Post Reply 
error with Solve App
10-17-2014, 03:12 AM
Post: #1
error with Solve App
I have a very simple set of equations in SolveApp, which when solve is pushed, the result is a red x “Solver error”. What am I doing wrong here??? the two equations are below:

0=F + G*4/5
0=-6000 + G*3/5

I put in a seed value of 10000 for G, and still get the error, then put in a seed value for F, -8000 and still get the error.
Find all posts by this user
Quote this message in a reply
10-17-2014, 03:25 AM (This post was last modified: 10-17-2014 04:04 AM by Tim Wessman.)
Post: #2
RE: error with Solve App
You are not doing anything wrong. Rather, the "digit grouping" separators are causing the problem.

What is actually happening is that the value you put in is *not* actually getting stored in the variable. You can see this by typing 10000 in for G, and then go to the home screen and type G. The value will be the old one.

Only workaround unfortunately for the moment is either a) manually store something in for G in the command line (G:=10000) or else b) turn of the digit grouping.

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-17-2014, 03:39 AM
Post: #3
RE: error with Solve App
Thanks for the quick reply. I checked G in HomeMode and got 10000. Checked the Solve App, still the same error message. I entered G:=10000 in HomeMode, confirmed G, returned to Solve App, still got the same error. I then checked what was being stored in F, got 7.2****E-12, replace that value to -5000. Checked the Solver App and got the correct answer -8000.

I looked at the setting in HomeMode and found "digit grouping" but there was no way to turn it off. Is there another way to turn off "digit grouping" ???
Find all posts by this user
Quote this message in a reply
10-17-2014, 04:06 AM
Post: #4
RE: error with Solve App
Apologies, I was not clear there. What I meant was select one of the non-comma separated display options like 123456.789 or 123456,789

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-26-2014, 06:25 AM
Post: #5
RE: error with Solve App
Tim,

Could you elaborate on what Solve Eq. actually does with the variables, when values are provided?

The part I don't understand is storing a value of a named constant in the equation in a variable (e.g. G:=1000) vs. storing it (somewhere) by using the Solve Eg. app page (in which case, how does Solve Eq. app treat the second value actually stored under the variable name, say G)?

Cheers
Find all posts by this user
Quote this message in a reply
10-26-2014, 07:22 AM
Post: #6
RE: error with Solve App
(10-17-2014 03:12 AM)resolved Wrote:  I have a very simple set of equations in SolveApp, which when solve is pushed, the result is a red x “Solver error”. What am I doing wrong here??? the two equations are below:

0=F + G*4/5
0=-6000 + G*3/5

I put in a seed value of 10000 for G, and still get the error, then put in a seed value for F, -8000 and still get the error.

It worked for me at first try.
I didn't need to specify any guess values (F and G are automatic declared global
system variables, and in my case it had the default value of 0).

Result:
F:-8000
G:10000

What I did:
1. Press the "Home" key;

2. Press Shift+Home to go into Settings. My current option values are:
- Angle Measure: Radians;
- Number Format: Standard;
- Digit Grouping: 123,456.789;
- Entry: Textbook
- Integers: Hex 32
- Complex: a+b*1
- Language: English

3. Press Apps key, select Solve and type:
On E1: 0=F+G*4/5
On E2: 0=-6,000+G*3/5

4. Press Num key and select Solve.

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
10-26-2014, 01:08 PM (This post was last modified: 10-26-2014 01:13 PM by YEDERF.)
Post: #7
RE: error with Solve App
fence SHIFT HOME (home settings) at 123456.789 select grouping of digits
so no temdra these problems !!!
Find all posts by this user
Quote this message in a reply
10-26-2014, 02:55 PM
Post: #8
RE: error with Solve App
Another approach, using the solve() function:

solve({0=F+G*4/5,0=-6000+G*3/5},{F,G}) => {[-8000.,10000.]}

An {equation list} containing the two equations, and a {variable list} containing the two unknowns, returns a {list} of the solutions.

-Dale-
Find all posts by this user
Quote this message in a reply
10-26-2014, 04:08 PM
Post: #9
RE: error with Solve App
(10-26-2014 02:55 PM)DrD Wrote:  Another approach, using the solve() function:

solve({0=F+G*4/5,0=-6000+G*3/5},{F,G}) => {[-8000.,10000.]}

An {equation list} containing the two equations, and a {variable list} containing the two unknowns, returns a {list} of the solutions.

-Dale-

I continue to struggle with understanding the different results when using the same equations in Home and CAS modes; this is a good example.

In CAS mode, the above equation indeed produces {[-8000 10000]}

In Home mode however, I get {[0 255]}, obviously incorrect.

I used Copy / Paste to ensure identical input.

Display mode is set to 123456.789; in Algebraic entry mode

Can someone explain? Is this due to pre-exisitng values in F and G in Home mode?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
10-26-2014, 05:29 PM
Post: #10
RE: error with Solve App
(10-26-2014 04:08 PM)rprosperi Wrote:  In Home mode however, I get {[0 255]}, obviously incorrect.
Display mode is set to 123456.789; in Algebraic entry mode

Strange, indeed.

Works with me, on both the physical and virtual calculators.
See my post #6 for my settings.

Interestingly, it works with digit grouping using commas as thousands separators or just without them. Algebraic or textbook is ok too.

The F and G variables are global and I never had to assign a value to them. Zero is ok.
However, changing F and G contents in the Solve app (press Num key, then Edit), makes no difference in the result.
There is one exception, though: when typing very small negative numbers like -99E-410 (using the EEX key to enter the exponent) in both Variables, I get an "Solver error" message.
But I guess this is not what you are doing, so the issue must be something else.

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
10-26-2014, 05:47 PM
Post: #11
RE: error with Solve App
linsolve([0 = (F+(G*4/5)),-6000+G*3/5],[F,G]) Also works.

One helpful hint: The Toolbox key reveals that 'solve' is a CAS function. I try to stay within the associated HOME or CAS framework when working with functions and commands.

Whether it is a general truism or not, I don't fully know, but after reading many posts Parisse (and others) have resolved for us, I gather the distinction between the two "modes" doesn't mix well.

-Dale-
Find all posts by this user
Quote this message in a reply
10-26-2014, 07:53 PM
Post: #12
RE: error with Solve App
It is a good idea to work with CAS functions in the CAS environment, and with Home functions in the Home environment (this also goes for programs, naturally).

However, if you are really bent on using a CAS function in Home, here is one way to do it:

CAS("solve({0=6000...,0=F+...},{F,G})") works fine.
Find all posts by this user
Quote this message in a reply
10-27-2014, 12:02 AM
Post: #13
RE: error with Solve App
Jose, Dale & Helge:

Thanks for your comments. I agree it's best (likely essential) to use CAS features in CAS mode, Home features in Home mode, etc. to get expected results, as this minimizes most mode issues.

Jose - I am using the command line in Home, not the Solve application, which explains our different results.

What concerns me is when I get invalid results, like in this case as I noted above, with no hint that the requested features, mode, etc. aren't valid. The command I entered in Home mode was accepted, and a seemingly valid answer provided, however it is completely wrong.

Things like this erode my confidence in using Prime, as I can't trust the answers it gives me. I'd much prefer in such case I get an error or warning, so at least I have a chance to notice I may be in the wrong mode, used lower case instead of UPPER CASE, etc.

The reason I asked for an explanation is not to understand why it gave me an invalid answer, but rather why it gave this answer at all, which I presume actually is valid for some non-obvious conditions which CAS used to evaluate the solve() call.

Hope thats more clear.

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




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