Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · Finance · The Plumbing That Moves Money · about 12 min to read

Play it as a journeyTutor comes with a plan

Half a Point a Day, Gone, integer minor units, rounding and currency exponents

IEEE-754 Decoder
IEEE-754 Decoder · Open board

How a float is stored, and why 0.1 + 0.2 comes out as 0.30000000000000004. That board explains the machine. This lesson is what a ledger does about it: which number to store for money, and where rounding is allowed to happen.

Education, not financial advice.

Before you start. From A Book You Never Erase, the append-only ledger, reversals and derived balances: a ledger is entries you only add to, and every balance is the sum of its entries, so any error in a single entry is in the balance forever. From Numbers for Real (signed ints, overflow, floating point): a computer’s usual number with a decimal point, a float, stores most decimals only approximately, because 0.1 in binary repeats forever and has to be cut short. You do not need the bits. You need that one fact.

Lesson 45 of 58 in Finance

The rest of this lesson 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.

In this lesson

  • January 1982: an index that started at 1,000
  • Truncation: a meter that always reads low
  • Why not just use decimals: floats are close, not exact
  • Count the smallest coin: minor units
  • Round once, at the edge, by a stated rule

Terms it explains: truncation, minor unit, currency exponent, Banker's rounding, allocation.

Lab

Your program stores 0.1. What is actually in those 64 bits?

Type 0.1 in the box labelled A decimal number, click any exponent bit, and watch The exact value stored move.

Open Inside a float

Review Finance