DEV Community

Discussion on: Tell me some useless (or useful) software trivia

Collapse
 
briwa profile image
briwa

In some programming languages, 0.1 + 0.2 doesn't always equal to 0.3. It would give you 0.30000000000000004 or something along the lines. In fact, you can try it out in your browser for Javascript at least.

For more info: 0.30000000000000004.com/ and also there's a list of the programming languages where this phenomenon occurs.