Skip to content

Modern Math CIsInfinite

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

Home › Math Library › Math Library › CIsInfinite

CIsInfinite

Returns true if either part of a complex number is infinite.

Syntax

CIsInfinite( byref z as Complex ) as boolean

Notes

  • Either component. A complex number with one infinite part is infinite whatever the other part is — including when the other part is NaN.
  • That is why CAbs of such a number is Infinity( ) rather than NaN: the infinity already determines the modulus.

Examples

#import "std/numeric"
using numeric

print CIsInfinite( CInfinity( ) )                 '' true
print CIsInfinite( CSet( NegInfinity( ), 1.0 ) )  '' true
print CIsInfinite( CSet( Infinity( ), NaN( ) ) )  '' true   -- infinite, not NaN

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

Clone this wiki locally