Skip to content

Modern Math CIsZero

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

Home › Math Library › Math Library › CIsZero

CIsZero

Returns true if both parts of a complex number are zero.

Syntax

CIsZero( byref z as Complex ) as boolean

Notes

  • True for either sign of zero in either component — see CIsReal.
  • CReciprocal and CSgn both check this first, and both return zero rather than an infinity or a NaN when it holds.

Examples

#import "std/numeric"
using numeric

print CIsZero( CZero( ) )           '' true
print CIsZero( CSet( -0.0, 0.0 ) )  '' true
print CIsZero( CSet( 0, 1e-320 ) )  '' false

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

Clone this wiki locally