Skip to content Skip to sidebar Skip to footer
Showing posts with the label Floating Accuracy

Is There A Way To Return A Fully Reduced Ratio When Calling .as_integer_ratio()?

I noticed something strange when calling .as_integer_ratio() on some floats. for example: (2.2).as_… Read more Is There A Way To Return A Fully Reduced Ratio When Calling .as_integer_ratio()?

Python 2.7.5 Error Printing List Of Float Numbers

I was trying to answer a question from here (Substracion of two items from two lists). The original… Read more Python 2.7.5 Error Printing List Of Float Numbers

Why `0.4/2` Equals To `0.2` Meanwhile `0.6/3` Equals To `0.19999999999999998` In Python?

I know these are float point division. But why did these two formula behave differently? And I did … Read more Why `0.4/2` Equals To `0.2` Meanwhile `0.6/3` Equals To `0.19999999999999998` In Python?