iets3.opensource
iets3.opensource copied to clipboard
Numbers in scientific notation without number part shouldn't be allowed
The following expression can be entered: e-5 / 10 equals 1e-6
.
The number only has an exponent (e-5) which is allowed according to the constraints but doesn't work with the type system and interpreter:
java.lang.NumberFormatException: No digits found.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:588)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:467)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:896)
at org.iets3.core.expr.base.plugin.InfHelper.div(InfHelper.java:119)
We should probably disallow those numbers.