HP-11C FRAC & INT - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: HP-11C FRAC & INT (/thread-21537.html) |
HP-11C FRAC & INT - Gamo - 04-01-2024 10:02 AM The HP-55 doesn't have FRAC and INT functions and I'm happen to see some program example from HP-55 User's Manual that program the fractional and integer part routine in program. So I just try this out on the HP-11C to see how it work with this program it will only work on "Positive Integer" Procedure: LBL A for FRAC LBL B for INT Program: Quote:LBL A Example: FIX 9 ¶ display 3.141592654 [A] display 0.141592654 7 e^x display 1096.633158 [B] display 1097.000000 To find the remainder of the division of 18811 ÷ 133 18811 [ENTER] 133 [÷] display 141.4360902 While result on display press [A] display 0.436090200 While result on display press 133 [x] display 57.9999660 While result on display press [B] display answer 58 The remainder is 58 Gamo 4/2024 RE: HP-11C FRAC & INT - Thomas Klemm - 04-01-2024 02:04 PM (04-01-2024 10:02 AM)Gamo Wrote: 7 e^x display 1096.633158 [B] display 1097.000000 That is rounding it to the next integer. If you really want to implement INT you can use: Code: 001 { 42 21 11 } f LBL A Example 7 ex GSB B 1,096.000000 Caveat: This doesn't work for numbers bigger than 9,999,999,990. On the other hand, these are already integers. |