Method: CCMath.cosh
- Defined in:
- ext/ccmath/ccmath.c
.cosh(z) ⇒ Object
228 229 230 231 232 233 234 235 |
# File 'ext/ccmath/ccmath.c', line 228 static VALUE ccmath_cosh(VALUE obj, VALUE z) { EXTRACT_DBLS(z); if (z_real == 0.0) return DBLS2COMP(cos(z_imag), 0.0); if (z_imag == 0.0) return DBLS2COMP(cosh(z_real), 0.0); return DBLS2COMP(cosh(z_real) * cos(z_imag), sinh(z_real) * sin(z_imag)); } |