[j-nsp] format of minimum and maximum value of math:random() in SLAX

Martin T m4rtntns at gmail.com
Thu Jul 5 15:41:33 EDT 2018


Hi!

According to the documentation, math:random() function returns a
random number with a minimum value of 0 and a maximum value of 1.
Larger values than 0 and smaller values than 1 have a format similar
to 0.663341003779015. What is the format of minimum and maximum value?
Simply 0 and 1? 0.000000000000000 and 1.000000000000000? The reason I
ask is that I use "substring(math:random(), 3, 2) mod 16" for finding
random numbers between 0 and 15 and I need to apply a workaround if
format is not always x.xxxxxxxxxxxxxxx.


thanks,
Martin


More information about the juniper-nsp mailing list