On 2014-08-21, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> Currently in Sage, we have
>
> sage: RR(2/3)
> 0.666666666666667
> sage: float(2/3)
> 0.6666666666666666
> sage: RDF(2/3)
> 0.666666666667
>
> It's annoying that all these 3 are exactly the same thing (53-bit 
> precision floats with the same bit pattern), but all 3 have a different 
> __repr__. I noticed this in a doctest failure #16858 (a float was 
> expected, but an RDF element was returned). The easy thing to do would 
> be to just fix those doctests.
>
> However, I would actually like to make the __repr__ of RDF consistent 
> with the __repr__ of Python floats (except maybe NaN and infinity 
> values, which are currently special-cased anyway). The change itself is 
> quite easy, but it obviously gives massive amounts of doctest failures. 
> I personally don't mind fixing those, but I wanted to ask for opinions 
> here, since that change will have a significant impact.
>
> Everything I said about RDF also applies to CDF, I would change that also.
>
> Opinions?

I think it's a great idea, and will reduce the confusion level quite a bit; 
what precision will you choose as the right one?
float() ?


> Jeroen.
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to