w_cabs.c 263 B

123456789101112131415
  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)