#18697: any FP number in an Expression without symbol should trigger evaluation
-----------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.8
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #10035 | Stopgaps:
-----------------------------+------------------------
Changes (by rws):
* upstream: Fixed upstream, but not in a stable release. => N/A
Old description:
> {{{
> 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)
> }}}
New description:
{{{
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
--
Comment:
Partial "fix" of Sage code removed, it was actually an unrelated Pynac
issue, which is fixed in 0.4.2.
--
Ticket URL: <http://trac.sagemath.org/ticket/18697#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.