[next][previous][up][top][index]
search for:

random RR -- random real number

random x -- yields a random real number in the range 0 .. x.

Synopsis of use:

  • Operator: random
  • Class of argument 1: RR
  • Class of typical returned value: RR
  • Code:

         -- ../m2/integers.m2:68-72
         random RR := RR => x -> (
              if x <= 0. then (
                   error "expected a positive number"
                   );
              x * (randomint() / d))

    [next][previous][up][top][index]
    search for: