blob: fd092f5a4433abd316ece93fe6bbd4ba61e00920 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdlib.h>
#include "limits.h"
/** absolute value **/
long int labs(long int j)
{
if (j == LONG_MIN) {
/* undefined */
}
return j < 0 ? -j : j;
}
/***
function computes the absolute value of ARGUMENT(j).
***/
/*
UNDEFINED(ABS(ARGUMENT(j)) cannot be represented)
RETURN_SUCCESS(ABS(ARGUMENT(j)))
STDC(1)
*/
|