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_pythag.c File Reference

#include "f2c.h"

Go to the source code of this file.


Functions

doublereal pythag_ (doublereal *a, doublereal *b)

Function Documentation

doublereal pythag_ doublereal   a,
doublereal   b
 

Definition at line 8 of file eis_pythag.c.

References a, abs, max, min, and p.

Referenced by bandv_(), bqr_(), cinvit_(), comqr2_(), comqr_(), corth_(), csroot_(), htrid3_(), htridi_(), imtql1_(), imtql2_(), imtqlv_(), invit_(), minfit_(), svd_(), tinvit_(), tql1_(), tql2_(), tqlrat_(), and tsturm_().

00009 {
00010     /* System generated locals */
00011     doublereal ret_val, d__1, d__2, d__3;
00012 
00013     /* Local variables */
00014     static doublereal p, r__, s, t, u;
00015 
00016 
00017 /*     FINDS DSQRT(A**2+B**2) WITHOUT OVERFLOW OR DESTRUCTIVE UNDERFLOW */
00018 
00019 /* Computing MAX */
00020     d__1 = abs(*a), d__2 = abs(*b);
00021     p = max(d__1,d__2);
00022     if (p == 0.) {
00023         goto L20;
00024     }
00025 /* Computing MIN */
00026     d__2 = abs(*a), d__3 = abs(*b);
00027 /* Computing 2nd power */
00028     d__1 = min(d__2,d__3) / p;
00029     r__ = d__1 * d__1;
00030 L10:
00031     t = r__ + 4.;
00032     if (t == 4.) {
00033         goto L20;
00034     }
00035     s = r__ / t;
00036     u = s * 2. + 1.;
00037     p = u * p;
00038 /* Computing 2nd power */
00039     d__1 = s / u;
00040     r__ = d__1 * d__1 * r__;
00041     goto L10;
00042 L20:
00043     ret_val = p;
00044     return ret_val;
00045 } /* pythag_ */
 

Powered by Plone

This site conforms to the following standards: