Saturday 26 November 2022

An exception

I have found one case where the TLC algorithm does not give the 'expected' result. By 'expected' I mean the value given by

The exception occurs when operator ⊡ is equal to PLUS, i.e. the ALU(9,1) case, and γ = 1. The expected result is

However, the TLC algorithm yields something different, for example:

The algorithm yields rational values, which are close to the expected 1/α value.

It's conjectured that, for the ALU(9,1) with γ = 1 case, the actual value given by the algorithm is given by
where b is a parameter in the TLC algorithm (see post of 18th December 2021). Hence, 
It is evident that the larger the value of b, the closer the algorithm's value is to the expected 1/α value. A value of b = 888 was used for the above.

The rational value and that produced by the algorithm agree to large numbers of digits. For example, for the α = 2 example (i.e. 219780/439561), the rational value and the algorithm's value agree to at least 5000 digits; this may reflect the fact that the value is a repeating decimal (period 525).

Finally, we look at the effect that parameter b has on the calculation of  π:


There's a little blip at b = 888; this gives 265 correct decimal places. That's actually two more correct digits than given in the 25th September 2021 post; that result took b = 1023.


Hence there appears to be an optimum value of b - at least for the π calculation.  The TTL implementation allows the user to set b to any particular value.

As mentioned in a previous post, the actual values produced by the TTL implementation may differ from that produced by the above expressions for P and Q, due to the fact that the TTL implementation necessarily uses limited bit widths.




No comments:

Post a Comment