jkeri Posted November 28, 2018 Share Posted November 28, 2018 I need to create a java expression as follows.all my $V variables are java.math.BigDecimal: BASE, AVG, VAR If BASE / 0 gives a DIVIDE BY ZERO or NAN error then RESULT = 0 ELSE RESULT = (AVG - VAR)/VAR Link to comment Share on other sites More sharing options...
dszeto Posted November 30, 2018 Share Posted November 30, 2018 How about in your dividend check whether that subtraction is > 0 and if not, set the dividend to 0. Once that is done then you can do an <expression> ? 0 : <result>. I am not sure how you would check if the result of the division is NULL unless you are checking whether the variables themselves are NULL. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now