HP Forums
Condition on equation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Condition on equation (/thread-12162.html)



Condition on equation - EricR - 01-11-2019 02:14 PM

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?


RE: Condition on equation - Carlos295pz - 01-11-2019 02:55 PM

With assume( ) and additionally( ) you can perform those actions


RE: Condition on equation - informach - 01-11-2019 03:23 PM

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


RE: Condition on equation - EricR - 01-11-2019 05:05 PM

Thanks a lot! assume() was what I was looking for. I've got to study the manual...


RE: Condition on equation - informach - 01-12-2019 04:12 PM

Hi!, EricR :
You can use too ... IFTE
Check, with ...
https://en.hpprime.club/docs/reference/IFTE
https://en.hpprime.club/articles/prime-tutorial-by-edward-shore-part-2/


RE: Condition on equation - Eddie W. Shore - 01-16-2019 01:46 PM

How you would cancel an assume/additionally?


RE: Condition on equation - Carlos295pz - 01-16-2019 02:26 PM

purge()


RE: Condition on equation - Arno K - 01-16-2019 02:26 PM

As far as I know the only way is "purge(var)".
Arno