Post Reply 
Little explorations with HP calculators (no Prime)
04-23-2017, 07:24 PM (This post was last modified: 04-23-2017 07:27 PM by pier4r.)
Post: #197
RE: Little explorations with the HP calculators
(04-19-2017 09:58 PM)ttw Wrote:  I did lots of tests of list-based, array-based, loop-based, (FOR START DO) and firmware routines (matrix and vector and the like). For some things, the clever routines were best. For others (and there was no way to guess ahead of time), just a loop was best.

Interesting (I missed this post for those days, sorry). By chance did you document the results / routines somewhere? Like in the software library here on the forum?

Anyway, while I'm trying to slowly solve the puzzle that I proposed about list processing here I reached the challenge 6. I'm super slow due to trivial mistakes that I do not discover quickly. Like "value 'var' STO-" instead of "'var' value STO-" (somehow I always mess with non commutative STO operations).

Aside from the fact that the code of DavidM does not include a challenge 6 solver, so I will have to compare against myself ( :sad: ) , I have two problems.


First problem is about inserting a list in a list.

Quote:Side question: I am not able to put a list in a list

I mean {1 2 3} {1 2 3} + returns {1 2 3 1 2 3}. What is the operation to return {1 2 3 {1 2 3} } ?



Second problem (it is a nice by product problem, I'm happy when I find those). To test the challenge 6 code, I use a program to generate a random list of N integers between minValue and maxValue (both extremes included). Now if minValue is 1 and maxValue is 10, given 100 elements, what is the probability of getting a valid list for the challenge 6? (challenge 6: verify that in a list of 100+ positive integers, every integer appears a number of times equal to its value)

I'll attack it as soon as I get enough sleep, I guess it is like "how can I partition a number".

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with the HP calculators - pier4r - 04-23-2017 07:24 PM



User(s) browsing this thread: 12 Guest(s)