w_cabsl.c 429 B

1234567891011121314151617181920
  1. /*
  2. * cabs() wrapper for hypot().
  3. *
  4. * Written by J.T. Conklin, <jtc@wimsey.com>
  5. * Placed into the Public Domain, 1994.
  6. *
  7. * Modified by Steven G. Kargl for the long double type.
  8. */
  9. #include "cdefs-compat.h"
  10. //__FBSDID("$FreeBSD: src/lib/msun/src/w_cabsl.c,v 1.1 2008/03/30 20:02:03 das Exp $");
  11. #include <complex.h>
  12. #include <openlibm.h>
  13. long double
  14. cabsl(long double complex z)
  15. {
  16. return hypotl(creall(z), cimagl(z));
  17. }