You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After jitting (= after evaluating the constraint 20 times)
A constraint like this fails, where value is BigDecimal
Fact( value / 7B >= 0 )
org.drools.mvel.ConstraintEvaluationException: Error evaluating constraint 'value / 7B >= 0' in [Rule "Rule 1" in /tmp/reproducer_arithmeticexception_1c/target/classes/com/example/reproducer/Sample.drl]
at org.drools.mvel.MVELConstraint.evaluate(MVELConstraint.java:287)
at org.drools.mvel.MVELConstraint.isAllowed(MVELConstraint.java:235)
at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:145)
...
Caused by: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
at java.base/java.math.BigDecimal.divide(BigDecimal.java:1736)
at ConditionEvaluator05169571c7d846e3b0c6e6e4439e0ef9.evaluate(Unknown Source)
at org.drools.mvel.MVELConstraint.evaluate(MVELConstraint.java:285)
The text was updated successfully, but these errors were encountered:
Note: Mvel (= before jitting) and executable-model use bigDecimal1.divide(bigDecimal2, MathContext.DECIMAL128) for the calculation, so we should align with it.
drools-engine-classic
)A constraint like this fails, where
value
isBigDecimal
The text was updated successfully, but these errors were encountered: