The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Bug in CAS mode with function defined as definite integral
05-12-2023, 11:07 AM (This post was last modified: 05-12-2023 03:10 PM by GafSlaffe.)
Post: #1
Bug in CAS mode with function defined as definite integral
I found an interesting bug with HP Prime memory management when using CAS mode to define variable as function using definite integral. Executing int(1,u,0,1) in CAS mode works and there is no problems. Defining fun2:=(x)->int(1,u,0,1) CAS variable also works.

If we execute fun2(1) while it returns correct value, it creates new CAS variable. With it's name not really constant it changes during any operations and view changes of the calculator. After executing it again we see another CAS variable the same behaviour. This behaviour is independent of the integral itself it simply must be definite integral. What's even more interesting is that it fails to run a third time and instead of result it returns fun2(1) and doesn't add any more CAS variables, however this behaviour seems to depend on integral itself and with some integrals it continuous to return correct values even after third execution while also creating those weird CAS variables with each execution.

Additionally I also found an interesting behaviour with define key if we define function as int(1,U,0,X) it suggests X and U as input variables while ∫(1,U,0,X) suggests correctly only X as input variable. If we define ∫(1,U,0,X) as fun(X) using define key and execute this function in HOME it works perfectly fine. If we execute it in CAS mode it returns correct result but also creates those new CAS variables that should not exist after each execution.

This was tested on virtual calculator 2.1.14730 version on PC windows 10.
On my hardware rev D 2.1.14603 executing fun2(1) also creates such variables and returns correct values however other behaviour was not tested on it because sadly I actually need my hardware calculator for regular calculations and have only one and this bug is probably connected to memory leaks and overwriting memory and I don't want to risk it considering HP Prime is known to have problems with it's memory management.

   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Bug in CAS mode with function defined as definite integral - GafSlaffe - 05-12-2023 11:07 AM



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