This is not a Jess problem.

Using reals for non-atomic monetary units (e.g., dollar, euro, pound) is a no-no. Absolutely. Don't do it.

You might turn to integers representing the subunit (e.g., cent or penny or whatever). Or use java.math.BigDecimal.

Kind regards
Wolfgang

Nara Hari wrote:

Hi,

We are calculating some pricing information based on Jess rules and some
times the results are little fuzzy!

e.g.
(- 1.1 0.9) ==> 0.20000000000000007
(- 1.1 0.7) ==> 0.40000000000000013

Any idea what the reason is or how can I fix it other than to round-off in
the application.

I have tested the issue with Jess versions 70p2 as well as 71b1

Thanks.

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to