Post Reply 
(42, all flavours) Integer Division - how?
12-11-2020, 09:28 PM
Post: #7
RE: (42, all flavours) Integer Division - how?
Hi.
Here is one version fulfilling the test examples on the Free42.
It uses the DOT function to force calculation with all digits prior to rounding.
I am not sure how reliable it actually is.
It uses one extra stack level Sad

00 {28-Byte Prgm }
01 LBL "IDIV2"
02 X<>Y
03 -0.5
04 RCLX ST Z
05 COMPLEX
06 X<>Y
07 1/X
08 ENTER
09 COMPLEX
10 DOT
11 IP
12 END

Best regards
Gjermund
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (42, all flavours) Integer Division - how? - Gjermund Skailand - 12-11-2020 09:28 PM



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