scabs1.c 962 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* scabs1.f -- translated by f2c (version 20061008).
  2. You must link the resulting object file with libf2c:
  3. on Microsoft Windows system, link with libf2c.lib;
  4. on Linux or Unix systems, link with .../path/to/libf2c.a -lm
  5. or, if you install libf2c.a in a standard place, with -lf2c -lm
  6. -- in that order, at the end of the command line, as in
  7. cc *.o -lf2c -lm
  8. Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
  9. http://www.netlib.org/f2c/libf2c.zip
  10. */
  11. #include "f2c.h"
  12. #include "blaswrap.h"
  13. doublereal scabs1_(complex *z__)
  14. {
  15. /* System generated locals */
  16. real ret_val, r__1, r__2;
  17. /* Builtin functions */
  18. double r_imag(complex *);
  19. /* .. Scalar Arguments .. */
  20. /* .. */
  21. /* Purpose */
  22. /* ======= */
  23. /* SCABS1 computes absolute value of a complex number */
  24. /* .. Intrinsic Functions .. */
  25. /* .. */
  26. ret_val = (r__1 = z__->r, dabs(r__1)) + (r__2 = r_imag(z__), dabs(r__2));
  27. return ret_val;
  28. } /* scabs1_ */