w_cabs.c 267 B

12345678910111213141516
  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. libm_hidden_proto(hypot)
  10. double cabs(double _Complex z)
  11. {
  12. return hypot(__real__ z, __imag__ z);
  13. }