Post Reply 
(41C) Quotient and Remainder
04-18-2023, 10:24 AM (This post was last modified: 04-18-2023 01:14 PM by J-F Garnier.)
Post: #9
RE: (41C) Quotient and Remainder
(04-18-2023 05:40 AM)Ángel Martin Wrote:  the OS does that for you: the truncated 10-digit value is placed in C, while the 13-digit value is left in registers {A,B}

No, the OS provides the rounded 10-digit value in C.
If we need the truncated 10-digit value, we need to build it from {A,B}
(very similar to the HP-71B math code that I know much better)

So QREM may give the wrong quotient when the dividend is >1E10, e.g.:
2E10 3 QREM --> Q=6666666667

(checked on V41-R9I, Lib#4-R59b, SandMath-R7)

J-F
Edit: not really sure of the SandMath version I downloaded from TOS. The Web page and the manual both say Release 7, but the ROM says R6 (HL-6B, SM-6B) ?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(41C) Quotient and Remainder - Werner - 04-05-2023, 09:12 AM
RE: (41C) Quotient and Remainder - Werner - 04-05-2023, 01:08 PM
RE: (41C) Quotient and Remainder - Werner - 04-10-2023, 07:25 AM
RE: (41C) Quotient and Remainder - J-F Garnier - 04-18-2023 10:24 AM
RE: (41C) Quotient and Remainder - Werner - 04-18-2023, 02:57 PM



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