Re: Approx mode creates largedr matricies



Another point about the size of objects in original
real/complex "array" types (3 and 4)
vs. "list (of lists)" type (29)
is that in the original "array" type, a kind of
"header" defines the number of dimensions,
how many "rows" are in each dimension,
and what type every included object is,
then only the data part of every number
(less the usual 2.5-byte prolog) is stored
(in fixed slots) thereafter.

In the "list (of lists)" alternate storage type,
every object retains its own prolog (and a length,
if integer type), every row is in a list of its own,
and for 2D arrays, the collection of rows is in a list.

A large real or complex array of non-integers
ought to be more compact in the original format,
any array with even one "integer" or symbolic element
can only be expressed as type 29,
and a large array of small decimal integers
ought to be more compact as type 29 than as type 3.

Type 3 and 4 array objects are internally identical
in 48 and 49 series,
but in lists, where small integers (even decimal)
are replaced by ROM addresses,
the presence of even one integer makes the internal objects
incompatible between calculator series.

When reals (or any non-composite UserRPL object)
are stored into variables,
no ROM address is ever used, and such stored objects
would be the same in all 48/49 series calculators,
but objects within composites (lists, programs,
symbolics, type 29 "arrays" and unit objects)
may contain ROM addresses, and may then be incompatible.

Well, "every rule has exceptions" -- in this case,
even though functions and commands are changed to
ROMPTRs (library references) when stored into variables,
those ROMPTRs are often incompatible between 48 and 49 series;
even library two (the basic original commands
which started with the HP48S series)
has had some function numbers changed, alas,
but it's not common for those to be stored by themselves
into variables.

The internal anatomy of HP48 series objects
is described in rplman.doc from HP:
http://www.hpcalc.org/search.php?query=rplman

You can also use the internal \->H function in HP49
(or \->ASC program in HP48) to dissect objects.

I had enough dissection in biology class, however
(and of course it had to have been right before lunch :)

[r->] [OFF]
.



Relevant Pages

  • Re: garbage collection problem in large linked lists
    ... Instead all buckets are allocated at once in an array. ... VG.net, which must be very scalable, but only for lists which would normally ... Linked lists require pointer dereferencing in order to traverse. ... When you run out of space, you allocate a new smaller array. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Dict sharing vs. duplication
    ... array to enforce unique keys and I use lists to enforce order. ... API in a page or two of Tcl code, it isn't so much a missing feature ... OpenACS database API which creates a new specialized data structure, ...
    (comp.lang.tcl)
  • Re: Translating python to scheme
    ... Scheme has mutation, and there are reasons to use it. ... confusing when considering a 2d array. ... in other languages: Lisp Lists and Vectors. ...
    (comp.lang.scheme)
  • Re: vasam
    ... // Set the size for long lists in records #2 and #3 only! ... Here is the sequel of my previous post "Variable array sizes as members" ... I was given some advice on how to use malloc and realloc in oder to achieve ...
    (microsoft.public.vc.language)
  • Re: Compare the values of two sorted arrays of variable size.
    ... This algorithm does not check for every possible location in each array. ... > contains a double loop where each element of the inner loop is compared ... > Dim lngMaxAIdx ' Upper value of the A list index. ... one of the lists has finished. ...
    (microsoft.public.scripting.vbscript)