Try to learn something about everything, and everything about somethingThomas Huxley “Darwin's bulldog” (1824-1895)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:calculator:progs:dm15l_progs [14/02/26 07:45 GMT] – [Solve with an Integral] johnpublic:calculator:progs:dm15l_progs [05/04/26 09:46 BST] (current) – [Integrate Tests] john
Line 1347: Line 1347:
 ∫ 3 ∫ 3
 ABS ABS
 +         // THIS IS A METHOD OF RESTRICTING SOLVE TO A CERTAIN ACCURACY TO REDUCE THE TIME..
 x<=y?    // y has the Integration accuracy estimate. We test if our "zero" is <= this. No point in trying further. Limits search time x<=y?    // y has the Integration accuracy estimate. We test if our "zero" is <= this. No point in trying further. Limits search time
 CLx      // if our current guess for "zero" is better than the integration accuracy estimate we wipe "x" to an "actual" zero so that the SOLVE will complete CLx      // if our current guess for "zero" is better than the integration accuracy estimate we wipe "x" to an "actual" zero so that the SOLVE will complete
Line 1374: Line 1375:
 ==== Firmware details ==== ==== Firmware details ====
  
-[[..:info:lf15c|]]+[[..:3rd:lf15c|]]
  
  
Line 1413: Line 1414:
 %% %%
  
