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. However, with RR instead of RDF by default, you lose all the benefit of libraries that rely on double floating point numbers from the CPU (e.g. atlas, scipy,...), which are faster and which implement serious stable numerical algorithms: sage: M = random_matrix(RDF,100) sage: %time M^100 Wall time: 11.1 ms sage: M = M.change_ring(RR) sage: %time M^100 Wall time: 9.28 s sage: M = random_matrix(RDF,10) sage: M.left_eigenvectors() [(-2.0607... sage: M = M.change_ring(RR) sage: M.left_eigenvectors() NotImplementedError: eigenspaces cannot be computed reliably for inexact rings such as Real Field with 53 bits of precision, consult numerical or symbolic matrix classes for other options Those are not unusual situations, and integer determinants are now computed with flint. > > 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" ? I am not sure how does Matlab represent elliptic curves over GF(2) by default, though. Ciao, Thierry > ~$ 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. -- 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.
