Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/lapack/double/dladiv.c

raw symbols SCIP
1 /* lapack/double/dladiv.f -- translated by f2c (version 20050501).
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
10 http://www.netlib.org/f2c/libf2c.zip
11 */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/
17
18 /*< SUBROUTINE DLADIV( A, B, C, D, P, Q ) >*/
19 /* Subroutine */ int dladiv_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:69:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *a, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *b, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *c__,
20 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *d__, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *p, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *q)
21 {
22 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! e, f;
23
24
25 /* -- LAPACK auxiliary routine (version 3.0) -- */
26 /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */
27 /* Courant Institute, Argonne National Lab, and Rice University */
28 /* October 31, 1992 */
29
30 /* .. Scalar Arguments .. */
31 /*< DOUBLE PRECISION A, B, C, D, P, Q >*/
32 /* .. */
33
34 /* Purpose */
35 /* ======= */
36
37 /* DLADIV performs complex division in real arithmetic */
38
39 /* a + i*b */
40 /* p + i*q = --------- */
41 /* c + i*d */
42
43 /* The algorithm is due to Robert L. Smith and can be found */
44 /* in D. Knuth, The art of Computer Programming, Vol.2, p.195 */
45
46 /* Arguments */
47 /* ========= */
48
49 /* A (input) DOUBLE PRECISION */
50 /* B (input) DOUBLE PRECISION */
51 /* C (input) DOUBLE PRECISION */
52 /* D (input) DOUBLE PRECISION */
53 /* The scalars a, b, c, and d in the above expression. */
54
55 /* P (output) DOUBLE PRECISION */
56 /* Q (output) DOUBLE PRECISION */
57 /* The scalars p and q in the above expression. */
58
59 /* ===================================================================== */
60
61 /* .. Local Scalars .. */
62 /*< DOUBLE PRECISION E, F >*/
63 /* .. */
64 /* .. Intrinsic Functions .. */
65 /*< INTRINSIC ABS >*/
66 /* .. */
67 /* .. Executable Statements .. */
68
69 /*< IF( ABS( D ).LT.ABS( C ) ) THEN >*/
70 if (abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(*d__) < abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(*c__)) {
71 /*< E = D / C >*/
72 e = *d__ / *c__;
73 /*< F = C + D*E >*/
74 f = *c__ + *d__ * e;
75 /*< P = ( A+B*E ) / F >*/
76 *p = (*a + *b * e) / f;
77 /*< Q = ( B-A*E ) / F >*/
78 *q = (*b - *a * e) / f;
79 /*< ELSE >*/
80 } else {
81 /*< E = C / D >*/
82 e = *c__ / *d__;
83 /*< F = D + C*E >*/
84 f = *d__ + *c__ * e;
85 /*< P = ( B+A*E ) / F >*/
86 *p = (*b + *a * e) / f;
87 /*< Q = ( -A+B*E ) / F >*/
88 *q = (-(*a) + *b * e) / f;
89 /*< END IF >*/
90 }
91
92 /*< RETURN >*/
93 return 0;
94
95 /* End of DLADIV */
96
97 /*< END >*/
98 } /* dladiv_ */
99
100 #ifdef __cplusplus
101 }
102 #endif