// sinh().
// General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
-#include "cl_F_tran.h"
-#include "cl_F.h"
-#include "cl_lfloat.h"
-#include "cl_LF.h"
+#include "float/transcendental/cl_F_tran.h"
+#include "float/cl_F.h"
+#include "cln/lfloat.h"
+#include "float/lfloat/cl_LF.h"
+
+namespace cln {
const cl_F sinh (const cl_F& x)
{
// Methode:
-// Genauigkeit erhöhen,
+// Genauigkeit erhöhen,
// e := Exponent aus (decode-float x)
// falls e<0: (sinh(x)/x)^2 errechnen, Wurzel ziehen, mit x multiplizieren.
// falls e>=0: y:=exp(x) errechnen, (scale-float (- y (/ y)) -1) bilden.
if (float_exponent(x) < 0) { // Exponent e abtesten
// e<0
- // Rechengenauigkeit erhöhen
+ // Rechengenauigkeit erhöhen
if (longfloatp(x)) {
DeclareType(cl_LF,x);
#if 0
} else
#endif
if ((TheLfloat(x)->len >= 500)
- && (float_exponent(x) > (-(sintL)float_digits(x))>>1)) {
+ && (float_exponent(x) > (-(sintC)float_digits(x))>>1)) {
// verwende exp(x), schneller als cl_coshsinh_ratseries
- // (aber nur bei 0 > e > -d/2, denn wir müssen, um
- // Auslöschung zu verhindern, |e| Bits dazunehmen)
- var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintL)(-float_exponent(x)),intDsize));
+ // (aber nur bei 0 > e > -d/2, denn wir müssen, um
+ // Auslöschung zu verhindern, |e| Bits dazunehmen)
+ var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintE)(-float_exponent(x)),intDsize));
var cl_F y = exp(xx);
var cl_F z = scale_float(y - recip(y), -1); // (/ (- y (/ y)) 2)
return cl_float(z,x);
// 1000 59 61
// 2500 297 247
// ==> ratseries faster for N >= 1300.
+
+} // namespace cln