Hello,

in FileMaker 12 Training Series they ask for the result of the following function:

Ceiling ( Random * 6 )

The solution according to the Training Series is:

*A random integer from 1 to 6*

That seems to me not correct. The Random function is explained as

*Returns a random decimal number between 0 and 1 (including 0, but not including 1).*

So, if Random returns 0.0, then 0.0*6 is also 0, and Ceiling(0) is 0.

So, I'd say the correct answer is: *A random integer from 0 to 6*

Who is right, FileMaker or me? ;-)

Thanks,

Michael

My guess is FileMaker. I did a test run. Created a field with the formula Ceiling (random * 6) The ran a loop that created 10000 records. Well actually ran the script twice so 20000 records. At the end of this I had 3300 records with a value of 6 and 0 records with a value of 0.

As a test I created 20000 records with the formula random. The lowest value I got was 0.002xxxx with several more digits after the 2. So based on this, it will be very rare that you would get an actual 0.

If you rounded the random function to 2 digits, you would get a 0.

HTH

Bruce