-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
I'm currently working on using your excellent library for my EvalEx project.
While porting the acos() function, I came to some kind of rounding problems, I guess.
Given this code:
MathContext mathContext = new MathContext(68, RoundingMode.HALF_EVEN);
BigDecimal x = new BigDecimal("1", mathContext);
BigDecimal acos = BigDecimalMath.acos(x, mathContext);
System.out.println(acos.toPlainString());
it will not print 0 as expected, but it prints out 0.0000000000000000000000000000000000000000000000000000000000000000000000001
This only happens, when I use a scale >= 60 in the MathContext.
Is this a problem of big-math or BigDecimal?