by juanre · 14y ago · 0 comments
Yes you are right, it's better to convert the whole thing to a sum of logs, otherwise you end up with floating-point underflow.
The article was getting already too long however, but I'll add a note about it because it is an important optimization that affects both speed and even correctness (because of the underlying limitations of floating point).
UPDATE: note added.
In the context of this article and implementation, the speed difference between + and * is utterly irrelevant and unmeasurable.