| MODULE Math; (*Standard functions; NW 12.10.2013*) |
| .MODULE Math (KEY 32C32F12, VERSION 1, SIZE 0000071C) |
| .FIXUP T 0H |
| |
| PROCEDURE sqrt*(x: REAL): REAL; |
| CONST c1 = 0.70710680; (* 1/sqrt(2) *) |
| c2 = 0.590162067; |
| c3 = 1.4142135; (*sqrt(2)*) |
| VAR s: REAL; e: INTEGER; |
| BEGINa ASSERT(x >= 0.0)b;c |
0000 | a .PROC 1 |
0000 | a(4EE90010): SUB SP, SP, 10H |
0001 | a(AFE00000): STR LNK, SP, 0H |
0002 | a(A0E00004): STR R0, SP, 4H |
0003 | b(80E00004): LDR R0, SP, 4H |
0004 | c(D500F77C): BLLT MT [trap=7, pos=247] |
| IF x > 0.0 THENd |
0005 | d(80E00004): LDR R0, SP, 4H |
0006 | d(E6000034): BLE 52 [003BH] |
| UNPK(x, e);e |
0007 | e(80E00004): LDR R0, SP, 4H |
0008 | e(41020017): ASR R1, R0, 17H |
0009 | e(4119007F): SUB R1, R1, 7FH |
000A | e(A1E0000C): STR R1, SP, CH |
000B | e(41110017): LSL R1, R1, 17H |
000C | e(00090001): SUB R0, R0, R1 |
000D | e(A0E00004): STR R0, SP, 4H |
| s := c2*(x+c1)f;g |
000E | f(80E00004): LDR R0, SP, 4H |
000F | f(61003F35): MOV' R1, R0, 3F35H |
0010 | f(411604F4): IOR R1, R1, 4F4H |
0011 | f(000C0001): FAD R0, R0, R1 |
0012 | g(61003F17): MOV' R1, R0, 3F17H |
0013 | g(411614DD): IOR R1, R1, 14DDH |
0014 | g(001E0000): FML R0, R1, R0 |
0015 | g(A0E00008): STR R0, SP, 8H |
| s := s + (x/s)h;i |
0016 | h(80E00004): LDR R0, SP, 4H |
0017 | h(81E00008): LDR R1, SP, 8H |
0018 | h(000F0001): FDV R0, R0, R1 |
0019 | i(81E00008): LDR R1, SP, 8H |
001A | i(001C0000): FAD R0, R1, R0 |
001B | i(A0E00008): STR R0, SP, 8H |
| s := 0.25*s +j x/s;k |
001C | j(60003E80): MOV' R0, R0, 3E80H |
001D | j(81E00008): LDR R1, SP, 8H |
001E | j(000E0001): FML R0, R0, R1 |
001F | k(81E00004): LDR R1, SP, 4H |
0020 | k(82E00008): LDR R2, SP, 8H |
0021 | k(011F0002): FDV R1, R1, R2 |
0022 | k(000C0001): FAD R0, R0, R1 |
0023 | k(A0E00008): STR R0, SP, 8H |
| s := 0.5 * (s + x/s)l;m |
0024 | l(80E00004): LDR R0, SP, 4H |
0025 | l(81E00008): LDR R1, SP, 8H |
0026 | l(000F0001): FDV R0, R0, R1 |
0027 | l(81E00008): LDR R1, SP, 8H |
0028 | l(001C0000): FAD R0, R1, R0 |
0029 | m(61003F00): MOV' R1, R0, 3F00H |
002A | m(001E0000): FML R0, R1, R0 |
002B | m(A0E00008): STR R0, SP, 8H |
| IF ODD(e) THENn s := c3*s ENDo ; |
002C | n(80E0000C): LDR R0, SP, CH |
002D | n(40040001): AND R0, R0, 1H |
002E | n(E1000005): BEQ 5 [0034H] |
002F | o(60003FB5): MOV' R0, R0, 3FB5H |
0030 | o(400604F3): IOR R0, R0, 4F3H |
0031 | o(81E00008): LDR R1, SP, 8H |
0032 | o(000E0001): FML R0, R0, R1 |
0033 | o(A0E00008): STR R0, SP, 8H |
| PACK(s, e DIV 2)p |
0034 | p(80E0000C): LDR R0, SP, CH |
0035 | p(40020001): ASR R0, R0, 1H |
| ELSEq sr := 0.0 |
0036 | q(81E00008): LDR R1, SP, 8H |
0037 | q(40010017): LSL R0, R0, 17H |
0038 | q(01180000): ADD R1, R1, R0 |
0039 | q(A1E00008): STR R1, SP, 8H |
003A | r(E7000002): B 2 [003DH] |
| ENDs ; |
003B | s(40000000): MOV R0, R0, 0H |
003C | s(A0E00008): STR R0, SP, 8H |
| RETURN s |
| ENDt sqrt; |
003D | t(80E00008): LDR R0, SP, 8H |
003E | t(8FE00000): LDR LNK, SP, 0H |
003F | t(4EE80010): ADD SP, SP, 10H |
0040 | t(C700000F): B LNK |
| |
| PROCEDURE exp*(x: REAL): REAL; |
| CONST |
| c1 = 1.4426951; (*1/ln(2) *) |
| p0 = 1.513864173E3; |
| p1= 2.020170000E1; |
| p2 = 2.309432127E-2; |
| q0 = 4.368088670E3; |
| q1 = 2.331782320E2; |
| VAR n: INTEGER; p, y, yy: REAL; |
| BEGINu y := c1*x;v |
0041 | u .PROC 2 |
0041 | u(4EE90018): SUB SP, SP, 18H |
0042 | u(AFE00000): STR LNK, SP, 0H |
0043 | u(A0E00004): STR R0, SP, 4H |
0044 | v(60003FB8): MOV' R0, R0, 3FB8H |
0045 | v(4006AA3C): IOR R0, R0, FFFFAA3CH |
0046 | v(81E00004): LDR R1, SP, 4H |
0047 | v(000E0001): FML R0, R0, R1 |
0048 | v(A0E00010): STR R0, SP, 10H |
| n := FLOOR(y + 0.5)w;x y := y - FLT(n);y |
0049 | w(80E00010): LDR R0, SP, 10H |
004A | w(61003F00): MOV' R1, R0, 3F00H |
004B | w(000C0001): FAD R0, R0, R1 |
004C | x(61004B00): MOV' R1, R0, 4B00H |
004D | x(100C0001): FAD R0, R0, R1 |
004E | x(A0E00008): STR R0, SP, 8H |
004F | y(80E00008): LDR R0, SP, 8H |
0050 | y(61004B00): MOV' R1, R0, 4B00H |
0051 | y(200C0001): FAD' R0, R0, R1 |
0052 | y(81E00010): LDR R1, SP, 10H |
0053 | y(001D0000): FSB R0, R1, R0 |
0054 | y(A0E00010): STR R0, SP, 10H |
| yy := y*y;z |
0055 | z(80E00010): LDR R0, SP, 10H |
0056 | z(81E00010): LDR R1, SP, 10H |
0057 | z(000E0001): FML R0, R0, R1 |
0058 | z(A0E00014): STR R0, SP, 14H |
| p := ((p2*yy +a p1)b*yy +c p0)d*y;e |
0059 | a(60003CBD): MOV' R0, R0, 3CBDH |
005A | a(4006304D): IOR R0, R0, 304DH |
005B | a(81E00014): LDR R1, SP, 14H |
005C | a(000E0001): FML R0, R0, R1 |
005D | b(610041A1): MOV' R1, R0, 41A1H |
005E | b(41169D15): IOR R1, R1, FFFF9D15H |
005F | b(000C0001): FAD R0, R0, R1 |
0060 | c(81E00014): LDR R1, SP, 14H |
0061 | c(000E0001): FML R0, R0, R1 |
0062 | d(610044BD): MOV' R1, R0, 44BDH |
0063 | d(41163BA7): IOR R1, R1, 3BA7H |
0064 | d(000C0001): FAD R0, R0, R1 |
0065 | e(81E00010): LDR R1, SP, 10H |
0066 | e(000E0001): FML R0, R0, R1 |
0067 | e(A0E0000C): STR R0, SP, CH |
| p := p/((yy + q1)f*yy +g q0 -h p)i +j 0.5;k |
0068 | f(80E00014): LDR R0, SP, 14H |
0069 | f(61004369): MOV' R1, R0, 4369H |
006A | f(41162DA1): IOR R1, R1, 2DA1H |
006B | f(000C0001): FAD R0, R0, R1 |
006C | g(81E00014): LDR R1, SP, 14H |
006D | g(000E0001): FML R0, R0, R1 |
006E | h(61004588): MOV' R1, R0, 4588H |
006F | h(411680B6): IOR R1, R1, FFFF80B6H |
0070 | h(000C0001): FAD R0, R0, R1 |
0071 | i(81E0000C): LDR R1, SP, CH |
0072 | i(000D0001): FSB R0, R0, R1 |
0073 | j(81E0000C): LDR R1, SP, CH |
0074 | j(001F0000): FDV R0, R1, R0 |
0075 | k(61003F00): MOV' R1, R0, 3F00H |
0076 | k(000C0001): FAD R0, R0, R1 |
0077 | k(A0E0000C): STR R0, SP, CH |
| PACK(p, n+1)l;m RETURN p |
0078 | l(80E00008): LDR R0, SP, 8H |
0079 | l(40080001): ADD R0, R0, 1H |
007A | m(81E0000C): LDR R1, SP, CH |
007B | m(40010017): LSL R0, R0, 17H |
007C | m(01180000): ADD R1, R1, R0 |
007D | m(A1E0000C): STR R1, SP, CH |
| ENDn exp; |
007E | n(80E0000C): LDR R0, SP, CH |
007F | n(8FE00000): LDR LNK, SP, 0H |
0080 | n(4EE80018): ADD SP, SP, 18H |
0081 | n(C700000F): B LNK |
| |
| PROCEDURE ln*(x: REAL): REAL; |
| CONST c1 = 0.70710680; (* 1/sqrt(2) *) |
| c2 = 0.69314720; (* ln(2) *) |
| p0 = -9.01746917E1; |
| p1 = 9.34639006E1; |
| p2 = -1.83278704E1; |
| q0 = -4.50873458E1; |
| q1 = 6.76106560E1; |
| q2 = -2.07334879E1; |
| VAR e: INTEGER; xx, y: REAL; |
| BEGINo ASSERT(x > 0.0)p;q UNPK(x, e);r |
0082 | o .PROC 3 |
0082 | o(4EE90014): SUB SP, SP, 14H |
0083 | o(AFE00000): STR LNK, SP, 0H |
0084 | o(A0E00004): STR R0, SP, 4H |
0085 | p(80E00004): LDR R0, SP, 4H |
0086 | q(D604EC7C): BLLE MT [trap=7, pos=1260] |
0087 | r(80E00004): LDR R0, SP, 4H |
0088 | r(41020017): ASR R1, R0, 17H |
0089 | r(4119007F): SUB R1, R1, 7FH |
008A | r(A1E00008): STR R1, SP, 8H |
008B | r(41110017): LSL R1, R1, 17H |
008C | r(00090001): SUB R0, R0, R1 |
008D | r(A0E00004): STR R0, SP, 4H |
| IF x < c1 THENs x := x*2.0;t e := e-1 ENDu ; |
008E | s(80E00004): LDR R0, SP, 4H |
008F | s(61003F35): MOV' R1, R0, 3F35H |
0090 | s(411604F4): IOR R1, R1, 4F4H |
0091 | s(000D0001): FSB R0, R0, R1 |
0092 | s(ED000007): BGE 7 [009AH] |
0093 | t(80E00004): LDR R0, SP, 4H |
0094 | t(61004000): MOV' R1, R0, 4000H |
0095 | t(000E0001): FML R0, R0, R1 |
0096 | t(A0E00004): STR R0, SP, 4H |
0097 | u(80E00008): LDR R0, SP, 8H |
0098 | u(40090001): SUB R0, R0, 1H |
0099 | u(A0E00008): STR R0, SP, 8H |
| x := (x-1.0)v/(x+1.0)w;x |
009A | v(80E00004): LDR R0, SP, 4H |
009B | v(61003F80): MOV' R1, R0, 3F80H |
009C | v(000D0001): FSB R0, R0, R1 |
009D | w(81E00004): LDR R1, SP, 4H |
009E | w(62003F80): MOV' R2, R0, 3F80H |
009F | w(011C0002): FAD R1, R1, R2 |
00A0 | x(000F0001): FDV R0, R0, R1 |
00A1 | x(A0E00004): STR R0, SP, 4H |
| xx := x;y |
00A2 | y(80E00004): LDR R0, SP, 4H |
00A3 | y(A0E0000C): STR R0, SP, CH |
| y := c2*FLT(e) +z x*((p2*xx +a p1)b*xx +c p0)d /e (((xx + q2)f*xx +g q1)h*xx +i q0)j;k |
00A4 | z(80E00008): LDR R0, SP, 8H |
00A5 | z(61004B00): MOV' R1, R0, 4B00H |
00A6 | z(200C0001): FAD' R0, R0, R1 |
00A7 | z(61003F31): MOV' R1, R0, 3F31H |
00A8 | z(41167218): IOR R1, R1, 7218H |
00A9 | z(001E0000): FML R0, R1, R0 |
00AA | a(6100C192): MOV' R1, R0, FFFFC192H |
00AB | a(41169F7B): IOR R1, R1, FFFF9F7BH |
00AC | a(82E0000C): LDR R2, SP, CH |
00AD | a(011E0002): FML R1, R1, R2 |
00AE | b(620042BA): MOV' R2, R0, 42BAH |
00AF | b(4226ED85): IOR R2, R2, FFFFED85H |
00B0 | b(011C0002): FAD R1, R1, R2 |
00B1 | c(82E0000C): LDR R2, SP, CH |
00B2 | c(011E0002): FML R1, R1, R2 |
00B3 | d(6200C2B4): MOV' R2, R0, FFFFC2B4H |
00B4 | d(42265971): IOR R2, R2, 5971H |
00B5 | d(011C0002): FAD R1, R1, R2 |
00B6 | e(82E00004): LDR R2, SP, 4H |
00B7 | e(012E0001): FML R1, R2, R1 |
00B8 | f(82E0000C): LDR R2, SP, CH |
00B9 | f(6300C1A5): MOV' R3, R0, FFFFC1A5H |
00BA | f(4336DE30): IOR R3, R3, FFFFDE30H |
00BB | f(022C0003): FAD R2, R2, R3 |
00BC | g(83E0000C): LDR R3, SP, CH |
00BD | g(022E0003): FML R2, R2, R3 |
00BE | h(63004287): MOV' R3, R0, 4287H |
00BF | h(433638A8): IOR R3, R3, 38A8H |
00C0 | h(022C0003): FAD R2, R2, R3 |
00C1 | i(83E0000C): LDR R3, SP, CH |
00C2 | i(022E0003): FML R2, R2, R3 |
00C3 | j(6300C234): MOV' R3, R0, FFFFC234H |
00C4 | j(43365971): IOR R3, R3, 5971H |
00C5 | j(022C0003): FAD R2, R2, R3 |
00C6 | k(011F0002): FDV R1, R1, R2 |
00C7 | k(000C0001): FAD R0, R0, R1 |
00C8 | k(A0E00010): STR R0, SP, 10H |
| RETURN y |
| ENDl ln; |
00C9 | l(80E00010): LDR R0, SP, 10H |
00CA | l(8FE00000): LDR LNK, SP, 0H |
00CB | l(4EE80014): ADD SP, SP, 14H |
00CC | l(C700000F): B LNK |
| |
| PROCEDURE sin*(x: REAL): REAL; |
| CONST |
| c1 = 6.3661977E-1; (*2/pi*) |
| p0 = 7.8539816E-1; |
| p1 = -8.0745512E-2; |
| p2 = 2.4903946E-3; |
| p3 = -3.6576204E-5; |
| p4 = 3.1336162E-7; |
| p5 = -1.7571493E-9; |
| p6 = 6.8771004E-12; |
| q0 = 9.9999999E-1; |
| q1 = -3.0842514E-1; |
| q2 = 1.5854344E-2; |
| q3 = -3.2599189E-4; |
| q4 = 3.5908591E-6; |
| q5 = -2.4609457E-8; |
| q6 = 1.1363813E-10; |
| VAR n: INTEGER; y, yy, f: REAL; |
| BEGINm y := c1*x;n |
00CD | m .PROC 4 |
00CD | m(4EE90018): SUB SP, SP, 18H |
00CE | m(AFE00000): STR LNK, SP, 0H |
00CF | m(A0E00004): STR R0, SP, 4H |
00D0 | n(60003F22): MOV' R0, R0, 3F22H |
00D1 | n(4006F984): IOR R0, R0, FFFFF984H |
00D2 | n(81E00004): LDR R1, SP, 4H |
00D3 | n(000E0001): FML R0, R0, R1 |
00D4 | n(A0E0000C): STR R0, SP, CH |
| IF y >= 0.0 THENo n := FLOOR(y + 0.5)p ELSEq nr := FLOOR(y - 0.5)s ENDt ; |
00D5 | o(80E0000C): LDR R0, SP, CH |
00D6 | o(E5000007): BLT 7 [00DEH] |
00D7 | p(80E0000C): LDR R0, SP, CH |
00D8 | p(61003F00): MOV' R1, R0, 3F00H |
00D9 | p(000C0001): FAD R0, R0, R1 |
00DA | q(61004B00): MOV' R1, R0, 4B00H |
00DB | q(100C0001): FAD R0, R0, R1 |
00DC | q(A0E00008): STR R0, SP, 8H |
00DD | r(E7000006): B 6 [00E4H] |
00DE | s(80E0000C): LDR R0, SP, CH |
00DF | s(61003F00): MOV' R1, R0, 3F00H |
00E0 | s(000D0001): FSB R0, R0, R1 |
00E1 | t(61004B00): MOV' R1, R0, 4B00H |
00E2 | t(100C0001): FAD R0, R0, R1 |
00E3 | t(A0E00008): STR R0, SP, 8H |
| y := (y - FLT(n))u * 2.0;v yy := y*y;w |
00E4 | u(80E00008): LDR R0, SP, 8H |
00E5 | u(61004B00): MOV' R1, R0, 4B00H |
00E6 | u(200C0001): FAD' R0, R0, R1 |
00E7 | u(81E0000C): LDR R1, SP, CH |
00E8 | u(001D0000): FSB R0, R1, R0 |
00E9 | v(61004000): MOV' R1, R0, 4000H |
00EA | v(000E0001): FML R0, R0, R1 |
00EB | v(A0E0000C): STR R0, SP, CH |
00EC | w(80E0000C): LDR R0, SP, CH |
00ED | w(81E0000C): LDR R1, SP, CH |
00EE | w(000E0001): FML R0, R0, R1 |
00EF | w(A0E00010): STR R0, SP, 10H |
| IF ODD(n) THENx f := (((((q6*yy +y q5)z*yy +a q4)b*yy +c q3)d*yy +e q2)f*yy +g q1)h*yy +i q0 |
00F0 | x(80E00008): LDR R0, SP, 8H |
00F1 | x(40040001): AND R0, R0, 1H |
00F2 | x(E1000021): BEQ 33 [0114H] |
00F3 | y(60002EF9): MOV' R0, R0, 2EF9H |
00F4 | y(4006E493): IOR R0, R0, FFFFE493H |
00F5 | y(81E00010): LDR R1, SP, 10H |
00F6 | y(000E0001): FML R0, R0, R1 |
00F7 | z(6100B2D3): MOV' R1, R0, FFFFB2D3H |
00F8 | z(411664C5): IOR R1, R1, 64C5H |
00F9 | z(000C0001): FAD R0, R0, R1 |
00FA | a(81E00010): LDR R1, SP, 10H |
00FB | a(000E0001): FML R0, R0, R1 |
00FC | b(61003670): MOV' R1, R0, 3670H |
00FD | b(4116FA7E): IOR R1, R1, FFFFFA7EH |
00FE | b(000C0001): FAD R0, R0, R1 |
00FF | c(81E00010): LDR R1, SP, 10H |
0100 | c(000E0001): FML R0, R0, R1 |
0101 | d(6100B9AA): MOV' R1, R0, FFFFB9AAH |
0102 | d(4116E9E5): IOR R1, R1, FFFFE9E5H |
0103 | d(000C0001): FAD R0, R0, R1 |
0104 | e(81E00010): LDR R1, SP, 10H |
0105 | e(000E0001): FML R0, R0, R1 |
0106 | f(61003C81): MOV' R1, R0, 3C81H |
0107 | f(4116E0F8): IOR R1, R1, FFFFE0F8H |
0108 | f(000C0001): FAD R0, R0, R1 |
0109 | g(81E00010): LDR R1, SP, 10H |
010A | g(000E0001): FML R0, R0, R1 |
010B | h(6100BE9D): MOV' R1, R0, FFFFBE9DH |
010C | h(4116E9E6): IOR R1, R1, FFFFE9E6H |
010D | h(000C0001): FAD R0, R0, R1 |
010E | i(81E00010): LDR R1, SP, 10H |
010F | i(000E0001): FML R0, R0, R1 |
| ELSEj fk := ((((((p6*yy +l p5)m*yy +n p4)o*yy +p p3)q*yy +r p2)s*yy +t p1)u*yy +v p0)w*y |
0110 | j(61003F80): MOV' R1, R0, 3F80H |
0111 | j(000C0001): FAD R0, R0, R1 |
0112 | j(A0E00014): STR R0, SP, 14H |
0113 | k(E7000023): B 35 [0137H] |
0114 | l(60002CF1): MOV' R0, R0, 2CF1H |
0115 | l(4006F76B): IOR R0, R0, FFFFF76BH |
0116 | l(81E00010): LDR R1, SP, 10H |
0117 | l(000E0001): FML R0, R0, R1 |
0118 | m(6100B0F1): MOV' R1, R0, FFFFB0F1H |
0119 | m(41168032): IOR R1, R1, FFFF8032H |
011A | m(000C0001): FAD R0, R0, R1 |
011B | n(81E00010): LDR R1, SP, 10H |
011C | n(000E0001): FML R0, R0, R1 |
011D | o(610034A8): MOV' R1, R0, 34A8H |
011E | o(41163C18): IOR R1, R1, 3C18H |
011F | o(000C0001): FAD R0, R0, R1 |
0120 | p(81E00010): LDR R1, SP, 10H |
0121 | p(000E0001): FML R0, R0, R1 |
0122 | q(6100B819): MOV' R1, R0, FFFFB819H |
0123 | q(41166966): IOR R1, R1, 6966H |
0124 | q(000C0001): FAD R0, R0, R1 |
0125 | r(81E00010): LDR R1, SP, 10H |
0126 | r(000E0001): FML R0, R0, R1 |
0127 | s(61003B23): MOV' R1, R0, 3B23H |
0128 | s(411635E3): IOR R1, R1, 35E3H |
0129 | s(000C0001): FAD R0, R0, R1 |
012A | t(81E00010): LDR R1, SP, 10H |
012B | t(000E0001): FML R0, R0, R1 |
012C | u(6100BDA5): MOV' R1, R0, FFFFBDA5H |
012D | u(41165DE7): IOR R1, R1, 5DE7H |
012E | u(000C0001): FAD R0, R0, R1 |
012F | v(81E00010): LDR R1, SP, 10H |
0130 | v(000E0001): FML R0, R0, R1 |
0131 | w(61003F49): MOV' R1, R0, 3F49H |
0132 | w(41160FDB): IOR R1, R1, FDBH |
0133 | w(000C0001): FAD R0, R0, R1 |
| ENDx ; |
0134 | x(81E0000C): LDR R1, SP, CH |
0135 | x(000E0001): FML R0, R0, R1 |
0136 | x(A0E00014): STR R0, SP, 14H |
| IF ODD(n DIV 2)y THENz f := -f ENDa ; |
0137 | y(80E00008): LDR R0, SP, 8H |
0138 | y(40020001): ASR R0, R0, 1H |
0139 | z(40040001): AND R0, R0, 1H |
013A | z(E1000004): BEQ 4 [013FH] |
013B | a(80E00014): LDR R0, SP, 14H |
013C | a(41000000): MOV R1, R0, 0H |
013D | a(001D0000): FSB R0, R1, R0 |
013E | a(A0E00014): STR R0, SP, 14H |
| RETURN f |
| ENDb sin; |
013F | b(80E00014): LDR R0, SP, 14H |
0140 | b(8FE00000): LDR LNK, SP, 0H |
0141 | b(4EE80018): ADD SP, SP, 18H |
0142 | b(C700000F): B LNK |
| |
| PROCEDURE cos*(x: REAL): REAL; |
| CONST |
| c1 = 6.3661977E-1; (*2/pi*) |
| p0 = 7.8539816E-1; |
| p1 = -8.0745512E-2; |
| p2 = 2.4903946E-3; |
| p3 = -3.6576204E-5; |
| p4 = 3.1336162E-7; |
| p5 = -1.7571493E-9; |
| p6 = 6.8771004E-12; |
| q0 = 9.9999999E-1; |
| q1 = -3.0842514E-1; |
| q2 = 1.5854344E-2; |
| q3 = -3.2599189E-4; |
| q4 = 3.5908591E-6; |
| q5 = -2.4609457E-8; |
| q6 = 1.1363813E-10; |
| VAR n: INTEGER; y, yy, f: REAL; |
| BEGINc y := c1*x;d |
0143 | c .PROC 5 |
0143 | c(4EE90018): SUB SP, SP, 18H |
0144 | c(AFE00000): STR LNK, SP, 0H |
0145 | c(A0E00004): STR R0, SP, 4H |
0146 | d(60003F22): MOV' R0, R0, 3F22H |
0147 | d(4006F984): IOR R0, R0, FFFFF984H |
0148 | d(81E00004): LDR R1, SP, 4H |
0149 | d(000E0001): FML R0, R0, R1 |
014A | d(A0E0000C): STR R0, SP, CH |
| IF y >= 0.0 THENe n := FLOOR(y + 0.5)f ELSEg nh := FLOOR(y - 0.5)i ENDj ; |
014B | e(80E0000C): LDR R0, SP, CH |
014C | e(E5000007): BLT 7 [0154H] |
014D | f(80E0000C): LDR R0, SP, CH |
014E | f(61003F00): MOV' R1, R0, 3F00H |
014F | f(000C0001): FAD R0, R0, R1 |
0150 | g(61004B00): MOV' R1, R0, 4B00H |
0151 | g(100C0001): FAD R0, R0, R1 |
0152 | g(A0E00008): STR R0, SP, 8H |
0153 | h(E7000006): B 6 [015AH] |
0154 | i(80E0000C): LDR R0, SP, CH |
0155 | i(61003F00): MOV' R1, R0, 3F00H |
0156 | i(000D0001): FSB R0, R0, R1 |
0157 | j(61004B00): MOV' R1, R0, 4B00H |
0158 | j(100C0001): FAD R0, R0, R1 |
0159 | j(A0E00008): STR R0, SP, 8H |
| y := (y - FLT(n))k * 2.0;l yy := y*y;m |
015A | k(80E00008): LDR R0, SP, 8H |
015B | k(61004B00): MOV' R1, R0, 4B00H |
015C | k(200C0001): FAD' R0, R0, R1 |
015D | k(81E0000C): LDR R1, SP, CH |
015E | k(001D0000): FSB R0, R1, R0 |
015F | l(61004000): MOV' R1, R0, 4000H |
0160 | l(000E0001): FML R0, R0, R1 |
0161 | l(A0E0000C): STR R0, SP, CH |
0162 | m(80E0000C): LDR R0, SP, CH |
0163 | m(81E0000C): LDR R1, SP, CH |
0164 | m(000E0001): FML R0, R0, R1 |
0165 | m(A0E00010): STR R0, SP, 10H |
| IF ~ODD(n) THENn f := (((((q6*yy +o q5)p*yy +q q4)r*yy +s q3)t*yy +u q2)v*yy +w q1)x*yy +y q0 |
0166 | n(80E00008): LDR R0, SP, 8H |
0167 | n(40040001): AND R0, R0, 1H |
0168 | n(E9000021): BNE 33 [018AH] |
0169 | o(60002EF9): MOV' R0, R0, 2EF9H |
016A | o(4006E493): IOR R0, R0, FFFFE493H |
016B | o(81E00010): LDR R1, SP, 10H |
016C | o(000E0001): FML R0, R0, R1 |
016D | p(6100B2D3): MOV' R1, R0, FFFFB2D3H |
016E | p(411664C5): IOR R1, R1, 64C5H |
016F | p(000C0001): FAD R0, R0, R1 |
0170 | q(81E00010): LDR R1, SP, 10H |
0171 | q(000E0001): FML R0, R0, R1 |
0172 | r(61003670): MOV' R1, R0, 3670H |
0173 | r(4116FA7E): IOR R1, R1, FFFFFA7EH |
0174 | r(000C0001): FAD R0, R0, R1 |
0175 | s(81E00010): LDR R1, SP, 10H |
0176 | s(000E0001): FML R0, R0, R1 |
0177 | t(6100B9AA): MOV' R1, R0, FFFFB9AAH |
0178 | t(4116E9E5): IOR R1, R1, FFFFE9E5H |
0179 | t(000C0001): FAD R0, R0, R1 |
017A | u(81E00010): LDR R1, SP, 10H |
017B | u(000E0001): FML R0, R0, R1 |
017C | v(61003C81): MOV' R1, R0, 3C81H |
017D | v(4116E0F8): IOR R1, R1, FFFFE0F8H |
017E | v(000C0001): FAD R0, R0, R1 |
017F | w(81E00010): LDR R1, SP, 10H |
0180 | w(000E0001): FML R0, R0, R1 |
0181 | x(6100BE9D): MOV' R1, R0, FFFFBE9DH |
0182 | x(4116E9E6): IOR R1, R1, FFFFE9E6H |
0183 | x(000C0001): FAD R0, R0, R1 |
0184 | y(81E00010): LDR R1, SP, 10H |
0185 | y(000E0001): FML R0, R0, R1 |
| ELSEz fa := ((((((p6*yy +b p5)c*yy +d p4)e*yy +f p3)g*yy +h p2)i*yy +j p1)k*yy +l p0)m*y |
0186 | z(61003F80): MOV' R1, R0, 3F80H |
0187 | z(000C0001): FAD R0, R0, R1 |
0188 | z(A0E00014): STR R0, SP, 14H |
0189 | a(E7000023): B 35 [01ADH] |
018A | b(60002CF1): MOV' R0, R0, 2CF1H |
018B | b(4006F76B): IOR R0, R0, FFFFF76BH |
018C | b(81E00010): LDR R1, SP, 10H |
018D | b(000E0001): FML R0, R0, R1 |
018E | c(6100B0F1): MOV' R1, R0, FFFFB0F1H |
018F | c(41168032): IOR R1, R1, FFFF8032H |
0190 | c(000C0001): FAD R0, R0, R1 |
0191 | d(81E00010): LDR R1, SP, 10H |
0192 | d(000E0001): FML R0, R0, R1 |
0193 | e(610034A8): MOV' R1, R0, 34A8H |
0194 | e(41163C18): IOR R1, R1, 3C18H |
0195 | e(000C0001): FAD R0, R0, R1 |
0196 | f(81E00010): LDR R1, SP, 10H |
0197 | f(000E0001): FML R0, R0, R1 |
0198 | g(6100B819): MOV' R1, R0, FFFFB819H |
0199 | g(41166966): IOR R1, R1, 6966H |
019A | g(000C0001): FAD R0, R0, R1 |
019B | h(81E00010): LDR R1, SP, 10H |
019C | h(000E0001): FML R0, R0, R1 |
019D | i(61003B23): MOV' R1, R0, 3B23H |
019E | i(411635E3): IOR R1, R1, 35E3H |
019F | i(000C0001): FAD R0, R0, R1 |
01A0 | j(81E00010): LDR R1, SP, 10H |
01A1 | j(000E0001): FML R0, R0, R1 |
01A2 | k(6100BDA5): MOV' R1, R0, FFFFBDA5H |
01A3 | k(41165DE7): IOR R1, R1, 5DE7H |
01A4 | k(000C0001): FAD R0, R0, R1 |
01A5 | l(81E00010): LDR R1, SP, 10H |
01A6 | l(000E0001): FML R0, R0, R1 |
01A7 | m(61003F49): MOV' R1, R0, 3F49H |
01A8 | m(41160FDB): IOR R1, R1, FDBH |
01A9 | m(000C0001): FAD R0, R0, R1 |
| ENDn ; |
01AA | n(81E0000C): LDR R1, SP, CH |
01AB | n(000E0001): FML R0, R0, R1 |
01AC | n(A0E00014): STR R0, SP, 14H |
| IF ODD((n+1)o DIV 2)p THENq f := -f ENDr ; |
01AD | o(80E00008): LDR R0, SP, 8H |
01AE | o(40080001): ADD R0, R0, 1H |
01AF | p(40020001): ASR R0, R0, 1H |
01B0 | q(40040001): AND R0, R0, 1H |
01B1 | q(E1000004): BEQ 4 [01B6H] |
01B2 | r(80E00014): LDR R0, SP, 14H |
01B3 | r(41000000): MOV R1, R0, 0H |
01B4 | r(001D0000): FSB R0, R1, R0 |
01B5 | r(A0E00014): STR R0, SP, 14H |
| RETURN f |
| ENDs cos; |
01B6 | s(80E00014): LDR R0, SP, 14H |
01B7 | s(8FE00000): LDR LNK, SP, 0H |
01B8 | s(4EE80018): ADD SP, SP, 18H |
01B9 | s(C700000F): B LNK |
| ENDt Math.u |
01BA | t .PROC 0 |
01BA | t .ENTRYPOINT |
01BA | t(4EE90004): SUB SP, SP, 4H |
01BB | t(AFE00000): STR LNK, SP, 0H |
01BC | u(8FE00000): LDR LNK, SP, 0H |
01BD | u(4EE80004): ADD SP, SP, 4H |
01BE | u(C700000F): B LNK |