HP Forums

Full Version: HP Prime - CAS functions in Spreadsheet App
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


As I posted in an earlier post, I think the Spreadsheet App may be the most powerful/useful on on the Prime. It certainly seems to be able to do some things that traditional ones cannot.

I spent some time in a new spreadsheet which takes an expression entered in a cell - say =x^3-3*x-1 (in cell C3 which I named Expr1) then other cells contain CAS functions which use/refer to Expr1. Some worked and some did not. I was in Textbook, Minimum, Exact mode.



=Integral(Expr1)dx using math template/integral,

=Integral(Expr1)dx using math template AND referring to named Lower/Upper limits of integration


These had PROBLEMS:

= diff(Expr1) using math template, diff() and/or toolbox/cas/calculus/differentiate

= CAS.int(Expr1) using toolbox/cas/calculus/integrate

= CAS.solve(Expr1,x) and =CAS.nsolve(Expr1,x)


Tim provided a better explanation, so I've deleted my post.

Edited: 10 Nov 2013, 12:26 p.m.

When you are entering a forumula you'd like the CAS to evaluate, click the CAS menu key while editing the formula. The CAS parser/evaluator will then evaluate those cells completely.

Edited: 10 Nov 2013, 11:34 a.m.

Thanks for the quick response Tim. Unfortunately, I have already tried enabling the CAS* key when entering - gives the RED CAS indicator, but some functions still not working.

In all the cases below, the cell result looked similar to the cell function but without any evaluation (or incorrectly) executed.

These had PROBLEMS:

= diff(Expr1) using math template, diff() and/or toolbox/cas/calculus/differentiate ==> gives diff(Expr1,x) or 0

= CAS.int(Expr1) using toolbox/cas/calculus/integrate ==> gives int(Expr1,x)

= CAS.solve(Expr1,x) and =CAS.nsolve(Expr1,x) ==> give solve(Expr1,x), nsolve(Expr1,x) respectively. However, CAS.zeros(Expr1) gives accurate roots.

This is still a really cool application.


Edited: 10 Nov 2013, 3:30 p.m.

Enter =solve(Expr1) with the CAS toggle set.

THANKS! Works great now.

I didn't know you often need to delete the "CAS." in =CAS.solve() or for other CAS functions. The Toolbox/CAS menu puts the "CAS." in automatically I guess.


Edited: 11 Nov 2013, 12:05 a.m.

You use the CAS. prefix in a non-CAS environment such as Home, but just use the function name such as solve or zeros w/o the CAS. prefix in CAS. Go to CAS and insert a CAS function such as solve or zeros from the CAS menu in the Toolbox, and you won't see the CAS. prefix, but you will in Home. The CAS. prefix indicates that you are treating the function as if it were in CAS, and when you toggle the CAS button in the Spreadsheet App, you are treating the function as if it were already in CAS, so there is no need for the CAS. prefix. The easiest way to debug a CAS expression is to first enter it in CAS before inserting it in a Spreadsheet. Also, if a CAS function is being used in a program, the easiest way to make it work is to insert it in the CAS() command, which creates a CAS environment just as the toggle button does in the Spreadsheet. For example, CAS("solve(Expr1)").

Edited: 11 Nov 2013, 12:38 a.m.