Updates:
Status: Fixed
Comment #10 on issue 2950 by smi...@gmail.com: Rational() doesn't work with
floats
http://code.google.com/p/sympy/issues/detail?id=2950
Rational(float) gives the unprejudiced underlying binary fraction that
represents the float/Float.
--
You received this
Comment #9 on issue 2950 by smi...@gmail.com: Rational() doesn't work with
floats
http://code.google.com/p/sympy/issues/detail?id=2950
https://github.com/sympy/sympy/pull/1680
--
You received this message because you are subscribed to the Google Groups
sympy-issues group.
To post to this
Updates:
Labels: smichr NeedsReview
Comment #8 on issue 2950 by smi...@gmail.com: Rational() doesn't work with
floats
http://code.google.com/p/sympy/issues/detail?id=2950
https://github.com/sympy/sympy/pull/1679
--
You received this message because you are subscribed to the Google
Updates:
Status: Accepted
Comment #5 on issue 2950 by asmeu...@gmail.com: Rational() doesn't work
with floats
http://code.google.com/p/sympy/issues/detail?id=2950
Why would anyone want that? I think that it should either raise a
TypeError or return a rational number just like the
Comment #6 on issue 2950 by asmeu...@gmail.com: Rational() doesn't work
with floats
http://code.google.com/p/sympy/issues/detail?id=2950
This is not specific to float. It also does that for Float:
In [149]: Rational(Float('3.2'))
Out[149]: 3
--
You received this message because you are
Updates:
Status: WontFix
Comment #3 on issue 2950 by smi...@gmail.com: Rational() doesn't work with
floats
http://code.google.com/p/sympy/issues/detail?id=2950
Here's an example:
repr(.2)
'0.20001'
.2.as_integer_ratio()
(3602879701896397L, 18014398509481984L)
If
Comment #2 on issue 2950 by smi...@gmail.com: Rational() doesn't work with
floats
http://code.google.com/p/sympy/issues/detail?id=2950
I believe we discussed this and this is not the way to go: In the face of
ambiguity, refuse the temptation to guess. Rational doesn't have to guess
when
Status: New
Owner:
Labels: Type-Defect Priority-Medium
New issue 2950 by tlora...@gmail.com: Rational() doesn't work with floats
http://code.google.com/p/sympy/issues/detail?id=2950
Below is a session demonstrating the problems. Especially line 85 should
produce something more
Updates:
Status: Accepted
Labels: WrongResult
Comment #1 on issue 2950 by asmeu...@gmail.com: Rational() doesn't work
with floats
http://code.google.com/p/sympy/issues/detail?id=2950
So clearly normalizing the args to int is wrong. We should try to convert
floats to