3 ms·
Numerical implementations of functions often use look-up tables, and there's sometimes a trade-off between number of operations and memory access. (Large look-u
by imurray 7y ago
Numerical implementations of functions often use look-up tables, and there's sometimes a trade-off between number of operations and memory access. (Large look-up tables aren't cache-friendly.)
This blog-post is from someone who prefers to do less mental arithmetic, but remember a few numbers:
http://www.theexclusive.org/2012/08/converting-fahrenheit-into-celsius.html http://www.theexclusive.org/2012/08/converting-fahrenheit-in...
- susam 7y agoThanks for sharing the theexclusive.org link. The trick discussed there is quite nifty. Here's a nice way to recall the lookup table mentioned there, in case, one forgets it: - It is easy to remember that 0 °C = 32 °F because it is the freezing point of water. - Every 10 °C interval corresponds to an interval of 18 °F. That's where the 9/5 in the conversion formula F = (9/5) * C + 32 comes from. - Now it is easy to construct the lookup table: 10 °C = 50 °F, 20 °C = 68 °F, and 30 °C = 86 °F.