Guardian C Library Calls Reference Manual
_min (supplementary)
3-122 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
_min (supplementary)
The _min macro expands to the lesser of its two arguments.
<arith_type>
is the type of expr1, expr2, and the return value. It can be any arithmetic type.
expr1
is an expression.
expr2
is an expression of the same type as expr1.
Return Value
is the numerically lesser of the two arguments, expr1 and expr2.
Example
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);
}
#include <stdlibh>
<arith_type> _min(<arith_type> expr1, <arith_type> expr2);