0

Ok, so i made a scientific calculator recently and one of my friends was using it when he said that if he types in (2.1 * 3) the answer should be 6.3 but he recieves something like: 6.30000001.

Why does this happen? Is this some sort of bug in java?

EDIT: Its not just a problem with my calc, i also made a small java file for multiplying 2 numbers and i face the same probelem even in cmd

namsnath
  • 138
  • 1
  • 3
  • 11

0 Answers0