On Wed, Mar 21, 2012 at 7:39 PM, kcrisman <kcris...@gmail.com> wrote:
>
>
> On Mar 21, 10:00 pm, Gonzalo Tornaria <torna...@math.utexas.edu>
> wrote:
>> In sage 4.8:
>>
>> sage: NaN - NaN
>> sage: 0
>> sage: NaN + NaN
>> 2*NaN
>> sage: NaN * NaN
>> NaN^2
>
> Naturally!  Since NaN is a symbolic expression, apparently:
>
> sage: type(NaN)
> <type 'sage.symbolic.expression.Expression'>
>
> See  sage/symbolic/constants.py, e.g.
> http://hg.sagemath.org/sage-main/file/c239be1054e0/sage/symbolic/constants.py#l665
> Based on the code in that file, I think that means this is the Pynac
> NaN.

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).

- Robert

-- 
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