(48G) GCD: Greatest Common Divisor
|
09-01-2018, 08:41 PM
Post: #19
|
|||
|
|||
RE: (48G) GCD: Greatest Common Divisor
(09-01-2018 07:40 PM)Thomas Klemm Wrote: Thanks again for taking the time for this analysis! Everyone's least favorite answer: "It depends..." If the program is intended to behave in a "normal" fashion (accepting varying argument types, preserving stack for UNDO/LAST, etc.), I'm not sure you could save any space at all by going the SysRPL route. If you don't care about error trapping or argument type checking (which leaves you exposed for a nasty crash if you forget which types of arguments to use), you could go with a "throw caution to the wind" approach and do something like this: Code: :: This only works with approximate numbers, and weighs in at 25 bytes. Not much savings for the risk and hassle, IMHO. Then of course you'd need something else entirely if exact integers were involved, which makes going the SysRPL route even less attractive. I'd stick with a UserRPL version for something like this. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)