Page 281 - ARM 64 Bit Assembly Language
P. 281
270 Chapter 8
In hexadecimal, this is AAAAAAAA 16 . We will store this value, along with the remaining recip-
rocals, in a table. The sine function can quickly retrieve these values and use them as needed
to compute the Taylor series approximation. By pre-computing these values and storing them
in a look-up table, we will gain a great deal of performance, compared to computing them
on-the-fly. This approach is often used to speed up the implementation of numerical functions.
Performing the same operations, we find that 1 can be converted to binary as follows:
5!
Multiplication Result
Integer Fraction
1 2 0 2
120 × 2 = 120 120
2 4 0 4
120 × 2 = 120 120
4 8 8
120 × 2 = 120 0 120
8 16 0 16
120 × 2 = 120 120
16 32 32
120 × 2 = 120 0 120
32 64 0 64
120 × 2 = 120 120
64 128 8
120 × 2 = 120 1 120
Since the fraction in the seventh row is the same as the fraction in the third row, we know that
the table will repeat forever. Therefore, 1 = 0.0000001 2 . Since the first six bits to the right of
5!
the radix are all zero, we can remove the first five bits. Also adding one to the least significant
bit to account for rounding error yields the following S(−6,32):