Skip to content

Modern Math CAcosh

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

Home › Math Library › Math Library › CAcosh

CAcosh

Returns the inverse hyperbolic cosine of a complex number, or of any real number.

Syntax

CAcosh( byref z as Complex ) as Complex
CAcosh( byval x as float64 ) as Complex

Notes

  • Reached through the inverse trigonometric functions, so it inherits the Hull–Fairgrieve–Tang conditioning rather than carrying its own copy. acosh z = ±i·acos z, with the sign chosen to keep the real part non-negative, which is the principal branch.
  • Cut along (-∞, 1). Between -1 and 1 on the real axis the answer is purely imaginary, and that segment is answered directly so that the real part comes out +0 rather than the -0 the rotation would produce.
  • The float64 overload is AfxNova's CArcCosHReal: the real acosh is undefined below 1 while the complex one is not.

Examples

#import "std/numeric"
using numeric

print CToString( CAcosh( CSet( 2, 1 ) ) )      '' 1.4693517443681854+0.5073563032171445i
print CToString( CAcosh( 0.5 ) )               '' 0+1.0471975511965979i   -- purely imaginary, real part +0
print CToString( CAcosh( CSet( -2, 0.0 ) ) )   '' 1.3169578969248166+3.141592653589793i   -- above the cut
print CToString( CAcosh( CSet( -2, -0.0 ) ) )  '' 1.3169578969248166-3.141592653589793i   -- below it

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

Clone this wiki locally