Post Reply 
HP-11C FRAC & INT
04-01-2024, 02:04 PM
Post: #2
RE: HP-11C FRAC & INT
(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
   002 {       36 } ENTER
   003 {    32 12 } GSB B
   004 {       30 } -
   005 {    43 32 } g RTN
   006 { 42 21 12 } f LBL B
   007 {       48 } .
   008 {        5 } 5
   009 {    42 20 } f x>y
   010 {    43 35 } g CLx
   011 {       30 } -
   012 {       26 } EEX
   013 {        9 } 9
   014 {       40 } +
   015 {    43 36 } g LSTx
   016 {       30 } -

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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-11C FRAC & INT - Gamo - 04-01-2024, 10:02 AM
RE: HP-11C FRAC & INT - Thomas Klemm - 04-01-2024 02:04 PM



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