projects
/
htsworkflow.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added script front-end for primer-design code
[htsworkflow.git]
/
htswanalysis
/
MACS
/
lib
/
gsl
/
gsl-1.11
/
cblas
/
hypot.c
1
#include <math.h>
2
3
static double xhypot (const double x, const double y);
4
5
static double xhypot (const double x, const double y)
6
{
7
double xabs = fabs(x) ;
8
double yabs = fabs(y) ;
9
double min, max;
10
11
if (xabs < yabs) {
12
min = xabs ;
13
max = yabs ;
14
} else {
15
min = yabs ;
16
max = xabs ;
17
}
18
19
if (min == 0)
20
{
21
return max ;
22
}
23
24
{
25
double u = min / max ;
26
return max * sqrt (1 + u * u) ;
27
}
28
}