Hacker News new | ask | show | jobs
by danbruc 3076 days ago
Without reading the patent it sounds a lot like interval arithmetic [1] which sounds like a really good idea at first but is not without its own problems. For example the inverse 1/x for an interval x like [-1,+1] containing 0 consists of two intervals (-∞,-1] and [+1;+∞).

[1] https://en.wikipedia.org/wiki/Interval_arithmetic

3 comments

"In addition, though the embodiment presented herein represents an apparatus and associated method for bounded floating point addition and subtraction, it is presented as an example of bounded floating point operations. By extension, the same inventive apparatus for calculating and retaining a bound on error during floating point operations can be used in other floating point operations such as multiplication, division, square root, multiply-add, and other floating point functions."

The hard part has been left as an exercise for the examiner.

In your example, this would correspond to having the number x = 0 +-1 and then wanting to compute 1/x. If your number can potentially be zero, why would you want to use it as a divisor?
The problem remains if you wrap the division in a non-zero check. Or maybe the interval [-1,+1] is already kind of a lie, i.e. x is known to be in the interval but you additionally know that x is non-zero when you are about to perform the division. The example is just meant to illustrate the problem that using a single interval is not good enough to track error bounds in the general case.
You could always just return nan in that case, like for normal arithmetic.
In which case you go from a potentially imprecise result to no result at all which would arguably make things worse, especially if you happen to know that x is non-zero and division by zero is not an issue. The problem is that using a single interval is not generally good enough to track error bounds for arbitrary calculations while avoiding to turn everything into the useless (-∞,+∞). The common solution is to use multi-interval arithmetic but having to deal with a data structure of variable length is really painful for hardware implementations.