Post Reply 
HP Calculator Applications in the Workplace
07-13-2014, 08:05 AM
Post: #10
RE: HP Calculator Applications in the Workplace
(07-12-2014 08:48 PM)Thomas Klemm Wrote:  It might be difficult to do that with the solver of the HP-17B as the XOR function is missing. But I'm sure there's a way to circumvent that hindrance.

That's what I came up with:

XOR:X=
IF(A=B:0:
IF(A+B=7:7:
IF(MOD(A-B:8)=4:4:
IF(MOD(A+B:8)=3:3:
IF(MOD(A:4)=0 OR MOD(B:4)=0:MOD(A+B):8:
IF(A=7 OR B=7:ABS(A-B):
IF(A=3:MOD(A-B:8):MOD(B-A:8)
)))))))


This works only for numbers in the range 0-7 but that's all we need.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP Calculator Applications in the Workplace - Thomas Klemm - 07-13-2014 08:05 AM



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