Top "Bigdecimal" questions

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

Java:Why should we use BigDecimal instead of Double in the real world?

When dealing with real world monetary values, I am advised to use BigDecimal instead of Double.But I have not …

java floating-point double bigdecimal
Convert int to BigDecimal with decimal - Java

I'm having a hard time figuring out how to convert this. Here is what I want: int i = 5900; BigDecimal bD = …

java type-conversion bigdecimal
Java BigDecimal remove decimal and trailing numbers

I'm new to Java and trying to take a BigDecimal (for example 99999999.99) and convert it to a string but without …

java decimal bigdecimal
BigDecimal.ZERO vs. new BigDecimal(0). Which to use and why?

I was wondering if these two are the same. Can anyone verify? (I am trying to replace the 1st with …

java bigdecimal
What causes "Non-terminating decimal expansion" exception from BigDecimal.divide?

I've used BigDecimals before but not very often and I was working on something this morning and I kept getting …

java exception bigdecimal
Removing trailing zeros from BigDecimal in Java

I need to remove trailing zeros from BigDecimal along with RoundingMode.HALF_UP. For instance, Value Output 15.3456 <=> 15.35 15.999 <=&…

java bigdecimal
What is the equivalent of the Java BigDecimal class in C#?

BigDecimal is a class in the java.math package that has a lot of benefits for handling big numbers of …

c# java bigdecimal equivalent
Which rounding mode to be used for currency manipulation in java?

I have read on java site to use BigDecimal for currencies. http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.…

java bigdecimal
How to truncate a BigDecimal without rounding

After a series of calculations in my code, I have a BigDecimal with value 0.01954 I then need to multiply this …

java rounding bigdecimal arithmeticexception
Square root of BigDecimal in Java

Can we compute the square root of a BigDecimal in Java by using only the Java API and not a …

java bigdecimal square-root