mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-14 23:04:57 +00:00
Comment fixed
This commit is contained in:
parent
73bdd4ff8d
commit
651de919b3
@ -73,8 +73,7 @@ signed word sin16s(dword x) {
|
|||||||
word usinx = x1 - x3_6; // u[1.15] x - x^3/6
|
word usinx = x1 - x3_6; // u[1.15] x - x^3/6
|
||||||
word x4 = mul_u16_sel(x3, x1, 0); // u[3.13] x^4
|
word x4 = mul_u16_sel(x3, x1, 0); // u[3.13] x^4
|
||||||
word x5 = mul_u16_sel(x4, x1, 0); // u[4.12] x^5
|
word x5 = mul_u16_sel(x4, x1, 0); // u[4.12] x^5
|
||||||
//word x5_128 = mul_u16_sel(x5, $10000/128, 3); // u[1.15] x^5/128;
|
word x5_128 = x5>>4; // // u[1.15] x^5/128 -- much more efficient than mul_u16_sel(x5, $10000/128, 3);
|
||||||
word x5_128 = x5>>4;
|
|
||||||
usinx = usinx + x5_128; // u[1.15] (always an initial zero)
|
usinx = usinx + x5_128; // u[1.15] (always an initial zero)
|
||||||
signed word sinx = (signed word)usinx; // s[0.15]
|
signed word sinx = (signed word)usinx; // s[0.15]
|
||||||
if(isUpper!=0) {
|
if(isUpper!=0) {
|
||||||
|
@ -74,8 +74,7 @@ signed word sin16s(dword x) {
|
|||||||
word usinx = x1 - x3_6; // u[1.15] x - x^3/6
|
word usinx = x1 - x3_6; // u[1.15] x - x^3/6
|
||||||
word x4 = mul_u16_sel(x3, x1, 0); // u[3.13] x^4
|
word x4 = mul_u16_sel(x3, x1, 0); // u[3.13] x^4
|
||||||
word x5 = mul_u16_sel(x4, x1, 0); // u[4.12] x^5
|
word x5 = mul_u16_sel(x4, x1, 0); // u[4.12] x^5
|
||||||
//word x5_128 = mul_u16_sel(x5, $10000/128, 3); // u[1.15] x^5/128;
|
word x5_128 = x5>>4; // // u[1.15] x^5/128 -- much more efficient than mul_u16_sel(x5, $10000/128, 3);
|
||||||
word x5_128 = x5>>4;
|
|
||||||
usinx = usinx + x5_128; // u[1.15] (always an initial zero)
|
usinx = usinx + x5_128; // u[1.15] (always an initial zero)
|
||||||
signed word sinx = (signed word)usinx; // s[0.15]
|
signed word sinx = (signed word)usinx; // s[0.15]
|
||||||
if(isUpper!=0) {
|
if(isUpper!=0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user