mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-23 16:00:09 -08:00
Fix scaling for optimization in FUNCTION_LN, in the positive direction towards unity (i.e., when the argument passed to ln is small).
This commit is contained in:
parent
ecc5f6d2bd
commit
f5fa890c4f
|
@ -222,7 +222,7 @@ public class StandardPlugin extends Plugin {
|
||||||
} else {
|
} else {
|
||||||
param = param.multiply(new NaiveNumber(2).promoteTo(param.getClass()));
|
param = param.multiply(new NaiveNumber(2).promoteTo(param.getClass()));
|
||||||
powersOf2--;
|
powersOf2--;
|
||||||
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != 1) {
|
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != -1) {
|
||||||
break;
|
break;
|
||||||
//No infinite loop for you.
|
//No infinite loop for you.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user