Returns the value of the smaller argument.
Include
<math.h>
Prototype
double fmin(double x, double y);
Argument
x
y
Return Value
Returns the value of the smaller argument.
Example
#include <math.h>
#include <stdio.h>
int main(void)
{
double x, y, z;
x = -5.7;
y = 2.0;
z = fmin(x, y);
printf("The smaller of %f and %f is %f\n", x, y, z);
}
Example Output
The larger of -5.700000 and 2.000000 is -5.700000