Numbers are treated as a BigDecimal as opposed to a double in our assertion which causes results in scientific notation.
If a decimal is required the toString() method can be called to retain a certain level of precision.
For Example:
Given the expression 163066.42 * 100 will result in 1
.6306642000000002E7
context.setVariable("receiveAmountDecimal", receiveAmountDecimal.toString());
After executing toString() will produce this decimal value.
16306642.000000002
If precision is not an issue and you wish to disregard the fractional part or return only a fixed number of digits in the fractional part you can use
context.setVariable("receiveAmountDecimal", receiveAmountDecimal.toFixed(x));
Where
x will be the number of digits to retain to the right of the decimal. If no precision is needed simply set this to 0.