fmin(), fminf(), fminl() — Calculate the minimum numeric value

Standards

Standards / Extensions C or C++ Dependencies
C99
Single UNIX Specification, Version 3
C++ TR1 C99
both
z/OS® V1R7

Format

#define _ISOC99_SOURCE
#include <math.h>

double fmin(double x, double y);
float fminf(float x, float y);
long double fminl(long double x, long double y);
C++ TR1 C99:
#define _TR1_C99
#include <math.h>

float fmin(float x, float y); 
long double fmin(long double x, long double y);

General description

The fmin() family of functions determine the minimum numeric value of their arguments. NaN arguments are treated as missing data. If one argument is a NaN and the other numeric, then the numeric value will be chosen.
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
fmin X X
fminf X X
fminl X X
Restriction: The fminf() function does not support the _FP_MODE_VARIABLE feature test macro.

Returned value

If successful, they return the minimum numeric value of their arguments.

Related information