mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 07:20:09 -08:00
Eliminate warnings related to null returns that have been removed.
This commit is contained in:
parent
3057f66e66
commit
fbdf2c7e52
|
@ -332,7 +332,7 @@ public class StandardPlugin extends Plugin {
|
|||
//We'll use the series \sigma_{n >= 1) ((1/3^n + 1/4^n) * 1/n)
|
||||
//In the following, a=1/3^n, b=1/4^n, c = 1/n.
|
||||
//a is also an error bound.
|
||||
NumberInterface a = implementation.instanceForString("1"), b = a, c = a;
|
||||
NumberInterface a = implementation.instanceForString("1"), b = a, c;
|
||||
NumberInterface sum = implementation.instanceForString("0");
|
||||
NumberInterface one = implementation.instanceForString("1");
|
||||
int n = 0;
|
||||
|
@ -715,7 +715,7 @@ public class StandardPlugin extends Plugin {
|
|||
* @return the value of the series
|
||||
*/
|
||||
private static NumberInterface sinTaylor(MutableEvaluationContext context, NumberInterface x) {
|
||||
NumberInterface power = x, multiplier = x.multiply(x).negate(), currentTerm = x, sum = x;
|
||||
NumberInterface power = x, multiplier = x.multiply(x).negate(), currentTerm, sum = x;
|
||||
NumberInterface maxError = x.getMaxError();
|
||||
int n = 1;
|
||||
do {
|
||||
|
|
|
@ -17,7 +17,7 @@ class NumberReducer(val abacus: Abacus, context: EvaluationContext) : Reducer<Nu
|
|||
val promotionManager = abacus.promotionManager
|
||||
return when(treeNode){
|
||||
is NumberNode -> {
|
||||
context.inheritedNumberImplementation?.instanceForString(treeNode.number)
|
||||
context.inheritedNumberImplementation.instanceForString(treeNode.number)
|
||||
?: throw EvaluationException("no number implementation selected.")
|
||||
}
|
||||
is VariableNode -> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user