mirror of
https://github.com/apache/commons-math.git
synced 2025-02-16 15:07:54 +00:00
Unnecessary casts - angbd is double, so ensures the rest of the calculation uses double
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1200350 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
710b276e47
commit
19ad2142b6
@ -2149,7 +2149,7 @@ public class BOBYQAOptimizer
|
||||
redsav = ZERO;
|
||||
iu = (int) (angbd * 17. + 3.1);
|
||||
for (int i = 0; i < iu; i++) {
|
||||
angt = angbd * (double) i / (double) iu;
|
||||
angt = angbd * i / iu;
|
||||
sth = (angt + angt) / (ONE + angt * angt);
|
||||
temp = shs + angt * (angt * dhd - dhs - dhs);
|
||||
rednew = sth * (angt * dredg - sredg - HALF * sth * temp);
|
||||
@ -2171,7 +2171,7 @@ public class BOBYQAOptimizer
|
||||
}
|
||||
if (isav < iu) {
|
||||
temp = (rdnext - rdprev) / (redmax + redmax - rdprev - rdnext);
|
||||
angt = angbd * ((double) isav + HALF * temp) / (double) iu;
|
||||
angt = angbd * (isav + HALF * temp) / iu;
|
||||
}
|
||||
cth = (ONE - angt * angt) / (ONE + angt * angt);
|
||||
sth = (angt + angt) / (ONE + angt * angt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user