Opened 7 years ago

Last modified 5 years ago

#18697 new defect

any FP number in an Expression without symbol should trigger evaluation

Reported by: Ralf Stephan Owned by:
Priority: major Milestone: sage-6.8
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #10035 Stopgaps:

Status badges

Description (last modified by Ralf Stephan)

sage: 0.1 * cos(pi/13)
0.100000000000000*cos(1/13*pi)

This is annoying because the 0.1 at once limits the precision of any other non-symbolic expression.

https://github.com/pynac/pynac/issues/71

Change History (7)

comment:1 Changed 7 years ago by Ralf Stephan

Report Upstream: N/AReported upstream. Developers acknowledge bug.

comment:2 Changed 7 years ago by Ralf Stephan

Dependencies: #10035

People will complain if they cannot change this behaviour, so we need a hold context.

comment:3 Changed 7 years ago by Ralf Stephan

Description: modified (diff)

comment:4 Changed 7 years ago by Ralf Stephan

Report Upstream: Reported upstream. Developers acknowledge bug.Fixed upstream, but not in a stable release.

comment:5 Changed 7 years ago by Ralf Stephan

Description: modified (diff)
Report Upstream: Fixed upstream, but not in a stable release.N/A

Partial "fix" of Sage code removed, it was actually an unrelated Pynac issue, which is fixed in 0.4.2.

comment:6 Changed 5 years ago by Ralf Stephan

The problem with this ticket is shown by

    sage: pi + RBF(1)

The expected output would be [4.141592653589793 +/- 5.61e-16], i.e. the same as with RBF(pi) + RBF(1). Constant conversions thus need to take the right parent into account. There may be multiple incompatible parents and that fact may be hidden deep in the expression tree.

Last edited 5 years ago by Ralf Stephan (previous) (diff)

comment:7 in reply to:  6 Changed 5 years ago by Ralf Stephan

Replying to rws:

There may be multiple incompatible parents and that fact may be hidden deep in the expression tree.

This is not a problem because we are evaluating depth-first. The only problem at all seems de-facto limited precision constants, in spite of #18255. Also this might be in the way: https://github.com/pynac/pynac/issues/311

Note: See TracTickets for help on using tickets.