AppliedMultiple choice
Why do exchange systems store prices as integer ticks rather than as floating-point numbers?
- AIntegers are faster to add than floating-point values
- BDecimal prices are not exactly representable in binary
- CIntegers use less memory than double-precision floats do
- DFloating point cannot represent numbers as large as a price
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Reported in interviews at
More numerical methods questions
- What is machine epsilon for IEEE 754 double precision, in units of 10⁻¹⁶, to…Foundation
- Where doubles run out of digits, part 1 of 3Foundation
- In double precision, what does 1 - math.cos(1e-8) evaluate to?Applied
- Double precision can represent every integer up to 2ᵏ exactly, but not every…Applied
- A loop total = 0.0; for _ in range(10): total += 0.1 leaves total == 0.9999999999999999.Applied
- Where doubles run out of digits, part 2 of 3Applied