DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Square root and similar operations for BigDecimal - a BigDecimalMath class #1658

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Calculating roots isn't available for BigDecimal in the JDK, leading to many 
different thrown together solutions 
(http://stackoverflow.com/questions/13649703/square-root-of-bigdecimal-in-java),
 none of which are clearly correct or ideal.

It would be very helpful for Guava to include a BigDecimalMath class mirroring 
the appropriate behavior in BigIntegerMath, in order to provide tested and 
robust implementations of common mathematical operators.

I imagine this has not been implemented by the JDK or other major libraries due 
to the complexity of "getting it right", however in my mind that makes Guava 
the ideal candidate for providing this behavior - with whatever caveats are 
necessary - as a trusted source of quality utilities.

Original issue reported on code.google.com by dimo414 on 6 Feb 2014 at 2:53

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07