this post was submitted on 03 Dec 2019
2 points (100.0% liked)

General Programming Discussion

7766 readers
18 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS
 

Your language isn't broken, it's doing floating point math. Computers can only natively store integers, so they need some way of representing decimal numbers. This representation comes with some degree of inaccuracy. That's why, more often than not, .1 + .2 != .3.

you are viewing a single comment's thread
view the rest of the comments
[–] terusgormand8465@lemmings.world 1 points 2 hours ago

Exactly, well said.