X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fcomplex%2Felem%2Fdivision%2Fcl_C_FF_recip.cc;h=e01c65a3327d7fbad7998e94cfccbd821af313cf;hb=8169a19b38c42588b39b21dae5bdb964e2f6b8c6;hp=0fe21cc10f2455baa29de8c8be8a1498565f377c;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/complex/elem/division/cl_C_FF_recip.cc b/src/complex/elem/division/cl_C_FF_recip.cc index 0fe21cc..e01c65a 100644 --- a/src/complex/elem/division/cl_C_FF_recip.cc +++ b/src/complex/elem/division/cl_C_FF_recip.cc @@ -1,26 +1,28 @@ // cl_C_recip(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. -#include "cl_C.h" +#include "complex/cl_C.h" // Implementation. -#include "cl_ffloat.h" -#include "cl_FF.h" +#include "cln/ffloat.h" +#include "float/ffloat/cl_FF.h" + +namespace cln { const cl_C_FF cl_C_recip (const cl_FF& a, const cl_FF& b) { // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // 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', @@ -53,3 +55,5 @@ const cl_C_FF cl_C_recip (const cl_FF& a, const cl_FF& b) // 2^(-e)*a'/c' + i * -2^(-e)*b'/c' return cl_C_FF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e)); } + +} // namespace cln