|
|
|
|
|
by Ragib_Zaman
2525 days ago
|
|
Edit: The original comment below did not take into proper account the significance of taking the floor in the approximations, rendering it mostly useless.
---- If the "refined approximation" assumes it's easy to 1) subtract 10% 2) double and 3) add 31, then it should be just as easy to 1) double 2) subtract 10% and 3) add 32 - i.e. the exact conversion formula. |
|
In other words, (c - c/10) * 2 + 32 = 2c - 2c/10 + 32 = 9c/5 + 32.
The only difference between the refined approximation and your approximation is 31 vs. 32 in the last step. The rationale for choosing 31 is explained in the "Analysis" section of the blog post. To summarize, when we subtract 10% in the approximation method, we do not perform an exact division. Instead, we perform a floor division (discard the fractional part) for easier mental calculation. The floor division introduces an error that lies in the interval [0, 2). If we subtract 1 from the result, then the error lies in the interval [-1, 1). Therefore, in order to prevent the magnitude of error from exceeding 1 °F, we add 31 instead of 32 in the last step.
Also, I find subtracting 10% of smaller number from itself slightly easier than doing so with a larger number. That's why the subtraction step comes before the doubling step.