News for hackers. Stuff that matters.
Re:Math.min(Math.max(num, min), max) by noctune on Thursday August 20, 2020 @05:12PM (#24229045)
> Both min and max should return NaN, if any of their parameters is NaN.

That's not a given, though. IEEE 754-2008 defined min and max as returning the non-NaN parameter. They have been removed in IEEE 754-2019 though.

Re:Math.min(Math.max(num, min), max) by xxs on Thursday August 20, 2020 @05:31PM (#24229256)
The reference to IEEE 754 is made later on, mostly to answer the question posted. I meant regular functions in C alike languages - Math.min/max - java/javascript, fmin/fmax - C++. They do the "right" thing to propagate the NaN