fabs.c 265 B

123456789101112131415
  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. * Author: Ceriel J.H. Jacobs
  6. */
  7. /* $Id$ */
  8. double
  9. fabs(x)
  10. double x;
  11. {
  12. return x < 0 ? -x : x;
  13. }