Theodor Lindberg, Oscar Gustafsson
4 min
This paper proposes a new method for approximating floating-point addition by leveraging the geometric mean, defined as the square root of the product of two numbers. Because the geometric mean can be computed efficiently using integer operations in the logarithmic domain, this approach allows floating-point addition to be performed on integer processors or with minimal hardware overhead. The authors derive a closed-form expression for the maximum relative error and refine the approximation by adding a constant to improve accuracy.
The proposed design implements the approximation using bit-level integer operations, avoiding expensive variable shifts. The authors evaluate the method across five floating-point formats (E5M2, E4M3, bfloat16, FP16, and FP32) and compare it against existing approximate designs and exact implementations. The evaluation focuses on numerical performance metrics—such as maximum absolute relative error and mean absolute relative error—and hardware synthesis results for ASIC and FPGA technologies.
Approximate computing is increasingly used to reduce energy consumption and hardware area in resource-constrained environments. By shifting the burden of floating-point addition to simple integer operations, this method enables efficient acceleration of specific tasks, such as sums of squares and exponentials, which are common in machine learning and signal processing. The approach provides a practical alternative to complex, power-hungry floating-point units, particularly in scenarios where exact precision is not required.
Sam: That sounds like a significant shortcut. But when does it actually work? If one number is a million and the other is one, the geometric mean isn't going to be close to a million and one.
Alex: That's exactly the limit the researchers identified. When one number is much larger than the other — specifically, when one is more than about four times bigger — the geometric mean becomes a poor estimate. So the system includes a simple check: if the numbers are far enough apart, just return the larger one. At that point, the smaller number is so insignificant that ignoring it barely changes the result.
Sam: Like a safety valve. If the approximation would break down, you switch to a simpler rule that's more accurate for that situation.
Alex: Precisely. And that switching logic is what keeps the error bounded. The paper reports a maximum relative error of around twenty percent — meaning the answer is never off by more than about a fifth of the true value. For many AI calculations, that's an acceptable trade-off.
Sam: Twenty percent sounds like quite a lot, though. What kinds of tasks can actually tolerate that?
Alex: The researchers focus on operations where the inputs are all positive numbers and where the final result depends on many additions combined — things like computing the sum of squares across a vector, or running a softmax function, which is a standard step in neural networks for converting raw scores into probabilities. In those cases, errors in individual additions tend to average out across the full calculation, so the overall result stays reasonable.
Sam: So it's not a general-purpose replacement for precise arithmetic. It's a targeted tool for specific AI workloads.
Alex: That's the right framing. The researchers are careful about this. They're not claiming it works everywhere. They're identifying a specific niche — energy-constrained devices running particular AI operations — where the trade-off makes sense.
Sam: Did they actually build this, or is it purely theoretical?
Alex: They ran synthesis tests, which means they took the design and ran it through software that estimates how it would perform on real chip hardware — both standard logic circuits and a type of reprogrammable chip called an FPGA. Compared to a standard exact adder, their design used fewer hardware resources and completed operations in less time.
Sam: So the real-world picture is: a smaller circuit, faster operation, and lower energy use — in exchange for answers that are close but not exact.
Alex: That's the conclusion. And the broader point the paper makes is that this is possible because they moved the computation away from dedicated floating-point hardware and onto the integer processing units that most chips already have sitting available. Integer operations are simpler and cheaper for a chip to execute.
Sam: It's a classic engineering trade-off, but it's interesting that the key insight was mathematical rather than purely about circuit design. They changed what calculation they were doing, not just how they were doing it.
Alex: That's a good way to put it. The paper is a reminder that sometimes the most effective path to efficiency isn't building faster hardware — it's asking whether the calculation you're performing is the right one in the first place. For a constrained device running AI at the edge, approximating with a geometric mean may well be the right calculation.
Sam: It's a small but meaningful shift in perspective. Thanks for walking me through it, Alex.
Alex: Thanks for listening to ResearchPod.