Reference

fmaximum_num(3)

floating-point maximum and minimum number functions

NAME

fmaximum_num, fmaximum_numf, fmaximum_numl, fminimum_num, fminimum_numf, fminimum_numl – floating-point maximum and minimum number functions

LIBRARY

Math Library (libm, -lm)

SYNOPSIS

#include <math.h>

double

fmaximum_num(double x, double y);

float

fmaximum_numf(float x, float y);

long double

fmaximum_numl(long double x, long double y);

double

fminimum_num(double x, double y);

float

fminimum_numf(float x, float y);

long double

fminimum_numl(long double x, long double y);

DESCRIPTION

The fmaximum_num(), fmaximum_numf(), and fmaximum_numl() functions determine the larger of x and y, preferring a numeric value over an . If one argument is a numeric value and the other is an , the numeric value is returned. If both arguments are numeric, the larger value is returned. If both arguments are s, a quiet is returned. For the purpose of these functions, positive zero is considered greater than negative zero.

Likewise, the fminimum_num(), fminimum_numf(), and fminimum_numl() functions determine the smaller of x and y, preferring a numeric value over an . If one argument is a numeric value and the other is an , the numeric value is returned. If both arguments are numeric, the smaller value is returned. If both arguments are s, a quiet is returned. For the purpose of these functions, negative zero is considered less than positive zero.

Unlike with the fmaximum(3) and fmaximum_mag(3) families of functions, if either argument is a signaling , an invalid exception is raised. Otherwise, these routines do not raise any floating-point exceptions.

SEE ALSO

fmax(3), fmaximum(3), fmaximum_mag(3), math(3)

STANDARDS

The fmaximum_num(), fmaximum_numf(), fmaximum_numl(), fminimum_num(), fminimum_numf(), and fminimum_numl() functions conform to ISO/IEC 9899:2024 (“ISO C23”).

HISTORY

These routines first appeared in FreeBSD 16.0.