HP Forums
Garbage names in the cas vars menu - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Garbage names in the cas vars menu (/thread-13844.html)



Garbage names in the cas vars menu - rombva - 10-23-2019 02:26 PM

I wrote the program for the cas mode.

Code:
#cas
zf74(X,Y,γ,a,b):=
BEGIN
LOCAL f,v;
PRINT("---------------------------------");
PRINT("W#7, P#4:");
γ:=unapply(γ,x);
X:=unapply(X,{x,y});
Y:=unapply(Y,{x,y});
f:=expand(simplify(subst(X(x,y)+Y(x,y)*diff(γ(x),x),y=γ(x))));
PRINT("f(x)="+f+";");
PRINT("F(x)="+expand(simplify(∫(f,x)))+";");
v:=∫(f,x,a[1],b[1]);
PRINT(suppress("∫(f(x)"," ")+", x, "+a[1]+", "+b[1]+")="+v+when(FP(v)≠0,"="+ROUND(v,4),"")+";");
PRINT("---------------------------------");
1;
END;
#end

After a lot of runs in the CAS Vars menu the garbage or/and empty-names variables appear. This issue happens while running my other cas programs.

Command line:
[Image: 7rd27zF9FJ.png]

Before running:
[Image: v51afl7w10.png]

After running:
[Image: F3A2wTINS4.png]

CAS Vars mem:
[Image: Bywhn1K4cc.png]


RE: Garbage names in the cas vars menu - Tim Wessman - 10-24-2019 07:04 AM

This on a calculator, emulator, etc?


RE: Garbage names in the cas vars menu - rombva - 10-24-2019 09:39 AM

(10-24-2019 07:04 AM)Tim Wessman Wrote:  This on a calculator, emulator, etc?

On a calculator (G2) and emulators (Win10, Android). Sometimes the run returns the input line without showing a terminal window.


RE: Garbage names in the cas vars menu - Tim Wessman - 10-24-2019 10:06 AM

I'd like to try and reproduce, but you have conveniently hidden your inputs in the screenshot. Smile I see: zf74(2*x-y,-x*y,<--hidden by box---->,[2,8])

Can you copy the command line of your run in? Thanks. Also, give it a whirl on the latest 1.5.0 CAS version if you want.


RE: Garbage names in the cas vars menu - rombva - 10-24-2019 10:23 AM

(10-24-2019 10:06 AM)Tim Wessman Wrote:  I'd like to try and reproduce, but you have conveniently hidden your inputs in the screenshot. Smile I see: zf74(2*x-y,-x*y,<--hidden by box---->,[2,8])

Can you copy the command line of your run in? Thanks. Also, give it a whirl on the latest 1.5.0 CAS version if you want.

Sorry. Command line: zf74(2*x-y,-x*y,2*x^2,[0,0],[2,8]).


RE: Garbage names in the cas vars menu - rombva - 10-24-2019 10:46 AM

(10-24-2019 10:06 AM)Tim Wessman Wrote:  ...

Can you copy the command line of your run in? Thanks. Also, give it a whirl on the latest 1.5.0 CAS version if you want.

On the beta emu (Windows, x64):

Run 01:
[Image: T89z58ITKC.png]

Run 02:
[Image: 39yClcbPl0.png]

Run 03:
[Image: kOLB3vgGGs.png]

Run 04:
[Image: V16c2rUKhO.png]

Run 05:
[Image: 8jPv5vmLRA.png]

Run 06:
[Image: 1gVcL73mU5.png]

Run 07:
[Image: 2chuRzUHJG.png]

Run 08:
[Image: 7PnVZb3Q4I.png]

Run 09:
[Image: eXlZjAYPMB.png]

Run 10:
[Image: qGM0L6pbnX.png]


RE: Garbage names in the cas vars menu - Tim Wessman - 10-24-2019 01:19 PM

Thanks! Will investigate....


RE: Garbage names in the cas vars menu - FrankP - 10-24-2019 09:58 PM

On my Android Emu changing "∫" to "int" in line
PHP Code:
// v:=∫(f,x,a[1],b[1]);
v:=int(f,x,a[1],b[1]); 
avoided mem garbage generation. Maybe helps also in your case?


RE: Garbage names in the cas vars menu - compsystems - 10-24-2019 10:41 PM

This error also happened in XCAS see discussion

https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=19&t=2112&p=10423&hilit=file#p10348







RE: Garbage names in the cas vars menu - rombva - 10-25-2019 03:41 AM

(10-24-2019 09:58 PM)FrankP Wrote:  On my Android Emu changing "∫" to "int" in line
PHP Code:
// v:=∫(f,x,a[1],b[1]);
v:=int(f,x,a[1],b[1]); 
avoided mem garbage generation. Maybe helps also in your case?

That's right, thanks.

But after running the program in the cas vars menu the x variable with assumption of integration boundaries appears.

[Image: 7aIhL3J8yZ.png]

[Image: R3bj7l4VV1.png]


RE: Garbage names in the cas vars menu - parisse - 10-25-2019 06:00 AM

That's expected, because x is not declared as a local variable (add purge(x) after declaration to keep it symbolic).


RE: Garbage names in the cas vars menu - rombva - 10-25-2019 08:47 AM

(10-25-2019 06:00 AM)parisse Wrote:  That's expected, because x is not declared as a local variable (add purge(x) after declaration to keep it symbolic).

Thanks!


RE: Garbage names in the cas vars menu - Tim Wessman - 10-28-2019 01:30 AM

(10-25-2019 08:47 AM)rombva Wrote:  
(10-25-2019 06:00 AM)parisse Wrote:  That's expected, because x is not declared as a local variable (add purge(x) after declaration to keep it symbolic).

Thanks!

So just to clarify, when you changed to "int(...)" the problem basically when away? (letting us focus on the ∫(...) path exclusively to track it down)


RE: Garbage names in the cas vars menu - rombva - 10-28-2019 05:30 AM

(10-28-2019 01:30 AM)Tim Wessman Wrote:  
(10-25-2019 08:47 AM)rombva Wrote:  Thanks!

So just to clarify, when you changed to "int(...)" the problem basically when away? (letting us focus on the ∫(...) path exclusively to track it down)

Replacing the ∫(...) by the int(...) removed the garbage names genartion in my all cas programms.