Hello,

There is something wrong

sage: bool(RR(pi) == pi)
True
sage: bool(RR(golden_ratio) == golden_ratio)
True

which is fine to me. You coerce to the field with less precision. But

sage: bool(RR(sqrt(2)) == sqrt(2))
False
sage: sqrt(2).n() == RR(sqrt(2))
True
sage: RR(sqrt(2)) == CC(sqrt(2))
False

which is very wrong.

Vincent

2015-02-26 9:41 UTC+01:00, Ralf Stephan <gtrw...@gmail.com>:
> Hi,
>
> with current Sage,
> sage: bool(sqrt(2)==CC(sqrt(2)))
> False
>
> You would expect that this leads to
> sage: sqrt(2) in CC
> False
> but due to a bug I'm fixing atm in #12967 this returns True.
> However, now that it's fixed I'm faced with the question if
> answer to both really should be False. If one doctest in parent.py
> is right both should be True. But how could Sage see that equation
> holds if
> sage: CC(sqrt(2))
> 1.41421356237309
> sage: sqrt(2).n()
> 1.41421356237310
> so either there is a bug in SR+CC or the abovementioned doctest
> is wromg.
>
> What do you think?
>
> Regards,
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to