Open GoogleCodeExporter opened 9 years ago
round() would destroy the fraction and turn all results into either 1 or 0, no?
Better use something like `min(1.0, fraction)` to cap the fraction.
Original comment by rodrigo....@gmail.com
on 6 Aug 2014 at 9:43
You can also use round(x, n) to get n-digits of floating point precision. Using
round(x, 12) would be another way to fix this assuming you only need 12
significant digits.
Original comment by chris.fl...@gmail.com
on 6 Aug 2014 at 10:27
I don't think pyeuclid should set an arbitrary rounding precision: that's up
for the user. The error is better handled by clamping fractions the [-1, 1]
range prior to using trigonometric functions like acos. What do you think chris?
Original comment by rodrigo....@gmail.com
on 6 Sep 2014 at 6:56
Original issue reported on code.google.com by
quasipe...@gmail.com
on 27 Sep 2011 at 9:30