Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
_min(3) Guardian Native C Library Calls Reference Manual
NAME
_min - Expands the lesser of its two arguments
LIBRARY
None. This application program interface is implemented as a macro.
SYNOPSIS
#include <stdlib.h>
arith_type _min(
arith_type expr1,
arith_type expr2);
PARAMETERS
arith_type Specifies the type of expr1, expr2, and the return value. Any arithmetic type can
be specified, but all must be of the same type. This is an optional parameter.
expr1 Is an expression.
expr2 Is an expression of the same type as expr1.
DESCRIPTION
_min is a macro that expands to the lesser of its two arguments.
NOTES
Because _min is a macro, avoid specifying expressions with side effects as arguments.
EXAMPLES
This example prints "The minimum number is 5.000000.:
#include <stdlibh>
.
#include <stdioh>
.
int main(void)
{
double r, x, y;
x = 5.0;
y = 7.0;
r = _min(x, y);
printf("The minimum number is %f.", r);
}
RETURN VALUES
The _min() macro returns the numerically lesser of the two arguments, expr1 and expr2.
RELATED INFORMATION
Functions: _max(3).
4−54 Hewlett-Packard Company 527192-005