003 File Manager
Current Path:
/usr/src/contrib/bc/tests/bc/scripts
usr
/
src
/
contrib
/
bc
/
tests
/
bc
/
scripts
/
📁
..
📄
add.bc
(228 B)
📄
all.txt
(149 B)
📄
array.bc
(554 B)
📄
array.txt
(1.33 KB)
📄
atan.bc
(134 B)
📄
atan.txt
(2.34 KB)
📄
bessel.bc
(700 B)
📄
divide.bc
(298 B)
📄
functions.bc
(42 B)
📄
functions.txt
(26 B)
📄
globals.bc
(176 B)
📄
globals.txt
(18 B)
📄
len.bc
(623 B)
📄
len.txt
(6 B)
📄
multiply.bc
(285 B)
📄
parse.bc
(314 B)
📄
print.bc
(397 B)
📄
rand.bc
(852 B)
📄
rand.txt
(462 B)
📄
references.bc
(4.73 KB)
📄
references.txt
(3.33 KB)
📄
screen.bc
(247 B)
📄
screen.txt
(4 B)
📄
subtract.bc
(228 B)
Editing: rand.bc
#! /usr/bin/bc define x(x) { seed = x seed@20 return seed } define y(x) { auto s seed@20 s = x(x) seed@20 return s } define void u(x) { seed = x seed@20 } define void v(x) { u(x) seed@20 } define g(x) { auto s s = irand(x) s < x return seed } define h(x) { auto s s = g(x) s == seed return s } define j(x) { auto s, r seed@20 s = seed r = rand() seed = x s != seed return rand() } define k(x) { auto s, r s = seed seed@20 r = j(x) s != seed seed = x rand() == r return r } define m(*a[]) { auto i seed = seed for (i = 0; i < 100; ++i) { a[i] = rand() } return seed } v(50.5) seed@20 s = y(75.25) s@20 seed@20 r = rand() i = irand(r) i < r s = h(maxrand() ^ 4) s == seed seed = 2398.0625 r = k(38.45) seed = 38.45 r == rand() s = m(a[]) for (i = 0; i < 100; ++i) { rand() == a[i] } s == seed
Upload File
Create Folder