On Thu, Mar 10, 2016 at 9:28 AM, Thierry
<[email protected]> wrote:
> On Thu, Mar 10, 2016 at 09:04:07AM -0800, William Stein wrote:
> [...]
>> 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
>
> Well iirc, the exponent is encoded in a fixed long, but fair enough.

You're right -- the exponent isn't arbitrary precision, but rather at
most the largest number in a long.  Thanks for pointing that out.
Still, with RDF, the maximum exponent is very small.

sage: RDF(10)^309
+infinity

> Those are not unusual situations, and integer determinants are now
> computed with flint.

I was just giving an example of how large exponents come up in practice.

You might consider that RDF was something we (me and Tom Boothby) only
added to Sage many years after RR, obviously motivated by the examples
you gave above.   Another concern that was an issue early on with RDF
versus RR, is that Paul Zimmerman is careful that operations and
functions have well defined consistent behavior across platforms when
using RR.  With RDF, in contrast, the results of operations can be
platform dependent.

>> > 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.
>
> I am not sure, does "being a free software alternative to" mean "repeat
> the same mistakes, but GPL" ?

Hindsight is 20/20.

-- William

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