Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
ee044fea
Commit
ee044fea
authored
Feb 28, 2019
by
Folkert Nobels
Browse files
IN random numbers Change pow(arg,.5f) to sqrt(arg)
parent
5bced612
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/testRandom.c
View file @
ee044fea
...
...
@@ -29,7 +29,7 @@
double
pearsonfunc
(
double
mean1
,
double
mean2
,
double
total12
,
double
var1
,
double
var2
,
int
counter
)
{
const
double
mean12
=
total12
/
(
double
)
counter
;
const
double
correlation
=
(
mean12
-
mean1
*
mean2
)
/
pow
(
var1
*
var2
,
.
5
f
);
const
double
correlation
=
(
mean12
-
mean1
*
mean2
)
/
sqrt
(
var1
*
var2
);
return
fabs
(
correlation
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment