Changes
Willy
,/* logsin and exponent tables */
The exponent table exp[] is calculated by f(x)=round((power(2, x/256)-1)×1024) for x from 0 to 255. Given a value, the significand is calculated by exp[8 LSB] + 1024, and the exponent is the remaining MSBs, producing a floating-point value. Ten bits of exponent are required to represent all values in the table, the largest being 1,018.
The logsin table logsin[] is calculated by f(x)=round(-log(sin((x+0.5)*pi/512))/log(2)*256) for x from 0 to 255. It requires 12 11 bits to represent all values (largest is 2,137) and represents the first rising quarter of a sine wave.
<br>