Browse Source

Catch some divide-by-zero errors in JasFunction.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9385 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 11 years ago
parent
commit
c99655eda9
  1. 10
      prism/src/param/JasFunction.java

10
prism/src/param/JasFunction.java

@ -182,6 +182,16 @@ final class JasFunction extends Function {
if (this.isNaN() || other.isNaN()) {
return factory.getNaN();
}
if (other.isZero()) {
if (this.isZero()) {
return factory.getNaN();
} else {
return factory.getInf();
}
}
if (this.isZero()) {
return factory.getZero();
}
return new JasFunction((JasFunctionFactory) factory, jas.divide(((JasFunction) other).jas), NORMAL);
}

Loading…
Cancel
Save