From C++, are min
and max
preferable over fmin
and fmax
? For comparing two integers, do they provide basically the same functionality?
Do you tend to use one of these sets of functions or do you prefer to write your own (perhaps to improve efficiency, portability, flexibility, etc.)?
Notes:
The C++ Standard Template Library (STL) declares the
min
andmax
functions in the standard C++ algorithm header.The C standard (C99) provides the
fmin
andfmax
function in the standard C math.h header.
Thanks in advance!