(49G) Integer to Long Real Programme
|
05-22-2015, 07:20 AM
(This post was last modified: 05-22-2015 01:23 PM by Gerald H.)
Post: #2
|
|||
|
|||
RE: HP 49G: Integer to Long Real Programme
I'm sorry to say the above programme does not deal with numbers of the form 123456789012006 correctly, but just drops the bold zeros.
The programme below should correct that error. :: CK1&Dispatch # FF :: :: FPTR2 ^DupZIsNeg? SWAP FPTR2 ^ZAbs DUP FPTR2 ^Z>S DUPLEN$ #1-DUP BINT12 #< case2drop FPTR2 ^Z2%% ROTDROP OVER BINT13 1_#1-SUB$ FPTR2 ^S>Z FPTR2 ^Z>R %MANTISSA %>%% ROT BINT13 BINT16 SUB$ CHR_. >H$ palparse DROP %>%% %% 1E11 %%/ %%+ %%10 ROT FPTR2 ^PPow# %%* ; SWAP NOT?SEMI %%CHS ; ; |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(49G) Integer to Long Real Programme - Gerald H - 05-21-2015, 08:27 PM
RE: HP 49G: Integer to Long Real Programme - Gerald H - 05-22-2015 07:20 AM
|
User(s) browsing this thread: 1 Guest(s)