base:kernal_floating_point_mathematics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
base:kernal_floating_point_mathematics [2016-02-06 01:05] – [Movement] malcontent | base:kernal_floating_point_mathematics [2016-03-14 16:54] – fixed the mantissa range litwr2 | ||
---|---|---|---|
Line 3: | Line 3: | ||
[[http:// | [[http:// | ||
- | Floating point numbers are stored with 5 bytes. The first byte is the exponent, stored in excess $80 format (E = E - $80). Second byte holds the sign of the mantissa in its uppermost bit. The normalised | + | Floating point numbers are stored with 5 bytes. The first byte is the exponent, stored in excess $80 format (E = E - $80). Second byte holds the sign of the mantissa in its uppermost bit. The normalized |
81 00 00 00 00 = 1 = 2< | 81 00 00 00 00 = 1 = 2< | ||
Line 249: | Line 249: | ||
====== Optimising ====== | ====== Optimising ====== | ||
+ | |||
+ | ===== Multiply ===== | ||
+ | |||
+ | Numerous advantages are gained improving the speed of the multiply. Routines that rely on it can be copied from the ROM and pointed to the new routine to improve performance. The following example relies on the Steve Judd's fast multiplication and reduces the number of cycles to multiply from around 2300 to little over 1400. | ||
+ | |||
+ | [[Fast Floating Point Multiply]] | ||
===== Movement ===== | ===== Movement ===== | ||
Line 396: | Line 402: | ||
Doing log(exp(8)) = 7.99999624\\ | Doing log(exp(8)) = 7.99999624\\ | ||
- | If we do exponentiation with our new routines like the Kernal does (y< | + | If we do exponentiation with our new routines like the Kernal does (y< |
===== Faster Square Root ===== | ===== Faster Square Root ===== |
base/kernal_floating_point_mathematics.txt · Last modified: 2020-12-06 20:48 by pararaum