commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject [math ]Re: Big Decimal support in Apache Math
Date Sat, 21 Dec 2013 08:20:21 GMT
Hi Avi,

[first of all, please add a [math] marker in the subject line when
posting questions here about this component. The list is shared among
all Apache Commons Components, and this marker help subscribers to
filter messages appropriately, thanks].

Le 20/12/2013 12:31, ABINASH MISRA a écrit :
> Could some one let me know support of Big Decimal support in Apache Math
> Library
> or any proposal for Bid Decimal support in next release.

The BigDecimal class is a standard class in the Java language and
supports only a subset of mathematical operations. As such, our support
is quite limited in [math]. We use it for example in the BigFraction
class for conversions, we wrap it in out own BigReal class in order to
implement a custom interface, and we also use it to compute some

For high accuracy computation, we prefer to use our Dfp class (Decimal
Floating Point) which can also be configured to support any desired
accuracy (even hundreds of singificant digits). In addition to the
classical operations BigDecimal supports (4 arithmetic operations plus a
few conversions and rounding), Dfp also supports all classical
mathematical operations like trigonometric functions, hyperbolic
functions, roots, power ... In fact, everything you would find in the
java.util.Math (or org.apache.commons.math3.util.FastMath) for primitive
double is also available in the Dfp class, and in all the classes that
implement org.apache.commons.math3.RealFieldElement.

Hope this helps,

> Thanks with Regards,
> Avi

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message