fpclassify function

int fpclassify(
  1. double x
)

Implementation

int fpclassify(double x) {
  if (x.isNaN) return FP_NAN;
  if (x.isInfinite) return FP_INFINITE;
  if (x == 0.0) return FP_ZERO;
  if (x.abs() < _DBL_MIN) return FP_SUBNORMAL;
  return FP_NORMAL;
}