this post was submitted on 27 Nov 2023
676 points (96.2% liked)
Skeptic
1309 readers
1 users here now
A community for Scientific Skepticism:
Scientific skepticism or rational skepticism, sometimes referred to as skeptical inquiry, is a position in which one questions the veracity of claims lacking empirical evidence.
Do not confuse this with General Skepticism, Philosophical Skepticism, or Denialism.
Things we like:
- Civility
- Thoughtful discussion based on evidence and facts
- Humor
Things we don't like:
- Personal attacks or disrespectful attitude
- Wild speculation on events with no evidence
- Low-effort comments and posts
Other communities of interest:
"A wise man proportions his belief to the evidence." -David Hume
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
2.25 + 2.25 = 4.5
If you add two floats together then the output is a float, if you add an int and a float together the output is a float. Computers will always perform the calculation as is, unless you explicitly tell them to perform a rounding operation.
However, if you stuff them into an int at the last minute, you can get that effect.
Under the hood, it's floats. On the output, it's ints.
It's obvious and silly with small examples. The problem can creep in when you are using larger libraries or frameworks.