diff options
Diffstat (limited to 'src/stdlib/labs.c')
| -rw-r--r-- | src/stdlib/labs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stdlib/labs.c b/src/stdlib/labs.c index fd092f5a..298c2e64 100644 --- a/src/stdlib/labs.c +++ b/src/stdlib/labs.c @@ -2,17 +2,19 @@ #include "limits.h" /** absolute value **/ + long int labs(long int j) { if (j == LONG_MIN) { /* undefined */ + return LONG_MIN; } return j < 0 ? -j : j; } /*** -function computes the absolute value of ARGUMENT(j). +computes the absolute value of ARGUMENT(j). ***/ /* |
