Show all digits of a huge integer

General discussion about calculators, SwissMicros or otherwise
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: Show all digits of a huge integer

Post by dlachieze »

BINUBALL wrote:
Fri Jan 27, 2023 6:48 am
10 STO- Y is unnecessary. Deleting step 10 and change step 22 to BACK 014 gives 1 step less.
Good catch, I missed that.
pauli wrote:
Fri Jan 27, 2023 8:13 am
Another saving is avoiding the LocR and using the lettered registers which (I think) start zero filled.
It may work for the first run of the program but not for the second as the lettered registers will keep their value and not be reset to zero.
rudi wrote:
Fri Jan 27, 2023 8:16 am
I'm planning on using the following snippets for my solution, but still, haven't had the time to look at it yet

Code: Select all

// get number of digits of the number in X
LOG
1
+
IP
This can be done in two steps:

Code: Select all

// get number of digits of the number in X
EXP
INC X
DM42: 00425 - DM41X: β00066 - WP43: 00042
User avatar
rudi
Posts: 415
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

Re: Show all digits of a huge integer

Post by rudi »

dlachieze wrote:
Fri Jan 27, 2023 9:18 am
BINUBALL wrote:
Fri Jan 27, 2023 6:48 am
10 STO- Y is unnecessary. Deleting step 10 and change step 22 to BACK 014 gives 1 step less.
Good catch, I missed that.
pauli wrote:
Fri Jan 27, 2023 8:13 am
Another saving is avoiding the LocR and using the lettered registers which (I think) start zero filled.
It may work for the first run of the program but not for the second as the lettered registers will keep their value and not be reset to zero.
rudi wrote:
Fri Jan 27, 2023 8:16 am
I'm planning on using the following snippets for my solution, but still, haven't had the time to look at it yet

Code: Select all

// get number of digits of the number in X
LOG
1
+
IP
This can be done in two steps:

Code: Select all

// get number of digits of the number in X
EXP
INC X
brilliant! thanks...
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
Post Reply