More strange round behavior, this time with negative numbers.

In [1]: S(123.6).round(0)
Out[1]: 124.

In [2]: S(-123.6).round(0)
Out[2]: -123.

In [3]: S(-123.7).round(0)
Out[3]: -124.

The rounding up behavior seems to occur between 6 and 7.  This isn't a 
precision/binary representation issue as the break is occurring far away 
from the correct 5.  Standard python rounding get it right:

In [4]: round(123.6)
Out[4]: 124.0

In [5]: round(-123.6)
Out[5]: -124.0

Duane

On Saturday, September 6, 2014 1:42:33 PM UTC-5, Duane Nykamp wrote:
>
> Thanks for fixing this!
>
> On Wednesday, September 3, 2014 8:32:34 PM UTC-5, Chris Smith wrote:
>>
>> It should work now in the most recent build. Thanks for reporting the 
>> issue.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/cfb32996-6d26-4e58-aa29-da4befddd03f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to