Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ieee 754

How To Create A Decimal.decimal Object With A Given Number Of Significant Figures?

The best way I've found to produce a decimal.Decimal number with a specific number of significa… Read more How To Create A Decimal.decimal Object With A Given Number Of Significant Figures?

Bogus Parsing/eval Of Complex Literals

When evaluating complex numbers, python likes to fiddle the signs. >>> -0j (-0-0j) >>… Read more Bogus Parsing/eval Of Complex Literals

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?

Floating Point Arithmetic Error

I'm using the following function to approximate the derivative of a function at a point: def pr… Read more Floating Point Arithmetic Error