1
0

abs 461 B

123456789101112131415161718192021222324252627282930313233
  1. .TH ABS 2
  2. .SH NAME
  3. abs, labs \- integer absolute values
  4. .SH SYNOPSIS
  5. .B #include <u.h>
  6. .br
  7. .B #include <libc.h>
  8. .PP
  9. .B
  10. int abs(int a)
  11. .PP
  12. .B
  13. long labs(long a)
  14. .SH DESCRIPTION
  15. .I Abs
  16. returns
  17. the absolute value of integer
  18. .IR a ,
  19. and
  20. .I labs
  21. does the same for a long.
  22. .SH SOURCE
  23. .B /sys/src/libc/port/abs.c
  24. .SH SEE ALSO
  25. .IR floor (2)
  26. for
  27. .I fabs
  28. .SH DIAGNOSTICS
  29. .I Abs
  30. and
  31. .I labs
  32. return
  33. the most negative integer or long when the true result is unrepresentable.