00001 /* cladiv.f -- translated by f2c (version 20061008). 00002 You must link the resulting object file with libf2c: 00003 on Microsoft Windows system, link with libf2c.lib; 00004 on Linux or Unix systems, link with .../path/to/libf2c.a -lm 00005 or, if you install libf2c.a in a standard place, with -lf2c -lm 00006 -- in that order, at the end of the command line, as in 00007 cc *.o -lf2c -lm 00008 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., 00009 00010 http://www.netlib.org/f2c/libf2c.zip 00011 */ 00012 00013 #include "f2c.h" 00014 #include "blaswrap.h" 00015 00016 /* Complex */ VOID cladiv_(complex * ret_val, complex *x, complex *y) 00017 { 00018 /* System generated locals */ 00019 real r__1, r__2, r__3, r__4; 00020 complex q__1; 00021 00022 /* Builtin functions */ 00023 double r_imag(complex *); 00024 00025 /* Local variables */ 00026 real zi, zr; 00027 extern /* Subroutine */ int sladiv_(real *, real *, real *, real *, real * 00028 , real *); 00029 00030 00031 /* -- LAPACK auxiliary routine (version 3.2) -- */ 00032 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ 00033 /* November 2006 */ 00034 00035 /* .. Scalar Arguments .. */ 00036 /* .. */ 00037 00038 /* Purpose */ 00039 /* ======= */ 00040 00041 /* CLADIV := X / Y, where X and Y are complex. The computation of X / Y */ 00042 /* will not overflow on an intermediary step unless the results */ 00043 /* overflows. */ 00044 00045 /* Arguments */ 00046 /* ========= */ 00047 00048 /* X (input) COMPLEX */ 00049 /* Y (input) COMPLEX */ 00050 /* The complex scalars X and Y. */ 00051 00052 /* ===================================================================== */ 00053 00054 /* .. Local Scalars .. */ 00055 /* .. */ 00056 /* .. External Subroutines .. */ 00057 /* .. */ 00058 /* .. Intrinsic Functions .. */ 00059 /* .. */ 00060 /* .. Executable Statements .. */ 00061 00062 r__1 = x->r; 00063 r__2 = r_imag(x); 00064 r__3 = y->r; 00065 r__4 = r_imag(y); 00066 sladiv_(&r__1, &r__2, &r__3, &r__4, &zr, &zi); 00067 q__1.r = zr, q__1.i = zi; 00068 ret_val->r = q__1.r, ret_val->i = q__1.i; 00069 00070 return ; 00071 00072 /* End of CLADIV */ 00073 00074 } /* cladiv_ */