OxL Reference

method f64.isNaN

Whether the value is not a number (the result of 0.0 / 0.0).

Example:

oxl✓ checked in CI
fn main() io {
  let zero: f64 = 0.0
  let nan = zero / zero
  print("{nan.isNaN()} {(1.5 as f64).isNaN()}")
}
Output
true false
pub(api) fn isNaN() -> bool

Complexity. O(1).

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/numbers.oxl:4119

See also