[WP34S] LocRm allocation function missing?



#12

Would it be possible for the WP34S project to include a well documented LocRm function which brings the calculator into it's max. local data register configuration? It seems cumbersome for me to guess which settings to change in order to get which max. allocation for LocR use. I would like to get quick access to my standard min. 200 data regs. wish requirement.

Chris


Edited: 13 May 2012, 2:02 p.m.


#13

Hmmh, this max depends on the number of global registers you allocated (assume you took the startup default 100), the need for summation registers (assume you don't need them?), and the size of program memory you require. If you start with the startup default of 100 global numbered registers and no statistics, write a little program containing LocR 100 and you've got your 200 registers you want - even 12 more due to the stack and lettered registers. So I hope I understood you correctly.

Edited: 13 May 2012, 3:55 p.m.


#14

Walter,

You understand me correctly, of course, and I appreciate your input. What you say is exactly what I want.

The catch is the input from Marcus that even a simple XEQ kills the local data, so unless I can do my calculations truly internally, which I may, or will desparately try to do, then I am back to the R00-R99 plus the lettered A-D etc. regs.

Briefly, I have 90 source data in R00-R89, the next ten for internal calculation result storage. Then I have 90 exponential weights summed to unity and based upon analysis of the source data placed in my imaginary upper say R155-R255, in which the last ten would be for very local short time storage and end up in A-D say.

The rest are then statistical calculations but I can do that without using XEQ, maybe. Ultimately the new 90 data sequence would be stored in R00-R89. Let's face it, pushing Monte Carlo probability runs into a neural network with a volatility lognormal 2 days-into-the-future prediction value is a stretch even on a WP34S. But I think I can do it. Of course, I can always go back to my HP Folio Ultrabook and do it all in Excel, but that somehow does not present the same thrill factor. There is something very alluring about doing neural networks on a handheld calculator. And I'm almost there thanks to the WP34S that you guys are inventing as we speak!

Thanks again,

Chris


#15

Quote:
The catch is the input from Marcus that even a simple XEQ kills the local data, so unless I can do my calculations truly internally, which I may, or will desparately try to do, then I am back to the R00-R99 plus the lettered A-D etc. regs.

XEQ from the keyboard kills the local data. XEQ in a program does not and the local data is available in the called routine until it does a LocR command.

If you want to run code from the keyboard without losing local data, Use GTO and R/S and I think it will be okay.


Otherwise, it seems like your problem is simply too large for this device.


- Pauli


#16

Paul,

Thanks. I just noticed your post on my messed up thread sequence. Sorry.

Now, that is entirely different then. A local XEQ does not kill the data. I'll have to do some testing routines and logically make a 34S behavior matrix. That may change everything back. Many thanks for that additional information.

It could be that my idea is a bit too big. However, I want to point out that in order to do Monte Carlo one does not need to generate an array. By definition neural networks need array "memory" as I am sure you know.

I still see a lot of potential in the WP34S, and as you guys introduce printing and who knows even a memory card option some day - that's good.

It's too bad we had to wait 35 years for a group of great thinkers like you and your fellow WP34S team to show up and work together across continents - and for free.

Thanks.

Chris

#17

There is such a configuration but it's not utterly useful: REGS 00, CL[SIGMA] and CLPALL makes all memory available to the subroutine return stack which is also used for local data. But this makes a simple STO 00 impossible and it is only feasible if you have the programs you are using moved to flash memory.

Instead, you should just allocate (via LocR) as much memory as you need and if this fails with a memory error make room with one of the above mentioned commands. Local data is really only useful inside a program. You can only address 16 local registers directly (.00 to .15). More is possible but only indirectly addressable.

The real beauty of local registers in subroutines is that they are independent of the caller's memory and therefore cannot clobber its data. For bulk data, the global registers are better suited but your mileage may vary. Global registers are more stable in the sense that they are not easily lost by doing a manual XEQ (or hot key) which resets the return stack and thus clears all local data.


(Reposted because I had answered the wrong post.)


#18

Marcus,

I just noticed upon fine reading that you said one simple XEQ will kill local data. That is local allright and volatile. I really needed two 90 data sets, but I may now from what you say go via the Sigma functionality combined with the R00-R99. I can then do the simulation part without leaving the routine in any way. It is still doable but more complicated. What helps me is that I know N, i.e. the number of sample data, up front, as well as the distribution mean and variance.

Thanks Marcus, (and good bye to my LocRm idea)

Chris

PS: Is there any way one can store data (arrays) in the flash even though that may "wear out" the chip?

Edited: 13 May 2012, 5:53 p.m.


#19

Quote:
Is there any way one can store data (arrays) in the flash even though that may "wear out" the chip?


FYI, we had that in discussion several weeks ago but dropped it for exactly the reason you mentioned.

#20

We used to have commands to read & use the registers in the flash backup -- no write just read. Deemed too large to keep in the image.


- Pauli

#21

As Pauli stated, clearing local registers only happens if you manually XEQ a routine. Inside a program this wouldn't be of much help. ;-)


#22

Marcus, Walter, & Paul,

Thanks for your overnight world wide additional comments. I'm from Arctic Alaska so I'm beginning to suffer from WP34S induced jet lag ....

This is a great way to learn directly from the masters, however.

Chris


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP50g: Writing a function that returns a function Chris de Castro 2 2,188 12-10-2013, 06:49 PM
Last Post: Han
  [HP-Prime] - Missing confirmation before deletion Jean-Michel 11 3,773 11-14-2013, 05:47 AM
Last Post: Thomas Radtke
  HP 15C missing logo ! FORTIN Pascal 16 4,831 10-02-2013, 08:40 PM
Last Post: FORTIN Pascal
  Missing LCD segments (48 SX) Matti Övermark 2 1,424 09-18-2013, 03:50 PM
Last Post: Matti Övermark
  Missing functions on the HP Prime!!!??? :-( Namir 6 2,395 08-22-2013, 08:40 AM
Last Post: Gilles Carpentier
  HP-12C: Missing Segments Stefan Ramonat 2 1,494 06-28-2013, 10:59 AM
Last Post: Stefan Ramonat
  Missing HP Prime introduction Johnny Bjoern Rasmussen 2 1,416 04-24-2013, 05:18 AM
Last Post: Johnny Bjoern Rasmussen
  [WP34s] RSD function Dieter 11 3,372 01-29-2013, 08:58 AM
Last Post: Walter B
  Missing pages in HP-42s manual Philippe Cairic 1 1,136 12-05-2012, 01:52 AM
Last Post: Philippe Cairic
  [WP34s] Parallel function Dieter 25 6,118 11-05-2012, 04:04 PM
Last Post: Marcus von Cube, Germany

Forum Jump: