You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Luc Maisonobe <lu...@spaceroots.org> on 2013/12/21 09:20:21 UTC

[math ]Re: Big Decimal support in Apache Math

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
coefficients.

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,
Luc


> 
> 
> Thanks with Regards,
> Avi
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org