Re:Calculating integer factorials in constant time, taking a...
by hellofunk on Tuesday December 15, 2015 @09:01AM
(#10737762)
I found this rather strange. Use of the word "calculate" is a bit of a stretch with dealing with a lookup table to get results. Worth reading, however.
[ Parent
| on HN ]
Re:Calculating integer factorials in constant time, taking a...
by mzl on Tuesday December 15, 2015 @09:19AM
(#10737838)
The point is that the lookup table contains results for _all_ inputs to the function that have a defined result (that is, functions that do not trigger overflow and thus undefined behaviour). In that sense, it has the same semantics as the original function although most people would not suspect that.
Re:Calculating integer factorials in constant time, taking a...
by dietrichepp on Tuesday December 15, 2015 @09:13AM
(#10737810)
I don't think it's really a stretch. It's the classic tradeoff: space versus time. The results are the same.