Top "Bigdecimal" questions

BigDecimal is a numeric object type in Java that represents decimal numbers with arbitrary precision.

Why does Java BigDecimal return 1E+1?

Why does this code sometimes return 1E+1 whilst for other inputs (e.g. 17) the output is not printed in scientific …

java floating-point bigdecimal
Set all BigDecimal operations to a certain precision?

My Java program is centered around high precision calculations, which need to be accurate to at least 120 decimal places. Consequentially, …

java math rounding bigdecimal floating-accuracy
Determine if a String is a number and convert in Java?

I know variants of this question have been asked frequently before (see here and here for instance), but this is …

java numbers bigdecimal string-parsing
How to average BigDecimals using Streams?

I'm wanting to take the following method: public BigDecimal mean(List<BigDecimal> bigDecimals, RoundingMode roundingMode) { BigDecimal sum = BigDecimal.…

java collections java-8 bigdecimal java-stream
Why is BigDecimal.equals specified to compare both value and scale individually?

This is not a question about how to compare two BigDecimal objects - I know that you can use compareTo …

java bigdecimal
generating pi to nth digit java

I wanted to know how I can generate pi to the nth digit. I have a couple of basic ideas. …

java precision bigdecimal pi
"Non-terminating decimal expansion; no exact representable decimal result" happens even when divide by 100

My java code is running on HP-UX hpdev B.11.23 U ia64 and sometimes it will produce the following exception: java.…

java bigdecimal arithmeticexception
Java BigDecimal memory usage?

Is there a guideline for estimating the amount of memory consumed by a BigDecimal? Looking for something similar to these …

java memory memory-management bigdecimal
Deprecated constructor for BigDecimal.setScale(int, int) and RoundingMode enums

I'm trying to specify the precision of a BigDecimal value with the following: new BigDecimal(12.99).setScale(2, BigDecimal.ROUND_HALF_EVEN. …

java enums deprecated bigdecimal deprecation-warning
Is there a decimal math library for JavaScript?

Is there a mature library for doing decimal-based math, possibly arbitrary-precision, in JavaScript? Edit: I want this information for a …

javascript decimal bigdecimal