NAME
fmaximum_mag, fmaximum_magf, fmaximum_magl, fminimum_mag, fminimum_magf, fminimum_magl – floating-point maximum and minimum magnitude functions
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
fmaximum_mag(double x, double y);
float
fmaximum_magf(float x, float y);
long double
fmaximum_magl(long double x, long double y);
double
fminimum_mag(double x, double y);
float
fminimum_magf(float x, float y);
long double
fminimum_magl(long double x, long double y);
DESCRIPTION
The fmaximum_mag(), fmaximum_magf(), and fmaximum_magl() functions determine the larger of the absolute values of x and y, and return the argument with the larger absolute value. If the absolute values are equal, the behavior is equivalent to calling the corresponding fmaximum() function on the arguments.
Likewise, the fminimum_mag(), fminimum_magf(), and fminimum_magl() functions determine the smaller of the absolute values of x and y, and return the argument with the smaller absolute value. If the absolute values are equal, the behavior is equivalent to calling the corresponding fminimum() function on the arguments.
If either argument is an , then the result is an . These routines do not raise any floating-point exceptions.
SEE ALSO
STANDARDS
The fmaximum_mag(), fmaximum_magf(), fmaximum_magl(), fminimum_mag(), fminimum_magf(), and fminimum_magl() functions conform to ISO/IEC 9899:2024 (“ISO C23”).
HISTORY
These routines first appeared in FreeBSD 16.0.