HP 35S Memory questions
|
10-27-2017, 04:50 PM
(This post was last modified: 10-27-2017 05:06 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: HP 35S Memory questions
(10-25-2017 02:35 PM)JeremyBeck Wrote: I am working on my own programs for the HP35s to help me with an NCEES exam and I am trying to save on memory where applicable. I am having trouble figuring the exact memory used by equations. There is a simple way to check how much memory is occupied here: simply look at what MEM reports with and without that equation. (10-25-2017 02:35 PM)JeremyBeck Wrote: In addition, other lines of my program have 180. Since numbers in program lines use 35 bytes would I save memory using π →DEG instead of 180 (6 bytes instead of 35 and using two program lines instead of one)? I'm not sure if any number will consume 35 (!) bytes (this can also be checked with MEM), but numeric constants in programs can often be written in several ways, and in my programs I like to use different techniques to both save memory and speed up program execution (lines with numbers are sloooow): Instead of "0" often CLX can be used (but consider stack lift) Instead of "1" you may use PI SGN Instead of "2" try e IP Instead of "3" use PI IP Instead of "–1" try CLX NOT etc. So this PI R→D indeed is a good idea. You may also store some often-used constants in registers. For instance, for a statistical distributions program package I have 1 and 2 prestored in O and T , so that a short and fast RCLxT, RCL÷T, RCL+O or RCL–O can be used throughout the program. The two constants are of course coded like this: e IP STO T SGN STO O I assume the 180 stands for 180 degrees. This means that DEG mode has to be set. For a mode-independent setting arccos(–1) might be a better idea: CLX NOT ACOS and store this somewhere. This produces 180 in DEG and pi in RAD mode. BTW, instead of IP(Q÷2) you may also try INT÷, which in a formula appears as IDIV(Q,2). Not sure if this saves memory, I assume it doesn't. Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP 35S Memory questions - JeremyBeck - 10-25-2017, 02:35 PM
RE: HP 35S Memory questions - Dieter - 10-27-2017 04:50 PM
RE: HP 35S Memory questions - JeremyBeck - 11-02-2017, 11:07 PM
RE: HP 35S Memory questions - Thomas Radtke - 11-03-2017, 02:55 PM
|
User(s) browsing this thread: 1 Guest(s)