(41C 32S): n = a^2 + b
|
07-18-2021, 05:00 AM
Post: #1
|
|||
|
|||
(41C 32S): n = a^2 + b
The following program splits a positive integer n into the sum:
n = a^2 + b This technique is useful, especially with the HP 32S and HP 32SII. Normally, real numbers take up 9.5 bytes of memory on the HP 32S series. Integers 0 - 100 only consume 1.5 bytes of memory for the original HP 32S and the range is extended to 0 - 254 for the HP 32SII. When the program terminates, b is on the X stack while a is on the Y stack. Example: 684 Result: Y: 26 X: 8 (26^2 + 8 = 684) HP 41C/Swiss Micros DM41X Program: SQPLUS Code: 01 LBL^T SQPLUS HP 32S and HP 32SII Program: SQPLUS Code: S01 LBL S |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(41C 32S): n = a^2 + b - Eddie W. Shore - 07-18-2021 05:00 AM
RE: (41C 32S): n = a^2 + b - C.Ret - 07-18-2021, 06:17 AM
RE: (41C 32S): n = a^2 + b - J-F Garnier - 07-18-2021, 09:19 AM
|
User(s) browsing this thread: 1 Guest(s)