Math

Used Exports

BUILTINS: ASSERT FLOOR FLT INTEGER ODD PACK REAL UNPK

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
0000a .PROC 1
0000a(4EE90010): SUB SP, SP, 10H
0001a(AFE00000): STR LNK, SP, 0H
0002a(A0E00004): STR R0, SP, 4H
0003b(80E00004): LDR R0, SP, 4H
0004c(D500F77C): BLLT MT [trap=7, pos=247]
IF x > 0.0 THENd
0005d(80E00004): LDR R0, SP, 4H
0006d(E6000034): BLE 52 [003BH]
UNPK(x, e);e
0007e(80E00004): LDR R0, SP, 4H
0008e(41020017): ASR R1, R0, 17H
0009e(4119007F): SUB R1, R1, 7FH
000Ae(A1E0000C): STR R1, SP, CH
000Be(41110017): LSL R1, R1, 17H
000Ce(00090001): SUB R0, R0, R1
000De(A0E00004): STR R0, SP, 4H
s := c2*(x+c1)f;g
000Ef(80E00004): LDR R0, SP, 4H
000Ff(61003F35): MOV' R1, R0, 3F35H
0010f(411604F4): IOR R1, R1, 4F4H
0011f(000C0001): FAD R0, R0, R1
0012g(61003F17): MOV' R1, R0, 3F17H
0013g(411614DD): IOR R1, R1, 14DDH
0014g(001E0000): FML R0, R1, R0
0015g(A0E00008): STR R0, SP, 8H
s := s + (x/s)h;i
0016h(80E00004): LDR R0, SP, 4H
0017h(81E00008): LDR R1, SP, 8H
0018h(000F0001): FDV R0, R0, R1
0019i(81E00008): LDR R1, SP, 8H
001Ai(001C0000): FAD R0, R1, R0
001Bi(A0E00008): STR R0, SP, 8H
s := 0.25*s +j x/s;k
001Cj(60003E80): MOV' R0, R0, 3E80H
001Dj(81E00008): LDR R1, SP, 8H
001Ej(000E0001): FML R0, R0, R1
001Fk(81E00004): LDR R1, SP, 4H
0020k(82E00008): LDR R2, SP, 8H
0021k(011F0002): FDV R1, R1, R2
0022k(000C0001): FAD R0, R0, R1
0023k(A0E00008): STR R0, SP, 8H
s := 0.5 * (s + x/s)l;m
0024l(80E00004): LDR R0, SP, 4H
0025l(81E00008): LDR R1, SP, 8H
0026l(000F0001): FDV R0, R0, R1
0027l(81E00008): LDR R1, SP, 8H
0028l(001C0000): FAD R0, R1, R0
0029m(61003F00): MOV' R1, R0, 3F00H
002Am(001E0000): FML R0, R1, R0
002Bm(A0E00008): STR R0, SP, 8H
IF ODD(e) THENn s := c3*s ENDo ;
002Cn(80E0000C): LDR R0, SP, CH
002Dn(40040001): AND R0, R0, 1H
002En(E1000005): BEQ 5 [0034H]
002Fo(60003FB5): MOV' R0, R0, 3FB5H
0030o(400604F3): IOR R0, R0, 4F3H
0031o(81E00008): LDR R1, SP, 8H
0032o(000E0001): FML R0, R0, R1
0033o(A0E00008): STR R0, SP, 8H
PACK(s, e DIV 2)p
0034p(80E0000C): LDR R0, SP, CH
0035p(40020001): ASR R0, R0, 1H
ELSEq sr := 0.0
0036q(81E00008): LDR R1, SP, 8H
0037q(40010017): LSL R0, R0, 17H
0038q(01180000): ADD R1, R1, R0
0039q(A1E00008): STR R1, SP, 8H
003Ar(E7000002): B 2 [003DH]
ENDs ;
003Bs(40000000): MOV R0, R0, 0H
003Cs(A0E00008): STR R0, SP, 8H
RETURN s
ENDt sqrt;
003Dt(80E00008): LDR R0, SP, 8H
003Et(8FE00000): LDR LNK, SP, 0H
003Ft(4EE80010): ADD SP, SP, 10H
0040t(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
0041u .PROC 2
0041u(4EE90018): SUB SP, SP, 18H
0042u(AFE00000): STR LNK, SP, 0H
0043u(A0E00004): STR R0, SP, 4H
0044v(60003FB8): MOV' R0, R0, 3FB8H
0045v(4006AA3C): IOR R0, R0, FFFFAA3CH
0046v(81E00004): LDR R1, SP, 4H
0047v(000E0001): FML R0, R0, R1
0048v(A0E00010): STR R0, SP, 10H
n := FLOOR(y + 0.5)w;x y := y - FLT(n);y
0049w(80E00010): LDR R0, SP, 10H
004Aw(61003F00): MOV' R1, R0, 3F00H
004Bw(000C0001): FAD R0, R0, R1
004Cx(61004B00): MOV' R1, R0, 4B00H
004Dx(100C0001): FAD R0, R0, R1
004Ex(A0E00008): STR R0, SP, 8H
004Fy(80E00008): LDR R0, SP, 8H
0050y(61004B00): MOV' R1, R0, 4B00H
0051y(200C0001): FAD' R0, R0, R1
0052y(81E00010): LDR R1, SP, 10H
0053y(001D0000): FSB R0, R1, R0
0054y(A0E00010): STR R0, SP, 10H
yy := y*y;z
0055z(80E00010): LDR R0, SP, 10H
0056z(81E00010): LDR R1, SP, 10H
0057z(000E0001): FML R0, R0, R1
0058z(A0E00014): STR R0, SP, 14H
p := ((p2*yy +a p1)b*yy +c p0)d*y;e
0059a(60003CBD): MOV' R0, R0, 3CBDH
005Aa(4006304D): IOR R0, R0, 304DH
005Ba(81E00014): LDR R1, SP, 14H
005Ca(000E0001): FML R0, R0, R1
005Db(610041A1): MOV' R1, R0, 41A1H
005Eb(41169D15): IOR R1, R1, FFFF9D15H
005Fb(000C0001): FAD R0, R0, R1
0060c(81E00014): LDR R1, SP, 14H
0061c(000E0001): FML R0, R0, R1
0062d(610044BD): MOV' R1, R0, 44BDH
0063d(41163BA7): IOR R1, R1, 3BA7H
0064d(000C0001): FAD R0, R0, R1
0065e(81E00010): LDR R1, SP, 10H
0066e(000E0001): FML R0, R0, R1
0067e(A0E0000C): STR R0, SP, CH
p := p/((yy + q1)f*yy +g q0 -h p)i +j 0.5;k
0068f(80E00014): LDR R0, SP, 14H
0069f(61004369): MOV' R1, R0, 4369H
006Af(41162DA1): IOR R1, R1, 2DA1H
006Bf(000C0001): FAD R0, R0, R1
006Cg(81E00014): LDR R1, SP, 14H
006Dg(000E0001): FML R0, R0, R1
006Eh(61004588): MOV' R1, R0, 4588H
006Fh(411680B6): IOR R1, R1, FFFF80B6H
0070h(000C0001): FAD R0, R0, R1
0071i(81E0000C): LDR R1, SP, CH
0072i(000D0001): FSB R0, R0, R1
0073j(81E0000C): LDR R1, SP, CH
0074j(001F0000): FDV R0, R1, R0
0075k(61003F00): MOV' R1, R0, 3F00H
0076k(000C0001): FAD R0, R0, R1
0077k(A0E0000C): STR R0, SP, CH
PACK(p, n+1)l;m RETURN p
0078l(80E00008): LDR R0, SP, 8H
0079l(40080001): ADD R0, R0, 1H
007Am(81E0000C): LDR R1, SP, CH
007Bm(40010017): LSL R0, R0, 17H
007Cm(01180000): ADD R1, R1, R0
007Dm(A1E0000C): STR R1, SP, CH
ENDn exp;
007En(80E0000C): LDR R0, SP, CH
007Fn(8FE00000): LDR LNK, SP, 0H
0080n(4EE80018): ADD SP, SP, 18H
0081n(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
0082o .PROC 3
0082o(4EE90014): SUB SP, SP, 14H
0083o(AFE00000): STR LNK, SP, 0H
0084o(A0E00004): STR R0, SP, 4H
0085p(80E00004): LDR R0, SP, 4H
0086q(D604EC7C): BLLE MT [trap=7, pos=1260]
0087r(80E00004): LDR R0, SP, 4H
0088r(41020017): ASR R1, R0, 17H
0089r(4119007F): SUB R1, R1, 7FH
008Ar(A1E00008): STR R1, SP, 8H
008Br(41110017): LSL R1, R1, 17H
008Cr(00090001): SUB R0, R0, R1
008Dr(A0E00004): STR R0, SP, 4H
IF x < c1 THENs x := x*2.0;t e := e-1 ENDu ;
008Es(80E00004): LDR R0, SP, 4H
008Fs(61003F35): MOV' R1, R0, 3F35H
0090s(411604F4): IOR R1, R1, 4F4H
0091s(000D0001): FSB R0, R0, R1
0092s(ED000007): BGE 7 [009AH]
0093t(80E00004): LDR R0, SP, 4H
0094t(61004000): MOV' R1, R0, 4000H
0095t(000E0001): FML R0, R0, R1
0096t(A0E00004): STR R0, SP, 4H
0097u(80E00008): LDR R0, SP, 8H
0098u(40090001): SUB R0, R0, 1H
0099u(A0E00008): STR R0, SP, 8H
x := (x-1.0)v/(x+1.0)w;x
009Av(80E00004): LDR R0, SP, 4H
009Bv(61003F80): MOV' R1, R0, 3F80H
009Cv(000D0001): FSB R0, R0, R1
009Dw(81E00004): LDR R1, SP, 4H
009Ew(62003F80): MOV' R2, R0, 3F80H
009Fw(011C0002): FAD R1, R1, R2
00A0x(000F0001): FDV R0, R0, R1
00A1x(A0E00004): STR R0, SP, 4H
xx := x;y
00A2y(80E00004): LDR R0, SP, 4H
00A3y(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
00A4z(80E00008): LDR R0, SP, 8H
00A5z(61004B00): MOV' R1, R0, 4B00H
00A6z(200C0001): FAD' R0, R0, R1
00A7z(61003F31): MOV' R1, R0, 3F31H
00A8z(41167218): IOR R1, R1, 7218H
00A9z(001E0000): FML R0, R1, R0
00AAa(6100C192): MOV' R1, R0, FFFFC192H
00ABa(41169F7B): IOR R1, R1, FFFF9F7BH
00ACa(82E0000C): LDR R2, SP, CH
00ADa(011E0002): FML R1, R1, R2
00AEb(620042BA): MOV' R2, R0, 42BAH
00AFb(4226ED85): IOR R2, R2, FFFFED85H
00B0b(011C0002): FAD R1, R1, R2
00B1c(82E0000C): LDR R2, SP, CH
00B2c(011E0002): FML R1, R1, R2
00B3d(6200C2B4): MOV' R2, R0, FFFFC2B4H
00B4d(42265971): IOR R2, R2, 5971H
00B5d(011C0002): FAD R1, R1, R2
00B6e(82E00004): LDR R2, SP, 4H
00B7e(012E0001): FML R1, R2, R1
00B8f(82E0000C): LDR R2, SP, CH
00B9f(6300C1A5): MOV' R3, R0, FFFFC1A5H
00BAf(4336DE30): IOR R3, R3, FFFFDE30H
00BBf(022C0003): FAD R2, R2, R3
00BCg(83E0000C): LDR R3, SP, CH
00BDg(022E0003): FML R2, R2, R3
00BEh(63004287): MOV' R3, R0, 4287H
00BFh(433638A8): IOR R3, R3, 38A8H
00C0h(022C0003): FAD R2, R2, R3
00C1i(83E0000C): LDR R3, SP, CH
00C2i(022E0003): FML R2, R2, R3
00C3j(6300C234): MOV' R3, R0, FFFFC234H
00C4j(43365971): IOR R3, R3, 5971H
00C5j(022C0003): FAD R2, R2, R3
00C6k(011F0002): FDV R1, R1, R2
00C7k(000C0001): FAD R0, R0, R1
00C8k(A0E00010): STR R0, SP, 10H
RETURN y
ENDl ln;
00C9l(80E00010): LDR R0, SP, 10H
00CAl(8FE00000): LDR LNK, SP, 0H
00CBl(4EE80014): ADD SP, SP, 14H
00CCl(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
00CDm .PROC 4
00CDm(4EE90018): SUB SP, SP, 18H
00CEm(AFE00000): STR LNK, SP, 0H
00CFm(A0E00004): STR R0, SP, 4H
00D0n(60003F22): MOV' R0, R0, 3F22H
00D1n(4006F984): IOR R0, R0, FFFFF984H
00D2n(81E00004): LDR R1, SP, 4H
00D3n(000E0001): FML R0, R0, R1
00D4n(A0E0000C): STR R0, SP, CH
IF y >= 0.0 THENo n := FLOOR(y + 0.5)p ELSEq nr := FLOOR(y - 0.5)s ENDt ;
00D5o(80E0000C): LDR R0, SP, CH
00D6o(E5000007): BLT 7 [00DEH]
00D7p(80E0000C): LDR R0, SP, CH
00D8p(61003F00): MOV' R1, R0, 3F00H
00D9p(000C0001): FAD R0, R0, R1
00DAq(61004B00): MOV' R1, R0, 4B00H
00DBq(100C0001): FAD R0, R0, R1
00DCq(A0E00008): STR R0, SP, 8H
00DDr(E7000006): B 6 [00E4H]
00DEs(80E0000C): LDR R0, SP, CH
00DFs(61003F00): MOV' R1, R0, 3F00H
00E0s(000D0001): FSB R0, R0, R1
00E1t(61004B00): MOV' R1, R0, 4B00H
00E2t(100C0001): FAD R0, R0, R1
00E3t(A0E00008): STR R0, SP, 8H
y := (y - FLT(n))u * 2.0;v yy := y*y;w
00E4u(80E00008): LDR R0, SP, 8H
00E5u(61004B00): MOV' R1, R0, 4B00H
00E6u(200C0001): FAD' R0, R0, R1
00E7u(81E0000C): LDR R1, SP, CH
00E8u(001D0000): FSB R0, R1, R0
00E9v(61004000): MOV' R1, R0, 4000H
00EAv(000E0001): FML R0, R0, R1
00EBv(A0E0000C): STR R0, SP, CH
00ECw(80E0000C): LDR R0, SP, CH
00EDw(81E0000C): LDR R1, SP, CH
00EEw(000E0001): FML R0, R0, R1
00EFw(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
00F0x(80E00008): LDR R0, SP, 8H
00F1x(40040001): AND R0, R0, 1H
00F2x(E1000021): BEQ 33 [0114H]
00F3y(60002EF9): MOV' R0, R0, 2EF9H
00F4y(4006E493): IOR R0, R0, FFFFE493H
00F5y(81E00010): LDR R1, SP, 10H
00F6y(000E0001): FML R0, R0, R1
00F7z(6100B2D3): MOV' R1, R0, FFFFB2D3H
00F8z(411664C5): IOR R1, R1, 64C5H
00F9z(000C0001): FAD R0, R0, R1
00FAa(81E00010): LDR R1, SP, 10H
00FBa(000E0001): FML R0, R0, R1
00FCb(61003670): MOV' R1, R0, 3670H
00FDb(4116FA7E): IOR R1, R1, FFFFFA7EH
00FEb(000C0001): FAD R0, R0, R1
00FFc(81E00010): LDR R1, SP, 10H
0100c(000E0001): FML R0, R0, R1
0101d(6100B9AA): MOV' R1, R0, FFFFB9AAH
0102d(4116E9E5): IOR R1, R1, FFFFE9E5H
0103d(000C0001): FAD R0, R0, R1
0104e(81E00010): LDR R1, SP, 10H
0105e(000E0001): FML R0, R0, R1
0106f(61003C81): MOV' R1, R0, 3C81H
0107f(4116E0F8): IOR R1, R1, FFFFE0F8H
0108f(000C0001): FAD R0, R0, R1
0109g(81E00010): LDR R1, SP, 10H
010Ag(000E0001): FML R0, R0, R1
010Bh(6100BE9D): MOV' R1, R0, FFFFBE9DH
010Ch(4116E9E6): IOR R1, R1, FFFFE9E6H
010Dh(000C0001): FAD R0, R0, R1
010Ei(81E00010): LDR R1, SP, 10H
010Fi(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
0110j(61003F80): MOV' R1, R0, 3F80H
0111j(000C0001): FAD R0, R0, R1
0112j(A0E00014): STR R0, SP, 14H
0113k(E7000023): B 35 [0137H]
0114l(60002CF1): MOV' R0, R0, 2CF1H
0115l(4006F76B): IOR R0, R0, FFFFF76BH
0116l(81E00010): LDR R1, SP, 10H
0117l(000E0001): FML R0, R0, R1
0118m(6100B0F1): MOV' R1, R0, FFFFB0F1H
0119m(41168032): IOR R1, R1, FFFF8032H
011Am(000C0001): FAD R0, R0, R1
011Bn(81E00010): LDR R1, SP, 10H
011Cn(000E0001): FML R0, R0, R1
011Do(610034A8): MOV' R1, R0, 34A8H
011Eo(41163C18): IOR R1, R1, 3C18H
011Fo(000C0001): FAD R0, R0, R1
0120p(81E00010): LDR R1, SP, 10H
0121p(000E0001): FML R0, R0, R1
0122q(6100B819): MOV' R1, R0, FFFFB819H
0123q(41166966): IOR R1, R1, 6966H
0124q(000C0001): FAD R0, R0, R1
0125r(81E00010): LDR R1, SP, 10H
0126r(000E0001): FML R0, R0, R1
0127s(61003B23): MOV' R1, R0, 3B23H
0128s(411635E3): IOR R1, R1, 35E3H
0129s(000C0001): FAD R0, R0, R1
012At(81E00010): LDR R1, SP, 10H
012Bt(000E0001): FML R0, R0, R1
012Cu(6100BDA5): MOV' R1, R0, FFFFBDA5H
012Du(41165DE7): IOR R1, R1, 5DE7H
012Eu(000C0001): FAD R0, R0, R1
012Fv(81E00010): LDR R1, SP, 10H
0130v(000E0001): FML R0, R0, R1
0131w(61003F49): MOV' R1, R0, 3F49H
0132w(41160FDB): IOR R1, R1, FDBH
0133w(000C0001): FAD R0, R0, R1
ENDx ;
0134x(81E0000C): LDR R1, SP, CH
0135x(000E0001): FML R0, R0, R1
0136x(A0E00014): STR R0, SP, 14H
IF ODD(n DIV 2)y THENz f := -f ENDa ;
0137y(80E00008): LDR R0, SP, 8H
0138y(40020001): ASR R0, R0, 1H
0139z(40040001): AND R0, R0, 1H
013Az(E1000004): BEQ 4 [013FH]
013Ba(80E00014): LDR R0, SP, 14H
013Ca(41000000): MOV R1, R0, 0H
013Da(001D0000): FSB R0, R1, R0
013Ea(A0E00014): STR R0, SP, 14H
RETURN f
ENDb sin;
013Fb(80E00014): LDR R0, SP, 14H
0140b(8FE00000): LDR LNK, SP, 0H
0141b(4EE80018): ADD SP, SP, 18H
0142b(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
0143c .PROC 5
0143c(4EE90018): SUB SP, SP, 18H
0144c(AFE00000): STR LNK, SP, 0H
0145c(A0E00004): STR R0, SP, 4H
0146d(60003F22): MOV' R0, R0, 3F22H
0147d(4006F984): IOR R0, R0, FFFFF984H
0148d(81E00004): LDR R1, SP, 4H
0149d(000E0001): FML R0, R0, R1
014Ad(A0E0000C): STR R0, SP, CH
IF y >= 0.0 THENe n := FLOOR(y + 0.5)f ELSEg nh := FLOOR(y - 0.5)i ENDj ;
014Be(80E0000C): LDR R0, SP, CH
014Ce(E5000007): BLT 7 [0154H]
014Df(80E0000C): LDR R0, SP, CH
014Ef(61003F00): MOV' R1, R0, 3F00H
014Ff(000C0001): FAD R0, R0, R1
0150g(61004B00): MOV' R1, R0, 4B00H
0151g(100C0001): FAD R0, R0, R1
0152g(A0E00008): STR R0, SP, 8H
0153h(E7000006): B 6 [015AH]
0154i(80E0000C): LDR R0, SP, CH
0155i(61003F00): MOV' R1, R0, 3F00H
0156i(000D0001): FSB R0, R0, R1
0157j(61004B00): MOV' R1, R0, 4B00H
0158j(100C0001): FAD R0, R0, R1
0159j(A0E00008): STR R0, SP, 8H
y := (y - FLT(n))k * 2.0;l yy := y*y;m
015Ak(80E00008): LDR R0, SP, 8H
015Bk(61004B00): MOV' R1, R0, 4B00H
015Ck(200C0001): FAD' R0, R0, R1
015Dk(81E0000C): LDR R1, SP, CH
015Ek(001D0000): FSB R0, R1, R0
015Fl(61004000): MOV' R1, R0, 4000H
0160l(000E0001): FML R0, R0, R1
0161l(A0E0000C): STR R0, SP, CH
0162m(80E0000C): LDR R0, SP, CH
0163m(81E0000C): LDR R1, SP, CH
0164m(000E0001): FML R0, R0, R1
0165m(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
0166n(80E00008): LDR R0, SP, 8H
0167n(40040001): AND R0, R0, 1H
0168n(E9000021): BNE 33 [018AH]
0169o(60002EF9): MOV' R0, R0, 2EF9H
016Ao(4006E493): IOR R0, R0, FFFFE493H
016Bo(81E00010): LDR R1, SP, 10H
016Co(000E0001): FML R0, R0, R1
016Dp(6100B2D3): MOV' R1, R0, FFFFB2D3H
016Ep(411664C5): IOR R1, R1, 64C5H
016Fp(000C0001): FAD R0, R0, R1
0170q(81E00010): LDR R1, SP, 10H
0171q(000E0001): FML R0, R0, R1
0172r(61003670): MOV' R1, R0, 3670H
0173r(4116FA7E): IOR R1, R1, FFFFFA7EH
0174r(000C0001): FAD R0, R0, R1
0175s(81E00010): LDR R1, SP, 10H
0176s(000E0001): FML R0, R0, R1
0177t(6100B9AA): MOV' R1, R0, FFFFB9AAH
0178t(4116E9E5): IOR R1, R1, FFFFE9E5H
0179t(000C0001): FAD R0, R0, R1
017Au(81E00010): LDR R1, SP, 10H
017Bu(000E0001): FML R0, R0, R1
017Cv(61003C81): MOV' R1, R0, 3C81H
017Dv(4116E0F8): IOR R1, R1, FFFFE0F8H
017Ev(000C0001): FAD R0, R0, R1
017Fw(81E00010): LDR R1, SP, 10H
0180w(000E0001): FML R0, R0, R1
0181x(6100BE9D): MOV' R1, R0, FFFFBE9DH
0182x(4116E9E6): IOR R1, R1, FFFFE9E6H
0183x(000C0001): FAD R0, R0, R1
0184y(81E00010): LDR R1, SP, 10H
0185y(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
0186z(61003F80): MOV' R1, R0, 3F80H
0187z(000C0001): FAD R0, R0, R1
0188z(A0E00014): STR R0, SP, 14H
0189a(E7000023): B 35 [01ADH]
018Ab(60002CF1): MOV' R0, R0, 2CF1H
018Bb(4006F76B): IOR R0, R0, FFFFF76BH
018Cb(81E00010): LDR R1, SP, 10H
018Db(000E0001): FML R0, R0, R1
018Ec(6100B0F1): MOV' R1, R0, FFFFB0F1H
018Fc(41168032): IOR R1, R1, FFFF8032H
0190c(000C0001): FAD R0, R0, R1
0191d(81E00010): LDR R1, SP, 10H
0192d(000E0001): FML R0, R0, R1
0193e(610034A8): MOV' R1, R0, 34A8H
0194e(41163C18): IOR R1, R1, 3C18H
0195e(000C0001): FAD R0, R0, R1
0196f(81E00010): LDR R1, SP, 10H
0197f(000E0001): FML R0, R0, R1
0198g(6100B819): MOV' R1, R0, FFFFB819H
0199g(41166966): IOR R1, R1, 6966H
019Ag(000C0001): FAD R0, R0, R1
019Bh(81E00010): LDR R1, SP, 10H
019Ch(000E0001): FML R0, R0, R1
019Di(61003B23): MOV' R1, R0, 3B23H
019Ei(411635E3): IOR R1, R1, 35E3H
019Fi(000C0001): FAD R0, R0, R1
01A0j(81E00010): LDR R1, SP, 10H
01A1j(000E0001): FML R0, R0, R1
01A2k(6100BDA5): MOV' R1, R0, FFFFBDA5H
01A3k(41165DE7): IOR R1, R1, 5DE7H
01A4k(000C0001): FAD R0, R0, R1
01A5l(81E00010): LDR R1, SP, 10H
01A6l(000E0001): FML R0, R0, R1
01A7m(61003F49): MOV' R1, R0, 3F49H
01A8m(41160FDB): IOR R1, R1, FDBH
01A9m(000C0001): FAD R0, R0, R1
ENDn ;
01AAn(81E0000C): LDR R1, SP, CH
01ABn(000E0001): FML R0, R0, R1
01ACn(A0E00014): STR R0, SP, 14H
IF ODD((n+1)o DIV 2)p THENq f := -f ENDr ;
01ADo(80E00008): LDR R0, SP, 8H
01AEo(40080001): ADD R0, R0, 1H
01AFp(40020001): ASR R0, R0, 1H
01B0q(40040001): AND R0, R0, 1H
01B1q(E1000004): BEQ 4 [01B6H]
01B2r(80E00014): LDR R0, SP, 14H
01B3r(41000000): MOV R1, R0, 0H
01B4r(001D0000): FSB R0, R1, R0
01B5r(A0E00014): STR R0, SP, 14H
RETURN f
ENDs cos;
01B6s(80E00014): LDR R0, SP, 14H
01B7s(8FE00000): LDR LNK, SP, 0H
01B8s(4EE80018): ADD SP, SP, 18H
01B9s(C700000F): B LNK
ENDt Math.u
01BAt .PROC 0
01BAt .ENTRYPOINT
01BAt(4EE90004): SUB SP, SP, 4H
01BBt(AFE00000): STR LNK, SP, 0H
01BCu(8FE00000): LDR LNK, SP, 0H
01BDu(4EE80004): ADD SP, SP, 4H
01BEu(C700000F): B LNK