Absorption in naive floating-point summation
In IEEE-754 double precision, you sum, left to right, one value of followed by exactly (one million) values of . The exact mathematical total is . What total does the naive running-sum loop actually return? (A double has a 52-bit fraction, so around its representable values are spaced apart.)
Show hints (2)+
- At the spacing between doubles is , so is below the rounding threshold.
- Each leaves the running sum unchanged - the total stays .
Answer
Reveal answer →Final answer
10000000000000000
Create a free account to see the full worked solution and track your progress.
Interview format: Prop Trading, Systematic & Data-Driven Trading