Little explorations with HP calculators (no Prime)
|
03-31-2017, 08:33 PM
(This post was last modified: 03-31-2017 08:34 PM by pier4r.)
Post: #93
|
|||
|
|||
RE: Little explorations with the HP calculators
Ok, with the help of the "profiling subprogram" (1) I found the most time consuming function. With flag -3 and -105 set (so, no exact mode) each call lasts for an (eyeballed) average of 3 seconds. There are 480 calls to this function, that requires a total of 24 minutes. There is other code to execute, but the time spent on the rest of the code is less than the one used for this function.
What the function does is the following. - Given this matrix http://i.imgur.com/moh6eSP.png - produce a random value between 1 and 7225, call it curProbV - from the first row to the last row of the matrix, check if curProbV is smaller that the element in the first column (I thought I could start from the bottom, but since curProbV is random, it would not matter). - if you find that the value is smaller, take the third element in the row and return it. I do use some algebraic notation to avoid having problems to read in the code that what I do is reading a matrix. Could be that this extend the execution of the function to 3 seconds? The rpl code is the following Code:
(1) Code:
Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)