Browse Source

param: Fix divide by infinity.

Would throw an exception before, now we return NaN as for BigRational and other engines.
accumulation-v4.7
Joachim Klein 6 years ago
parent
commit
7d6b899ef4
  1. 3
      prism/src/param/JasFunction.java

3
prism/src/param/JasFunction.java

@ -182,6 +182,9 @@ final class JasFunction extends Function {
if (this.isNaN() || other.isNaN()) {
return factory.getNaN();
}
if (other.isInf() || other.isMInf()) {
return factory.getNaN();
}
if (other.isZero()) {
if (this.isConstant()) {
// evaluate constant to return either NaN, Inf or -Inf, using BigRational division

Loading…
Cancel
Save