• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

Can anybody please explain me why the result of 2.05 - 0.05 isn't 2?

https://code.sololearn.com/c31mxWyEkjK6/?ref=app

javaoutputcode
27th Jul 2017, 3:51 PM
Jnny
3 Answers
+ 11
Please refer: https://stackoverflow.com/questions/588004/is-floating-point-math-broken
27th Jul 2017, 4:04 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Thanks to @Hatsy Rei's link, I found a simpler but inaccurate explanation: http://floating-point-gui.de/basic/
27th Jul 2017, 4:13 PM
Jnny

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Need suggestions
0 Votes
Hello can anyone help me to learn gdscript
0 Votes
What coding language should i use to make a custom coding language?
0 Votes
Best code for creating games?
0 Votes
progaming
1 Votes
Anyone Learning Godot?
1 Votes
Any easy game ideas for beginners?
0 Votes
Which is more important CSS vs HTML vs JS?
1 Votes
hello world i need help
1 Votes
Which databases are the best at injecting dynamic data within websites, and how can you achieve it?
0 Votes