proteus
1.9.0
C/C++/Fortran libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
work
cekees
proteus
proteus
fenton
Dpythag.cpp
Go to the documentation of this file.
1
#include <math.h>
2
static
double
dsqrarg;
3
#define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)
4
5
double
dpythag
(
double
a,
double
b)
6
{
7
double
absa,absb;
8
absa=fabs(a);
9
absb=fabs(b);
10
if
(absa > absb)
return
absa*sqrt(1.0+
DSQR
(absb/absa));
11
else
return
(absb == 0.0 ? 0.0 : absb*sqrt(1.0+
DSQR
(absa/absb)));
12
}
13
dpythag
double dpythag(double a, double b)
Definition
Dpythag.cpp:5
DSQR
#define DSQR(a)
Definition
Dpythag.cpp:3
Generated on
for proteus by
1.18.0