[PATCH v4 11/12] math: Use fmin/fmax on hypot

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Dec 6 11:44:23 GMT 2021


Hi Adhemerval,

@@ -95,8 +96,8 @@ __ieee754_hypot (double x, double y)
   x = fabs (x);
   y = fabs (y);
 
-  double ax = x < y ? y : x;
-  double ay = x < y ? x : y;
+  double ax = USE_FMAX_BUILTIN ? fmax (x, y) : (x < y ? y : x);
+  double ay = USE_FMIN_BUILTIN ? fmin (x, y) : (x < y ? x : y);
 
Looks good.

Cheers,
Wilco


More information about the Libc-alpha mailing list