Learning objectives
What you should understand
- Avoid floating-point ambiguity in price and quantity
- Encode scale, range and rounding in types
- Detect overflow and invalid arithmetic
Lab
Hands-on exercise
Implement typed price and quantity arithmetic with boundary tests.
Deliverable
Evidence of completion
A fixed-point library with wire conversions and invariant tests.
- Prerequisite
- EP 53