You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4192 Reporter: johnm Status: closed (set by @damiendoligez on 2007-01-10T22:12:57Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.09.3 Category: ~DO NOT USE (was: OCaml general)
Bug description
Random.int should complain if the argument is negative but if the argument is exactly 0 it seems to me the function ought to return 0.
:; ocaml
Objective Caml version 3.09.3
Random.int 0;;
Exception: Invalid_argument "Random.int".
The text was updated successfully, but these errors were encountered:
I don't think so. The function behaves exactly as specified in the documentation. "Random.int n" will chose one of n numbers, namely the numbers ranging from 0 to n-1. One cannot chose a number out of zero numbers.
Original bug ID: 4192
Reporter: johnm
Status: closed (set by @damiendoligez on 2007-01-10T22:12:57Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.09.3
Category: ~DO NOT USE (was: OCaml general)
Bug description
Random.int should complain if the argument is negative but if the argument is exactly 0 it seems to me the function ought to return 0.
:; ocaml
Objective Caml version 3.09.3
Random.int 0;;
Exception: Invalid_argument "Random.int".
The text was updated successfully, but these errors were encountered: