HP33s: Quotient & Remainder
|
04-25-2023, 01:02 PM
Post: #1
|
|||
|
|||
HP33s: Quotient & Remainder
Q & R
For input of integers Y X The programme returns the quotient of Y/X Q to the stack & stores RMDR(Y:X) in R & quotient in Q. Does not disturb stack. Code: 1. LBL P |
|||
04-29-2023, 09:15 PM
Post: #2
|
|||
|
|||
RE: HP33s: Quotient & Remainder
This should also work but I don’t have a 33s to test it:
Code: 1. LBL P |
|||
04-30-2023, 03:58 AM
Post: #3
|
|||
|
|||
RE: HP33s: Quotient & Remainder
Yes, programme gives correct answers on real 33s, Bravo Didier!
LN= 30 CK= 4CF7 |
|||
05-01-2023, 09:20 AM
Post: #4
|
|||
|
|||
RE: HP33s: Quotient & Remainder
(04-29-2023 09:15 PM)Didier Lachieze Wrote: This should also work but I don’t have a 33s to test it: Running this code on my 35S: 2E12 3 XEQ P --> Q= 666666666667 incorrect ! R= 2 correct The culprit is the INT÷ function ! Curiously this bug is not in the 35S bug list. Can someone confirm the 33S is correct or not for this test case? J-F |
|||
05-01-2023, 03:53 PM
Post: #5
|
|||
|
|||
RE: HP33s: Quotient & Remainder
(05-01-2023 09:20 AM)J-F Garnier Wrote: Running this code on my 35S: The 33s also gets it wrong. <0|ɸ|0> -Joe- |
|||
05-02-2023, 08:19 AM
(This post was last modified: 05-02-2023 08:22 AM by Gerald H.)
Post: #6
|
|||
|
|||
RE: HP33s: Quotient & Remainder
While the answer is certainly wrong I don't use Q & R functions on 33s for numbers greater than (10^12)-1, for which the results are correct.
Incorrect answer also given for (2e12)+17. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)