See the remarks on savage benchmark. For that reason we “partially” dismiss the importance of the accuracy in the savage test.
INPUT N; A=1; FOR(I=1;I<N;++I){ A=tan(tan-1(e^(ln(|/(A*A)))))+1; } PRINT A; END;
0*L(A,1)+SIGMA(I,1,N,1, 0*L(A,1+TAN(ATAN(EXP(LN(SQRT(g(A)*g(A)))))))) +L(B,g(A))-B 2499 N and solving for B
1->A For(I,1,2499) tan(tan-1(e^(ln(\|(A^2)))))+1->A End Disp A
>RADIANS >1 T=TIME @ A=0 @ FOR I=1 TO 2500 @ B=SQR(A+1) @ A=TAN(ATAN(EXP(LN(B*B)))) @ NEXT I >2 DISP A;TIME-T
0*L(A,1)+SIGMA(I,1,N,1, 0*L(A,1+TAN(ATAN(EXP(LN(SQRT(g(A)*g(A)))))))) +L(B,g(A))-B 2499 N and solving for B
EXPORT SAVAGE() BEGIN A:=0 FOR I FROM 1 TO 2500 DO A:=TAN(ATAN(EXP(LN(sqrt(A+1)²)))); END: END;
5 RAD 7 t=TIME 10 A=1 20 FOR I=1 TO 2499 30 A=TAN (ATN (EXP (LOG (SQR (A*A)))))+1 40 NEXT I 50 PRINT A 55 PRINT HMS$ (TIME -t) 60 END
LBL A TICKS 2 4 9 9 # 001 LBL 00 x[^2] [sqrt] LN e[^x] ATAN TAN INC X DSE Y GTO 00 TICKS RCL- T SDR 001 x[<->] Y END
@ "Savage benchmark" for 48 and 49 series. @ 48 series checksum: # ECAh @ 48 series size: 159 @ 49 series checksum: # B0C9h @ 49 series size: 159. \<< @ STD @ Force standard display mode. RCLF @ Get original flags. -55. SF @ Force last arguments disabled. 64. STWS @ Force wordsize. RAD @ Force radians mode. MEM DROP @ Force a GC. TICKS @ Initial system time. 1. @ Initial value. 1. 2499. @ Loop start/stop values. START @ DUP * @ Square. \v/ @ Square root command. LN @ EXP @ ATAN @ TAN @ 1. + @ NEXT @ TICKS @ Ending system time. ROT @ Move initial time to level 1. - @ Elapsed time. B\->R @ Convert binary to real. "Ticks" @ \->TAG @ DUP @ 8192. / @ Convert ticks to seconds. 3. RND @ Round to 3 decimal places. "Seconds" @ \->TAG @ 4. ROLL STOF @ Restore original flags. \>>
<< RAD TICKS 0. 1. 2500. START 1. + sqrt SQ LN EXP ATAN TAN NEXT SWAP TICKS SWAP - B->R 8192. / DEG 800. 2. BEEP >>
@ "Savage benchmark" for 28 series. @ A 28C must be in HEX mode when this program is entered to ensure @ that the correct address is supplied to SYSEVAL! \<< @ STD @ RCLF @ Get original flags. 31 CF @ Force last arguments disabled. 64 STWS @ Force wordsize. RAD @ Force radians mode. MEM DROP @ Force a GC. @ Uncomment the binary integer in one of the following 3 lines. @ #123E @ @ For 28C ROM version 1BB. @ #1266 @ @ For 28C ROM version 1CC. @ #11CAh @ @ For 28S ROM version 2BB. SYSEVAL @ Initial system time. 1 @ Initial value. 1 2499 @ Loop start/stop values. START @ DUP * @ Square. \v/ @ Square root command. LN @ EXP @ ATAN @ TAN @ 1 + @ NEXT @ @ Uncomment the binary integer in one of the following 3 lines. @ #123E @ @ For 28C ROM version 1BB. @ #1266 @ @ For 28C ROM version 1CC. @ #11CAh @ @ For 28S ROM version 2BB. SYSEVAL @ Ending system time. ROT @ Move initial time to level 1. - @ Elapsed time. B\->R @ Convert binary to real. DUP @ \->STR @ Convert real to character string. "Ticks=" @ SWAP + @ SWAP @ 8192 / @ Convert ticks to seconds. 3 FIX RND @ Round to 3 decimal places. \->STR @ Convert real to character string. "Seconds=" @ SWAP + @ 4 ROLL STOF @ Restore original flags. \>>
01 LBL "SB" 02 RAD 03 0 04 LBL 01 05 1 06 + 07 SQRT 08 X^2 09 LN 10 E^X 11 ATAN 12 TAN 13 DSE ST Y 14 GTO 01 15 BEEP 16 DEG 17 END
LBL A 1 STO A STO I LBL B RCL A x^2 \|x (Square root of x) LN e^x ATAN TAN 1 + STO A 1 STO+ I RCL I 2,499 x>=y? GTO B RCL A RTN
01 LBL B 02 RAD 03 ST I 04 0 05 LBL 1 06 1 07 + 08 SQRT 09 X^2 10 LN 11 e^X 12 ATAN 13 TAN 14 DSZ I 15 GTO 1 16 DEG 17 RTN
001 LBL B 002 STO 0 003 RAD 004 FIX 9 005 0 006 LBL 0 007 1 008 + 009 SQRT 010 X^2 011 LN 012 e^X 013 ARCTAN 014 TAN 015 DSE 0 016 GTO 0 017 DEG 018 RTN
01 LBL B 02 RAD 03 STO I 04 0 05 LBL 1 06 1 07 + 08 SQRT 09 X^2 10 LN 11 e^X 12 ATAN 13 TAN 14 DSE I 15 GTO 1 16 DEG 17 RTN
01 RAD 02 STO 0 03 0 04 STO 1 05 RCL 1 06 1 07 + 08 SQRT 09 X^2 10 LN 11 e^X 12 ATAN 13 TAN 14 STO 1 15 RCL 0 16 1 17 - 18 STO 0 19 X=0? 20 GTO 22 21 GTO 05 22 RCL 1 23 DEG 24 GTO 00