Skip to content

Modern Math CAsec

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

Home › Math Library › Math Library › CAsec

CAsec

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

Syntax

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

Notes

  • CAcos( CReciprocal( z ) ), so it inherits the Hull–Fairgrieve–Tang conditioning.
  • The float64 overload is AfxNova's CArcSecReal: the real arcsecant is undefined inside (-1, 1) while the complex one is not.

Examples

#import "std/numeric"
using numeric

print CToString( CAsec( CSet( 2, 1 ) ) )  '' 1.1692099351270904+0.21561241855582966i
print CToString( CAsec( 0.5 ) )           '' 0-1.3169578969248166i   -- inside the real function's hole

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

Clone this wiki locally