sintab.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. /*
  2. * Copyright (C) 2007 by Jonathan Duddington
  3. * email: jonsd@users.sourceforge.net
  4. * Copyright (C) 2015 Reece H. Dunn
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
  18. */
  19. #ifdef __cplusplus
  20. extern "C"
  21. {
  22. #endif
  23. short int sin_tab[2048] = {
  24. 0, -25, -50, -75, -100, -125, -150, -175,
  25. -201, -226, -251, -276, -301, -326, -351, -376,
  26. -401, -427, -452, -477, -502, -527, -552, -577,
  27. -602, -627, -652, -677, -702, -727, -752, -777,
  28. -802, -827, -852, -877, -902, -927, -952, -977,
  29. -1002, -1027, -1052, -1077, -1102, -1127, -1152, -1177,
  30. -1201, -1226, -1251, -1276, -1301, -1326, -1350, -1375,
  31. -1400, -1425, -1449, -1474, -1499, -1523, -1548, -1573,
  32. -1597, -1622, -1647, -1671, -1696, -1721, -1745, -1770,
  33. -1794, -1819, -1843, -1868, -1892, -1917, -1941, -1965,
  34. -1990, -2014, -2038, -2063, -2087, -2111, -2136, -2160,
  35. -2184, -2208, -2233, -2257, -2281, -2305, -2329, -2353,
  36. -2377, -2401, -2425, -2449, -2473, -2497, -2521, -2545,
  37. -2569, -2593, -2617, -2640, -2664, -2688, -2712, -2735,
  38. -2759, -2783, -2806, -2830, -2853, -2877, -2900, -2924,
  39. -2947, -2971, -2994, -3018, -3041, -3064, -3088, -3111,
  40. -3134, -3157, -3180, -3204, -3227, -3250, -3273, -3296,
  41. -3319, -3342, -3365, -3388, -3410, -3433, -3456, -3479,
  42. -3502, -3524, -3547, -3570, -3592, -3615, -3637, -3660,
  43. -3682, -3705, -3727, -3749, -3772, -3794, -3816, -3839,
  44. -3861, -3883, -3905, -3927, -3949, -3971, -3993, -4015,
  45. -4037, -4059, -4080, -4102, -4124, -4146, -4167, -4189,
  46. -4211, -4232, -4254, -4275, -4296, -4318, -4339, -4360,
  47. -4382, -4403, -4424, -4445, -4466, -4487, -4508, -4529,
  48. -4550, -4571, -4592, -4613, -4633, -4654, -4675, -4695,
  49. -4716, -4736, -4757, -4777, -4798, -4818, -4838, -4859,
  50. -4879, -4899, -4919, -4939, -4959, -4979, -4999, -5019,
  51. -5039, -5059, -5078, -5098, -5118, -5137, -5157, -5176,
  52. -5196, -5215, -5235, -5254, -5273, -5292, -5311, -5331,
  53. -5350, -5369, -5388, -5406, -5425, -5444, -5463, -5482,
  54. -5500, -5519, -5537, -5556, -5574, -5593, -5611, -5629,
  55. -5648, -5666, -5684, -5702, -5720, -5738, -5756, -5774,
  56. -5791, -5809, -5827, -5844, -5862, -5880, -5897, -5914,
  57. -5932, -5949, -5966, -5984, -6001, -6018, -6035, -6052,
  58. -6069, -6085, -6102, -6119, -6136, -6152, -6169, -6185,
  59. -6202, -6218, -6235, -6251, -6267, -6283, -6299, -6315,
  60. -6331, -6347, -6363, -6379, -6395, -6410, -6426, -6441,
  61. -6457, -6472, -6488, -6503, -6518, -6533, -6549, -6564,
  62. -6579, -6594, -6608, -6623, -6638, -6653, -6667, -6682,
  63. -6696, -6711, -6725, -6739, -6754, -6768, -6782, -6796,
  64. -6810, -6824, -6838, -6852, -6865, -6879, -6893, -6906,
  65. -6920, -6933, -6946, -6960, -6973, -6986, -6999, -7012,
  66. -7025, -7038, -7051, -7064, -7076, -7089, -7101, -7114,
  67. -7126, -7139, -7151, -7163, -7175, -7187, -7199, -7211,
  68. -7223, -7235, -7247, -7259, -7270, -7282, -7293, -7305,
  69. -7316, -7327, -7338, -7349, -7361, -7372, -7382, -7393,
  70. -7404, -7415, -7425, -7436, -7446, -7457, -7467, -7478,
  71. -7488, -7498, -7508, -7518, -7528, -7538, -7548, -7557,
  72. -7567, -7577, -7586, -7596, -7605, -7614, -7623, -7633,
  73. -7642, -7651, -7660, -7668, -7677, -7686, -7695, -7703,
  74. -7712, -7720, -7728, -7737, -7745, -7753, -7761, -7769,
  75. -7777, -7785, -7793, -7800, -7808, -7816, -7823, -7830,
  76. -7838, -7845, -7852, -7859, -7866, -7873, -7880, -7887,
  77. -7894, -7900, -7907, -7914, -7920, -7926, -7933, -7939,
  78. -7945, -7951, -7957, -7963, -7969, -7975, -7980, -7986,
  79. -7991, -7997, -8002, -8008, -8013, -8018, -8023, -8028,
  80. -8033, -8038, -8043, -8047, -8052, -8057, -8061, -8066,
  81. -8070, -8074, -8078, -8082, -8086, -8090, -8094, -8098,
  82. -8102, -8105, -8109, -8113, -8116, -8119, -8123, -8126,
  83. -8129, -8132, -8135, -8138, -8141, -8143, -8146, -8149,
  84. -8151, -8153, -8156, -8158, -8160, -8162, -8164, -8166,
  85. -8168, -8170, -8172, -8174, -8175, -8177, -8178, -8179,
  86. -8181, -8182, -8183, -8184, -8185, -8186, -8187, -8187,
  87. -8188, -8189, -8189, -8190, -8190, -8190, -8190, -8190,
  88. -8191, -8190, -8190, -8190, -8190, -8190, -8189, -8189,
  89. -8188, -8187, -8187, -8186, -8185, -8184, -8183, -8182,
  90. -8181, -8179, -8178, -8177, -8175, -8174, -8172, -8170,
  91. -8168, -8166, -8164, -8162, -8160, -8158, -8156, -8153,
  92. -8151, -8149, -8146, -8143, -8141, -8138, -8135, -8132,
  93. -8129, -8126, -8123, -8119, -8116, -8113, -8109, -8105,
  94. -8102, -8098, -8094, -8090, -8086, -8082, -8078, -8074,
  95. -8070, -8066, -8061, -8057, -8052, -8047, -8043, -8038,
  96. -8033, -8028, -8023, -8018, -8013, -8008, -8002, -7997,
  97. -7991, -7986, -7980, -7975, -7969, -7963, -7957, -7951,
  98. -7945, -7939, -7933, -7926, -7920, -7914, -7907, -7900,
  99. -7894, -7887, -7880, -7873, -7866, -7859, -7852, -7845,
  100. -7838, -7830, -7823, -7816, -7808, -7800, -7793, -7785,
  101. -7777, -7769, -7761, -7753, -7745, -7737, -7728, -7720,
  102. -7712, -7703, -7695, -7686, -7677, -7668, -7660, -7651,
  103. -7642, -7633, -7623, -7614, -7605, -7596, -7586, -7577,
  104. -7567, -7557, -7548, -7538, -7528, -7518, -7508, -7498,
  105. -7488, -7478, -7467, -7457, -7446, -7436, -7425, -7415,
  106. -7404, -7393, -7382, -7372, -7361, -7349, -7338, -7327,
  107. -7316, -7305, -7293, -7282, -7270, -7259, -7247, -7235,
  108. -7223, -7211, -7199, -7187, -7175, -7163, -7151, -7139,
  109. -7126, -7114, -7101, -7089, -7076, -7064, -7051, -7038,
  110. -7025, -7012, -6999, -6986, -6973, -6960, -6946, -6933,
  111. -6920, -6906, -6893, -6879, -6865, -6852, -6838, -6824,
  112. -6810, -6796, -6782, -6768, -6754, -6739, -6725, -6711,
  113. -6696, -6682, -6667, -6653, -6638, -6623, -6608, -6594,
  114. -6579, -6564, -6549, -6533, -6518, -6503, -6488, -6472,
  115. -6457, -6441, -6426, -6410, -6395, -6379, -6363, -6347,
  116. -6331, -6315, -6299, -6283, -6267, -6251, -6235, -6218,
  117. -6202, -6185, -6169, -6152, -6136, -6119, -6102, -6085,
  118. -6069, -6052, -6035, -6018, -6001, -5984, -5966, -5949,
  119. -5932, -5914, -5897, -5880, -5862, -5844, -5827, -5809,
  120. -5791, -5774, -5756, -5738, -5720, -5702, -5684, -5666,
  121. -5648, -5629, -5611, -5593, -5574, -5556, -5537, -5519,
  122. -5500, -5482, -5463, -5444, -5425, -5406, -5388, -5369,
  123. -5350, -5331, -5311, -5292, -5273, -5254, -5235, -5215,
  124. -5196, -5176, -5157, -5137, -5118, -5098, -5078, -5059,
  125. -5039, -5019, -4999, -4979, -4959, -4939, -4919, -4899,
  126. -4879, -4859, -4838, -4818, -4798, -4777, -4757, -4736,
  127. -4716, -4695, -4675, -4654, -4633, -4613, -4592, -4571,
  128. -4550, -4529, -4508, -4487, -4466, -4445, -4424, -4403,
  129. -4382, -4360, -4339, -4318, -4296, -4275, -4254, -4232,
  130. -4211, -4189, -4167, -4146, -4124, -4102, -4080, -4059,
  131. -4037, -4015, -3993, -3971, -3949, -3927, -3905, -3883,
  132. -3861, -3839, -3816, -3794, -3772, -3749, -3727, -3705,
  133. -3682, -3660, -3637, -3615, -3592, -3570, -3547, -3524,
  134. -3502, -3479, -3456, -3433, -3410, -3388, -3365, -3342,
  135. -3319, -3296, -3273, -3250, -3227, -3204, -3180, -3157,
  136. -3134, -3111, -3088, -3064, -3041, -3018, -2994, -2971,
  137. -2947, -2924, -2900, -2877, -2853, -2830, -2806, -2783,
  138. -2759, -2735, -2712, -2688, -2664, -2640, -2617, -2593,
  139. -2569, -2545, -2521, -2497, -2473, -2449, -2425, -2401,
  140. -2377, -2353, -2329, -2305, -2281, -2257, -2233, -2208,
  141. -2184, -2160, -2136, -2111, -2087, -2063, -2038, -2014,
  142. -1990, -1965, -1941, -1917, -1892, -1868, -1843, -1819,
  143. -1794, -1770, -1745, -1721, -1696, -1671, -1647, -1622,
  144. -1597, -1573, -1548, -1523, -1499, -1474, -1449, -1425,
  145. -1400, -1375, -1350, -1326, -1301, -1276, -1251, -1226,
  146. -1201, -1177, -1152, -1127, -1102, -1077, -1052, -1027,
  147. -1002, -977, -952, -927, -902, -877, -852, -827,
  148. -802, -777, -752, -727, -702, -677, -652, -627,
  149. -602, -577, -552, -527, -502, -477, -452, -427,
  150. -401, -376, -351, -326, -301, -276, -251, -226,
  151. -201, -175, -150, -125, -100, -75, -50, -25,
  152. 0, 25, 50, 75, 100, 125, 150, 175,
  153. 201, 226, 251, 276, 301, 326, 351, 376,
  154. 401, 427, 452, 477, 502, 527, 552, 577,
  155. 602, 627, 652, 677, 702, 727, 752, 777,
  156. 802, 827, 852, 877, 902, 927, 952, 977,
  157. 1002, 1027, 1052, 1077, 1102, 1127, 1152, 1177,
  158. 1201, 1226, 1251, 1276, 1301, 1326, 1350, 1375,
  159. 1400, 1425, 1449, 1474, 1499, 1523, 1548, 1573,
  160. 1597, 1622, 1647, 1671, 1696, 1721, 1745, 1770,
  161. 1794, 1819, 1843, 1868, 1892, 1917, 1941, 1965,
  162. 1990, 2014, 2038, 2063, 2087, 2111, 2136, 2160,
  163. 2184, 2208, 2233, 2257, 2281, 2305, 2329, 2353,
  164. 2377, 2401, 2425, 2449, 2473, 2497, 2521, 2545,
  165. 2569, 2593, 2617, 2640, 2664, 2688, 2712, 2735,
  166. 2759, 2783, 2806, 2830, 2853, 2877, 2900, 2924,
  167. 2947, 2971, 2994, 3018, 3041, 3064, 3088, 3111,
  168. 3134, 3157, 3180, 3204, 3227, 3250, 3273, 3296,
  169. 3319, 3342, 3365, 3388, 3410, 3433, 3456, 3479,
  170. 3502, 3524, 3547, 3570, 3592, 3615, 3637, 3660,
  171. 3682, 3705, 3727, 3749, 3772, 3794, 3816, 3839,
  172. 3861, 3883, 3905, 3927, 3949, 3971, 3993, 4015,
  173. 4037, 4059, 4080, 4102, 4124, 4146, 4167, 4189,
  174. 4211, 4232, 4254, 4275, 4296, 4318, 4339, 4360,
  175. 4382, 4403, 4424, 4445, 4466, 4487, 4508, 4529,
  176. 4550, 4571, 4592, 4613, 4633, 4654, 4675, 4695,
  177. 4716, 4736, 4757, 4777, 4798, 4818, 4838, 4859,
  178. 4879, 4899, 4919, 4939, 4959, 4979, 4999, 5019,
  179. 5039, 5059, 5078, 5098, 5118, 5137, 5157, 5176,
  180. 5196, 5215, 5235, 5254, 5273, 5292, 5311, 5331,
  181. 5350, 5369, 5388, 5406, 5425, 5444, 5463, 5482,
  182. 5500, 5519, 5537, 5556, 5574, 5593, 5611, 5629,
  183. 5648, 5666, 5684, 5702, 5720, 5738, 5756, 5774,
  184. 5791, 5809, 5827, 5844, 5862, 5880, 5897, 5914,
  185. 5932, 5949, 5966, 5984, 6001, 6018, 6035, 6052,
  186. 6069, 6085, 6102, 6119, 6136, 6152, 6169, 6185,
  187. 6202, 6218, 6235, 6251, 6267, 6283, 6299, 6315,
  188. 6331, 6347, 6363, 6379, 6395, 6410, 6426, 6441,
  189. 6457, 6472, 6488, 6503, 6518, 6533, 6549, 6564,
  190. 6579, 6594, 6608, 6623, 6638, 6653, 6667, 6682,
  191. 6696, 6711, 6725, 6739, 6754, 6768, 6782, 6796,
  192. 6810, 6824, 6838, 6852, 6865, 6879, 6893, 6906,
  193. 6920, 6933, 6946, 6960, 6973, 6986, 6999, 7012,
  194. 7025, 7038, 7051, 7064, 7076, 7089, 7101, 7114,
  195. 7126, 7139, 7151, 7163, 7175, 7187, 7199, 7211,
  196. 7223, 7235, 7247, 7259, 7270, 7282, 7293, 7305,
  197. 7316, 7327, 7338, 7349, 7361, 7372, 7382, 7393,
  198. 7404, 7415, 7425, 7436, 7446, 7457, 7467, 7478,
  199. 7488, 7498, 7508, 7518, 7528, 7538, 7548, 7557,
  200. 7567, 7577, 7586, 7596, 7605, 7614, 7623, 7633,
  201. 7642, 7651, 7660, 7668, 7677, 7686, 7695, 7703,
  202. 7712, 7720, 7728, 7737, 7745, 7753, 7761, 7769,
  203. 7777, 7785, 7793, 7800, 7808, 7816, 7823, 7830,
  204. 7838, 7845, 7852, 7859, 7866, 7873, 7880, 7887,
  205. 7894, 7900, 7907, 7914, 7920, 7926, 7933, 7939,
  206. 7945, 7951, 7957, 7963, 7969, 7975, 7980, 7986,
  207. 7991, 7997, 8002, 8008, 8013, 8018, 8023, 8028,
  208. 8033, 8038, 8043, 8047, 8052, 8057, 8061, 8066,
  209. 8070, 8074, 8078, 8082, 8086, 8090, 8094, 8098,
  210. 8102, 8105, 8109, 8113, 8116, 8119, 8123, 8126,
  211. 8129, 8132, 8135, 8138, 8141, 8143, 8146, 8149,
  212. 8151, 8153, 8156, 8158, 8160, 8162, 8164, 8166,
  213. 8168, 8170, 8172, 8174, 8175, 8177, 8178, 8179,
  214. 8181, 8182, 8183, 8184, 8185, 8186, 8187, 8187,
  215. 8188, 8189, 8189, 8190, 8190, 8190, 8190, 8190,
  216. 8191, 8190, 8190, 8190, 8190, 8190, 8189, 8189,
  217. 8188, 8187, 8187, 8186, 8185, 8184, 8183, 8182,
  218. 8181, 8179, 8178, 8177, 8175, 8174, 8172, 8170,
  219. 8168, 8166, 8164, 8162, 8160, 8158, 8156, 8153,
  220. 8151, 8149, 8146, 8143, 8141, 8138, 8135, 8132,
  221. 8129, 8126, 8123, 8119, 8116, 8113, 8109, 8105,
  222. 8102, 8098, 8094, 8090, 8086, 8082, 8078, 8074,
  223. 8070, 8066, 8061, 8057, 8052, 8047, 8043, 8038,
  224. 8033, 8028, 8023, 8018, 8013, 8008, 8002, 7997,
  225. 7991, 7986, 7980, 7975, 7969, 7963, 7957, 7951,
  226. 7945, 7939, 7933, 7926, 7920, 7914, 7907, 7900,
  227. 7894, 7887, 7880, 7873, 7866, 7859, 7852, 7845,
  228. 7838, 7830, 7823, 7816, 7808, 7800, 7793, 7785,
  229. 7777, 7769, 7761, 7753, 7745, 7737, 7728, 7720,
  230. 7712, 7703, 7695, 7686, 7677, 7668, 7660, 7651,
  231. 7642, 7633, 7623, 7614, 7605, 7596, 7586, 7577,
  232. 7567, 7557, 7548, 7538, 7528, 7518, 7508, 7498,
  233. 7488, 7478, 7467, 7457, 7446, 7436, 7425, 7415,
  234. 7404, 7393, 7382, 7372, 7361, 7349, 7338, 7327,
  235. 7316, 7305, 7293, 7282, 7270, 7259, 7247, 7235,
  236. 7223, 7211, 7199, 7187, 7175, 7163, 7151, 7139,
  237. 7126, 7114, 7101, 7089, 7076, 7064, 7051, 7038,
  238. 7025, 7012, 6999, 6986, 6973, 6960, 6946, 6933,
  239. 6920, 6906, 6893, 6879, 6865, 6852, 6838, 6824,
  240. 6810, 6796, 6782, 6768, 6754, 6739, 6725, 6711,
  241. 6696, 6682, 6667, 6653, 6638, 6623, 6608, 6594,
  242. 6579, 6564, 6549, 6533, 6518, 6503, 6488, 6472,
  243. 6457, 6441, 6426, 6410, 6395, 6379, 6363, 6347,
  244. 6331, 6315, 6299, 6283, 6267, 6251, 6235, 6218,
  245. 6202, 6185, 6169, 6152, 6136, 6119, 6102, 6085,
  246. 6069, 6052, 6035, 6018, 6001, 5984, 5966, 5949,
  247. 5932, 5914, 5897, 5880, 5862, 5844, 5827, 5809,
  248. 5791, 5774, 5756, 5738, 5720, 5702, 5684, 5666,
  249. 5648, 5629, 5611, 5593, 5574, 5556, 5537, 5519,
  250. 5500, 5482, 5463, 5444, 5425, 5406, 5388, 5369,
  251. 5350, 5331, 5311, 5292, 5273, 5254, 5235, 5215,
  252. 5196, 5176, 5157, 5137, 5118, 5098, 5078, 5059,
  253. 5039, 5019, 4999, 4979, 4959, 4939, 4919, 4899,
  254. 4879, 4859, 4838, 4818, 4798, 4777, 4757, 4736,
  255. 4716, 4695, 4675, 4654, 4633, 4613, 4592, 4571,
  256. 4550, 4529, 4508, 4487, 4466, 4445, 4424, 4403,
  257. 4382, 4360, 4339, 4318, 4296, 4275, 4254, 4232,
  258. 4211, 4189, 4167, 4146, 4124, 4102, 4080, 4059,
  259. 4037, 4015, 3993, 3971, 3949, 3927, 3905, 3883,
  260. 3861, 3839, 3816, 3794, 3772, 3749, 3727, 3705,
  261. 3682, 3660, 3637, 3615, 3592, 3570, 3547, 3524,
  262. 3502, 3479, 3456, 3433, 3410, 3388, 3365, 3342,
  263. 3319, 3296, 3273, 3250, 3227, 3204, 3180, 3157,
  264. 3134, 3111, 3088, 3064, 3041, 3018, 2994, 2971,
  265. 2947, 2924, 2900, 2877, 2853, 2830, 2806, 2783,
  266. 2759, 2735, 2712, 2688, 2664, 2640, 2617, 2593,
  267. 2569, 2545, 2521, 2497, 2473, 2449, 2425, 2401,
  268. 2377, 2353, 2329, 2305, 2281, 2257, 2233, 2208,
  269. 2184, 2160, 2136, 2111, 2087, 2063, 2038, 2014,
  270. 1990, 1965, 1941, 1917, 1892, 1868, 1843, 1819,
  271. 1794, 1770, 1745, 1721, 1696, 1671, 1647, 1622,
  272. 1597, 1573, 1548, 1523, 1499, 1474, 1449, 1425,
  273. 1400, 1375, 1350, 1326, 1301, 1276, 1251, 1226,
  274. 1201, 1177, 1152, 1127, 1102, 1077, 1052, 1027,
  275. 1002, 977, 952, 927, 902, 877, 852, 827,
  276. 802, 777, 752, 727, 702, 677, 652, 627,
  277. 602, 577, 552, 527, 502, 477, 452, 427,
  278. 401, 376, 351, 326, 301, 276, 251, 226,
  279. 201, 175, 150, 125, 100, 75, 50, 25,
  280. };
  281. #ifdef __cplusplus
  282. }
  283. #endif