Skip to content

Modern Math CSinh

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Math Library › Math Library › CSinh

CSinh

Returns the hyperbolic sine of a complex number.

Syntax

CSinh( byref z as Complex ) as Complex

Notes

  • sinh(re)·cos(im) + i·cosh(re)·sin(im), written out on libm's Sinh and Cosh from math.tiko.
  • Not routed through CSin, although sinh z = -i·sin( iz ) is exact: the rotation arrives with the signed zeros negated on the real axis, and the sign of a zero is what decides a branch cut.
  • CCosh² - CSinh² = 1 holds to within rounding for every operand.
  • Spelled with the C prefix because, when this library was a header in namespace FB, a function of the unprefixed name shadowed the intrinsic for every later header — measured, it broke what is now random.tiko — after which the intrinsic could not be called back. The name stayed when the header became std/numeric.

Examples

#import "std/numeric"
using numeric

dim as Complex z = CSet( 3, 4 )

print CToString( CSinh( CZero( ) ) )  '' 0+0i   -- exactly zero
print CToString( CSinh( z ) )         '' -6.5481200409110025-7.61923172032141i
print CToString( CSinh( -z ) )        '' 6.5481200409110025+7.61923172032141i   -- odd

Library: Math Library
Category: Math Library
Documented under: Members

Clone this wiki locally