SBSPSS/source/utils/sincos.cpp
2000-08-29 19:54:22 +00:00

404 lines
35 KiB
C++

/********************/
/*** SinCos Table ***/
/********************/
#include "system\global.h"
VECTOR upVec = { 0, ONE, 0, 0 };
/*****************************************************************************/
s16 ACosTable[4097] = {
2047 ,2027 ,2019 ,2012 ,2007 ,2002 ,1998 ,1994 ,1990 ,1986 ,1983 ,1980 ,1977 ,1974 ,1971 ,1969 ,
1966 ,1963 ,1961 ,1959 ,1956 ,1954 ,1952 ,1950 ,1948 ,1946 ,1944 ,1942 ,1940 ,1938 ,1936 ,1934 ,
1932 ,1930 ,1929 ,1927 ,1925 ,1923 ,1922 ,1920 ,1918 ,1917 ,1915 ,1914 ,1912 ,1911 ,1909 ,1908 ,
1906 ,1905 ,1903 ,1902 ,1900 ,1899 ,1897 ,1896 ,1895 ,1893 ,1892 ,1891 ,1889 ,1888 ,1887 ,1885 ,
1884 ,1883 ,1882 ,1880 ,1879 ,1878 ,1877 ,1875 ,1874 ,1873 ,1872 ,1871 ,1869 ,1868 ,1867 ,1866 ,
1865 ,1864 ,1862 ,1861 ,1860 ,1859 ,1858 ,1857 ,1856 ,1855 ,1854 ,1852 ,1851 ,1850 ,1849 ,1848 ,
1847 ,1846 ,1845 ,1844 ,1843 ,1842 ,1841 ,1840 ,1839 ,1838 ,1837 ,1836 ,1835 ,1834 ,1833 ,1832 ,
1831 ,1830 ,1829 ,1828 ,1827 ,1826 ,1825 ,1824 ,1823 ,1822 ,1821 ,1820 ,1819 ,1819 ,1818 ,1817 ,
1816 ,1815 ,1814 ,1813 ,1812 ,1811 ,1810 ,1809 ,1809 ,1808 ,1807 ,1806 ,1805 ,1804 ,1803 ,1802 ,
1802 ,1801 ,1800 ,1799 ,1798 ,1797 ,1796 ,1796 ,1795 ,1794 ,1793 ,1792 ,1791 ,1791 ,1790 ,1789 ,
1788 ,1787 ,1786 ,1786 ,1785 ,1784 ,1783 ,1782 ,1782 ,1781 ,1780 ,1779 ,1778 ,1778 ,1777 ,1776 ,
1775 ,1774 ,1774 ,1773 ,1772 ,1771 ,1771 ,1770 ,1769 ,1768 ,1768 ,1767 ,1766 ,1765 ,1764 ,1764 ,
1763 ,1762 ,1761 ,1761 ,1760 ,1759 ,1758 ,1758 ,1757 ,1756 ,1756 ,1755 ,1754 ,1753 ,1753 ,1752 ,
1751 ,1750 ,1750 ,1749 ,1748 ,1748 ,1747 ,1746 ,1745 ,1745 ,1744 ,1743 ,1743 ,1742 ,1741 ,1740 ,
1740 ,1739 ,1738 ,1738 ,1737 ,1736 ,1736 ,1735 ,1734 ,1734 ,1733 ,1732 ,1731 ,1731 ,1730 ,1729 ,
1729 ,1728 ,1727 ,1727 ,1726 ,1725 ,1725 ,1724 ,1723 ,1723 ,1722 ,1721 ,1721 ,1720 ,1719 ,1719 ,
1718 ,1717 ,1717 ,1716 ,1715 ,1715 ,1714 ,1713 ,1713 ,1712 ,1712 ,1711 ,1710 ,1710 ,1709 ,1708 ,
1708 ,1707 ,1706 ,1706 ,1705 ,1705 ,1704 ,1703 ,1703 ,1702 ,1701 ,1701 ,1700 ,1699 ,1699 ,1698 ,
1698 ,1697 ,1696 ,1696 ,1695 ,1694 ,1694 ,1693 ,1693 ,1692 ,1691 ,1691 ,1690 ,1690 ,1689 ,1688 ,
1688 ,1687 ,1687 ,1686 ,1685 ,1685 ,1684 ,1684 ,1683 ,1682 ,1682 ,1681 ,1681 ,1680 ,1679 ,1679 ,
1678 ,1678 ,1677 ,1676 ,1676 ,1675 ,1675 ,1674 ,1673 ,1673 ,1672 ,1672 ,1671 ,1671 ,1670 ,1669 ,
1669 ,1668 ,1668 ,1667 ,1666 ,1666 ,1665 ,1665 ,1664 ,1664 ,1663 ,1662 ,1662 ,1661 ,1661 ,1660 ,
1660 ,1659 ,1658 ,1658 ,1657 ,1657 ,1656 ,1656 ,1655 ,1655 ,1654 ,1653 ,1653 ,1652 ,1652 ,1651 ,
1651 ,1650 ,1649 ,1649 ,1648 ,1648 ,1647 ,1647 ,1646 ,1646 ,1645 ,1645 ,1644 ,1643 ,1643 ,1642 ,
1642 ,1641 ,1641 ,1640 ,1640 ,1639 ,1639 ,1638 ,1637 ,1637 ,1636 ,1636 ,1635 ,1635 ,1634 ,1634 ,
1633 ,1633 ,1632 ,1632 ,1631 ,1630 ,1630 ,1629 ,1629 ,1628 ,1628 ,1627 ,1627 ,1626 ,1626 ,1625 ,
1625 ,1624 ,1624 ,1623 ,1623 ,1622 ,1621 ,1621 ,1620 ,1620 ,1619 ,1619 ,1618 ,1618 ,1617 ,1617 ,
1616 ,1616 ,1615 ,1615 ,1614 ,1614 ,1613 ,1613 ,1612 ,1612 ,1611 ,1611 ,1610 ,1610 ,1609 ,1609 ,
1608 ,1608 ,1607 ,1607 ,1606 ,1605 ,1605 ,1604 ,1604 ,1603 ,1603 ,1602 ,1602 ,1601 ,1601 ,1600 ,
1600 ,1599 ,1599 ,1598 ,1598 ,1597 ,1597 ,1596 ,1596 ,1595 ,1595 ,1594 ,1594 ,1593 ,1593 ,1592 ,
1592 ,1591 ,1591 ,1590 ,1590 ,1589 ,1589 ,1589 ,1588 ,1588 ,1587 ,1587 ,1586 ,1586 ,1585 ,1585 ,
1584 ,1584 ,1583 ,1583 ,1582 ,1582 ,1581 ,1581 ,1580 ,1580 ,1579 ,1579 ,1578 ,1578 ,1577 ,1577 ,
1576 ,1576 ,1575 ,1575 ,1574 ,1574 ,1573 ,1573 ,1573 ,1572 ,1572 ,1571 ,1571 ,1570 ,1570 ,1569 ,
1569 ,1568 ,1568 ,1567 ,1567 ,1566 ,1566 ,1565 ,1565 ,1564 ,1564 ,1563 ,1563 ,1563 ,1562 ,1562 ,
1561 ,1561 ,1560 ,1560 ,1559 ,1559 ,1558 ,1558 ,1557 ,1557 ,1556 ,1556 ,1556 ,1555 ,1555 ,1554 ,
1554 ,1553 ,1553 ,1552 ,1552 ,1551 ,1551 ,1550 ,1550 ,1550 ,1549 ,1549 ,1548 ,1548 ,1547 ,1547 ,
1546 ,1546 ,1545 ,1545 ,1544 ,1544 ,1544 ,1543 ,1543 ,1542 ,1542 ,1541 ,1541 ,1540 ,1540 ,1539 ,
1539 ,1539 ,1538 ,1538 ,1537 ,1537 ,1536 ,1536 ,1535 ,1535 ,1535 ,1534 ,1534 ,1533 ,1533 ,1532 ,
1532 ,1531 ,1531 ,1530 ,1530 ,1530 ,1529 ,1529 ,1528 ,1528 ,1527 ,1527 ,1526 ,1526 ,1526 ,1525 ,
1525 ,1524 ,1524 ,1523 ,1523 ,1523 ,1522 ,1522 ,1521 ,1521 ,1520 ,1520 ,1519 ,1519 ,1519 ,1518 ,
1518 ,1517 ,1517 ,1516 ,1516 ,1515 ,1515 ,1515 ,1514 ,1514 ,1513 ,1513 ,1512 ,1512 ,1512 ,1511 ,
1511 ,1510 ,1510 ,1509 ,1509 ,1509 ,1508 ,1508 ,1507 ,1507 ,1506 ,1506 ,1505 ,1505 ,1505 ,1504 ,
1504 ,1503 ,1503 ,1502 ,1502 ,1502 ,1501 ,1501 ,1500 ,1500 ,1499 ,1499 ,1499 ,1498 ,1498 ,1497 ,
1497 ,1497 ,1496 ,1496 ,1495 ,1495 ,1494 ,1494 ,1494 ,1493 ,1493 ,1492 ,1492 ,1491 ,1491 ,1491 ,
1490 ,1490 ,1489 ,1489 ,1488 ,1488 ,1488 ,1487 ,1487 ,1486 ,1486 ,1486 ,1485 ,1485 ,1484 ,1484 ,
1483 ,1483 ,1483 ,1482 ,1482 ,1481 ,1481 ,1481 ,1480 ,1480 ,1479 ,1479 ,1478 ,1478 ,1478 ,1477 ,
1477 ,1476 ,1476 ,1476 ,1475 ,1475 ,1474 ,1474 ,1473 ,1473 ,1473 ,1472 ,1472 ,1471 ,1471 ,1471 ,
1470 ,1470 ,1469 ,1469 ,1469 ,1468 ,1468 ,1467 ,1467 ,1466 ,1466 ,1466 ,1465 ,1465 ,1464 ,1464 ,
1464 ,1463 ,1463 ,1462 ,1462 ,1462 ,1461 ,1461 ,1460 ,1460 ,1460 ,1459 ,1459 ,1458 ,1458 ,1458 ,
1457 ,1457 ,1456 ,1456 ,1456 ,1455 ,1455 ,1454 ,1454 ,1453 ,1453 ,1453 ,1452 ,1452 ,1451 ,1451 ,
1451 ,1450 ,1450 ,1449 ,1449 ,1449 ,1448 ,1448 ,1447 ,1447 ,1447 ,1446 ,1446 ,1445 ,1445 ,1445 ,
1444 ,1444 ,1443 ,1443 ,1443 ,1442 ,1442 ,1441 ,1441 ,1441 ,1440 ,1440 ,1440 ,1439 ,1439 ,1438 ,
1438 ,1438 ,1437 ,1437 ,1436 ,1436 ,1436 ,1435 ,1435 ,1434 ,1434 ,1434 ,1433 ,1433 ,1432 ,1432 ,
1432 ,1431 ,1431 ,1430 ,1430 ,1430 ,1429 ,1429 ,1428 ,1428 ,1428 ,1427 ,1427 ,1427 ,1426 ,1426 ,
1425 ,1425 ,1425 ,1424 ,1424 ,1423 ,1423 ,1423 ,1422 ,1422 ,1421 ,1421 ,1421 ,1420 ,1420 ,1420 ,
1419 ,1419 ,1418 ,1418 ,1418 ,1417 ,1417 ,1416 ,1416 ,1416 ,1415 ,1415 ,1414 ,1414 ,1414 ,1413 ,
1413 ,1413 ,1412 ,1412 ,1411 ,1411 ,1411 ,1410 ,1410 ,1409 ,1409 ,1409 ,1408 ,1408 ,1408 ,1407 ,
1407 ,1406 ,1406 ,1406 ,1405 ,1405 ,1405 ,1404 ,1404 ,1403 ,1403 ,1403 ,1402 ,1402 ,1401 ,1401 ,
1401 ,1400 ,1400 ,1400 ,1399 ,1399 ,1398 ,1398 ,1398 ,1397 ,1397 ,1397 ,1396 ,1396 ,1395 ,1395 ,
1395 ,1394 ,1394 ,1394 ,1393 ,1393 ,1392 ,1392 ,1392 ,1391 ,1391 ,1390 ,1390 ,1390 ,1389 ,1389 ,
1389 ,1388 ,1388 ,1387 ,1387 ,1387 ,1386 ,1386 ,1386 ,1385 ,1385 ,1384 ,1384 ,1384 ,1383 ,1383 ,
1383 ,1382 ,1382 ,1381 ,1381 ,1381 ,1380 ,1380 ,1380 ,1379 ,1379 ,1379 ,1378 ,1378 ,1377 ,1377 ,
1377 ,1376 ,1376 ,1376 ,1375 ,1375 ,1374 ,1374 ,1374 ,1373 ,1373 ,1373 ,1372 ,1372 ,1371 ,1371 ,
1371 ,1370 ,1370 ,1370 ,1369 ,1369 ,1369 ,1368 ,1368 ,1367 ,1367 ,1367 ,1366 ,1366 ,1366 ,1365 ,
1365 ,1364 ,1364 ,1364 ,1363 ,1363 ,1363 ,1362 ,1362 ,1362 ,1361 ,1361 ,1360 ,1360 ,1360 ,1359 ,
1359 ,1359 ,1358 ,1358 ,1358 ,1357 ,1357 ,1356 ,1356 ,1356 ,1355 ,1355 ,1355 ,1354 ,1354 ,1353 ,
1353 ,1353 ,1352 ,1352 ,1352 ,1351 ,1351 ,1351 ,1350 ,1350 ,1349 ,1349 ,1349 ,1348 ,1348 ,1348 ,
1347 ,1347 ,1347 ,1346 ,1346 ,1346 ,1345 ,1345 ,1344 ,1344 ,1344 ,1343 ,1343 ,1343 ,1342 ,1342 ,
1342 ,1341 ,1341 ,1340 ,1340 ,1340 ,1339 ,1339 ,1339 ,1338 ,1338 ,1338 ,1337 ,1337 ,1337 ,1336 ,
1336 ,1335 ,1335 ,1335 ,1334 ,1334 ,1334 ,1333 ,1333 ,1333 ,1332 ,1332 ,1331 ,1331 ,1331 ,1330 ,
1330 ,1330 ,1329 ,1329 ,1329 ,1328 ,1328 ,1328 ,1327 ,1327 ,1327 ,1326 ,1326 ,1325 ,1325 ,1325 ,
1324 ,1324 ,1324 ,1323 ,1323 ,1323 ,1322 ,1322 ,1322 ,1321 ,1321 ,1320 ,1320 ,1320 ,1319 ,1319 ,
1319 ,1318 ,1318 ,1318 ,1317 ,1317 ,1317 ,1316 ,1316 ,1316 ,1315 ,1315 ,1314 ,1314 ,1314 ,1313 ,
1313 ,1313 ,1312 ,1312 ,1312 ,1311 ,1311 ,1311 ,1310 ,1310 ,1310 ,1309 ,1309 ,1308 ,1308 ,1308 ,
1307 ,1307 ,1307 ,1306 ,1306 ,1306 ,1305 ,1305 ,1305 ,1304 ,1304 ,1304 ,1303 ,1303 ,1303 ,1302 ,
1302 ,1301 ,1301 ,1301 ,1300 ,1300 ,1300 ,1299 ,1299 ,1299 ,1298 ,1298 ,1298 ,1297 ,1297 ,1297 ,
1296 ,1296 ,1296 ,1295 ,1295 ,1294 ,1294 ,1294 ,1293 ,1293 ,1293 ,1292 ,1292 ,1292 ,1291 ,1291 ,
1291 ,1290 ,1290 ,1290 ,1289 ,1289 ,1289 ,1288 ,1288 ,1288 ,1287 ,1287 ,1286 ,1286 ,1286 ,1285 ,
1285 ,1285 ,1284 ,1284 ,1284 ,1283 ,1283 ,1283 ,1282 ,1282 ,1282 ,1281 ,1281 ,1281 ,1280 ,1280 ,
1280 ,1279 ,1279 ,1279 ,1278 ,1278 ,1278 ,1277 ,1277 ,1276 ,1276 ,1276 ,1275 ,1275 ,1275 ,1274 ,
1274 ,1274 ,1273 ,1273 ,1273 ,1272 ,1272 ,1272 ,1271 ,1271 ,1271 ,1270 ,1270 ,1270 ,1269 ,1269 ,
1269 ,1268 ,1268 ,1268 ,1267 ,1267 ,1267 ,1266 ,1266 ,1266 ,1265 ,1265 ,1265 ,1264 ,1264 ,1263 ,
1263 ,1263 ,1262 ,1262 ,1262 ,1261 ,1261 ,1261 ,1260 ,1260 ,1260 ,1259 ,1259 ,1259 ,1258 ,1258 ,
1258 ,1257 ,1257 ,1257 ,1256 ,1256 ,1256 ,1255 ,1255 ,1255 ,1254 ,1254 ,1254 ,1253 ,1253 ,1253 ,
1252 ,1252 ,1252 ,1251 ,1251 ,1251 ,1250 ,1250 ,1250 ,1249 ,1249 ,1249 ,1248 ,1248 ,1248 ,1247 ,
1247 ,1247 ,1246 ,1246 ,1245 ,1245 ,1245 ,1244 ,1244 ,1244 ,1243 ,1243 ,1243 ,1242 ,1242 ,1242 ,
1241 ,1241 ,1241 ,1240 ,1240 ,1240 ,1239 ,1239 ,1239 ,1238 ,1238 ,1238 ,1237 ,1237 ,1237 ,1236 ,
1236 ,1236 ,1235 ,1235 ,1235 ,1234 ,1234 ,1234 ,1233 ,1233 ,1233 ,1232 ,1232 ,1232 ,1231 ,1231 ,
1231 ,1230 ,1230 ,1230 ,1229 ,1229 ,1229 ,1228 ,1228 ,1228 ,1227 ,1227 ,1227 ,1226 ,1226 ,1226 ,
1225 ,1225 ,1225 ,1224 ,1224 ,1224 ,1223 ,1223 ,1223 ,1222 ,1222 ,1222 ,1221 ,1221 ,1221 ,1220 ,
1220 ,1220 ,1219 ,1219 ,1219 ,1218 ,1218 ,1218 ,1217 ,1217 ,1217 ,1216 ,1216 ,1216 ,1215 ,1215 ,
1215 ,1214 ,1214 ,1214 ,1213 ,1213 ,1213 ,1212 ,1212 ,1212 ,1211 ,1211 ,1211 ,1210 ,1210 ,1210 ,
1209 ,1209 ,1209 ,1208 ,1208 ,1208 ,1207 ,1207 ,1207 ,1206 ,1206 ,1206 ,1205 ,1205 ,1205 ,1204 ,
1204 ,1204 ,1203 ,1203 ,1203 ,1202 ,1202 ,1202 ,1201 ,1201 ,1201 ,1200 ,1200 ,1200 ,1199 ,1199 ,
1199 ,1198 ,1198 ,1198 ,1197 ,1197 ,1197 ,1196 ,1196 ,1196 ,1195 ,1195 ,1195 ,1194 ,1194 ,1194 ,
1193 ,1193 ,1193 ,1192 ,1192 ,1192 ,1192 ,1191 ,1191 ,1191 ,1190 ,1190 ,1190 ,1189 ,1189 ,1189 ,
1188 ,1188 ,1188 ,1187 ,1187 ,1187 ,1186 ,1186 ,1186 ,1185 ,1185 ,1185 ,1184 ,1184 ,1184 ,1183 ,
1183 ,1183 ,1182 ,1182 ,1182 ,1181 ,1181 ,1181 ,1180 ,1180 ,1180 ,1179 ,1179 ,1179 ,1178 ,1178 ,
1178 ,1177 ,1177 ,1177 ,1176 ,1176 ,1176 ,1175 ,1175 ,1175 ,1174 ,1174 ,1174 ,1173 ,1173 ,1173 ,
1172 ,1172 ,1172 ,1172 ,1171 ,1171 ,1171 ,1170 ,1170 ,1170 ,1169 ,1169 ,1169 ,1168 ,1168 ,1168 ,
1167 ,1167 ,1167 ,1166 ,1166 ,1166 ,1165 ,1165 ,1165 ,1164 ,1164 ,1164 ,1163 ,1163 ,1163 ,1162 ,
1162 ,1162 ,1161 ,1161 ,1161 ,1160 ,1160 ,1160 ,1159 ,1159 ,1159 ,1158 ,1158 ,1158 ,1157 ,1157 ,
1157 ,1157 ,1156 ,1156 ,1156 ,1155 ,1155 ,1155 ,1154 ,1154 ,1154 ,1153 ,1153 ,1153 ,1152 ,1152 ,
1152 ,1151 ,1151 ,1151 ,1150 ,1150 ,1150 ,1149 ,1149 ,1149 ,1148 ,1148 ,1148 ,1147 ,1147 ,1147 ,
1146 ,1146 ,1146 ,1145 ,1145 ,1145 ,1145 ,1144 ,1144 ,1144 ,1143 ,1143 ,1143 ,1142 ,1142 ,1142 ,
1141 ,1141 ,1141 ,1140 ,1140 ,1140 ,1139 ,1139 ,1139 ,1138 ,1138 ,1138 ,1137 ,1137 ,1137 ,1136 ,
1136 ,1136 ,1135 ,1135 ,1135 ,1134 ,1134 ,1134 ,1134 ,1133 ,1133 ,1133 ,1132 ,1132 ,1132 ,1131 ,
1131 ,1131 ,1130 ,1130 ,1130 ,1129 ,1129 ,1129 ,1128 ,1128 ,1128 ,1127 ,1127 ,1127 ,1126 ,1126 ,
1126 ,1125 ,1125 ,1125 ,1124 ,1124 ,1124 ,1124 ,1123 ,1123 ,1123 ,1122 ,1122 ,1122 ,1121 ,1121 ,
1121 ,1120 ,1120 ,1120 ,1119 ,1119 ,1119 ,1118 ,1118 ,1118 ,1117 ,1117 ,1117 ,1116 ,1116 ,1116 ,
1115 ,1115 ,1115 ,1115 ,1114 ,1114 ,1114 ,1113 ,1113 ,1113 ,1112 ,1112 ,1112 ,1111 ,1111 ,1111 ,
1110 ,1110 ,1110 ,1109 ,1109 ,1109 ,1108 ,1108 ,1108 ,1107 ,1107 ,1107 ,1106 ,1106 ,1106 ,1106 ,
1105 ,1105 ,1105 ,1104 ,1104 ,1104 ,1103 ,1103 ,1103 ,1102 ,1102 ,1102 ,1101 ,1101 ,1101 ,1100 ,
1100 ,1100 ,1099 ,1099 ,1099 ,1098 ,1098 ,1098 ,1098 ,1097 ,1097 ,1097 ,1096 ,1096 ,1096 ,1095 ,
1095 ,1095 ,1094 ,1094 ,1094 ,1093 ,1093 ,1093 ,1092 ,1092 ,1092 ,1091 ,1091 ,1091 ,1090 ,1090 ,
1090 ,1090 ,1089 ,1089 ,1089 ,1088 ,1088 ,1088 ,1087 ,1087 ,1087 ,1086 ,1086 ,1086 ,1085 ,1085 ,
1085 ,1084 ,1084 ,1084 ,1083 ,1083 ,1083 ,1082 ,1082 ,1082 ,1082 ,1081 ,1081 ,1081 ,1080 ,1080 ,
1080 ,1079 ,1079 ,1079 ,1078 ,1078 ,1078 ,1077 ,1077 ,1077 ,1076 ,1076 ,1076 ,1075 ,1075 ,1075 ,
1074 ,1074 ,1074 ,1074 ,1073 ,1073 ,1073 ,1072 ,1072 ,1072 ,1071 ,1071 ,1071 ,1070 ,1070 ,1070 ,
1069 ,1069 ,1069 ,1068 ,1068 ,1068 ,1067 ,1067 ,1067 ,1067 ,1066 ,1066 ,1066 ,1065 ,1065 ,1065 ,
1064 ,1064 ,1064 ,1063 ,1063 ,1063 ,1062 ,1062 ,1062 ,1061 ,1061 ,1061 ,1060 ,1060 ,1060 ,1059 ,
1059 ,1059 ,1059 ,1058 ,1058 ,1058 ,1057 ,1057 ,1057 ,1056 ,1056 ,1056 ,1055 ,1055 ,1055 ,1054 ,
1054 ,1054 ,1053 ,1053 ,1053 ,1052 ,1052 ,1052 ,1052 ,1051 ,1051 ,1051 ,1050 ,1050 ,1050 ,1049 ,
1049 ,1049 ,1048 ,1048 ,1048 ,1047 ,1047 ,1047 ,1046 ,1046 ,1046 ,1045 ,1045 ,1045 ,1045 ,1044 ,
1044 ,1044 ,1043 ,1043 ,1043 ,1042 ,1042 ,1042 ,1041 ,1041 ,1041 ,1040 ,1040 ,1040 ,1039 ,1039 ,
1039 ,1038 ,1038 ,1038 ,1038 ,1037 ,1037 ,1037 ,1036 ,1036 ,1036 ,1035 ,1035 ,1035 ,1034 ,1034 ,
1034 ,1033 ,1033 ,1033 ,1032 ,1032 ,1032 ,1031 ,1031 ,1031 ,1031 ,1030 ,1030 ,1030 ,1029 ,1029 ,
1029 ,1028 ,1028 ,1028 ,1027 ,1027 ,1027 ,1026 ,1026 ,1026 ,1025 ,1025 ,1025 ,1024 ,1024 ,1024 ,
1023 ,1023 ,1023 ,1023 ,1022 ,1022 ,1022 ,1021 ,1021 ,1021 ,1020 ,1020 ,1020 ,1019 ,1019 ,1019 ,
1018 ,1018 ,1018 ,1017 ,1017 ,1017 ,1016 ,1016 ,1016 ,1016 ,1015 ,1015 ,1015 ,1014 ,1014 ,1014 ,
1013 ,1013 ,1013 ,1012 ,1012 ,1012 ,1011 ,1011 ,1011 ,1010 ,1010 ,1010 ,1009 ,1009 ,1009 ,1009 ,
1008 ,1008 ,1008 ,1007 ,1007 ,1007 ,1006 ,1006 ,1006 ,1005 ,1005 ,1005 ,1004 ,1004 ,1004 ,1003 ,
1003 ,1003 ,1002 ,1002 ,1002 ,1002 ,1001 ,1001 ,1001 ,1000 ,1000 ,1000 ,999 ,999 ,999 ,998 ,
998 ,998 ,997 ,997 ,997 ,996 ,996 ,996 ,995 ,995 ,995 ,995 ,994 ,994 ,994 ,993 ,
993 ,993 ,992 ,992 ,992 ,991 ,991 ,991 ,990 ,990 ,990 ,989 ,989 ,989 ,988 ,988 ,
988 ,988 ,987 ,987 ,987 ,986 ,986 ,986 ,985 ,985 ,985 ,984 ,984 ,984 ,983 ,983 ,
983 ,982 ,982 ,982 ,981 ,981 ,981 ,980 ,980 ,980 ,980 ,979 ,979 ,979 ,978 ,978 ,
978 ,977 ,977 ,977 ,976 ,976 ,976 ,975 ,975 ,975 ,974 ,974 ,974 ,973 ,973 ,973 ,
973 ,972 ,972 ,972 ,971 ,971 ,971 ,970 ,970 ,970 ,969 ,969 ,969 ,968 ,968 ,968 ,
967 ,967 ,967 ,966 ,966 ,966 ,965 ,965 ,965 ,965 ,964 ,964 ,964 ,963 ,963 ,963 ,
962 ,962 ,962 ,961 ,961 ,961 ,960 ,960 ,960 ,959 ,959 ,959 ,958 ,958 ,958 ,957 ,
957 ,957 ,957 ,956 ,956 ,956 ,955 ,955 ,955 ,954 ,954 ,954 ,953 ,953 ,953 ,952 ,
952 ,952 ,951 ,951 ,951 ,950 ,950 ,950 ,949 ,949 ,949 ,949 ,948 ,948 ,948 ,947 ,
947 ,947 ,946 ,946 ,946 ,945 ,945 ,945 ,944 ,944 ,944 ,943 ,943 ,943 ,942 ,942 ,
942 ,941 ,941 ,941 ,941 ,940 ,940 ,940 ,939 ,939 ,939 ,938 ,938 ,938 ,937 ,937 ,
937 ,936 ,936 ,936 ,935 ,935 ,935 ,934 ,934 ,934 ,933 ,933 ,933 ,932 ,932 ,932 ,
932 ,931 ,931 ,931 ,930 ,930 ,930 ,929 ,929 ,929 ,928 ,928 ,928 ,927 ,927 ,927 ,
926 ,926 ,926 ,925 ,925 ,925 ,924 ,924 ,924 ,923 ,923 ,923 ,923 ,922 ,922 ,922 ,
921 ,921 ,921 ,920 ,920 ,920 ,919 ,919 ,919 ,918 ,918 ,918 ,917 ,917 ,917 ,916 ,
916 ,916 ,915 ,915 ,915 ,914 ,914 ,914 ,913 ,913 ,913 ,913 ,912 ,912 ,912 ,911 ,
911 ,911 ,910 ,910 ,910 ,909 ,909 ,909 ,908 ,908 ,908 ,907 ,907 ,907 ,906 ,906 ,
906 ,905 ,905 ,905 ,904 ,904 ,904 ,903 ,903 ,903 ,902 ,902 ,902 ,902 ,901 ,901 ,
901 ,900 ,900 ,900 ,899 ,899 ,899 ,898 ,898 ,898 ,897 ,897 ,897 ,896 ,896 ,896 ,
895 ,895 ,895 ,894 ,894 ,894 ,893 ,893 ,893 ,892 ,892 ,892 ,891 ,891 ,891 ,890 ,
890 ,890 ,890 ,889 ,889 ,889 ,888 ,888 ,888 ,887 ,887 ,887 ,886 ,886 ,886 ,885 ,
885 ,885 ,884 ,884 ,884 ,883 ,883 ,883 ,882 ,882 ,882 ,881 ,881 ,881 ,880 ,880 ,
880 ,879 ,879 ,879 ,878 ,878 ,878 ,877 ,877 ,877 ,876 ,876 ,876 ,875 ,875 ,875 ,
875 ,874 ,874 ,874 ,873 ,873 ,873 ,872 ,872 ,872 ,871 ,871 ,871 ,870 ,870 ,870 ,
869 ,869 ,869 ,868 ,868 ,868 ,867 ,867 ,867 ,866 ,866 ,866 ,865 ,865 ,865 ,864 ,
864 ,864 ,863 ,863 ,863 ,862 ,862 ,862 ,861 ,861 ,861 ,860 ,860 ,860 ,859 ,859 ,
859 ,858 ,858 ,858 ,857 ,857 ,857 ,856 ,856 ,856 ,855 ,855 ,855 ,855 ,854 ,854 ,
854 ,853 ,853 ,853 ,852 ,852 ,852 ,851 ,851 ,851 ,850 ,850 ,850 ,849 ,849 ,849 ,
848 ,848 ,848 ,847 ,847 ,847 ,846 ,846 ,846 ,845 ,845 ,845 ,844 ,844 ,844 ,843 ,
843 ,843 ,842 ,842 ,842 ,841 ,841 ,841 ,840 ,840 ,840 ,839 ,839 ,839 ,838 ,838 ,
838 ,837 ,837 ,837 ,836 ,836 ,836 ,835 ,835 ,835 ,834 ,834 ,834 ,833 ,833 ,833 ,
832 ,832 ,832 ,831 ,831 ,831 ,830 ,830 ,830 ,829 ,829 ,829 ,828 ,828 ,828 ,827 ,
827 ,827 ,826 ,826 ,826 ,825 ,825 ,825 ,824 ,824 ,824 ,823 ,823 ,823 ,822 ,822 ,
822 ,821 ,821 ,821 ,820 ,820 ,820 ,819 ,819 ,819 ,818 ,818 ,818 ,817 ,817 ,817 ,
816 ,816 ,816 ,815 ,815 ,815 ,814 ,814 ,814 ,813 ,813 ,813 ,812 ,812 ,812 ,811 ,
811 ,811 ,810 ,810 ,810 ,809 ,809 ,809 ,808 ,808 ,808 ,807 ,807 ,807 ,806 ,806 ,
806 ,805 ,805 ,805 ,804 ,804 ,804 ,803 ,803 ,803 ,802 ,802 ,802 ,801 ,801 ,800 ,
800 ,800 ,799 ,799 ,799 ,798 ,798 ,798 ,797 ,797 ,797 ,796 ,796 ,796 ,795 ,795 ,
795 ,794 ,794 ,794 ,793 ,793 ,793 ,792 ,792 ,792 ,791 ,791 ,791 ,790 ,790 ,790 ,
789 ,789 ,789 ,788 ,788 ,788 ,787 ,787 ,787 ,786 ,786 ,786 ,785 ,785 ,785 ,784 ,
784 ,784 ,783 ,783 ,782 ,782 ,782 ,781 ,781 ,781 ,780 ,780 ,780 ,779 ,779 ,779 ,
778 ,778 ,778 ,777 ,777 ,777 ,776 ,776 ,776 ,775 ,775 ,775 ,774 ,774 ,774 ,773 ,
773 ,773 ,772 ,772 ,772 ,771 ,771 ,771 ,770 ,770 ,769 ,769 ,769 ,768 ,768 ,768 ,
767 ,767 ,767 ,766 ,766 ,766 ,765 ,765 ,765 ,764 ,764 ,764 ,763 ,763 ,763 ,762 ,
762 ,762 ,761 ,761 ,761 ,760 ,760 ,759 ,759 ,759 ,758 ,758 ,758 ,757 ,757 ,757 ,
756 ,756 ,756 ,755 ,755 ,755 ,754 ,754 ,754 ,753 ,753 ,753 ,752 ,752 ,751 ,751 ,
751 ,750 ,750 ,750 ,749 ,749 ,749 ,748 ,748 ,748 ,747 ,747 ,747 ,746 ,746 ,746 ,
745 ,745 ,744 ,744 ,744 ,743 ,743 ,743 ,742 ,742 ,742 ,741 ,741 ,741 ,740 ,740 ,
740 ,739 ,739 ,739 ,738 ,738 ,737 ,737 ,737 ,736 ,736 ,736 ,735 ,735 ,735 ,734 ,
734 ,734 ,733 ,733 ,733 ,732 ,732 ,731 ,731 ,731 ,730 ,730 ,730 ,729 ,729 ,729 ,
728 ,728 ,728 ,727 ,727 ,727 ,726 ,726 ,725 ,725 ,725 ,724 ,724 ,724 ,723 ,723 ,
723 ,722 ,722 ,722 ,721 ,721 ,720 ,720 ,720 ,719 ,719 ,719 ,718 ,718 ,718 ,717 ,
717 ,717 ,716 ,716 ,716 ,715 ,715 ,714 ,714 ,714 ,713 ,713 ,713 ,712 ,712 ,712 ,
711 ,711 ,710 ,710 ,710 ,709 ,709 ,709 ,708 ,708 ,708 ,707 ,707 ,707 ,706 ,706 ,
705 ,705 ,705 ,704 ,704 ,704 ,703 ,703 ,703 ,702 ,702 ,701 ,701 ,701 ,700 ,700 ,
700 ,699 ,699 ,699 ,698 ,698 ,698 ,697 ,697 ,696 ,696 ,696 ,695 ,695 ,695 ,694 ,
694 ,694 ,693 ,693 ,692 ,692 ,692 ,691 ,691 ,691 ,690 ,690 ,689 ,689 ,689 ,688 ,
688 ,688 ,687 ,687 ,687 ,686 ,686 ,685 ,685 ,685 ,684 ,684 ,684 ,683 ,683 ,683 ,
682 ,682 ,681 ,681 ,681 ,680 ,680 ,680 ,679 ,679 ,678 ,678 ,678 ,677 ,677 ,677 ,
676 ,676 ,676 ,675 ,675 ,674 ,674 ,674 ,673 ,673 ,673 ,672 ,672 ,671 ,671 ,671 ,
670 ,670 ,670 ,669 ,669 ,668 ,668 ,668 ,667 ,667 ,667 ,666 ,666 ,666 ,665 ,665 ,
664 ,664 ,664 ,663 ,663 ,663 ,662 ,662 ,661 ,661 ,661 ,660 ,660 ,660 ,659 ,659 ,
658 ,658 ,658 ,657 ,657 ,657 ,656 ,656 ,655 ,655 ,655 ,654 ,654 ,653 ,653 ,653 ,
652 ,652 ,652 ,651 ,651 ,650 ,650 ,650 ,649 ,649 ,649 ,648 ,648 ,647 ,647 ,647 ,
646 ,646 ,646 ,645 ,645 ,644 ,644 ,644 ,643 ,643 ,642 ,642 ,642 ,641 ,641 ,641 ,
640 ,640 ,639 ,639 ,639 ,638 ,638 ,638 ,637 ,637 ,636 ,636 ,636 ,635 ,635 ,634 ,
634 ,634 ,633 ,633 ,633 ,632 ,632 ,631 ,631 ,631 ,630 ,630 ,629 ,629 ,629 ,628 ,
628 ,627 ,627 ,627 ,626 ,626 ,626 ,625 ,625 ,624 ,624 ,624 ,623 ,623 ,622 ,622 ,
622 ,621 ,621 ,620 ,620 ,620 ,619 ,619 ,619 ,618 ,618 ,617 ,617 ,617 ,616 ,616 ,
615 ,615 ,615 ,614 ,614 ,613 ,613 ,613 ,612 ,612 ,611 ,611 ,611 ,610 ,610 ,609 ,
609 ,609 ,608 ,608 ,607 ,607 ,607 ,606 ,606 ,606 ,605 ,605 ,604 ,604 ,604 ,603 ,
603 ,602 ,602 ,602 ,601 ,601 ,600 ,600 ,600 ,599 ,599 ,598 ,598 ,598 ,597 ,597 ,
596 ,596 ,596 ,595 ,595 ,594 ,594 ,594 ,593 ,593 ,592 ,592 ,591 ,591 ,591 ,590 ,
590 ,589 ,589 ,589 ,588 ,588 ,587 ,587 ,587 ,586 ,586 ,585 ,585 ,585 ,584 ,584 ,
583 ,583 ,583 ,582 ,582 ,581 ,581 ,581 ,580 ,580 ,579 ,579 ,578 ,578 ,578 ,577 ,
577 ,576 ,576 ,576 ,575 ,575 ,574 ,574 ,574 ,573 ,573 ,572 ,572 ,571 ,571 ,571 ,
570 ,570 ,569 ,569 ,569 ,568 ,568 ,567 ,567 ,566 ,566 ,566 ,565 ,565 ,564 ,564 ,
564 ,563 ,563 ,562 ,562 ,561 ,561 ,561 ,560 ,560 ,559 ,559 ,559 ,558 ,558 ,557 ,
557 ,556 ,556 ,556 ,555 ,555 ,554 ,554 ,553 ,553 ,553 ,552 ,552 ,551 ,551 ,550 ,
550 ,550 ,549 ,549 ,548 ,548 ,548 ,547 ,547 ,546 ,546 ,545 ,545 ,545 ,544 ,544 ,
543 ,543 ,542 ,542 ,542 ,541 ,541 ,540 ,540 ,539 ,539 ,538 ,538 ,538 ,537 ,537 ,
536 ,536 ,535 ,535 ,535 ,534 ,534 ,533 ,533 ,532 ,532 ,532 ,531 ,531 ,530 ,530 ,
529 ,529 ,528 ,528 ,528 ,527 ,527 ,526 ,526 ,525 ,525 ,524 ,524 ,524 ,523 ,523 ,
522 ,522 ,521 ,521 ,521 ,520 ,520 ,519 ,519 ,518 ,518 ,517 ,517 ,517 ,516 ,516 ,
515 ,515 ,514 ,514 ,513 ,513 ,512 ,512 ,512 ,511 ,511 ,510 ,510 ,509 ,509 ,508 ,
508 ,508 ,507 ,507 ,506 ,506 ,505 ,505 ,504 ,504 ,503 ,503 ,503 ,502 ,502 ,501 ,
501 ,500 ,500 ,499 ,499 ,498 ,498 ,497 ,497 ,497 ,496 ,496 ,495 ,495 ,494 ,494 ,
493 ,493 ,492 ,492 ,491 ,491 ,491 ,490 ,490 ,489 ,489 ,488 ,488 ,487 ,487 ,486 ,
486 ,485 ,485 ,484 ,484 ,484 ,483 ,483 ,482 ,482 ,481 ,481 ,480 ,480 ,479 ,479 ,
478 ,478 ,477 ,477 ,476 ,476 ,475 ,475 ,474 ,474 ,474 ,473 ,473 ,472 ,472 ,471 ,
471 ,470 ,470 ,469 ,469 ,468 ,468 ,467 ,467 ,466 ,466 ,465 ,465 ,464 ,464 ,463 ,
463 ,462 ,462 ,461 ,461 ,460 ,460 ,459 ,459 ,458 ,458 ,458 ,457 ,457 ,456 ,456 ,
455 ,455 ,454 ,454 ,453 ,453 ,452 ,452 ,451 ,451 ,450 ,450 ,449 ,449 ,448 ,448 ,
447 ,447 ,446 ,446 ,445 ,445 ,444 ,444 ,443 ,443 ,442 ,442 ,441 ,440 ,440 ,439 ,
439 ,438 ,438 ,437 ,437 ,436 ,436 ,435 ,435 ,434 ,434 ,433 ,433 ,432 ,432 ,431 ,
431 ,430 ,430 ,429 ,429 ,428 ,428 ,427 ,427 ,426 ,426 ,425 ,424 ,424 ,423 ,423 ,
422 ,422 ,421 ,421 ,420 ,420 ,419 ,419 ,418 ,418 ,417 ,417 ,416 ,415 ,415 ,414 ,
414 ,413 ,413 ,412 ,412 ,411 ,411 ,410 ,410 ,409 ,408 ,408 ,407 ,407 ,406 ,406 ,
405 ,405 ,404 ,404 ,403 ,402 ,402 ,401 ,401 ,400 ,400 ,399 ,399 ,398 ,398 ,397 ,
396 ,396 ,395 ,395 ,394 ,394 ,393 ,392 ,392 ,391 ,391 ,390 ,390 ,389 ,389 ,388 ,
387 ,387 ,386 ,386 ,385 ,385 ,384 ,383 ,383 ,382 ,382 ,381 ,381 ,380 ,379 ,379 ,
378 ,378 ,377 ,376 ,376 ,375 ,375 ,374 ,374 ,373 ,372 ,372 ,371 ,371 ,370 ,369 ,
369 ,368 ,368 ,367 ,366 ,366 ,365 ,365 ,364 ,363 ,363 ,362 ,362 ,361 ,360 ,360 ,
359 ,359 ,358 ,357 ,357 ,356 ,356 ,355 ,354 ,354 ,353 ,353 ,352 ,351 ,351 ,350 ,
349 ,349 ,348 ,348 ,347 ,346 ,346 ,345 ,344 ,344 ,343 ,342 ,342 ,341 ,341 ,340 ,
339 ,339 ,338 ,337 ,337 ,336 ,335 ,335 ,334 ,334 ,333 ,332 ,332 ,331 ,330 ,330 ,
329 ,328 ,328 ,327 ,326 ,326 ,325 ,324 ,324 ,323 ,322 ,322 ,321 ,320 ,320 ,319 ,
318 ,318 ,317 ,316 ,316 ,315 ,314 ,313 ,313 ,312 ,311 ,311 ,310 ,309 ,309 ,308 ,
307 ,307 ,306 ,305 ,304 ,304 ,303 ,302 ,302 ,301 ,300 ,299 ,299 ,298 ,297 ,297 ,
296 ,295 ,294 ,294 ,293 ,292 ,291 ,291 ,290 ,289 ,289 ,288 ,287 ,286 ,286 ,285 ,
284 ,283 ,283 ,282 ,281 ,280 ,279 ,279 ,278 ,277 ,276 ,276 ,275 ,274 ,273 ,273 ,
272 ,271 ,270 ,269 ,269 ,268 ,267 ,266 ,265 ,265 ,264 ,263 ,262 ,261 ,261 ,260 ,
259 ,258 ,257 ,256 ,256 ,255 ,254 ,253 ,252 ,251 ,251 ,250 ,249 ,248 ,247 ,246 ,
245 ,245 ,244 ,243 ,242 ,241 ,240 ,239 ,238 ,238 ,237 ,236 ,235 ,234 ,233 ,232 ,
231 ,230 ,229 ,228 ,228 ,227 ,226 ,225 ,224 ,223 ,222 ,221 ,220 ,219 ,218 ,217 ,
216 ,215 ,214 ,213 ,212 ,211 ,210 ,209 ,208 ,207 ,206 ,205 ,204 ,203 ,202 ,201 ,
200 ,199 ,198 ,197 ,196 ,195 ,193 ,192 ,191 ,190 ,189 ,188 ,187 ,186 ,185 ,183 ,
182 ,181 ,180 ,179 ,178 ,176 ,175 ,174 ,173 ,172 ,170 ,169 ,168 ,167 ,165 ,164 ,
163 ,162 ,160 ,159 ,158 ,156 ,155 ,154 ,152 ,151 ,150 ,148 ,147 ,145 ,144 ,142 ,
141 ,139 ,138 ,136 ,135 ,133 ,132 ,130 ,129 ,127 ,125 ,124 ,122 ,120 ,118 ,117 ,
115 ,113 ,111 ,109 ,107 ,105 ,103 ,101 ,99 ,97 ,95 ,93 ,91 ,88 ,86 ,84 ,
81 ,78 ,76 ,73 ,70 ,67 ,64 ,61 ,57 ,53 ,49 ,45 ,40 ,35 ,28 ,20 ,
0 };
s16 SinTable[1024] = {
0 ,6 ,12 ,18 ,25 ,31 ,37 ,43 ,50 ,56 ,62 ,69 ,75 ,81 ,87 ,94 ,
100 ,106 ,113 ,119 ,125 ,131 ,138 ,144 ,150 ,157 ,163 ,169 ,175 ,182 ,188 ,194 ,
200 ,207 ,213 ,219 ,226 ,232 ,238 ,244 ,251 ,257 ,263 ,269 ,276 ,282 ,288 ,295 ,
301 ,307 ,313 ,320 ,326 ,332 ,338 ,345 ,351 ,357 ,363 ,370 ,376 ,382 ,388 ,395 ,
401 ,407 ,413 ,420 ,426 ,432 ,438 ,445 ,451 ,457 ,463 ,470 ,476 ,482 ,488 ,495 ,
501 ,507 ,513 ,520 ,526 ,532 ,538 ,545 ,551 ,557 ,563 ,569 ,576 ,582 ,588 ,594 ,
601 ,607 ,613 ,619 ,625 ,632 ,638 ,644 ,650 ,656 ,663 ,669 ,675 ,681 ,687 ,694 ,
700 ,706 ,712 ,718 ,725 ,731 ,737 ,743 ,749 ,755 ,762 ,768 ,774 ,780 ,786 ,792 ,
799 ,805 ,811 ,817 ,823 ,829 ,836 ,842 ,848 ,854 ,860 ,866 ,872 ,879 ,885 ,891 ,
897 ,903 ,909 ,915 ,921 ,928 ,934 ,940 ,946 ,952 ,958 ,964 ,970 ,976 ,983 ,989 ,
995 ,1001 ,1007 ,1013 ,1019 ,1025 ,1031 ,1037 ,1043 ,1050 ,1056 ,1062 ,1068 ,1074 ,1080 ,1086 ,
1092 ,1098 ,1104 ,1110 ,1116 ,1122 ,1128 ,1134 ,1140 ,1146 ,1152 ,1158 ,1164 ,1170 ,1176 ,1182 ,
1189 ,1195 ,1201 ,1207 ,1213 ,1219 ,1225 ,1231 ,1237 ,1243 ,1248 ,1254 ,1260 ,1266 ,1272 ,1278 ,
1284 ,1290 ,1296 ,1302 ,1308 ,1314 ,1320 ,1326 ,1332 ,1338 ,1344 ,1350 ,1356 ,1362 ,1368 ,1373 ,
1379 ,1385 ,1391 ,1397 ,1403 ,1409 ,1415 ,1421 ,1427 ,1433 ,1438 ,1444 ,1450 ,1456 ,1462 ,1468 ,
1474 ,1479 ,1485 ,1491 ,1497 ,1503 ,1509 ,1515 ,1520 ,1526 ,1532 ,1538 ,1544 ,1550 ,1555 ,1561 ,
1567 ,1573 ,1579 ,1584 ,1590 ,1596 ,1602 ,1608 ,1613 ,1619 ,1625 ,1631 ,1636 ,1642 ,1648 ,1654 ,
1659 ,1665 ,1671 ,1677 ,1682 ,1688 ,1694 ,1699 ,1705 ,1711 ,1717 ,1722 ,1728 ,1734 ,1739 ,1745 ,
1751 ,1756 ,1762 ,1768 ,1773 ,1779 ,1785 ,1790 ,1796 ,1802 ,1807 ,1813 ,1819 ,1824 ,1830 ,1835 ,
1841 ,1847 ,1852 ,1858 ,1864 ,1869 ,1875 ,1880 ,1886 ,1891 ,1897 ,1903 ,1908 ,1914 ,1919 ,1925 ,
1930 ,1936 ,1941 ,1947 ,1952 ,1958 ,1964 ,1969 ,1975 ,1980 ,1986 ,1991 ,1997 ,2002 ,2007 ,2013 ,
2018 ,2024 ,2029 ,2035 ,2040 ,2046 ,2051 ,2057 ,2062 ,2067 ,2073 ,2078 ,2084 ,2089 ,2094 ,2100 ,
2105 ,2111 ,2116 ,2121 ,2127 ,2132 ,2138 ,2143 ,2148 ,2154 ,2159 ,2164 ,2170 ,2175 ,2180 ,2186 ,
2191 ,2196 ,2201 ,2207 ,2212 ,2217 ,2223 ,2228 ,2233 ,2238 ,2244 ,2249 ,2254 ,2259 ,2265 ,2270 ,
2275 ,2280 ,2286 ,2291 ,2296 ,2301 ,2306 ,2312 ,2317 ,2322 ,2327 ,2332 ,2337 ,2343 ,2348 ,2353 ,
2358 ,2363 ,2368 ,2373 ,2379 ,2384 ,2389 ,2394 ,2399 ,2404 ,2409 ,2414 ,2419 ,2424 ,2429 ,2434 ,
2439 ,2445 ,2450 ,2455 ,2460 ,2465 ,2470 ,2475 ,2480 ,2485 ,2490 ,2495 ,2500 ,2505 ,2510 ,2515 ,
2519 ,2524 ,2529 ,2534 ,2539 ,2544 ,2549 ,2554 ,2559 ,2564 ,2569 ,2574 ,2578 ,2583 ,2588 ,2593 ,
2598 ,2603 ,2608 ,2613 ,2617 ,2622 ,2627 ,2632 ,2637 ,2641 ,2646 ,2651 ,2656 ,2661 ,2665 ,2670 ,
2675 ,2680 ,2684 ,2689 ,2694 ,2699 ,2703 ,2708 ,2713 ,2717 ,2722 ,2727 ,2732 ,2736 ,2741 ,2746 ,
2750 ,2755 ,2760 ,2764 ,2769 ,2773 ,2778 ,2783 ,2787 ,2792 ,2796 ,2801 ,2806 ,2810 ,2815 ,2819 ,
2824 ,2828 ,2833 ,2837 ,2842 ,2847 ,2851 ,2856 ,2860 ,2865 ,2869 ,2874 ,2878 ,2882 ,2887 ,2891 ,
2896 ,2900 ,2905 ,2909 ,2914 ,2918 ,2922 ,2927 ,2931 ,2936 ,2940 ,2944 ,2949 ,2953 ,2957 ,2962 ,
2966 ,2970 ,2975 ,2979 ,2983 ,2988 ,2992 ,2996 ,3000 ,3005 ,3009 ,3013 ,3018 ,3022 ,3026 ,3030 ,
3034 ,3039 ,3043 ,3047 ,3051 ,3055 ,3060 ,3064 ,3068 ,3072 ,3076 ,3080 ,3085 ,3089 ,3093 ,3097 ,
3101 ,3105 ,3109 ,3113 ,3117 ,3121 ,3126 ,3130 ,3134 ,3138 ,3142 ,3146 ,3150 ,3154 ,3158 ,3162 ,
3166 ,3170 ,3174 ,3178 ,3182 ,3186 ,3190 ,3193 ,3197 ,3201 ,3205 ,3209 ,3213 ,3217 ,3221 ,3225 ,
3229 ,3232 ,3236 ,3240 ,3244 ,3248 ,3252 ,3255 ,3259 ,3263 ,3267 ,3271 ,3274 ,3278 ,3282 ,3286 ,
3289 ,3293 ,3297 ,3301 ,3304 ,3308 ,3312 ,3315 ,3319 ,3323 ,3326 ,3330 ,3334 ,3337 ,3341 ,3345 ,
3348 ,3352 ,3356 ,3359 ,3363 ,3366 ,3370 ,3373 ,3377 ,3381 ,3384 ,3388 ,3391 ,3395 ,3398 ,3402 ,
3405 ,3409 ,3412 ,3416 ,3419 ,3423 ,3426 ,3429 ,3433 ,3436 ,3440 ,3443 ,3447 ,3450 ,3453 ,3457 ,
3460 ,3463 ,3467 ,3470 ,3473 ,3477 ,3480 ,3483 ,3487 ,3490 ,3493 ,3497 ,3500 ,3503 ,3506 ,3510 ,
3513 ,3516 ,3519 ,3522 ,3526 ,3529 ,3532 ,3535 ,3538 ,3541 ,3545 ,3548 ,3551 ,3554 ,3557 ,3560 ,
3563 ,3566 ,3570 ,3573 ,3576 ,3579 ,3582 ,3585 ,3588 ,3591 ,3594 ,3597 ,3600 ,3603 ,3606 ,3609 ,
3612 ,3615 ,3618 ,3621 ,3624 ,3627 ,3629 ,3632 ,3635 ,3638 ,3641 ,3644 ,3647 ,3650 ,3652 ,3655 ,
3658 ,3661 ,3664 ,3667 ,3669 ,3672 ,3675 ,3678 ,3680 ,3683 ,3686 ,3689 ,3691 ,3694 ,3697 ,3700 ,
3702 ,3705 ,3708 ,3710 ,3713 ,3716 ,3718 ,3721 ,3723 ,3726 ,3729 ,3731 ,3734 ,3736 ,3739 ,3742 ,
3744 ,3747 ,3749 ,3752 ,3754 ,3757 ,3759 ,3762 ,3764 ,3767 ,3769 ,3772 ,3774 ,3776 ,3779 ,3781 ,
3784 ,3786 ,3789 ,3791 ,3793 ,3796 ,3798 ,3800 ,3803 ,3805 ,3807 ,3810 ,3812 ,3814 ,3816 ,3819 ,
3821 ,3823 ,3826 ,3828 ,3830 ,3832 ,3834 ,3837 ,3839 ,3841 ,3843 ,3845 ,3848 ,3850 ,3852 ,3854 ,
3856 ,3858 ,3860 ,3862 ,3864 ,3867 ,3869 ,3871 ,3873 ,3875 ,3877 ,3879 ,3881 ,3883 ,3885 ,3887 ,
3889 ,3891 ,3893 ,3895 ,3897 ,3899 ,3900 ,3902 ,3904 ,3906 ,3908 ,3910 ,3912 ,3914 ,3915 ,3917 ,
3919 ,3921 ,3923 ,3925 ,3926 ,3928 ,3930 ,3932 ,3933 ,3935 ,3937 ,3939 ,3940 ,3942 ,3944 ,3945 ,
3947 ,3949 ,3950 ,3952 ,3954 ,3955 ,3957 ,3959 ,3960 ,3962 ,3963 ,3965 ,3967 ,3968 ,3970 ,3971 ,
3973 ,3974 ,3976 ,3977 ,3979 ,3980 ,3982 ,3983 ,3985 ,3986 ,3988 ,3989 ,3990 ,3992 ,3993 ,3995 ,
3996 ,3997 ,3999 ,4000 ,4001 ,4003 ,4004 ,4005 ,4007 ,4008 ,4009 ,4011 ,4012 ,4013 ,4014 ,4016 ,
4017 ,4018 ,4019 ,4020 ,4022 ,4023 ,4024 ,4025 ,4026 ,4027 ,4029 ,4030 ,4031 ,4032 ,4033 ,4034 ,
4035 ,4036 ,4037 ,4038 ,4039 ,4040 ,4041 ,4042 ,4043 ,4044 ,4045 ,4046 ,4047 ,4048 ,4049 ,4050 ,
4051 ,4052 ,4053 ,4054 ,4055 ,4056 ,4057 ,4057 ,4058 ,4059 ,4060 ,4061 ,4062 ,4062 ,4063 ,4064 ,
4065 ,4065 ,4066 ,4067 ,4068 ,4068 ,4069 ,4070 ,4071 ,4071 ,4072 ,4073 ,4073 ,4074 ,4075 ,4075 ,
4076 ,4076 ,4077 ,4078 ,4078 ,4079 ,4079 ,4080 ,4080 ,4081 ,4081 ,4082 ,4082 ,4083 ,4083 ,4084 ,
4084 ,4085 ,4085 ,4086 ,4086 ,4087 ,4087 ,4087 ,4088 ,4088 ,4089 ,4089 ,4089 ,4090 ,4090 ,4090 ,
4091 ,4091 ,4091 ,4091 ,4092 ,4092 ,4092 ,4092 ,4093 ,4093 ,4093 ,4093 ,4094 ,4094 ,4094 ,4094 ,
4094 ,4094 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 ,4095 };
s32 OneSinTable[1024] = {
0 ,2670177 ,1335090 ,890062 ,667548 ,534040 ,445035 ,381461 ,333780 ,296695 ,267028 ,242754 ,222527 ,205411 ,190741 ,178027 ,
166902 ,157087 ,148362 ,140555 ,133529 ,127173 ,121394 ,116118 ,111282 ,106833 ,102726 ,98923 ,95392 ,92105 ,89037 ,86167 ,
83476 ,80949 ,78570 ,76327 ,74209 ,72205 ,70307 ,68506 ,66796 ,65169 ,63619 ,62142 ,60731 ,59384 ,58095 ,56861 ,
55678 ,54544 ,53455 ,52409 ,51404 ,50436 ,49504 ,48606 ,47740 ,46904 ,46098 ,45319 ,44565 ,43837 ,43132 ,42449 ,
41788 ,41147 ,40526 ,39923 ,39338 ,38770 ,38218 ,37682 ,37161 ,36654 ,36161 ,35681 ,35213 ,34758 ,34314 ,33882 ,
33461 ,33050 ,32649 ,32257 ,31875 ,31503 ,31138 ,30782 ,30435 ,30095 ,29763 ,29438 ,29120 ,28809 ,28504 ,28206 ,
27915 ,27629 ,27349 ,27075 ,26806 ,26543 ,26285 ,26032 ,25784 ,25540 ,25301 ,25067 ,24837 ,24611 ,24389 ,24172 ,
23958 ,23748 ,23542 ,23339 ,23140 ,22945 ,22752 ,22563 ,22377 ,22194 ,22014 ,21838 ,21664 ,21492 ,21324 ,21158 ,
20995 ,20834 ,20676 ,20520 ,20367 ,20216 ,20067 ,19921 ,19776 ,19634 ,19494 ,19356 ,19220 ,19085 ,18953 ,18823 ,
18694 ,18567 ,18442 ,18319 ,18197 ,18077 ,17959 ,17842 ,17727 ,17613 ,17501 ,17390 ,17280 ,17173 ,17066 ,16961 ,
16857 ,16754 ,16653 ,16553 ,16454 ,16356 ,16260 ,16165 ,16071 ,15978 ,15886 ,15795 ,15705 ,15617 ,15529 ,15442 ,
15357 ,15272 ,15189 ,15106 ,15024 ,14943 ,14863 ,14784 ,14706 ,14628 ,14552 ,14476 ,14401 ,14327 ,14254 ,14182 ,
14110 ,14039 ,13969 ,13899 ,13830 ,13762 ,13695 ,13628 ,13562 ,13497 ,13432 ,13368 ,13305 ,13242 ,13180 ,13118 ,
13057 ,12997 ,12937 ,12878 ,12819 ,12761 ,12704 ,12647 ,12591 ,12535 ,12479 ,12424 ,12370 ,12316 ,12263 ,12210 ,
12158 ,12106 ,12054 ,12004 ,11953 ,11903 ,11853 ,11804 ,11755 ,11707 ,11659 ,11612 ,11565 ,11518 ,11472 ,11426 ,
11381 ,11336 ,11291 ,11247 ,11203 ,11159 ,11116 ,11073 ,11030 ,10988 ,10947 ,10905 ,10864 ,10823 ,10783 ,10743 ,
10703 ,10663 ,10624 ,10585 ,10547 ,10509 ,10471 ,10433 ,10396 ,10359 ,10322 ,10285 ,10249 ,10213 ,10178 ,10142 ,
10107 ,10072 ,10038 ,10003 ,9969 ,9935 ,9902 ,9869 ,9835 ,9803 ,9770 ,9738 ,9706 ,9674 ,9642 ,9611 ,
9580 ,9549 ,9518 ,9487 ,9457 ,9427 ,9397 ,9367 ,9338 ,9309 ,9280 ,9251 ,9222 ,9194 ,9166 ,9137 ,
9110 ,9082 ,9054 ,9027 ,9000 ,8973 ,8946 ,8920 ,8893 ,8867 ,8841 ,8815 ,8790 ,8764 ,8739 ,8714 ,
8689 ,8664 ,8639 ,8614 ,8590 ,8566 ,8542 ,8518 ,8494 ,8471 ,8447 ,8424 ,8401 ,8378 ,8355 ,8332 ,
8310 ,8287 ,8265 ,8243 ,8221 ,8199 ,8177 ,8155 ,8134 ,8113 ,8091 ,8070 ,8049 ,8029 ,8008 ,7987 ,
7967 ,7946 ,7926 ,7906 ,7886 ,7866 ,7847 ,7827 ,7808 ,7788 ,7769 ,7750 ,7731 ,7712 ,7693 ,7674 ,
7656 ,7637 ,7619 ,7600 ,7582 ,7564 ,7546 ,7528 ,7511 ,7493 ,7475 ,7458 ,7441 ,7423 ,7406 ,7389 ,
7372 ,7355 ,7338 ,7322 ,7305 ,7289 ,7272 ,7256 ,7240 ,7224 ,7207 ,7192 ,7176 ,7160 ,7144 ,7129 ,
7113 ,7098 ,7082 ,7067 ,7052 ,7037 ,7022 ,7007 ,6992 ,6977 ,6962 ,6948 ,6933 ,6918 ,6904 ,6890 ,
6875 ,6861 ,6847 ,6833 ,6819 ,6805 ,6791 ,6778 ,6764 ,6750 ,6737 ,6723 ,6710 ,6697 ,6683 ,6670 ,
6657 ,6644 ,6631 ,6618 ,6605 ,6593 ,6580 ,6567 ,6555 ,6542 ,6530 ,6517 ,6505 ,6493 ,6480 ,6468 ,
6456 ,6444 ,6432 ,6420 ,6408 ,6396 ,6385 ,6373 ,6361 ,6350 ,6338 ,6327 ,6315 ,6304 ,6293 ,6282 ,
6270 ,6259 ,6248 ,6237 ,6226 ,6215 ,6204 ,6194 ,6183 ,6172 ,6162 ,6151 ,6140 ,6130 ,6119 ,6109 ,
6099 ,6088 ,6078 ,6068 ,6058 ,6048 ,6038 ,6028 ,6018 ,6008 ,5998 ,5988 ,5978 ,5969 ,5959 ,5949 ,
5940 ,5930 ,5921 ,5911 ,5902 ,5892 ,5883 ,5874 ,5865 ,5855 ,5846 ,5837 ,5828 ,5819 ,5810 ,5801 ,
5792 ,5783 ,5774 ,5766 ,5757 ,5748 ,5740 ,5731 ,5722 ,5714 ,5705 ,5697 ,5688 ,5680 ,5672 ,5663 ,
5655 ,5647 ,5639 ,5630 ,5622 ,5614 ,5606 ,5598 ,5590 ,5582 ,5574 ,5566 ,5559 ,5551 ,5543 ,5535 ,
5528 ,5520 ,5512 ,5505 ,5497 ,5490 ,5482 ,5475 ,5467 ,5460 ,5452 ,5445 ,5438 ,5430 ,5423 ,5416 ,
5409 ,5402 ,5395 ,5388 ,5380 ,5373 ,5366 ,5360 ,5353 ,5346 ,5339 ,5332 ,5325 ,5318 ,5312 ,5305 ,
5298 ,5292 ,5285 ,5278 ,5272 ,5265 ,5259 ,5252 ,5246 ,5239 ,5233 ,5227 ,5220 ,5214 ,5208 ,5201 ,
5195 ,5189 ,5183 ,5177 ,5171 ,5164 ,5158 ,5152 ,5146 ,5140 ,5134 ,5128 ,5122 ,5117 ,5111 ,5105 ,
5099 ,5093 ,5088 ,5082 ,5076 ,5070 ,5065 ,5059 ,5053 ,5048 ,5042 ,5037 ,5031 ,5026 ,5020 ,5015 ,
5009 ,5004 ,4999 ,4993 ,4988 ,4983 ,4977 ,4972 ,4967 ,4962 ,4956 ,4951 ,4946 ,4941 ,4936 ,4931 ,
4926 ,4921 ,4916 ,4911 ,4906 ,4901 ,4896 ,4891 ,4886 ,4881 ,4876 ,4871 ,4867 ,4862 ,4857 ,4852 ,
4848 ,4843 ,4838 ,4834 ,4829 ,4824 ,4820 ,4815 ,4811 ,4806 ,4802 ,4797 ,4793 ,4788 ,4784 ,4779 ,
4775 ,4771 ,4766 ,4762 ,4757 ,4753 ,4749 ,4745 ,4740 ,4736 ,4732 ,4728 ,4724 ,4719 ,4715 ,4711 ,
4707 ,4703 ,4699 ,4695 ,4691 ,4687 ,4683 ,4679 ,4675 ,4671 ,4667 ,4663 ,4659 ,4655 ,4652 ,4648 ,
4644 ,4640 ,4636 ,4633 ,4629 ,4625 ,4621 ,4618 ,4614 ,4610 ,4607 ,4603 ,4599 ,4596 ,4592 ,4589 ,
4585 ,4582 ,4578 ,4575 ,4571 ,4568 ,4564 ,4561 ,4557 ,4554 ,4551 ,4547 ,4544 ,4540 ,4537 ,4534 ,
4531 ,4527 ,4524 ,4521 ,4518 ,4514 ,4511 ,4508 ,4505 ,4502 ,4498 ,4495 ,4492 ,4489 ,4486 ,4483 ,
4480 ,4477 ,4474 ,4471 ,4468 ,4465 ,4462 ,4459 ,4456 ,4453 ,4450 ,4447 ,4444 ,4441 ,4439 ,4436 ,
4433 ,4430 ,4427 ,4425 ,4422 ,4419 ,4416 ,4414 ,4411 ,4408 ,4406 ,4403 ,4400 ,4398 ,4395 ,4392 ,
4390 ,4387 ,4385 ,4382 ,4379 ,4377 ,4374 ,4372 ,4369 ,4367 ,4364 ,4362 ,4359 ,4357 ,4355 ,4352 ,
4350 ,4347 ,4345 ,4343 ,4340 ,4338 ,4336 ,4333 ,4331 ,4329 ,4327 ,4324 ,4322 ,4320 ,4318 ,4315 ,
4313 ,4311 ,4309 ,4307 ,4305 ,4302 ,4300 ,4298 ,4296 ,4294 ,4292 ,4290 ,4288 ,4286 ,4284 ,4282 ,
4280 ,4278 ,4276 ,4274 ,4272 ,4270 ,4268 ,4266 ,4264 ,4262 ,4260 ,4259 ,4257 ,4255 ,4253 ,4251 ,
4249 ,4248 ,4246 ,4244 ,4242 ,4241 ,4239 ,4237 ,4235 ,4234 ,4232 ,4230 ,4229 ,4227 ,4225 ,4224 ,
4222 ,4220 ,4219 ,4217 ,4216 ,4214 ,4213 ,4211 ,4209 ,4208 ,4206 ,4205 ,4203 ,4202 ,4200 ,4199 ,
4198 ,4196 ,4195 ,4193 ,4192 ,4190 ,4189 ,4188 ,4186 ,4185 ,4184 ,4182 ,4181 ,4180 ,4178 ,4177 ,
4176 ,4174 ,4173 ,4172 ,4171 ,4170 ,4168 ,4167 ,4166 ,4165 ,4164 ,4162 ,4161 ,4160 ,4159 ,4158 ,
4157 ,4156 ,4155 ,4153 ,4152 ,4151 ,4150 ,4149 ,4148 ,4147 ,4146 ,4145 ,4144 ,4143 ,4142 ,4141 ,
4140 ,4139 ,4138 ,4138 ,4137 ,4136 ,4135 ,4134 ,4133 ,4132 ,4131 ,4131 ,4130 ,4129 ,4128 ,4127 ,
4127 ,4126 ,4125 ,4124 ,4123 ,4123 ,4122 ,4121 ,4121 ,4120 ,4119 ,4119 ,4118 ,4117 ,4117 ,4116 ,
4115 ,4115 ,4114 ,4113 ,4113 ,4112 ,4112 ,4111 ,4111 ,4110 ,4110 ,4109 ,4109 ,4108 ,4108 ,4107 ,
4107 ,4106 ,4106 ,4105 ,4105 ,4104 ,4104 ,4104 ,4103 ,4103 ,4102 ,4102 ,4102 ,4101 ,4101 ,4101 ,
4100 ,4100 ,4100 ,4100 ,4099 ,4099 ,4099 ,4099 ,4098 ,4098 ,4098 ,4098 ,4097 ,4097 ,4097 ,4097 ,
4097 ,4097 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 ,4096 };