]> www.ginac.de Git - cln.git/blobdiff - src/float/transcendental/cl_F_cos.cc
Update known-to-work-with compilers.
[cln.git] / src / float / transcendental / cl_F_cos.cc
index 4c18531c019dac7364e8685d2df2045d1ca06271..c19ce46835547bf54bdcae02b2af2fec4f22bf59 100644 (file)
@@ -1,7 +1,7 @@
 // cos().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
 #include "cln/float.h"
@@ -9,19 +9,19 @@
 
 // Implementation.
 
-#include "cl_F_tran.h"
-#include "cl_F.h"
+#include "float/transcendental/cl_F_tran.h"
+#include "float/cl_F.h"
 #include "cln/integer.h"
 #include "cln/lfloat.h"
-#include "cl_LF.h"
+#include "float/lfloat/cl_LF.h"
 
 namespace cln {
 
 const cl_F cos (const cl_F& x)
 {
 // Methode:
-// Genauigkeit erhöhen,
-// (q,r) := (round x (float pi x)), so daß |r|<=pi/2.
+// Genauigkeit erhöhen,
+// (q,r) := (round x (float pi x)), so daß |r|<=pi/2.
 // e := Exponent aus (decode-float r), d := (float-digits r)
 // Bei r=0.0 oder e<=-d/2 liefere 1.0
 //   (denn bei e<=-d/2 ist r^2/2 < 2^(-d)/2 = 2^(-d-1), also
@@ -31,7 +31,7 @@ const cl_F cos (const cl_F& x)
 //   (sin(s)/s)^2 errechnen, cos(r) = 1-r*s*(sin(s)/s)^2 errechnen.
 // Falls q ungerade: Vorzeichenwechsel.
 
-       // Rechengenauigkeit erhöhen und durch pi dividieren:
+       // Rechengenauigkeit erhöhen und durch pi dividieren:
        var cl_F cos_r;
        if (longfloatp(x)) {
                DeclareType(cl_LF,x);
@@ -51,7 +51,7 @@ const cl_F cos (const cl_F& x)
                        var cl_F_div_t q_r = cl_round_pi(cl_F_extendsqrt(x));
                        var cl_I& q = q_r.quotient;
                        var cl_LF r = The(cl_LF)(q_r.remainder);
-                       if (zerop(r) || (float_exponent(r) <= (-(sintL)float_digits(r))>>1))
+                       if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1))
                                cos_r = cl_float(1,x); // (cos r) = 1.0
                        else {
                                var cl_LF s = scale_float(r,-1); // s := r/2
@@ -66,7 +66,7 @@ const cl_F cos (const cl_F& x)
                var cl_F_div_t q_r = cl_round_pi(cl_F_extendsqrt(x));
                var cl_I& q = q_r.quotient;
                var cl_F& r = q_r.remainder;
-               if (zerop(r) || (float_exponent(r) <= (-(sintL)float_digits(r))>>1))
+               if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1))
                        cos_r = cl_float(1,x); // (cos r) = 1.0
                else {
                        var cl_F s = scale_float(r,-1); // s := r/2