back

Introduction to the dark arts of floating point numbers

If you suspend your transcription on amara.org, please add a timestamp below to indicate how far you progressed! This will help others to resume your work!

Please do not press “publish” on amara.org to save your progress, use “save draft” instead. Only press “publish” when you're done with quality control.

Video duration
00:28:23
Language
English
Abstract
This is a talk about floating point numbers, specifically the sort named IEEE-754, aka "why are javascript numbers so weird", aka "nooo you can't compare floats for equality!" (Spoiler: sometimes you can.) This is a talk about why.

Floating point numbers, which are the things that most programming languages call something like "float", while Javascript just says "number", are famously weird and confusing:

```
> big_number = 1e16
10000000000000000
> 25 + big_number - big_number
24.0
> big_number == big_number + 1
true
```

In this talk, I'll show you some of my favorite weird floating point phenomena, and then I'll try to explain why they happen.

If you are a bit scared of floating point, like I used to, and you're never quite sure which formulas might turn on you and summon the eldritch abomination named NaN, then maybe this talk can help you build an ability to understand (and perhaps control) these phenomena.

This will obviously be a very numbers-heavy talk, but I'm going to try to make it as accessible as I can. Knowledge of things like binary numbers or scientific number notation is not required.

Talk ID
rc3-nowhere-471
Event:
rc3-2021
Day
2
Room
FeM Channel
Start
5 p.m.
Duration
00:30:00
Track
Fundamentals
Type of
Lightning Talk
Speaker
Antonius Frie
Talk Slug & media link
rc3-2021-fem-471-introduction-to-the-dark-arts-of-floating-point-numbers
English
0.0% Checking done0.0%
0.0% Syncing done0.0%
38.9% Transcribing done38.9%
61.1% Nothing done yet61.1%
  

Work on this video on Amara!

English: Transcribed until

Last revision: 2 years, 7 months ago