(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 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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)