···262262 OCaml.
263263 (Damien Doligez, review by Stephen Dolan)
264264265265+- #10786: The implementation of Complex.norm now uses Float.hypot.
266266+ (Christophe Troestler, review by David Allsopp and Xavier Leroy)
267267+265268### Other libraries:
266269267270- #10192: Add support for Unix domain sockets on Windows and use them
···48484949let norm2 x = x.re *. x.re +. x.im *. x.im
50505151-let norm x =
5252- (* Watch out for overflow in computing re^2 + im^2 *)
5353- let r = abs_float x.re and i = abs_float x.im in
5454- if r = 0.0 then i
5555- else if i = 0.0 then r
5656- else if r >= i then
5757- let q = i /. r in r *. sqrt(1.0 +. q *. q)
5858- else
5959- let q = r /. i in i *. sqrt(1.0 +. q *. q)
5151+let norm x = Float.hypot x.re x.im
60526153let arg x = atan2 x.im x.re
6254