txt: ## rand.md
  rand
  
  Combined from primary sources listed below.
  
  # [In Num](#___top "go to top of document")[§](#(Num)_method_rand "direct link")
  
  See primary documentation
  [in context](/type/Num#method_rand)
  for **method rand**.
  
  ```raku
  method rand(Num:D: --> Num)
  ```
  
  Returns a pseudo random number between 0 and the invocant.
  
  # [In Terms](#___top "go to top of document")[§](#(Terms)_term_rand "direct link")
  
  See primary documentation
  [in context](/language/terms#term_rand)
  for **term rand**.
  
  Returns a pseudo-random [`Num`](/type/Num) in the range `0..^1`.
  
  # [In Range](#___top "go to top of document")[§](#(Range)_method_rand "direct link")
  
  See primary documentation
  [in context](/type/Range#method_rand)
  for **method rand**.
  
  ```raku
  method rand(Range:D --> Num:D)
  ```
  
  Returns a pseudo-random value belonging to the range.
  
  ```raku
  say (1^..5).rand;                              # OUTPUT: «1.02405550417031␤»
  say (0.1..0.3).rand;                           # OUTPUT: «0.2130353370062␤»
  ```
  
  # [In role Real](#___top "go to top of document")[§](#(role_Real)_routine_rand "direct link")
  
  See primary documentation
  [in context](/type/Real#routine_rand)
  for **routine rand**.
  
  ```raku
  sub term:<rand> (--> Num:D)
  method rand(Real:D: --> Real:D)
  ```
  
  Returns a pseudo-random number between zero (inclusive) and the number (non-inclusive). The [`Bridge` method](/routine/Bridge) is used to coerce the `Real` to a numeric that supports [rand](/routine/rand) method.
  
  The term form returns a pseudo-random [`Num`](/type/Num) between 0e0 (inclusive) and 1e0 (non-inclusive.)
  
  # [In Cool](#___top "go to top of document")[§](#(Cool)_method_rand "direct link")
  
  See primary documentation
  [in context](/type/Cool#method_rand)
  for **method rand**.
  
  ```raku
  method rand()
  ```
  
  Coerces the invocant to [`Num`](/type/Num) and returns a pseudo-random value between zero and the number.
  
  ```raku
  say 1e5.rand;           # OUTPUT: «33128.495184283␤»
  ```
  