Skip to navigation


Maths (Geometry): sinTable

Name: sinTable [Show more] Type: Variable Category: Maths (Geometry) Summary: Sine/cosine lookup table
Context: See this variable in context in the source code References: This variable is used as follows: * sinTableAddr uses sinTable

At byte n, the table contains: (2^31 - 1) * SIN(2 * PI * (n / 1024)) For n = 0 to 1023 In the original BBC BASIC source, this table would have been populated using something along these lines: FOR I% = 0 TO 1023 [ OPT pass% EQUD (2^31 - 1) * SIN(2 * PI * (I% / 1024)) ] NEXT I have used EQUDs here because different computers have different algorithms and accuracies in their maths routines, so the only way to ensure a complete match with the original binaries is to hard-code the values. The above loop produces the correct values when run on an Archimedes.
.sinTable EQUD &00000000, &00C90F87, &01921D1F, &025B26D7 EQUD &03242ABE, &03ED26E6, &04B6195D, &057F0034 EQUD &0647D97C, &0710A344, &07D95B9E, &08A2009A EQUD &096A9049, &0A3308BC, &0AFB6805, &0BC3AC35 EQUD &0C8BD35D, &0D53DB92, &0E1BC2E3, &0EE38765 EQUD &0FAB272B, &1072A047, &1139F0CE, &120116D4 EQUD &12C8106E, &138EDBB0, &145576B1, &151BDF85 EQUD &15E21444, &16A81304, &176DD9DE, &183366E8 EQUD &18F8B83C, &19BDCBF2, &1A82A025, &1B4732EE EQUD &1C0B826A, &1CCF8CB2, &1D934FE4, &1E56CA1D EQUD &1F19F97A, &1FDCDC1A, &209F701C, &2161B39F EQUD &2223A4C5, &22E541AE, &23A6887E, &24677757 EQUD &25280C5D, &25E845B5, &26A82185, &27679DF3 EQUD &2826B928, &28E5714A, &29A3C484, &2A61B101 EQUD &2B1F34EB, &2BDC4E6E, &2C98FBBA, &2D553AFB EQUD &2E110A61, &2ECC681D, &2F875262, &3041C760 EQUD &30FBC54C, &31B54A5D, &326E54C6, &3326E2C2 EQUD &33DEF286, &3496824F, &354D9056, &36041AD8 EQUD &36BA2013, &376F9E45, &382493AF, &38D8FE92 EQUD &398CDD31, &3A402DD1, &3AF2EEB6, &3BA51E28 EQUD &3C56BA6F, &3D07C1D5, &3DB832A5, &3E680B2C EQUD &3F1749B7, &3FC5EC97, &4073F21C, &4121589A EQUD &41CE1E63, &427A41D0, &4325C135, &43D09AEC EQUD &447ACD4F, &452456BC, &45CD358E, &46756827 EQUD &471CECE6, &47C3C22E, &4869E664, &490F57ED EQUD &49B41533, &4A581C9D, &4AFB6C97, &4B9E038E EQUD &4C3FDFF3, &4CE10033, &4D8162C3, &4E210616 EQUD &4EBFE8A4, &4F5E08E2, &4FFB654C, &5097FC5D EQUD &5133CC93, &51CED46D, &5269126D, &53028517 EQUD &539B2AEF, &5433027C, &54CA0A49, &556040E2 EQUD &55F5A4D1, &568A34A8, &571DEEF8, &57B0D255 EQUD &5842DD53, &58D40E8B, &59646497, &59F3DE11 EQUD &5A827999, &5B1035CE, &5B9D1153, &5C290ACB EQUD &5CB420DF, &5D3E5236, &5DC79D7B, &5E50015C EQUD &5ED77C89, &5F5E0DB2, &5FE3B38C, &60686CCD EQUD &60EC382E, &616F146A, &61F1003E, &6271FA68 EQUD &62F201AB, &637114CB, &63EF328E, &646C59BE EQUD &64E88925, &6563BF91, &65DDFBD2, &66573CBA EQUD &66CF811E, &6746C7D6, &67BD0FBB, &683257A9 EQUD &68A69E80, &6919E31F, &698C246B, &69FD6149 EQUD &6A6D98A3, &6ADCC963, &6B4AF277, &6BB812CF EQUD &6C24295F, &6C8F351A, &6CF934FB, &6D6227F9 EQUD &6DCA0D13, &6E30E349, &6E96A99C, &6EFB5F11 EQUD &6F5F02B1, &6FC19384, &70231098, &708378FE EQUD &70E2CBC5, &71410803, &719E2CD1, &71FA3947 EQUD &72552C84, &72AF05A6, &7307C3CF, &735F6625 EQUD &73B5EBD0, &740B53F9, &745F9DD0, &74B2C882 EQUD &7504D344, &7555BD4A, &75A585CE, &75F42C09 EQUD &7641AF3B, &768E0EA4, &76D94988, &77235F2C EQUD &776C4EDA, &77B417DE, &77FAB987, &78403327 EQUD &78848413, &78C7ABA0, &7909A92B, &794A7C10 EQUD &798A23B0, &79C89F6C, &7A05EEAC, &7A4210D7 EQUD &7A7D055A, &7AB6CBA2, &7AEF6322, &7B26CB4E EQUD &7B5D039C, &7B920B88, &7BC5E28E, &7BF8882F EQUD &7C29FBED, &7C5A3D4E, &7C894BDC, &7CB72723 EQUD &7CE3CEB0, &7D0F4217, &7D3980EB, &7D628AC5 EQUD &7D8A5F3F, &7DB0FDF6, &7DD6668D, &7DFA98A7 EQUD &7E1D93E8, &7E3F57FD, &7E5FE492, &7E7F3955 EQUD &7E9D55FB, &7EBA3A38, &7ED5E5C5, &7EF0585E EQUD &7F0991C2, &7F2191B3, &7F3857F5, &7F4DE44F EQUD &7F62368E, &7F754E7E, &7F872BF2, &7F97CEBC EQUD &7FA736B3, &7FB563B2, &7FC25595, &7FCE0C3D EQUD &7FD8878D, &7FE1C76A, &7FE9CBBF, &7FF09477 EQUD &7FF62181, &7FFA72D0, &7FFD8859, &7FFF6216 EQUD &7FFFFFFE, &7FFF6216, &7FFD8859, &7FFA72D0 EQUD &7FF62181, &7FF09477, &7FE9CBBF, &7FE1C76A EQUD &7FD8878D, &7FCE0C3D, &7FC25595, &7FB563B2 EQUD &7FA736B3, &7F97CEBC, &7F872BF2, &7F754E7E EQUD &7F62368E, &7F4DE44F, &7F3857F5, &7F2191B3 EQUD &7F0991C2, &7EF0585E, &7ED5E5C5, &7EBA3A38 EQUD &7E9D55FB, &7E7F3955, &7E5FE492, &7E3F57FD EQUD &7E1D93E8, &7DFA98A7, &7DD6668D, &7DB0FDF6 EQUD &7D8A5F3F, &7D628AC5, &7D3980EB, &7D0F4217 EQUD &7CE3CEB0, &7CB72723, &7C894BDC, &7C5A3D4E EQUD &7C29FBED, &7BF8882F, &7BC5E28E, &7B920B88 EQUD &7B5D039C, &7B26CB4E, &7AEF6322, &7AB6CBA2 EQUD &7A7D055A, &7A4210D7, &7A05EEAC, &79C89F6C EQUD &798A23B0, &794A7C10, &7909A92B, &78C7ABA0 EQUD &78848413, &78403327, &77FAB987, &77B417DE EQUD &776C4EDA, &77235F2C, &76D94988, &768E0EA4 EQUD &7641AF3B, &75F42C09, &75A585CE, &7555BD4A EQUD &7504D344, &74B2C882, &745F9DD0, &740B53FA EQUD &73B5EBD0, &735F6625, &7307C3CF, &72AF05A5 EQUD &72552C84, &71FA3948, &719E2CD1, &71410803 EQUD &70E2CBC5, &708378FD, &70231098, &6FC19384 EQUD &6F5F02B0, &6EFB5F11, &6E96A99C, &6E30E348 EQUD &6DCA0D13, &6D6227F9, &6CF934FB, &6C8F351A EQUD &6C24295F, &6BB812D0, &6B4AF277, &6ADCC963 EQUD &6A6D98A3, &69FD6149, &698C246B, &6919E320 EQUD &68A69E80, &683257AA, &67BD0FBC, &6746C7D6 EQUD &66CF811E, &66573CBA, &65DDFBD1, &6563BF91 EQUD &64E88925, &646C59BF, &63EF328E, &637114CB EQUD &62F201AC, &6271FA68, &61F1003E, &616F146B EQUD &60EC382E, &60686CCE, &5FE3B38D, &5F5E0DB2 EQUD &5ED77C89, &5E50015D, &5DC79D7B, &5D3E5236 EQUD &5CB420DF, &5C290ACB, &5B9D1153, &5B1035CF EQUD &5A82799A, &59F3DE11, &59646497, &58D40E8C EQUD &5842DD53, &57B0D256, &571DEEFA, &568A34A8 EQUD &55F5A4D2, &556040E2, &54CA0A49, &5433027D EQUD &539B2AEF, &53028516, &5269126E, &51CED46E EQUD &5133CC93, &5097FC5D, &4FFB654D, &4F5E08E2 EQUD &4EBFE8A4, &4E210617, &4D8162C4, &4CE10033 EQUD &4C3FDFF3, &4B9E0390, &4AFB6C97, &4A581C9D EQUD &49B41533, &490F57ED, &4869E664, &47C3C22F EQUD &471CECE6, &46756827, &45CD358F, &452456BC EQUD &447ACD50, &43D09AEC, &4325C134, &427A41D0 EQUD &41CE1E64, &4121589B, &4073F21C, &3FC5EC98 EQUD &3F1749B8, &3E680B2C, &3DB832A6, &3D07C1D6 EQUD &3C56BA6F, &3BA51E28, &3AF2EEB7, &3A402DD0 EQUD &398CDD32, &38D8FE93, &382493AF, &376F9E45 EQUD &36BA2013, &36041AD7, &354D9056, &3496824F EQUD &33DEF287, &3326E2C1, &326E54C7, &31B54A5E EQUD &30FBC54C, &3041C760, &2F875262, &2ECC681D EQUD &2E110A61, &2D553AFC, &2C98FBB9, &2BDC4E6F EQUD &2B1F34EB, &2A61B100, &29A3C484, &28E5714B EQUD &2826B927, &27679DF3, &26A82186, &25E845B6 EQUD &25280C5D, &24677757, &23A6887F, &22E541AE EQUD &2223A4C5, &2161B3A0, &209F701B, &1FDCDC1A EQUD &1F19F97B, &1E56CA1D, &1D934FE5, &1CCF8CB3 EQUD &1C0B8269, &1B4732EF, &1A82A026, &19BDCBF1 EQUD &18F8B83C, &183366E8, &176DD9DD, &16A81304 EQUD &15E21444, &151BDF86, &145576B0, &138EDBB1 EQUD &12C8106F, &120116D4, &1139F0CF, &1072A048 EQUD &0FAB272A, &0EE38765, &0E1BC2E4, &0D53DB91 EQUD &0C8BD35E, &0BC3AC35, &0AFB6804, &0A3308BC EQUD &096A9049, &08A20099, &07D95B9E, &0710A345 EQUD &0647D97D, &057F0034, &04B6195D, &03ED26E7 EQUD &03242ABE, &025B26D7, &01921D20, &00C90F87 EQUD &00000000, &FF36F079, &FE6DE2E0, &FDA4D929 EQUD &FCDBD542, &FC12D91A, &FB49E6A3, &FA80FFCD EQUD &F9B82684, &F8EF5CBC, &F826A463, &F75DFF67 EQUD &F6956FB7, &F5CCF745, &F50497FC, &F43C53CB EQUD &F3742CA3, &F2AC2470, &F1E43D1D, &F11C789B EQUD &F054D8D6, &EF8D5FB9, &EEC60F32, &EDFEE92D EQUD &ED37EF92, &EC712450, &EBAA8950, &EAE4207B EQUD &EA1DEBBC, &E957ECFC, &E8922624, &E7CC9918 EQUD &E70747C5, &E642340F, &E57D5FDB, &E4B8CD12 EQUD &E3F47D97, &E330734D, &E26CB01C, &E1A935E4 EQUD &E0E60685, &E02323E6, &DF608FE5, &DE9E4C61 EQUD &DDDC5B3C, &DD1ABE53, &DC597782, &DB9888A9 EQUD &DAD7F3A4, &DA17BA4A, &D957DE7B, &D898620D EQUD &D7D946DA, &D71A8EB6, &D65C3B7C, &D59E4F01 EQUD &D4E0CB15, &D423B192, &D3670447, &D2AAC505 EQUD &D1EEF59F, &D13397E3, &D078AD9E, &CFBE38A1 EQUD &CF043AB5, &CE4AB5A3, &CD91AB3A, &CCD91D3F EQUD &CC210D79, &CB697DB1, &CAB26FAB, &C9FBE529 EQUD &C945DFED, &C89061BC, &C7DB6C52, &C727016E EQUD &C67322CF, &C5BFD230, &C50D114A, &C45AE1D8 EQUD &C3A94592, &C2F83E2B, &C247CD5B, &C197F4D5 EQUD &C0E8B649, &C03A1369, &BF8C0DE5, &BEDEA766 EQUD &BE31E19D, &BD85BE31, &BCDA3ECD, &BC2F6514 EQUD &BB8532B1, &BADBA945, &BA32CA72, &B98A97DA EQUD &B8E3131B, &B83C3DD2, &B796199D, &B6F0A814 EQUD &B64BEACD, &B5A7E364, &B504936A, &B461FC71 EQUD &B3C0200E, &B31EFFCE, &B27E9D3D, &B1DEF9EA EQUD &B140175D, &B0A1F71F, &B0049AB4, &AF6803A3 EQUD &AECC336E, &AE312B93, &AD96ED93, &ACFD7AEA EQUD &AC64D511, &ABCCFD84, &AB35F5B7, &AA9FBF1E EQUD &AA0A5B2F, &A975CB58, &A8E21107, &A84F2DAB EQUD &A7BD22AD, &A72BF174, &A69B9B69, &A60C21EF EQUD &A57D8667, &A4EFCA32, &A462EEAE, &A3D6F536 EQUD &A34BDF21, &A2C1ADCB, &A2386286, &A1AFFEA4 EQUD &A1288378, &A0A1F24F, &A01C4C74, &9F979333 EQUD &9F13C7D2, &9E90EB96, &9E0EFFC4, &9D8E0599 EQUD &9D0DFE55, &9C8EEB37, &9C10CD72, &9B93A642 EQUD &9B1776DD, &9A9C4070, &9A22042E, &99A8C347 EQUD &99307EE2, &98B93829, &9842F046, &97CDA857 EQUD &97596180, &96E61CE2, &9673DB96, &96029EB6 EQUD &9592675E, &9523369D, &94B50D88, &9447ED31 EQUD &93DBD6A1, &9370CAE4, &9306CB06, &929DD807 EQUD &9235F2EC, &91CF1CB8, &91695664, &9104A0EE EQUD &90A0FD50, &903E6C7C, &8FDCEF67, &8F7C8703 EQUD &8F1D343B, &8EBEF7FC, &8E61D32F, &8E05C6B8 EQUD &8DAAD37D, &8D50FA5B, &8CF83C31, &8CA099DC EQUD &8C4A1430, &8BF4AC06, &8BA06231, &8B4D377E EQUD &8AFB2CBC, &8AAA42B6, &8A5A7A32, &8A0BD3F6 EQUD &89BE50C5, &8971F15C, &8926B678, &88DCA0D5 EQUD &8893B126, &884BE821, &88054679, &87BFCCD9 EQUD &877B7BED, &87385460, &86F656D5, &86B583EF EQUD &8675DC51, &86376094, &85FA1154, &85BDEF29 EQUD &8582FAA6, &8549345D, &85109CDE, &84D934B2 EQUD &84A2FC63, &846DF478, &843A1D72, &840777D1 EQUD &83D60413, &83A5C2B1, &8376B424, &8348D8DD EQUD &831C3150, &82F0BDEA, &82C67F15, &829D753B EQUD &8275A0C2, &824F020A, &82299973, &8205675A EQUD &81E26C18, &81C0A803, &81A01B6F, &8180C6AB EQUD &8162AA05, &8145C5C9, &812A1A3B, &810FA7A2 EQUD &80F66E3E, &80DE6E4D, &80C7A80B, &80B21BB1 EQUD &809DC972, &808AB181, &8078D40E, &80683144 EQUD &8058C94D, &804A9C4E, &803DAA6B, &8031F3C3 EQUD &80277873, &801E3896, &80163441, &800F6B89 EQUD &8009DE7F, &80058D30, &800277A7, &80009DEB EQUD &80000001, &80009DEB, &800277A7, &80058D30 EQUD &8009DE7F, &800F6B89, &80163441, &801E3895 EQUD &80277873, &8031F3C3, &803DAA6B, &804A9C4E EQUD &8058C94D, &80683145, &8078D40E, &808AB182 EQUD &809DC972, &80B21BB1, &80C7A80B, &80DE6E4D EQUD &80F66E3E, &810FA7A1, &812A1A3B, &8145C5C8 EQUD &8162AA05, &8180C6AA, &81A01B6E, &81C0A803 EQUD &81E26C18, &8205675A, &82299972, &824F0209 EQUD &8275A0C2, &829D753B, &82C67F15, &82F0BDEA EQUD &831C314F, &8348D8DD, &8376B424, &83A5C2B1 EQUD &83D60413, &840777D0, &843A1D71, &846DF478 EQUD &84A2FC63, &84D934B2, &85109CDE, &8549345D EQUD &8582FAA6, &85BDEF29, &85FA1153, &86376093 EQUD &8675DC50, &86B583EF, &86F656D4, &87385460 EQUD &877B7BED, &87BFCCD8, &88054679, &884BE821 EQUD &8893B126, &88DCA0D4, &8926B678, &8971F15B EQUD &89BE50C5, &8A0BD3F6, &8A5A7A32, &8AAA42B6 EQUD &8AFB2CBB, &8B4D377D, &8BA06231, &8BF4AC06 EQUD &8C4A1430, &8CA099DB, &8CF83C30, &8D50FA5A EQUD &8DAAD37D, &8E05C6B8, &8E61D32F, &8EBEF7FB EQUD &8F1D343A, &8F7C8702, &8FDCEF66, &903E6C7B EQUD &90A0FD4F, &9104A0EE, &91695664, &91CF1CB7 EQUD &9235F2EC, &929DD806, &9306CB05, &9370CAE4 EQUD &93DBD6A0, &9447ED31, &94B50D88, &9523369D EQUD &9592675E, &96029EB6, &9673DB95, &96E61CE2 EQUD &9759617F, &97CDA856, &9842F045, &98B93829 EQUD &99307EE2, &99A8C347, &9A22042D, &9A9C406F EQUD &9B1776DC, &9B93A641, &9C10CD72, &9C8EEB36 EQUD &9D0DFE54, &9D8E0598, &9E0EFFC3, &9E90EB95 EQUD &9F13C7D2, &9F979334, &A01C4C73, &A0A1F24E EQUD &A1288376, &A1AFFEA3, &A2386285, &A2C1ADC9 EQUD &A34BDF21, &A3D6F535, &A462EEAC, &A4EFCA31 EQUD &A57D8667, &A60C21ED, &A69B9B69, &A72BF175 EQUD &A7BD22AB, &A84F2DAA, &A8E21108, &A975CB56 EQUD &AA0A5B2E, &AA9FBF1F, &AB35F5B5, &ABCCFD83 EQUD &AC64D512, &ACFD7AE8, &AD96ED92, &AE312B93 EQUD &AECC336C, &AF6803A3, &B0049AB5, &B0A1F71D EQUD &B140175C, &B1DEF9EA, &B27E9D3C, &B31EFFCD EQUD &B3C0200F, &B461FC70, &B5049369, &B5A7E365 EQUD &B64BEACD, &B6F0A813, &B796199A, &B83C3DD1 EQUD &B8E3131A, &B98A97D7, &BA32CA71, &BADBA944 EQUD &BB8532AF, &BC2F6514, &BCDA3ECC, &BD85BE2F EQUD &BE31E19C, &BEDEA767, &BF8C0DE2, &C03A1368 EQUD &C0E8B649, &C197F4D3, &C247CD5A, &C2F83E2C EQUD &C3A9458F, &C45AE1D8, &C50D114B, &C5BFD22E EQUD &C67322CE, &C727016F, &C7DB6C4F, &C89061BB EQUD &C945DFEE, &C9FBE527, &CAB26FAA, &CB697DB2 EQUD &CC210D78, &CCD91D3E, &CD91AB3B, &CE4AB5A2 EQUD &CF043AB4, &CFBE38A2, &D078AD9D, &D13397E3 EQUD &D1EEF5A0, &D2AAC504, &D3670446, &D423B18F EQUD &D4E0CB14, &D59E4F00, &D65C3B7A, &D71A8EB5 EQUD &D7D946D9, &D898620B, &D957DE7A, &DA17BA4B EQUD &DAD7F3A1, &DB9888A8, &DC597783, &DD1ABE50 EQUD &DDDC5B3B, &DE9E4C62, &DF608FE2, &E02323E5 EQUD &E0E60686, &E1A935E1, &E26CB01B, &E330734F EQUD &E3F47D95, &E4B8CD11, &E57D5FDC, &E642340C EQUD &E70747C4, &E7CC9919, &E8922621, &E957ECFC EQUD &EA1DEBBD, &EAE4207A, &EBAA894F, &EC712451 EQUD &ED37EF91, &EDFEE92C, &EEC60F33, &EF8D5FB8 EQUD &F054D8D5, &F11C7898, &F1E43D1C, &F2AC246F EQUD &F3742CA0, &F43C53CA, &F50497FC, &F5CCF742 EQUD &F6956FB6, &F75DFF67, &F826A460, &F8EF5CBB EQUD &F9B82685, &FA80FFCA, &FB49E6A2, &FC12D91B EQUD &FCDBD540, &FDA4D928, &FE6DE2E1, &FF36F077