[PATCH v3 6/7] i386: Move hypot implementation to C

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Nov 22 14:47:23 GMT 2021


Hi Adhemerval,

One more comment on this version:

+  long double lx = x;
+  long double ly = y;
+  double r = sqrtl (math_narrow_eval (lx * lx + ly * ly));
+  math_check_force_underflow_nonneg (r);
+  return r;

I think Joseph meant something like:

double r = math_narrow_eval ((double) sqrtl (lx * lx + ly * ly));

The narrow eval macro forces the result to memory to remove excess
precision but it only works if it has the narrower type already.

Cheers,
Wilco


More information about the Libc-alpha mailing list