Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

eis_cdiv.c

Go to the documentation of this file.
00001 /* cdiv.f -- translated by f2c (version 19961017).
00002    You must link the resulting object file with the libraries:
00003         -lf2c -lm   (in that order)
00004 */
00005 
00006 #include "f2c.h"
00007 
00008 /* Subroutine */ int cdiv_(doublereal *ar, doublereal *ai, doublereal *br, 
00009         doublereal *bi, doublereal *cr, doublereal *ci)
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_ */
00034 
 

Powered by Plone

This site conforms to the following standards: