Opened 7 years ago

Last modified 4 years ago

#18697 new defect

any FP number in an Expression without symbol should trigger evaluation — at Version 3

Reported by: rws 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 rws)

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

The Pynac issue will need this fix(!) to work:

diff --git a/src/sage/symbolic/pynac.pyx b/src/sage/symbolic/pynac.pyx
--- a/src/sage/symbolic/pynac.pyx
+++ b/src/sage/symbolic/pynac.pyx
@@ -2036,10 +2041,10 @@ cdef public GConstant py_get_constant(const_char_ptr name) except +:
         pc = c._pynac
         return pc.object
 
-cdef public object py_eval_constant(unsigned serial, object kwds) except +:
+cdef public object py_eval_constant(unsigned serial, object parent) except +:
     from sage.symbolic.constants import constants_table
     constant = constants_table[serial]
-    return kwds['parent'](constant)
+    return parent(constant)

Change History (3)

comment:1 Changed 7 years ago by rws

  • Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.

comment:2 Changed 7 years ago by rws

  • Dependencies set to #10035

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

comment:3 Changed 7 years ago by rws

  • Description modified (diff)
Note: See TracTickets for help on using tickets.