Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Infinity vs. NaN in hypot #6321
Original bug ID: 6321
The ocaml runtime and Unix math runtime return different results for hypot(nan, infinity).
On Unix (Linux and OpenBSD), hypot(infinity, nan) returns infinity. The manual says this is as designed.
The ocaml runtime, when HAS_C99_FLOAT_OPS is not defined, returns nan.
I don't think this is important, but I thought I should point out the inconsistency.