Hi Vincent, On 2018-02-05, Vincent Delecroix <20100.delecr...@gmail.com> wrote: >> So, here is the example: >> sage: val = pi - 2286635172367940241408/1029347477390786609545*sqrt(2) >> sage: bool(val<0) >> False >> sage: bool(val>0) >> True > > > > [SNIP] > > >> So, is that a bug, after all? val being positive, RR(val) being >> negative? > > This is example is definitely a bug. In order to test > positivity/negativity of a real number you would better use interval > field to get provent result such as the following. With the default > precision of 53 bits it fails > > sage: r = 2286635172367940241408/1029347477390786609545 > > sage: R = RIF > sage: (R.pi() - r * R(2).sqrt()) > 0 > False > sage: (R.pi() - r * R(2).sqrt()) < 0 > False > > Note that in the above example R here is consistent with comparison: it > does not know and answers False everywhere.

As I said, it'd be OK to answer False in both cases. OK, since you confirm it is a bug, I should soonish open a ticket (although TB pointed me off-list (why?) to #19162, but I think #19162 is just a meta-ticket and thus shouldn't prevent to create a regular ticket). 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 sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.