+ 1

1.25%0.5

It is a float operation. It will give reminder. As the no. Are perfectly divisible how a reminder of 0.25 is written. I don't understand this.

13th Apr 2020, 4:28 AM
Medit Mercy
Medit Mercy - avatar
2 Antworten
13th Apr 2020, 4:51 AM
Ayush Kumar
Ayush Kumar - avatar
+ 2
0.5 * 2 = 1.0 and 0.5 * 3 = 1.5 So the numbers are not perfectly divisible, and the remainder after 0.5 is multiplied by 2 is 0.25
13th Apr 2020, 4:52 AM
XXX
XXX - avatar