fmaximum3
Floating-point maximum and minimum functions
Usage
#include <math.h>
double
fmaximum(double x, double y);
float
fmaximumf(float x, float y);
long double
fmaximuml(long double x, long double y);
double
fminimum(double x, double y);
float
fminimumf(float x, float y);
long double
fminimuml(long double x, long double y);
Library
Math Library (libm, -lm)
Overview
The fmaximum(), fmaximumf(), and fmaximuml() functions return the larger of x and y, and likewise, the fminimum(), fminimumf(), and fminimuml() functions return the smaller of x and y. They treat +0.0 as being larger than -0.0.
Unlike the fmax(3) family of functions, which ignore an , if either argument to fmaximum() or fminimum() is an , then the result is an . These routines do not raise any floating-point exceptions.