(42S) GAUSS LEGENDRE 16 POINT INTEGRATION
|
06-29-2014, 11:30 AM
(This post was last modified: 11-02-2017 05:14 PM by Gerald H.)
Post: #1
|
|||
|
|||
(42S) GAUSS LEGENDRE 16 POINT INTEGRATION
"Func name" should be the name of a programme taking one argument from the X register & returning a real value to the X register.
Func name → 00 Lower lim → 01 Upper lim → 02 # division → 03 Code: 0. { 379-Byte Prgm } |
|||
05-03-2015, 04:51 PM
(This post was last modified: 05-03-2015 04:53 PM by pito.)
Post: #2
|
|||
|
|||
RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION
Hi, I put the listing into .42s (for the 42s Code Editor) and raw format for free42 (see attached).
However it loops forever. As the function to integrate I used for example: Code: LBL "FX" and I stored it to 00 (so RCL 00 returns me "FX"). Not sure that is the way how it should be done, though.. |
|||
05-03-2015, 05:17 PM
Post: #3
|
|||
|
|||
RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION
Your programme is well formed. Limits in 01 & 02, divisions in 03 & it should work.
|
|||
05-03-2015, 05:38 PM
(This post was last modified: 05-03-2015 05:56 PM by pito.)
Post: #4
|
|||
|
|||
RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION
Thanks! I messed something with the limits before..
Test: Integrate ln(x) from 0 to 2 100divs: -6.13659225325e-1 100kdivs: -6.13705592467e-1 -6.13705638880109e-1 w.alfa says 42s Int (1e-7 acc): -6.13705307013e-1 |
|||
05-17-2015, 09:35 AM
(This post was last modified: 11-02-2017 05:14 PM by Gerald H.)
Post: #5
|
|||
|
|||
RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION
I note that some members (pito) have used the programme in some emulator contrary to my wish that we remain true to the original & exclusively use the programmes in the 42S.
However, recognising the scarcity & cost of a 42S I relent & permit usage in emulators. go42S emulates very nicely using the original ROM, sadly incorporating the possibility of accelerating calculation speed by a factor of up to 32. Free42 operates to a much higher level of accuracy & cannot operate at original speed - a sad comment on our times. The following programme is adapted for Free42 - it will run on the original 42S, just at a slightly slower speed than the above programme - to make use of abscissae & weights of greater accuracy. I would be pleased to hear of any actual improvement in calculating accuracy. Code: 00 { 607-Byte Prgm } |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)