w_cabs.c 241 B

1234567891011121314
  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. #include <complex.h>
  8. #include <math.h>
  9. double cabs(double _Complex z)
  10. {
  11. return hypot(__real__ z, __imag__ z);
  12. }