Post Reply 
Condition on equation
01-11-2019, 02:14 PM
Post: #1
Condition on equation
Hi! I've just received my new HP Prime (latest model) and am very excited. I'm also new to this forum. But I'm not new to HP calculators, I have a HP 48 and a HP50g.

Anyway, fiddling around with it, I was wondering whether there is a way to specify a condition on a formula in CAS mode. For example, if I want to add the condition x<1 before solving for x. Is that possible?
Find all posts by this user
Quote this message in a reply
01-11-2019, 02:55 PM
Post: #2
RE: Condition on equation
With assume( ) and additionally( ) you can perform those actions

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
01-11-2019, 03:23 PM
Post: #3
RE: Condition on equation
Hi!, EricR :
Try with CASE, per example ...
CASE IF A<0
THEN RETURN "negative";
END;
IF 0≤A≤1
THEN RETURN "small";
END;
DEFAULT RETURN "large";
END;

See, from User Guide ... http://h10032.www1.hp.com/ctg/Manual/c05332710
Find all posts by this user
Quote this message in a reply
01-11-2019, 05:05 PM
Post: #4
RE: Condition on equation
Thanks a lot! assume() was what I was looking for. I've got to study the manual...
Find all posts by this user
Quote this message in a reply
01-12-2019, 04:12 PM (This post was last modified: 01-12-2019 04:40 PM by informach.)
Post: #5
RE: Condition on equation
Hi!, EricR :
You can use too ... IFTE
Check, with ...
https://en.hpprime.club/docs/reference/IFTE
https://en.hpprime.club/articles/prime-t...re-part-2/
Find all posts by this user
Quote this message in a reply
01-16-2019, 01:46 PM
Post: #6
RE: Condition on equation
How you would cancel an assume/additionally?
Visit this user's website Find all posts by this user
Quote this message in a reply
01-16-2019, 02:26 PM
Post: #7
RE: Condition on equation
purge()

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
01-16-2019, 02:26 PM
Post: #8
RE: Condition on equation
As far as I know the only way is "purge(var)".
Arno
Find all posts by this user
Quote this message in a reply
Post Reply 




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