On Sat, Dec 1, 2012 at 5:33 PM, Christophe BAL <[email protected]> wrote:

> Hello,
> from mathematical point of view, the floats are a kind of approximations.
> So if someone
> wants to have a rational form of one float, I think that it could be
> better that this user must
> convert first the float to one decimal and then to one rational. Not user
> friendly but more
> precise.
>
> I don't have one concrete example, but there are situations where the
> approximation of a/b
> will give one float, an then one decimal that when it is reconverted to
> one ration al p/q, this
> fraction verifies p/q <> a/b.
>
>
I'm not sure that I follow this, but for now I've not tried to guess and
just use the exact n/2**e fraction that underlies all floats. This is what
Decimal does (after Py 2.5) and they call it the "unprejudiced'
representation of floats.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to