Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the benefits of symmetric level index arithmetic (alternative to floating point)?

Nowadays almost everyone uses floating point arithmetic. The system is essentially a tradeoff between range and accuracy, allowing one to represent numbers that are very small, or very large. However, there are other ways of doing this.

One of these ways, as I've recently discovered, is called symmetric level-index arithmetic. It's a complex system involving a kind of power tower, and I've seen some sporadic software implementations of the system in various places.

What are the advantages and disadvantages of this system versus traditional floating point arithmetic? Can't it be duplicated by, for example, increasing the base at which the exponent is taken? (thereby further reducing precision, but increasing range)

like image 524
GregRos Avatar asked Mar 17 '23 16:03

GregRos


1 Answers

Symmetric, level-indexed arithmetic (SLIA) is very good at representing gigantic numbers. For example, it can easily represent a googol 10^100 as 4.5268756157751 or a googolplex 10^(10^100) as 5.5272678974304. You can continue this up the tetration chain easily. This is in complete contrast to floating-point math, which breaks when it encounters exponents that are themselves high orders of magnitude.

However, floating point numbers do have fixed multiplicative (percentage) precision. The value ulp(x)/x where ulp is the distance between x and the next closest representable number, is bound by a relatively low value = 2^(-bits of precision). On the other hand, SILA does not guarantee this effect. Assuming you are storing your SILA represented bits fixed-point (since you are probably going to have some upper bound on your level), you have some fixed ulp in your index value. To use an example with SILA, take the example SILA = 3.14159; x = e^(e^(e^.14159))). To find ulp(x), we can use the derivative rule for the propagation of uncertainty, using ulp(index) as the uncertainty in the index (.14159). ulp(x) = e^(e^(e^.14159)))*e^(e^.14159))*e^.14159*ulp(index), so ulp(x)/x = e^(e^.14159))*e^.14159*ulp(index). This pattern holds in general, and due to the massive multiplicative difference between n and e^n I am ignoring all but the first term to conclude that ulp(x)/x ~ ln(x)*index*(ulp(index)/index). This is clearly a much higher level of error than you would have with a floating point representation.

Increasing the base of representation would increase the range. However, the real question is how big do you want your numbers to get? One of the largest numbers in physics, the Poincare recurrence time (see this article for the value), can be easily represented by standard SLIA as 8.2. Larger numbers, such as Graham's number, cannot be expressed in any base SLIA effectively, the number of towers is just too great. Base e is simply convenient because it does not require any correction factors.

like image 171
k_g Avatar answered Mar 24 '23 20:03

k_g