/cln-1.3.2/src/real/transcendental/cl_R_coshsinh.cc
C++ | 34 lines | 18 code | 9 blank | 7 comment | 3 complexity | 9d0d0dcd5e6ec361d543cce66b30cd57 MD5 | raw file
Possible License(s): GPL-2.0
- // cosh_sinh().
- // General includes.
- #include "base/cl_sysdep.h"
- // Specification.
- #include "cln/real.h"
- // Implementation.
- #include "cln/float.h"
- #include "real/cl_R.h"
- namespace cln {
- const cosh_sinh_t cosh_sinh (const cl_R& x)
- {
- // Methode:
- // x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln.
- // x Float -> bekannt.
- if (rationalp(x)) {
- DeclareType(cl_RA,x);
- if (zerop(x)) // x=0 -> (1,0) als Ergebnis
- return cosh_sinh_t(1,0);
- return cosh_sinh(cl_float(x)); // sonst in Float umwandeln
- } else {
- DeclareType(cl_F,x);
- return cosh_sinh(x);
- }
- }
- } // namespace cln