(42S) GAUSS LEGENDRE 16 POINT INTEGRATION - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (42S) GAUSS LEGENDRE 16 POINT INTEGRATION (/thread-1738.html) |
(42S) GAUSS LEGENDRE 16 POINT INTEGRATION - Gerald H - 06-29-2014 11:30 AM "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 } RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION - pito - 05-03-2015 04:51 PM 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.. RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION - Gerald H - 05-03-2015 05:17 PM Your programme is well formed. Limits in 01 & 02, divisions in 03 & it should work. RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION - pito - 05-03-2015 05:38 PM 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 RE: HP 42S GAUSS LEGENDRE 16 POINT INTEGRATION - Gerald H - 05-17-2015 09:35 AM 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 } |