Repository navigation
Modern Math CAcosh
Paul Squires edited this page Oct 19, 2026
·
5 revisions
Home › Math Library › Math Library › CAcosh
Returns the inverse hyperbolic cosine of a complex number, or of any real number.
CAcosh( byref z as Complex ) as Complex
CAcosh( byval x as float64 ) as Complex- 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+0rather than the-0the rotation would produce. - The
float64overload is AfxNova'sCArcCosHReal: the realacoshis undefined below 1 while the complex one is not.
#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 itLibrary: Math Library
Category: Math Library
Documented under: Members
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing