fmax function

double fmax(
  1. double x,
  2. double y
)

Implementation

double fmax(double x, double y) {
  if (x.isNaN) return y;
  if (y.isNaN) return x;
  return x > y ? x : y;
}