Applying a numeric function (at least subtraction, possibly others) to numbers large enough to overflow an int will fail. The following code should output 10.0 but actually outputs 0.0.
import ca.uqac.lif.cep.util.Numbers;
import ca.uqac.lif.cep.functions.Function;
public class TestDiff {
public static void main(String[] args) {
Function negation = Numbers.subtraction;
Object[] out = new Object[1];
negation.evaluate(new Object[]{1590785415514L, 1590785415504L}, out);
System.out.println("The return value of the function is: " + out[0]);
}
}
Applying a numeric function (at least subtraction, possibly others) to numbers large enough to overflow an int will fail. The following code should output 10.0 but actually outputs 0.0.