labs
raw OCR
Gives long absolute value.
Defined in header <math.h>
Syntax
#include <math.h>
long int labs(long int x);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ | ■ |
Remarks
labs computes the absolute value of the paran^eter x.
Return value
labs returns the absolute value of x.
See also
Example
#include <stdio.h>
#include <math.h>
int main(void)
{
long result;
long X = -12345678L;
result= labs (x);
printf("number: lid abs value: %ld\n", x, result);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/math.h/labs/
· short form /3.1/labs/