X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Ftranscendental%2Fcl_F_cosh.cc;h=620a0f46b356c68a111896468cfffece300df74a;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=3bab20181cf642ec56e27582b7ac6bfcdfa2863c;hpb=850abfde7f0d985ba01526c346bcd0d733562943;p=cln.git diff --git a/src/float/transcendental/cl_F_cosh.cc b/src/float/transcendental/cl_F_cosh.cc index 3bab201..620a0f4 100644 --- a/src/float/transcendental/cl_F_cosh.cc +++ b/src/float/transcendental/cl_F_cosh.cc @@ -1,7 +1,7 @@ // cosh(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. #include "cln/float.h" @@ -9,17 +9,17 @@ // Implementation. -#include "cl_F_tran.h" -#include "cl_F.h" +#include "float/transcendental/cl_F_tran.h" +#include "float/cl_F.h" #include "cln/lfloat.h" -#include "cl_LF.h" +#include "float/lfloat/cl_LF.h" namespace cln { const cl_F cosh (const cl_F& x) { // Methode: -// Genauigkeit erhöhen, +// Genauigkeit erhöhen, // e := Exponent aus (decode-float x), d := (float-digits x) // falls x=0.0 oder e<=(1-d)/2 liefere 1.0 // (denn bei e<=(1-d)/2 ist 1 <= cosh(x) = 1+x^2/2+... < 1+2^(-d), @@ -29,22 +29,22 @@ const cl_F cosh (const cl_F& x) // cosh(x) = 1+x*y*(sinh(y)/y)^2 errechnen. // falls e>=0: y:=exp(x) errechnen, (scale-float (+ y (/ y)) -1) bilden. - var sintL e = float_exponent(x); + var sintE e = float_exponent(x); if (e < 0) { // Exponent e abtesten // e<0 if (zerop(x)) return cl_float(1,x); - var uintL d = float_digits(x); - if (e <= (1-(sintL)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? + var uintC d = float_digits(x); + if (e <= (1-(sintC)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? return cl_float(1,x); // ja -> 1.0 als Ergebnis - // Rechengenauigkeit erhöhen + // Rechengenauigkeit erhöhen if (longfloatp(x)) { DeclareType(cl_LF,x); #if 0 if (TheLfloat(x)->len >= infty) { var cl_LF xx = extend(x,TheLfloat(x)->len+1); var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx); - return cln/float.hyp.cosh,x); + return cl_float(hyp.cosh,x); } else #endif if (TheLfloat(x)->len >= 600) {