]> www.ginac.de Git - cln.git/blob - src/real/transcendental/cl_R_coshsinh.cc
fc341def9772f9e3ee1426112006ecc00be427b6
[cln.git] / src / real / transcendental / cl_R_coshsinh.cc
1 // cl_cosh_sinh().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_real.h"
8
9
10 // Implementation.
11
12 #include "cl_float.h"
13 #include "cl_R.h"
14
15 const cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)
16 {
17 // Methode:
18 // x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln.
19 // x Float -> bekannt.
20
21         if (rationalp(x)) {
22                 DeclareType(cl_RA,x);
23                 if (zerop(x)) // x=0 -> (1,0) als Ergebnis
24                         return cl_cosh_sinh_t(1,0);
25                 return cl_cosh_sinh(cl_float(x)); // sonst in Float umwandeln
26         } else {
27                 DeclareType(cl_F,x);
28                 return cl_cosh_sinh(x);
29         }
30 }