Meta Engineer?

This is available as Math\is_nan in the www repository.

Returns whether a num is NAN

namespace HH\Lib\Math;

function is_nan(
  num $num,
): bool;

NAN is "the not-a-number special float value"

When comparing NAN to any value (including NAN) using operators false will be returned. NAN === NAN is false.

One must always check for NAN using is_nan and not $x === NAN.


  • num $num


  • bool