fmaxl3
Floating-point maximum and minimum functions
Part of fmax(3).
Usage
double
float
long double
double
float
long double
Library
Math Library (libm, -lm)
Overview
The fmax(), fmaxf(), and fmaxl() functions return the larger of x and y, and likewise, the fmin(), fminf(), and fminl() functions return the smaller of x and y. If one argument is an , then the other argument is returned. If both arguments are s, then the result is an . These routines do not raise any floating-point exceptions.
Caveats
The library implementations of these functions treat +0.0 as being larger than -0.0. This behavior is not specified by the C standard, is not portable, and may not occur in light of compiler optimizations. Applications requiring specific handling of signed zeroes or values are recommended to use fmaximum_num(3) and fminimum_num(3) instead, which have strictly defined behavior for these cases.
History
- FreeBSD 16.0-CURRENT (2026-10-27): the text shown here
- FreeBSD 15.1-RELEASE
- FreeBSD 15.0-RELEASE
- FreeBSD 14.5-RELEASE
- FreeBSD 14.4-RELEASE to FreeBSD 13.3-RELEASE
- FreeBSD 13.2-RELEASE to FreeBSD 13.0-RELEASE
- FreeBSD 12.4-RELEASE
- FreeBSD 12.3-RELEASE
- FreeBSD 12.2-RELEASE
- FreeBSD 12.1-RELEASE
- FreeBSD 12.0-RELEASE
- FreeBSD 11.4-RELEASE
- FreeBSD 11.3-RELEASE
- FreeBSD 11.2-RELEASE
- FreeBSD 11.1-RELEASE
- FreeBSD 11.0-RELEASE
- FreeBSD 10.4-RELEASE
- FreeBSD 10.3-RELEASE
- FreeBSD 10.2-RELEASE
- FreeBSD 10.1-RELEASE
- FreeBSD 10.0-RELEASE
- FreeBSD 9.3-RELEASE
- FreeBSD 9.2-RELEASE
- FreeBSD 9.1-RELEASE
- FreeBSD 9.0-RELEASE
- FreeBSD 8.4-RELEASE
- FreeBSD 8.3-RELEASE
- FreeBSD 8.2-RELEASE
- FreeBSD 8.1-RELEASE
- FreeBSD 8.0-RELEASE
- FreeBSD 7.4-RELEASE
- FreeBSD 7.3-RELEASE
- FreeBSD 7.2-RELEASE
- FreeBSD 7.1-RELEASE
- FreeBSD 7.0-RELEASE
- FreeBSD 6.4-RELEASE
- FreeBSD 6.3-RELEASE to FreeBSD 6.0-RELEASE
- FreeBSD 5.5-RELEASE to FreeBSD 5.4-RELEASE
- FreeBSD 5.3-RELEASE