absd.c 321 B

123456789101112131415161718
  1. /*
  2. (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /*
  6. Module: double abs function
  7. Author: Ceriel J.H. Jacobs
  8. Version: $Id$
  9. */
  10. #ifndef NOFLOAT
  11. double
  12. absd(i)
  13. double i;
  14. {
  15. return i >= 0 ? i : -i;
  16. }
  17. #endif