On 2018-02-04, Simon King <simon.k...@uni-jena.de> wrote: > On 2018-02-04, Thierry <sage-googlesu...@lma.metelu.net> wrote: >> On Sun, Feb 04, 2018 at 10:24:55PM +0000, Simon King wrote: >> What is wrong ? > > val is a NEGATIVE real number converted into SR. val evaluates POSITIVE, > even though the conversion of val into RR still evaluates negative.
Ouch, sorry, when I posted I was apparently editing stuff in a wrong way. So, here is the example: sage: val = pi - 2286635172367940241408/1029347477390786609545*sqrt(2) sage: bool(val<0) False sage: bool(val>0) True Hence, val evaluates positive. However, it represents a negative real number: sage: RR(val) -4.44089209850063e-16 Sorry, in my original post I was starting from that number and got a couple of things wrong. Note that evaluating val to higher precision still gives a negative number, although a clearly different one: sage: RR(RealField(2000)(val)) -5.68242325601396e-24 Going to even higher precision doesn't change things. So, is that a bug, after all? val being positive, RR(val) being negative? Cheers, Simon -- 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 email@example.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.