On Thu, Mar 22, 2012 at 4:14 PM, Robert Bradshaw <rober...@math.washington.edu> wrote: > ... > This is horrendous. Better to not have this "constant" (at least not > in the global namespace) than behavior like this. The top level NaN, > if we want one, could be in RR (precision doesn't really matter for > this value).
Agreed, that's my point. Working on a completely unrelated project, I was hit by a different and unrelated bug regarding NaN: sage: RR(NaN) < float(1e-10) True Also, I point out that the usual definition of NaN includes the fact that "NaN == NaN" should be false. Sage doesn't behave consistently: sage: float(NaN) == float(NaN) False sage: RR(NaN) == RR(NaN) True sage: NaN == NaN NaN == NaN sage: bool(_) True (this property is handy to test whether a value is nan) Gonzalo -- 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