• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
    • RDF quality heuristics
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.37 library(random): Random numbers
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(random): Random numbers
          • random/1
          • random_between/3
          • random/3
          • setrand/1
          • getrand/1
          • maybe/0
          • maybe/1
          • maybe/2
          • random_perm2/4
          • random_member/2
          • random_select/3
          • randset/3
          • randseq/3
          • random_permutation/2
    • Packages
Availability::- use_module(library(random)).(can be autoloaded)
Source[det]random(+L:int, +U:int, -R:int)
[det]random(+L:float, +U:float, -R:float)
Generate a random integer or float in a range. If L and U are both integers, R is a random integer in the half open interval [L,U). If L and U are both floats, R is a float in the open interval (L,U).
deprecated
Please use random/1 for generating a random float and random_between/3 for generating a random integer. Note that random_between/3 includes the upper bound, while this predicate excludes it.
ClioPatria (version V3.1.1-40-g9d9e003)