Thanks Henri.

My understanding of MathContext is it allows you to specify the significant
digits.
Here is a related thread --
http://stackoverflow.com/questions/2529526/bigdecimal-division-mathcontext-very-strange-behaviour

So if that understanding is correct, providing a comparison MathContext will
not solve the problem. Probably, a comparison scale, rounding mode,
would help.

Also curious to know about the issue that I mentioned in the equals method
in JexlArithmetic.

Thanks again.



On Thu, May 12, 2011 at 10:54 PM, henrib <hen...@apache.org> wrote:

> Howdy,
> I'll be looking into it momentarily. I'm not sure I completely see the pb
> with scaling wrt comparison since it seems a precision issue to me (set a
> precision of 2 in your case); may be a comparison MathContext would be more
> appropriate?
> If a solution is urgent, you can always subclass JexlArithmetic in your own
> project and/or additionally submit a patch.
> Cheers
>
> --
> View this message in context:
> http://apache-commons.680414.n4.nabble.com/Jexl-Problem-using-BigDecimal-divide-and-compare-tp3510724p3519378.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


-- 
~Naren

Reply via email to