MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / pythag2

Function pythag2

src/blas.cpp:338–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336
337
338double pythag2(double x, double y)
339{
340 double result;
341 double w;
342 double xabs;
343 double yabs;
344 double z;
345
346 xabs = fabs(x);
347 yabs = fabs(y);
348 w = ap::maxreal(xabs, yabs);
349 z = ap::minreal(xabs, yabs);
350 if( ap::fp_eq(z,0) )
351 {
352 result = w;
353 }
354 else
355 {
356 result = w*sqrt(1+ap::sqr(z/w));
357 }
358 return result;
359}
360
361
362void matrixmatrixmultiply(const ap::real_2d_array& a,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected