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: bessel.bc
#! /usr/bin/bc -q t[0] = 0 t[1] = 0.5 t[2] = 1 t[3] = 1.5 t[4] = 1.74 t[5] = 2 t[6] = 3.2345 t[7] = 100 t[8] = -0.5 t[9] = -1 t[10] = -1.5 t[11] = -1.74 t[12] = -2 t[13] = -3.2345 t[14] = -100 t[15] = 0.0000000000000000 l = 16 a[0] = t[0] for (i = 1; i < l; ++i) { a[i * 2 - 1] = t[i] a[i * 2] = -t[i] } l *= 2 l -= 1 for (i = 0; i < l; ++i) { for (j = 0; j < l; ++j) { print "j(", a[i] if (a[i] == 0 && scale(a[i]) > 0) print ".0000000000000000" print ", ", a[j] if (a[j] == 0 && scale(a[j]) > 0) print ".0000000000000000" print ")\n" } } # These are specific tests that bc could not pass at one time. print "j(3, 0.75)\n" print "scale = 0; j(40, 0.75)\n" print "halt\n" halt
Upload File
Create Folder