X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Ftranscendental%2Fcl_F_roundpi2.cc;h=d692c5dcce645e1cc012ac035dd7f64c5f7426af;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=9503a779652eb8df94e36836132dcbda29c92c8a;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/float/transcendental/cl_F_roundpi2.cc b/src/float/transcendental/cl_F_roundpi2.cc index 9503a77..d692c5d 100644 --- a/src/float/transcendental/cl_F_roundpi2.cc +++ b/src/float/transcendental/cl_F_roundpi2.cc @@ -1,20 +1,24 @@ // cl_round_pi2(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. -#include "cl_F_tran.h" +#include "float/transcendental/cl_F_tran.h" // Implementation. +namespace cln { + const cl_F_div_t cl_round_pi2 (const cl_F& x) { if (float_exponent(x) < 0) - // Exponent <0 -> |x|<1/2 -> |x/(pi/2)| < 1/2, also Division unnötig + // Exponent <0 -> |x|<1/2 -> |x/(pi/2)| < 1/2, also Division unnötig return cl_F_div_t(0,x); // Quotient 0, Rest x else // x durch pi/2 (mit hinreichender Genauigkeit) dividieren - return round2(x,scale_float(cl_pi(x),-1)); + return round2(x,scale_float(pi(x),-1)); } + +} // namespace cln