+ 3

0.1+0.2 = 0.3 ? what happen ?

i try 0.1 + 0.2 but answer is 0.30000000000000004

8th May 2017, 11:01 AM
Thiwanon Chomcharoen
Thiwanon Chomcharoen - avatar
5 Réponses
+ 1
That's why you should use BigDecimal instead float or double when you work with currency.
8th May 2017, 11:08 AM
SzabĂł GĂĄbor
SzabĂł GĂĄbor - avatar
+ 1
The first tag is Java 😊
8th May 2017, 11:42 AM
SzabĂł GĂĄbor
SzabĂł GĂĄbor - avatar
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes