Inside a float
Your program stores 0.1. What is actually in those 64 bits, and how much precision was lost?
Sixty-four bits hold every number a program calls a double, and each one is a button you can flip. Type a decimal and the page prints what actually got stored, to the last digit, alongside the gap to the very next number that exists. Flip one bit in the middle and watch the whole value jump.
Included with a plan
This lab is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
the lesson Half a Point a Day, Gone, integer minor units, rounding and currency exponents
The whole idea this lab came from, told start to finish.
on the path Module 1 of 7 in How Computers Work: Bits and switches
The lessons, boards and videos around this lab, in reading order.