#12257: 1.0*pi should *not* be pi
-------------------------+-------------------------------------------------
Reporter: was | Owner: burcin
Type: | Status: needs_review
defect | Milestone: sage-6.7
Priority: minor | Resolution:
Component: | Merged in:
calculus | Reviewers:
Keywords: pynac | Work issues:
Authors: Ralf | Commit:
Stephan | 31afae4c1e4e823322795150c65dfce27df18828
Report Upstream: N/A | Stopgaps:
Branch: |
u/rws/12257 |
Dependencies: |
#18088, #18362 |
-------------------------+-------------------------------------------------
Changes (by rws):
* status: needs_work => needs_review
Comment:
Replying to [comment:20 rws]:
> Replying to [comment:19 kcrisman]:
> > {{{
> > sage: sin(1.0*pi)
> > sin(1.00000000000000*pi)
> > }}}
> > which is perhaps also not ideal, if we wanted `0.00000000000` as in
the original intent
>
> I don't think you can expect `0.00000000000` but rather
`1.22464679914735e-16` which is what you get with `sin(1.0*pi).n()`. I
think it's Sage convention (?) that any FP value in an expression should
have the effect of automatically applying `N()` to it.
No, I thought wrong, because I cannot find any function that expands an
argument containing a FP number and a constant automatically (contrary to
FP only). And I really agree it's wrong because the constant's precision
is immediately limited as soon as the FP comes into it. But this is
clearly another ticket and the introduced behaviour of `sin(1.0*pi)` with
this ticket is exactly in line with all other functions and arguments at
the moment.
--
Ticket URL: <http://trac.sagemath.org/ticket/12257#comment:22>
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.