RecallWeaveRead the worked explanation
An offline numerical lab

Small rounding.
A different triangle.

Follow a value from its bits to its consequences. Inspect the number that binary32 stores, change the order of an addition, and reproduce a real case where a translated triangle reverses its winding.

Open the RecallWeave learner

Import the downloaded JSON in the learner. The three experiments below work in this file without an account or connection.

Companion lesson: decimal intent and binary64 arithmetic. Here, follow the next boundary into binary32 storage and geometry.

01 / REPRESENTATION

Which number was stored?

The input is a JavaScript Number (binary64). Math.fround selects a binary32 value with ties to even. The exact fractions below distinguish those two values from an author's intended decimal.

A finite decimal or scientific-notation Number, such as 0.1 or 1e8. This is not an exact decimal parser.
Input Number
Binary32 stored value
Sign · 1 bit
Exponent · 8 bits
Fraction · 23 bits

Classification: . Hexadecimal bits: .

Adjacent binary32 values in numerical order
PreviousStoredNext
Inspect the exact fractions and conversion error
Exact input Number
Exact binary32 stored value
Signed error: stored minus input Number

These fractions decode the actual binary values. For the input written as 0.1, its difference from the intended rational 1/10 occurs before the conversion measured here.

02 / ARITHMETIC

Move a rounding boundary.

The same three inputs can give different results when each addition rounds to binary32. Compare both paths with an exact sum of the stored inputs.

Round (a + b), then add c

First rounded result

Final rounded result

Round (b + c), then add a

First rounded result

Final rounded result

Exact sum of the stored inputs: .

Wider arithmetic before a loss can help. Widening an already rounded result cannot recover information that has disappeared.

03 / GEOMETRY

An exact translation. A rounded output.

Start with a=(0,0), b=(1.4,1.6), c=(2.6,3.4). Store the local vertices in binary32, add the same origin to both axes in wider arithmetic, then store the global output in binary32. Those final stored coordinates define the orange triangle.

A whole number from 0 through 67,108,864.
Scales the source and origin together. The plot divides this factor back out for comparison.
Source and stored triangle outlines
Solid blue · local sourceDashed orange · stored output
Both outlines are relative to their own vertex a and divided by the unit factor. Axes use the same scale. The table gives the actual stored coordinates.
Exact stored signed double area
Intended decimal double area in these units
Exact local binary32 source double area
Gap above the rounded origin in binary32

Double area is the determinant, twice the signed triangle area. Its sign answers a winding question; it does not certify accurate shape or positions.

Actual binary32 output coordinates and their retained differences
VertexStored xStored yRelative to stored a
Separate local storage, unit scaling, and sensitivity

Keeping the local vertices and origin separate retains the local source double area: . Subtracting the origin after global binary32 storage cannot restore the discarded edges. Baking large global coordinates again can repeat the loss.

For these local edges, |sin(theta)| is approximately . This angle measure is dimensionless; it is not a complete condition number for the coordinate pipeline. The perturbation model and output of interest also matter.

The bounded power-of-two unit control preserves the normalized rounding pattern here. Raw area changes with squared units. Range failures such as overflow and subnormal rounding are explored separately above.

Read the derivation and scope
NEXT / RETRIEVAL

Explain the boundary without the plot.

Before opening the lesson, explain why a positive affine determinant and nonzero stored triangle area can both hold while the stored winding is wrong.

Then use RecallWeave's existing lesson importer to practice fourteen questions with explanations and transfer prompts. The learner keeps the first-answer and practice stages separate.

Open the learner