Opened 22 months ago

Last modified 7 days ago

#31597 new defect

Pynac is buggy inside a hold context

Reported by: gh-DaveWitteMorris Owned by:
Priority: critical Milestone:
Component: symbolics Keywords: pynac, hold
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The ginac documentation says "GiNaC performs some automatic transformations on expressions, to simplify them and put them into a canonical form. ... This behavior is usually referred to as automatic or anonymous evaluation. ... The general rule is that when you construct expressions, GiNaC automatically creates them in canonical form, ... All GiNaC methods that transform expressions, like subs() or normal(), automatically re-evaluate their results."

It seems that some (many?) pynac methods assume that their inputs have been sanitized in this way. Since applying a hold context disables this automatic evaluation, these methods may silently produce incorrect results inside a hold context. Examples of this can be seen in #31554.

Change History (5)

comment:1 Changed 18 months ago by mkoeppe

Milestone: sage-9.4sage-9.5

comment:2 Changed 14 months ago by mkoeppe

Milestone: sage-9.5sage-9.6

comment:3 Changed 9 months ago by mkoeppe

Milestone: sage-9.6sage-9.7

comment:4 Changed 5 months ago by mkoeppe

Milestone: sage-9.7sage-9.8

comment:5 Changed 7 days ago by mkoeppe

Milestone: sage-9.8
Note: See TracTickets for help on using tickets.