X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fcomplex%2Falgebraic%2Fcl_SF_hypot.cc;h=f6f896924001580208314b3e505eace8d7908886;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=d410beac0f6aac0cb6783efd1b8951ed81b744a8;hpb=850abfde7f0d985ba01526c346bcd0d733562943;p=cln.git diff --git a/src/complex/algebraic/cl_SF_hypot.cc b/src/complex/algebraic/cl_SF_hypot.cc index d410bea..f6f8969 100644 --- a/src/complex/algebraic/cl_SF_hypot.cc +++ b/src/complex/algebraic/cl_SF_hypot.cc @@ -1,20 +1,20 @@ // cl_hypot(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. -#include "cl_C.h" +#include "complex/cl_C.h" // Implementation. #include "cln/sfloat.h" -#include "cl_SF.h" +#include "float/sfloat/cl_SF.h" -#undef MAYBE_INLINE -#define MAYBE_INLINE inline -#include "cl_SF_minusp.cc" +/* For inline copy of minusp */ +#include "base/cl_inline.h" +#include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { @@ -23,10 +23,10 @@ const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b) // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). -// a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e +// a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). -// b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e +// b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. @@ -37,7 +37,7 @@ const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b) var uintL uexp = SF_uexp(a); if (uexp == 0) // a=0.0 -> liefere (abs b) : - return (minusp(b) ? -b : b); + return (minusp_inline(b) ? -b : b); a_exp = (sintL)(uexp - SF_exp_mid); } { @@ -45,7 +45,7 @@ const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b) var uintL uexp = SF_uexp(b); if (uexp == 0) // b=0.0 -> liefere (abs a) : - return (minusp(a) ? -a : a); + return (minusp_inline(a) ? -a : a); b_exp = (sintL)(uexp - SF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b).