Post Reply 
Why does -2^2 compute to -4 on my HP Prime?
02-12-2024, 01:57 PM (This post was last modified: 02-12-2024 02:22 PM by Joe Horn.)
Post: #26
RE: Why does -2^2 compute to -4 on my HP Prime?
(02-11-2024 11:17 PM)jte Wrote:  Perhaps a hybrid approach would be to treat MOD as a declaration of arithmetic type, similar to how units are handled on the HP Prime. (Once applied, the modulus would carry through to results.)

Prime already does that, using %% syntax in CAS view. Example in CAS: (11111%%777)^22222 --> 100%%777. This is Prime's way of saying "11111^22222 ≡ 100 (mod 777)" as can be verified by performing powmod(11111,22222,777). Once %% notation is included in a calculation, the modulus carries through the calculation.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why does -2^2 compute to -4 on my HP Prime? - Joe Horn - 02-12-2024 01:57 PM



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