Post Reply 
arg() crashes the emulator
02-20-2015, 11:49 AM (This post was last modified: 02-20-2015 12:16 PM by Angus.)
Post: #3
RE: arg() crashes the emulator
What I tried to do is find out what are the variables of a cas function.
Say fun(a,b):=a^2/b;

Arguments(fun) should give {a,b}. Initially the idea was to be able to subst() a varible to 'X' for compatibility with built in apps. Now I am just wondering if it is possible.
Final goal is to get a plot() function that can be called as my_plot(fun, a) which then plots a fun(X) from the Function app. No special requirements for fun. fun may be a function of some variable or an expression.
As far as I understand I would need the independant var as X because that kind of plotting is not intended. (Maybe the geometry app suits better what made me open the other thread).

Edit: The need to distinguish between calling a function for an expression foo(expr) or a function foo(expr(indep)) should dimish. A program is able to find out if an argument is a function (DOM_FUNC) or an expression (DOM_SYMBOLIC) so it would be nice if it knew what variables are used by the function by itself.

P.S. btw is there a reason for glueing the app (like function app) to the build in fixed variables F1..9 with indepandant X? I'm under the impression that introducing the fixed type-bound variables was a bad idea. Cutting down flexibility and causing many of the known issues and questions that arise when home/cas interact. I see that that approach was economically seductive (code-reuse) and leads to an easy to introduce calculator for the first few hours. But I consider the scenario when you have defined or calculated a function in cas and then want to use exact that thing inside am app like Function the most natural approach. Straightforward and no workarounds needed.
If there are major benefits of the design the prime has I would be happy to learn. Many times I ask myself 'why did they do it this way'? Other than needing a quick solution.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
arg() crashes the emulator - Angus - 02-20-2015, 10:56 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 11:28 AM
RE: arg() crashes the emulator - Angus - 02-20-2015 11:49 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:10 PM
RE: arg() crashes the emulator - dg1969 - 02-23-2015, 07:33 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:14 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:25 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:31 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 01:43 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 06:19 AM
RE: arg() crashes the emulator - Han - 02-24-2015, 12:21 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 01:15 PM
RE: arg() crashes the emulator - Han - 02-24-2015, 03:24 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 06:00 AM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 08:47 AM
RE: arg() crashes the emulator - Han - 02-25-2015, 02:54 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:01 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:22 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 03:02 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:02 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:13 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:18 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:25 PM



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