On 09/12/2010 06:41 PM, mda_ wrote:
> sage: float(e^(-pi/2))
> 0.20787957635076193
> 
> The last digit should be 1, since
> i^i = 0.20787957635076190854........

You could try, e.g.,

sage: (e^(-pi/2)).numerical_approx(100)
0.20787957635076190854695561983
sage: (i^i).numerical_approx(100)
0.20787957635076190854695561983

or

sage: (e^(-pi/2)).n(100)
0.20787957635076190854695561983
sage: (i^i).n(100)
0.20787957635076190854695561983

> sage does not recognize this identity:
> 
> sage: e^(-pi/2) == i^i
> e^(-1/2*pi) == I^I
> 
> ("True" expected as output.)

This appears to work:

sage: bool(e^(-pi/2) == i^i)
True

> What's the best way to ask sage for floating point approximations; for
> fixed types and unlimited precision types?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to