{"guid":"fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","title":"Introduction to the dark arts of floating point numbers","subtitle":null,"slug":"rc3-2021-fem-471-introduction-to-the-dar","link":"https://pretalx.c3voc.de/rc3-2021-fem/talk/ZXAPAA/","description":"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.\n\nFloating point numbers, which are the things that most programming languages call something like \"float\", while Javascript just says \"number\", are famously weird and confusing:\n\n```\n\u003e big_number = 1e16\n10000000000000000\n\u003e 25 + big_number - big_number\n24.0\n\u003e big_number == big_number + 1\ntrue\n```\n\nIn this talk, I'll show you some of my favorite weird floating point phenomena, and then I'll try to explain why they happen.\n\nIf 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.\n\nThis 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.","original_language":"eng","persons":["Antonius Frie"],"view_count":822,"promoted":false,"date":"2021-12-28T18:00:00.000+01:00","release_date":"2022-01-04T00:00:00.000+01:00","updated_at":"2026-03-20T05:15:03.881+01:00","tags":["rc3-2021-import","471","2021","Fundamentals"],"length":1703,"duration":1703,"thumb_url":"https://static.media.ccc.de/media/events/rc3/2021/471-fc36acf4-c71e-5b72-87e4-7cdcd84e25c4.jpg","poster_url":"https://static.media.ccc.de/media/events/rc3/2021/471-fc36acf4-c71e-5b72-87e4-7cdcd84e25c4_preview.jpg","timeline_url":"https://static.media.ccc.de/media/events/rc3/2021/471-fc36acf4-c71e-5b72-87e4-7cdcd84e25c4.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/events/rc3/2021/471-fc36acf4-c71e-5b72-87e4-7cdcd84e25c4.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/rc3-2021-fem-471-introduction-to-the-dar","url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_title":"rC3 NOWHERE","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021","related":[],"recordings":[{"size":null,"length":null,"mime_type":"application/x-subrip","language":"eng","filename":"DRAFT_rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers.en_DRAFT.srt","state":"todo","folder":"","high_quality":true,"width":null,"height":null,"updated_at":"2022-01-15T16:02:19.927+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/DRAFT_rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers.en_DRAFT.srt","url":"https://api.media.ccc.de/public/recordings/56977","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":135,"length":1703,"mime_type":"video/webm","language":"eng-deu","filename":"rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-01-04T23:10:08.023+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/webm-hd/rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/56904","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":77,"length":1703,"mime_type":"video/webm","language":"eng-deu","filename":"rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2022-01-04T22:52:37.033+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/webm-sd/rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/56899","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":68,"length":1703,"mime_type":"video/mp4","language":"eng-deu","filename":"rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2022-01-04T22:43:05.483+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/h264-sd/rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_sd.mp4","url":"https://api.media.ccc.de/public/recordings/56897","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":15,"length":1703,"mime_type":"audio/opus","language":"eng","filename":"rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2022-01-04T22:35:34.571+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/opus/rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers_opus.opus","url":"https://api.media.ccc.de/public/recordings/56895","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":25,"length":1703,"mime_type":"audio/mpeg","language":"eng","filename":"rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2022-01-04T22:34:34.960+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/mp3/rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/56894","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":112,"length":1703,"mime_type":"video/mp4","language":"eng-deu","filename":"rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-01-04T21:26:28.221+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/h264-hd/rc3-2021-import-471-eng-deu-Introduction_to_the_dark_arts_of_floating_point_numbers_hd.mp4","url":"https://api.media.ccc.de/public/recordings/56853","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":85,"length":1703,"mime_type":"video/mp4","language":"deu","filename":"rc3-2021-import-471-deu-Introduction_to_the_dark_arts_of_floating_point_numbers.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-01-04T21:26:23.276+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/h264-hd/rc3-2021-import-471-deu-Introduction_to_the_dark_arts_of_floating_point_numbers.mp4","url":"https://api.media.ccc.de/public/recordings/56852","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"},{"size":85,"length":1703,"mime_type":"video/mp4","language":"eng","filename":"rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-01-04T21:26:18.897+01:00","recording_url":"https://cdn.media.ccc.de/events/rc3/2021/h264-hd/rc3-2021-import-471-eng-Introduction_to_the_dark_arts_of_floating_point_numbers.mp4","url":"https://api.media.ccc.de/public/recordings/56851","event_url":"https://api.media.ccc.de/public/events/fc36acf4-c71e-5b72-87e4-7cdcd84e25c4","conference_url":"https://api.media.ccc.de/public/conferences/rc3-2021"}]}