03-21-2023, 09:08 AM
Hello RPL'ers ,
I noticed an annoying difference for calculating numerical integrals in RPL between 28S and 48GX.
I create an equation for the integration: EQ1. This equation calls a small RPL program ('F1') where the integration variable (here 'Y') is also used. I simplified the scenario here, but I had this problem in a much larger application.
The 28S does this very well, while the 48GX does not.
The 48GX does not want to understand that the 'Y' is the same as the Y for the integral.
If anyone can figure out why the 48GX can't do it...or show me how.
Rem1: on a Swissmicros DM42, I can carry out this scenario without problem. This machine is still wonderful.
Rem2: syntax on the 28S was different than the syntax on the 48GX
28S:
EQ1 : 'F1(Y^2)'
F1: << -> x 'x*Y' >> (x is a local variable)
the stack before the command:
3: 'EQ1'
2: {Y 0.5 1}
1: 0.001 (accuracy)
integral command : S
answer 28S:
2: 0.234 (integral)
1: 2.34E-4 (error)
48GX : (flag -3 Set : numerical result)
EQ1: 'F1(Y^2)'
F1: << -> x 'x*Y' >> (x is a local variable)
the stack before the command:
4: 0.500
3: 1.00
2: 'EQ1'
1: 'Y'
integral command : S
answer 48GX:
^Error:
Undefined Name
What's happening here ?
I noticed an annoying difference for calculating numerical integrals in RPL between 28S and 48GX.
I create an equation for the integration: EQ1. This equation calls a small RPL program ('F1') where the integration variable (here 'Y') is also used. I simplified the scenario here, but I had this problem in a much larger application.
The 28S does this very well, while the 48GX does not.
The 48GX does not want to understand that the 'Y' is the same as the Y for the integral.
If anyone can figure out why the 48GX can't do it...or show me how.
Rem1: on a Swissmicros DM42, I can carry out this scenario without problem. This machine is still wonderful.
Rem2: syntax on the 28S was different than the syntax on the 48GX
28S:
EQ1 : 'F1(Y^2)'
F1: << -> x 'x*Y' >> (x is a local variable)
the stack before the command:
3: 'EQ1'
2: {Y 0.5 1}
1: 0.001 (accuracy)
integral command : S
answer 28S:
2: 0.234 (integral)
1: 2.34E-4 (error)
48GX : (flag -3 Set : numerical result)
EQ1: 'F1(Y^2)'
F1: << -> x 'x*Y' >> (x is a local variable)
the stack before the command:
4: 0.500
3: 1.00
2: 'EQ1'
1: 'Y'
integral command : S
answer 48GX:
^Error:
Undefined Name
What's happening here ?