On Thu, Mar 10, 2016 at 7:41 AM, Thierry
<[email protected]> wrote:
> On Thu, Mar 10, 2016 at 08:17:43AM +0100, Jeroen Demeyer wrote:
>> On 2016-03-09 23:56, Thierry wrote:
>> >Willing to
>> >change the behaviour will be similar to requesting that 'NaN in RR' should
>> >return False.
>> Not the topic of this thread, but I really think that "NaN in RR" should
>> return False. RR represents the real numbers and NaN is *not a number*.
>
> RR does *not* correspond to the real numbers, at least not in the way that
> NN, ZZ, QQ, AA, QQbar do. RR is just a MPFR representation of numbers,
> among various other representations, such as RDF, RIF, RBF,...  The
> particular RR name is ill-chosen, but RR is nothing but a slower
> implementation of RDF, whose second letter clearly insist on the

RR (=RealField(53)) is absolutely not "nothing but a slower
implementation of RDF".  With RR you get arbitrary precision
exponents, whereas with RDF you do not. This is an important
distinction for some computations, which I've personally run into in
practice (e.g., when implementing Sage's determinant algorithm for
integer matrices):

sage: RDF(1e99999)
+infinity
sage: RR(1e99999)
1.00000000000000e99999


> representation (an information that is missing for RR). The benefit of
> MPFR over CPU-floats is when we use more than 53 bits of precision. The
> focus on MPFR among other representations is imho a mistake.
>
> See http://trac.sagemath.org/ticket/17713#comment:3

I called it "RealField" for consistency with Magma, which has
precisely the same model.  Consistency with Magma is valuable.

~$ magma
Magma V2.18-5     Thu Mar 10 2016 17:02:10 on compute5-us [Seed = 112326797]
Type ? for help.  Type <Ctrl>-D to quit.
> RealField();
Real field of precision 30
> RealField(200);
Real field of precision 200

-- 
William (http://wstein.org)

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to