HP Prime: RANDOM Alberto Candel Member Posts: 72 Threads: 16 Joined: Sep 2013 10-16-2013, 12:33 PM 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! parisse Junior Member Posts: 38 Threads: 0 Joined: Aug 2013 10-16-2013, 12:39 PM 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) Alberto Candel Member Posts: 72 Threads: 16 Joined: Sep 2013 10-16-2013, 12:44 PM 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(). Han Senior Member Posts: 709 Threads: 104 Joined: Nov 2005 10-16-2013, 02:14 PM 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. Alberto Candel Member Posts: 72 Threads: 16 Joined: Sep 2013 10-18-2013, 09:18 PM 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. « Next Oldest | Next Newest »

 Possibly Related Threads... Thread Author Replies Views Last Post Some random wish list items for the 43s Marcel Samek 18 2,156 07-11-2013, 05:35 PM Last Post: Paul Dale OT: Help with Testing Random Number Generators Namir 5 852 08-01-2011, 11:20 PM Last Post: Paul Dale Question about random number generators Namir 20 1,929 07-08-2011, 11:05 AM Last Post: David Hayden Random Number Generation Challenge (sort of) Namir 9 1,195 02-15-2010, 08:05 AM Last Post: Bart (UK) HP17b & it's offsprings - Random Number Generator - How? Peter A. Gebhardt 29 2,662 12-09-2009, 02:18 AM Last Post: Marcus von Cube, Germany O.T. Pseodo-random noise designnut 0 311 11-25-2008, 05:31 PM Last Post: designnut Man calculates the 13th root of a random 200 digit number in his head in 70 secs! BruceH 5 777 12-15-2007, 10:46 AM Last Post: bt_schmidt Random simulation (and stimulation?) Kiyoshi Akima 7 1,050 07-28-2006, 07:08 PM Last Post: Rodger Rosenbaum HP35 HP45 battery charger. Random display values. Charles Esson 3 546 10-26-2005, 10:13 AM Last Post: Thomas Radtke Random number generated on a 32sii Charles 4 591 09-15-2003, 04:44 AM Last Post: Tizedes Csaba

Forum Jump: