[Tutor] Fraction - differing interpretations for number and string - presentation

Jim Mooney cybervigilante at gmail.com
Thu Apr 16 19:24:47 CEST 2015


>
> Is this "inaccurate"? Well, in the sense that it is not the exact true
> mathematical result, yes it is, but that term can be misleading if you
> think of it as "a mistake". In another sense, it's not inaccurate, it is
> as accurate as possible (given the limitation of only having a certain
> fixed number of bits).
> --
> Steve
>

---
Understood about the quondam inexactness of floating point bit
representation. I was just wondering why the different implementation of
representing it when using Fraction(float) as opposed to using
Fraction(string(float)).  In terms of user presentation, the string usage
has smaller numbers for the ratio, so it would be more understandable and
should, I assume, be chosen for GUI display.
-- 
Jim

The Paleo diet causes Albinism


More information about the Tutor mailing list