Merge pull request #2304 from aschackmull/java/rangeanalysis-integral-fix

Java: Fix range analysis bug in integral inequality bounds.
This commit is contained in:
yh-semmle
2019-11-12 16:33:12 -05:00
committed by GitHub
2 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
public class C {
double m1(double x) {
return (x < 0 || x > 1 || Double.isNaN(x)) ? Double.NaN :
x == 0 ? 0 : x == 1 ? 1 : 0.5;
}
}