Skip to main content

Module engine

Module engine 

Source
Expand description

What a pocket calculator does, without any interface. Operations run in the order they are pressed, so 2 + 3 × 4 = is 20.

Structs§

Engine
The calculator’s memory.

Enums§

Op
An operation between two numbers.
Press
A key of the calculator.

Functions§

format_number
Shows a number the way a person expects: without the noise of binary fractions, so 0.1 + 0.2 is 0.3, and in scientific notation when it does not fit.