shithub: riscv

Download patch

ref: 3bd600c01e8efa3b9df6366863a3831a7bb136fa
parent: 440d68d00350f8dc0d14a7bb8d385a0b6c819bb2
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sat Nov 26 19:50:53 EST 2011

rand(2): fix nroff output

--- a/sys/man/2/rand
+++ b/sys/man/2/rand
@@ -51,13 +51,15 @@
 returns a uniform pseudo-random
 number
 .IR x ,
-.RI 0≤ x <2\u\s715\s10\d.
+.if t 0≤ \fIx\fR <2\u\s715\s10\d.
+.if n 0≤ x <2^15.
 .PP
 .I Lrand
 returns a uniform
 .B long
 .IR x ,
-.RI 0≤ x <2\u\s731\s10\d.
+.if t 0≤ \fIx\fR <2\u\s731\s10\d.
+.if n 0≤ x <2^31.
 .PP
 .I Frand
 returns a uniform
@@ -115,7 +117,8 @@
 .I Ntruerand
 returns a uniform random integer
 .IR x ,
-.RI 0≤ x < val ≤ 2\u\s732\s10\d-1.
+.if t 0≤ \fIx\fR < \fIval\fR ≤ 2\u\s732\s10\d-1.
+.if n 0≤ x < val ≤ 2^32-1.
 .PP
 .I Genrandom
 fills a buffer with bytes from the X9.17 pseudo-random
@@ -146,7 +149,8 @@
 to return a uniform
 .B "unsigned long
 .IR x ,
-.RI 0≤ x < 2\u\s732\s10\d-1.
+.if t 0≤ \fIx\fR <2\u\s732\s10\d-1.
+.if n 0≤ x <2^32-1.
 .PP
 .I Nfastrand
 uses
@@ -154,7 +158,8 @@
 to return a uniform
 .B "unsigned long
 .IR x ,
-.RI 0≤ x < val ≤ 2\u\s732\s10\d-1.
+.if t 0≤ \fIx\fR < \fIval\fR ≤ 2\u\s732\s10\d-1.
+.if n 0≤ x < val ≤ 2^32-1.
 .SH SOURCE
 .B /sys/src/libc/port/*rand.c
 .br