Do all the C libraries we are using now support math.h and fmax()? I would really rather not roll my own version of max().
The math.h include is of course universally supported. I don’t know the coverage of fmax() and fmin(), and I couldn’t find anything conclusive on a quick google search. I’ve often used macro versions, which are efficient so long as the arguments are complicated expressions.