2 ms·
You can multiply two numbers by multiplying their mantissas and adding their exponents. Since the numbers are stored in base 2, the mantissa values range from
by zahlman 2y ago
You can multiply two numbers by multiplying their mantissas and adding their exponents.
Since the numbers are stored in base 2, the mantissa values range from 1 to 2 (subnormals notwithstanding) - but they're effectively stored as a 0..1 value. The effective range produced by adding vs. multiplying them have considerable overlap, and on average the difference won't be much. Because of how the mantissa and exponent fields are arranged (a deliberate choice by the standard, AFAIK), the mantissa effectively adds additional bits to the approximation of the logarithm given by the exponent.
Edit: this other comment chain https://news.ycombinator.com/item?id=43034230 https://news.ycombinator.com/item?id=43034230 perhaps puts it better.