HP Prime: RANDOM - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP Prime: RANDOM (/thread-253010.html) HP Prime: RANDOM - Alberto Candel - 10-16-2013 Good Morning, From Home, Toolbox- Math- Probability - Random - Number sets up the RANDOM function which inputs two numbers and outputs a random number in between those two. Produces a display like RANDOM(1,100) 99.2856397571 In CAS, the same sequence of key presses produces the display RANDOM(1+100*i) 20.2759023826 I wonder what is the role of the "i" in RANDOM. That is, I did not input "i" to RANDOM, I typed RANDOM(1,100) but it displayed the line above. Thanks! Re: HP Prime: RANDOM - parisse - 10-16-2013 RANDOM does not follow the same grammatical rule as "normal" functions for the CAS parser. You must write it without parenthesis RANDOM 1,100 or with parenthesis *outside* (RANDOM 1,100) Re: HP Prime: RANDOM - Alberto Candel - 10-16-2013 I see, thank you. But then, I wonder why the parenthesis come in when choosing RANDOM. that it's, the sequence of key presses above sets up RANDOM(). Re: HP Prime: RANDOM - Han - 10-16-2013 Quote: Good Morning, From Home, Toolbox- Math- Probability - Random - Number sets up the RANDOM function which inputs two numbers and outputs a random number in between those two. Produces a display like RANDOM(1,100) 99.2856397571 In CAS, the same sequence of key presses produces the display RANDOM(1+100*i) 20.2759023826 I wonder what is the role of the "i" in RANDOM. That is, I did not input "i" to RANDOM, I typed RANDOM(1,100) but it displayed the line above. Thanks! (a,b) is interpreted by the CAS parser to mean complex numbers. Ideally, though, RANDOM should have actually parsed RANDOM(1,100) "properly" and only assume a complex input when typing RANDOM((1,100)) -- we can only hope that they can find a way to do this for the next firmware. Re: HP Prime: RANDOM - Alberto Candel - 10-18-2013 I hope HP hears you. One unfortunate issue that this mismatch of notation causes is that "importing" is useless. It still works from Home to CAS, but it creates a messy instruction from CAS to Home.