003 File Manager
Current Path:
/usr/src/contrib/bc/tests/fuzzing/bc_inputs1
usr
/
src
/
contrib
/
bc
/
tests
/
fuzzing
/
bc_inputs1
/
📁
..
📄
abs.txt
(90 B)
📄
add.txt
(7.12 KB)
📄
arctangent.txt
(338 B)
📄
array.bc
(554 B)
📄
arrays.txt
(66 B)
📄
assignments.txt
(821 B)
📄
basic.txt
(439 B)
📄
boolean.txt
(2.37 KB)
📄
cosine.txt
(496 B)
📄
decimal.txt
(1.81 KB)
📄
divide.txt
(1.31 KB)
📄
engineering.txt
(160 B)
📄
exponent.txt
(206 B)
📄
functions.bc
(42 B)
📄
functions.txt
(124 B)
📄
globals.txt
(156 B)
📄
len.bc
(623 B)
📄
length.txt
(1.01 KB)
📄
lib10.txt
(34 B)
📄
lib11.txt
(46 B)
📄
lib12.txt
(8 B)
📄
lib2.txt
(156 B)
📄
lib3.txt
(30 B)
📄
lib4.txt
(89 B)
📄
lib5.txt
(37 B)
📄
lib6.txt
(45 B)
📄
lib7.txt
(131 B)
📄
lib8.txt
(19 B)
Editing: len.bc
define fast_gcd(a, b) { if (a == b) return a; if (a > b) return fast_gcd(a - b, b) return fast_gcd(a, b - a); } define void r_reduce(*r[]) { auto g,s; if (length(r[]) != 2) sqrt(-1); if (scale(r[0])) 2^r[0]; if (scale(r[1])) 2^r[1]; if (r[0] >= 0 && r[1] >= 0) g = fast_gcd(r[0], r[1]); else g = gcd(r[0], r[1]); s = scale; scale = 0; r[0] /= g; r[1] /= g; scale = s; } define void r_init(*r[], a, b) { r[0] = a; r[1] = b; r_reduce(r[]); } define void r_initi(*r[], i, a, b) { length(r[]); r[0] = i * b + a; r[1] = b; length(r[]); r_reduce(r[]); } length(a[]) r_initi(a[], 5, 63, 94);
Upload File
Create Folder