Doxygen Source Code Documentation
eis_cdiv.c File Reference
#include "f2c.h"
Go to the source code of this file.
Functions | |
int | cdiv_ (doublereal *ar, doublereal *ai, doublereal *br, doublereal *bi, doublereal *cr, doublereal *ci) |
Function Documentation
|
Definition at line 8 of file eis_cdiv.c. References abs. Referenced by cinvit_(), comhes_(), comlr2_(), comlr_(), comqr2_(), comqr_(), hqr2_(), and invit_().
00010 { 00011 /* System generated locals */ 00012 doublereal d__1, d__2; 00013 00014 /* Local variables */ 00015 static doublereal s, ais, bis, ars, brs; 00016 00017 00018 /* COMPLEX DIVISION, (CR,CI) = (AR,AI)/(BR,BI) */ 00019 00020 s = abs(*br) + abs(*bi); 00021 ars = *ar / s; 00022 ais = *ai / s; 00023 brs = *br / s; 00024 bis = *bi / s; 00025 /* Computing 2nd power */ 00026 d__1 = brs; 00027 /* Computing 2nd power */ 00028 d__2 = bis; 00029 s = d__1 * d__1 + d__2 * d__2; 00030 *cr = (ars * brs + ais * bis) / s; 00031 *ci = (ais * brs - ars * bis) / s; 00032 return 0; 00033 } /* cdiv_ */ |