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