Hello,
Since OCaml 4.00, there is the function hypot in the standard library. It is said to avoid undue overflow or underflow.
It could be used in Point.distance and Vector.magnitude. In my program, using hypot led me to different (and hopefully more precise) results.
Hello, Since OCaml 4.00, there is the function
hypot
in the standard library. It is said to avoid undue overflow or underflow. It could be used inPoint.distance
andVector.magnitude
. In my program, usinghypot
led me to different (and hopefully more precise) results.Best, Richard