python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Kotlin sum of Double or BigDecimal return unexpected result
I'm trying to get the total amount of double values but it returns unexpected results. Check the following screenshot:
Link for the code
Code:
import java.math.BigDecimal
/**
* You can edit, run, an...

Ibrahim Disouki
Votes: 0
Answers: 2
Handling the "BigDecimal(double) should not be used" bug reported by SonarQube
SonarQube reports any occurrence of the BigDecimal(double) constructor as a bug. The description of this rule refers to the note #1 in the JavaDoc that says "The results of this constructor can ...

Pino
Votes: 0
Answers: 0
Kotlin Big Decimal division returning inaccurate results
I am building a calculator with Kotlin and android studio (my first project). All equations were working properly until recent tweaks with decimal format. Now large division operations returns inaccur...

jPark197
Votes: 0
Answers: 1
Kotlin BigDecimal rounding to decimal point based on how large number is
I am building a simple calculator in Kotlin (first project) that uses BigDecimal precision. I have found with the current program that inputting 9% x 3% for example (0.09 x 0.03) will output 0.0026999...

jPark197
Votes: 0
Answers: 0