Post Reply 
Garbage names in the cas vars menu
10-23-2019, 02:26 PM (This post was last modified: 10-24-2019 10:20 AM by rombva.)
Post: #1
Garbage names in the cas vars menu
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]
Find all posts by this user
Quote this message in a reply
10-24-2019, 07:04 AM
Post: #2
RE: Garbage names in the cas vars menu
This on a calculator, emulator, etc?

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-24-2019, 09:39 AM
Post: #3
RE: Garbage names in the cas vars menu
(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.
Find all posts by this user
Quote this message in a reply
10-24-2019, 10:06 AM
Post: #4
RE: Garbage names in the cas vars menu
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.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-24-2019, 10:23 AM
Post: #5
RE: Garbage names in the cas vars menu
(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]).
Find all posts by this user
Quote this message in a reply
10-24-2019, 10:46 AM (This post was last modified: 10-24-2019 10:47 AM by rombva.)
Post: #6
RE: Garbage names in the cas vars menu
(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]
Find all posts by this user
Quote this message in a reply
10-24-2019, 01:19 PM
Post: #7
RE: Garbage names in the cas vars menu
Thanks! Will investigate....

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-24-2019, 09:58 PM
Post: #8
RE: Garbage names in the cas vars menu
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?
Find all posts by this user
Quote this message in a reply
10-24-2019, 10:41 PM
Post: #9
RE: Garbage names in the cas vars menu
This error also happened in XCAS see discussion

https://xcas.univ-grenoble-alpes.fr/foru...ile#p10348




Find all posts by this user
Quote this message in a reply
10-25-2019, 03:41 AM
Post: #10
RE: Garbage names in the cas vars menu
(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]
Find all posts by this user
Quote this message in a reply
10-25-2019, 06:00 AM
Post: #11
RE: Garbage names in the cas vars menu
That's expected, because x is not declared as a local variable (add purge(x) after declaration to keep it symbolic).
Find all posts by this user
Quote this message in a reply
10-25-2019, 08:47 AM
Post: #12
RE: Garbage names in the cas vars menu
(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!
Find all posts by this user
Quote this message in a reply
10-28-2019, 01:30 AM
Post: #13
RE: Garbage names in the cas vars menu
(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)

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-28-2019, 05:30 AM
Post: #14
RE: Garbage names in the cas vars menu
(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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)