Top "Bigdecimal" questions

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

adding 2 BigDecimal values

class Point { BigDecimal x; BigDecimal y; Point(double px, double py) { x = new BigDecimal(px); y = new BigDecimal(py); } void …

java bigdecimal
java math library for BigDecimal which allows null values

Is there a BigDecimal library with the basic operations of BigDecimal which allows null values? Null should be treated as 0 …

java bigdecimal
How to get biggest BigDecimal value

How can I get the largest possible value of a BigDecimal variable can hold? (Preferably programmatically, but hardcoding would be …

java math bigdecimal
cast Long to BigDecimal

How can I cast Long to BigDecimal?

java bigdecimal
How to display a number with always 2 decimal points using BigDecimal?

I am using BigDecimal to get some price values. Requirement is something like this, what ever the value we fetch …

java precision bigdecimal decimal-point
How do I convert a string number value with a dollar sign to BigDecimal in java?

I have a dollar amount in a String format. For example: String salePrice = $348.00. However, I want to convert this String …

java string bigdecimal
BigDecimal, precision and scale

I'm using BigDecimal for my numbers in my application, for example, with JPA. I did a bit of researching about …

java jpa scale precision bigdecimal
Rounding necessary with BigDecimal numbers

I want to set scale of two BigDecimal numbers a and b . as in this example : BigDecimal a = new BigDecimal("2.6…

java rounding bigdecimal
What variable type can I use to hold huge numbers (30+ digits) in java?

Is there a really large variable type I can use in Java to store huge numbers (up to around forty …

java biginteger bigdecimal