1
0
ミラー元 https://github.com/DanilaFe/abacus 前回の同期 2026-01-27 00:55:19 +00:00

Move OP_CARET back into place.

このコミットが含まれているのは:
2017-07-30 21:12:50 -07:00
コミット e7ad733c81

ファイルの表示

@@ -98,6 +98,17 @@ public class StandardPlugin extends Plugin {
}*/
}
});
public static final Operator OP_CARET = new Operator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 2, new Function() {
@Override
protected boolean matchesParams(NumberInterface[] params) {
return params.length == 2;
}
@Override
protected NumberInterface applyInternal(NumberInterface[] params) {
return FUNCTION_EXP.apply(FUNCTION_LN.apply(params[0]).multiply(params[1]));
}
});
public static final Function FUNCTION_ABS = new Function() {
@Override
protected boolean matchesParams(NumberInterface[] params) {
@@ -199,17 +210,6 @@ public class StandardPlugin extends Plugin {
return sum;
}
};
public static final Operator OP_CARET = new Operator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 2, new Function() {
@Override
protected boolean matchesParams(NumberInterface[] params) {
return params.length == 2;
}
@Override
protected NumberInterface applyInternal(NumberInterface[] params) {
return FUNCTION_EXP.apply(FUNCTION_LN.apply(params[0]).multiply(params[1]));
}
});
public static final Function FUNCTION_SQRT = new Function() {
@Override
protected boolean matchesParams(NumberInterface[] params) {