|
|
1.1 ! root 1: static ! 2: short costab[91]={ ! 3: 1024, 1024, 1023, 1023, 1022, ! 4: 1020, 1018, 1016, 1014, 1011, ! 5: 1008, 1005, 1002, 998, 994, ! 6: 989, 984, 979, 974, 968, ! 7: 962, 956, 949, 943, 935, ! 8: 928, 920, 912, 904, 896, ! 9: 887, 878, 868, 859, 849, ! 10: 839, 828, 818, 807, 796, ! 11: 784, 773, 761, 749, 737, ! 12: 724, 711, 698, 685, 672, ! 13: 658, 644, 630, 616, 602, ! 14: 587, 573, 558, 543, 527, ! 15: 512, 496, 481, 465, 449, ! 16: 433, 416, 400, 384, 367, ! 17: 350, 333, 316, 299, 282, ! 18: 265, 248, 230, 213, 195, ! 19: 178, 160, 143, 125, 107, ! 20: 89, 71, 54, 36, 18, ! 21: 0, ! 22: }; ! 23: cos(x) ! 24: register x; ! 25: { ! 26: x %= 360; ! 27: if(x<0) ! 28: x+=360; ! 29: if(x<=180) ! 30: return(x<90? costab[x] : -costab[180-x]); ! 31: return(x<180+90? -costab[x-180] : costab[360-x]); ! 32: } ! 33: sin(x) ! 34: register x; ! 35: { ! 36: return(cos(x-90)); ! 37: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.