HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)

f
fmax(3M) fmax(3M)
NAME
fmax() - maximum value function
SYNOPSIS
#include <math.h>
double fmax(double x, double y);
DESCRIPTION
The fmax() function determines the maximum numeric value of its arguments.
The ISO/ANSI C committee has approved the
fmax() function for inclusion in the C9X draft standard.
To use this function, compile either with the default
-Ae option or with the -Aa and -D_HPUX_SOURCE
options. Make sure your program includes <
math.h>. Link in the math library by specifying -lm on the
compiler or linker command line.
RETURN VALUE
The
fmax() function returns the maximum numeric value of its arguments.
If one argument is a NaN and the other is numeric, fmax() returns the numeric argument.
If both arguments are NaNs, fmax() returns one of the arguments.
ERRORS
No errors are defined.
SEE ALSO
fdim(3M), fmin(3M), math(5).
Section 3270 Hewlett-Packard Company 1 HP-UX 11i Version 1: September 2005