—
NAME
fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers
LIBRARY
Math library (libm, -lm)
SYNOPSIS
bash
#include <math.h>bash
double fmax(double \nx\n, double \ny\n);\n
\nfloat fmaxf(float \nx\n, float \ny\n);\n
\nlong double fmaxl(long double \nx\n, long double \ny\n);fmax(), fmaxf(), fmaxl():
bash
\n
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112LDESCRIPTION
These functions return the larger value of x and y.
RETURN VALUE
These functions return the maximum of x and y.
If one argument is a NaN, the other argument is returned.
If both arguments are NaN, a NaN is returned.
ERRORS
No errors occur.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| fmax (), fmaxf (), fmaxl () | Thread safety | MT-Safe |
STANDARDS
C11, POSIX.1-2008.
HISTORY
glibc 2.1. C99, POSIX.1-2001.
SEE ALSO
fdim(3), fmin(3)