Post Reply 
(42S) Integer Quotient
09-19-2017, 12:09 PM
Post: #5
RE: (42S) Integer Quotient
Beautiful, Werner, I love you.

Which leads to my programme which does what I want.

Store 10 in variable "10" & the following programme finds integer quotient on division by 5 without disturbing the stack:

Code:
0.    { 27-Byte Prgm }
1.    LBL “IQT5”
2.    RCL/ "10"
3.    IP
4.    STO+ ST X
5.    STO "."
6.    CLX
7.    LASTX
8.    FP
9.    STO+ ST X
10.    IP
11.    RCL+ "."
12.    END

The question now is which is faster, my programme in the initial posting or this one - in terms of elegance this one wins hands down.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(42S) Integer Quotient - Gerald H - 09-19-2017, 06:38 AM
RE: (42S) Integer Quotient - Werner - 09-19-2017, 07:45 AM
RE: (42S) Integer Quotient - Gerald H - 09-19-2017, 08:46 AM
RE: (42S) Integer Quotient - Werner - 09-19-2017, 11:20 AM
RE: (42S) Integer Quotient - Gerald H - 09-19-2017 12:09 PM
RE: (42S) Integer Quotient - grsbanks - 09-20-2017, 10:17 AM
RE: (42S) Integer Quotient - Gerald H - 09-20-2017, 12:08 PM



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