-  * [[..:bench2#The SAVAGE benchmark|Savage]] is prog ''A'' : <key>'f'</key><key>'A'</key> +  * [[..:benchmarking:start#The SAVAGE benchmark|Savage]] is prog ''A'' : <key>'f'</key><key>'A'</key> 
-  * [[..:bench2#N-Queens|8-Queens]] is prog ''88'' : <key>'f'</key> <key>LBL</key> <key>8</key><key>8</key>+  * [[..:benchmarking:start#N-Queens|8-Queens]] is prog ''88'' : <key>'f'</key> <key>LBL</key> <key>8</key><key>8</key>
     * Both the above use ''runTime'' to measure execution time - returns result in y and time in x     * Both the above use ''runTime'' to measure execution time - returns result in y and time in x
-  * [[..:bench2#HP Museum Maths Benchmark|]] is prog ''E'' : <key>'f'</key><key>'E'</key>+  * [[..:benchmarking:start#HP Museum Maths Benchmark|]] is prog ''E'' : <key>'f'</key><key>'E'</key>
     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>
-  * [[..:bench2#HP Museum Trig Benchmark|]] is prog ''77'' :  <key>'f'</key><key>LBL</key> <key>7</key><key>7</key>+  * [[..:benchmarking:start#HP Museum Trig Benchmark|]] is prog ''77'' :  <key>'f'</key><key>LBL</key> <key>7</key><key>7</key>
     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>
  
Line 1448: Line 1449:
  
  
-  * [[..:bench2#The SAVAGE benchmark|Savage]] is prog is prog ''66'' : <key>'f'</key> <key>LBL</key> <key>6</key><key>6</key> +  * [[..:benchmarking:start#The SAVAGE benchmark|Savage]] is prog is prog ''66'' : <key>'f'</key> <key>LBL</key> <key>6</key><key>6</key> 
-  * [[..:bench2#N-Queens|8-Queens]] is prog ''88'' : <key>'f'</key> <key>LBL</key> <key>8</key><key>8</key>+  * [[..:benchmarking:start#N-Queens|8-Queens]] is prog ''88'' : <key>'f'</key> <key>LBL</key> <key>8</key><key>8</key>
     * Both the above use ''runTime'' to measure execution time - returns result in y and time in x     * Both the above use ''runTime'' to measure execution time - returns result in y and time in x
-  * [[..:bench2#HP Museum Maths Benchmark|]] is prog is prog ''44'' : <key>'f'</key> <key>LBL</key> <key>4</key><key>4</key> +  * [[..:benchmarking:start#HP Museum Maths Benchmark|]] is prog is prog ''44'' : <key>'f'</key> <key>LBL</key> <key>4</key><key>4</key> 
     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>
-  * [[..:bench2#HP Museum Trig Benchmark|]] is prog ''55'' :  <key>'f'</key><key>LBL</key> <key>5</key><key>5</key>+  * [[..:benchmarking:start#HP Museum Trig Benchmark|]] is prog ''55'' :  <key>'f'</key><key>LBL</key> <key>5</key><key>5</key>
     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>     * Run for 60 seconds, press <key>'R/S'</key> and find result in reg 02 <key>RCL</key><key>0</key><key>2</key>
  
Line 1578: Line 1579:
  
 %% %%
-43 101 13 0 25 103 79 3 86 43 100 13 0 25 103 79 3 104 17 1 14 118 11 98 118 1 102 86 43 3 11 17 0 39 15 103 40 86 0 0+43 100 13 0 25 103 79 3 104 17 1 118 98 118 1 102 86 43 3 11 17 0 39 15 103 40 86 0 0 
 %% %%
  
Line 1593: Line 1594:
 ABS ABS
 RCL 1 RCL 1
-x<>y  // swap x & y to put our pre-set ACC value in y, like in the HP version +x>y? // test if current guess (y) is better (lower) than our required accuracy (x)
-x<=y? // test if current guess is better than our required accuracy+
 CLx   // if it is, we're near enough, put a real zero in x CLx   // if it is, we're near enough, put a real zero in x
 x≠0   // if it isn't zero we need to continue x≠0   // if it isn't zero we need to continue
Line 1615: Line 1615:
   * put your ''ACC'' value in ''R001'' (e.g. 0.0001 or 0.00001)   * put your ''ACC'' value in ''R001'' (e.g. 0.0001 or 0.00001)
   * put initial guesses of <key>'1'</key> <key>ENTER</key> <key>'2'</key> and then <key>'f'</key> <key>SOLVE</key> <key>'A'</key>   * put initial guesses of <key>'1'</key> <key>ENTER</key> <key>'2'</key> and then <key>'f'</key> <key>SOLVE</key> <key>'A'</key>
-  * first bessel zero at mod index ''2.405''+  * first bessel zero at mod index ''2.4048'' 
 + 
 +==== Integrate Tests ==== 
 + 
 +The 12 Integration examples from the PPC ROM handbook section ''IG'' 
 + 
 +%% 
 +43 12 84 24 26 37 14 24 30 37 39 4 86 43 11 28 16 14 84 24 26 37 4 39 14 24 30 37 26 34 22 30 40 16 40 86 43 10 84 24 26 37 4 86 43 9 30 20 24 16 86 43 8 88 15 86 43 7 35 25 25 103 39 37 4 14 4 37 14 11 84 35 25 25 39 14 40 86 43 6 24 27 37 14 39 4 86 43 5 4 14 26 38 40 14 88 20 38 86 43 4 88 86 43 3 103 39 11 86 43 2 4 86 43 1 27 14 84 26 37 40 86 0 0 
 +%% 
 + 
 +''SCI04'' display mode 
 + 
 +12 programs. Set limits and then execute <key>'f'</key> <key>∫</key> ''prog number'' 
 + 
 +For example for program 1  
 + 
 +<key> 0 </key> <key>ENTER</key> <key> 1 </key>  <key>'f'</key> <key>∫</key> <key> 0 </key> <key> 1 </key> gives answer ''3.1416'' 
 + 
 + 
 +  - Limits  0 -> 1 answer 3.1416 
 +  - Limits  0 -> 1 answer 6.6667 E-1 
 +  - Limits  0 -> 1 answer 6.3662 E-1 (rads mode) 
 +  - Limits  0 -> 1 answer -1.000 
 +  - Limits  0 -> 1 answer 3.6490 E-2 
 +  - Limits  0 -> 2 answer 3.1416 
 +  - Limits  0 -> π answer 2.1102 E1 
 +  - Limits  0 -> 1 answer 5.0000 E-1 (rads mode) 
 +  - Limits  0 -> 1 answer 2.0000 
 +  - Limits  0 -> 1 answer 7.8540 E-1 
 +  - Limits -1 -> 1 answer 2.3857 E-2 
 +  - Limits -1 -> 1 answer 2.2033 
 + 
 +Using ''FIX10'' still allows the integrations to complete almost instantly except for Program 8 which takes around 8 seconds! 
 + 
 +Dropping to ''FIX08'' and program 8 integration completes almost instantaneously too. 
 +Strangely Program 8 has some odd behaviour regarding display precision. 
 + 
 +  * ''FIX04'' -> ''FIX07'' -> instantaneous answer 0.5000.... 
 +  * ''FIX08'' -> instantaneous answer 0.50000.... 
 +  * ''FIX09'' -> 8 seconds  answer 0.499964689 
 +  * ''FIX10'' -> 8 seconds  answer 0.4999747623 
 +  * ''FIX11'' -> 10 seconds answer 0.49999489949 
 +  * ''FIX12'' -> 10 seconds answer 0.499999962001 
 +  * ''FIX13'' -> instantaneous answer 0.5000...... 
 +  * ''FIX14'' -> instantaneous answer 0.500000...... 
 +  * ''FIX15'' -> instantaneous answer 0.5000000......
  
  
Line 1624: Line 1669:
 Page last updated: ~~LASTMOD~~ Page last updated: ~~LASTMOD~~
  
- 
- 
---- //John Pumford-Green 24/04/23 16:04// 
  
  

Navigation