Good videos, with context.
Floating Point Numbers - Computerphile

Floating Point Numbers - Computerphile

Computerphile
2 HN recommenders · discussed 2015–2023
Open YouTube ↗

About this video

Tom Scott explains for Computerphile how floating point numbers work, why moving the binary point is fast, and why it handles money badly.

Why it appears in the archive

Recommended as a simple, fun explanation of why floating point gives odd errors like 0.1 + 0.2.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

felipesabino · 2015-11 · rec

Recommended: Floating Point Numbers - Computerphile [VIDEO] Tom Scott's fun and simple take on Floating Points is a good video explaining why such weird errors happen

Read original comment ↗
microwavecamera · 2017-06 · rec

Short answer, no decimal in binary and math is hard. :) Here's a couple handy videos explaining it: [VIDEO] [LINK]

Read original comment ↗
mercxry · 2023-10 · reference

You should still not use MONEY in Postgres, even their own website says so [1]. I still wouldn't use floats/numerics/decimals to store currency either in any db generally, as said by others you're going to end up with inaccurate numbers [2]. Therefore using integers is in fact very good for this use-case, especially if you are in accounting or book-keeping! Source: I work for a Fintech company that processes millions of payments. [1] [LINK] [2] [VIDEO]

Read original comment ↗