aboutsummaryrefslogtreecommitdiff
path: root/tests/bc
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2021-03-05 10:30:11 +0000
committerStefan Eßer <se@FreeBSD.org>2021-03-05 10:30:11 +0000
commit1fa9712ce0ef8cecd4888a67f4a4179c9e19e294 (patch)
tree118a4ebc08a4ede3ad3c91917fb3b50c19d1b379 /tests/bc
parentf131090388ae3272660242339b6c9e010309d811 (diff)
Diffstat (limited to 'tests/bc')
-rw-r--r--tests/bc/length.txt3
-rw-r--r--tests/bc/length_results.txt5
-rw-r--r--tests/bc/lib2.txt6
-rw-r--r--tests/bc/lib2_results.txt6
-rwxr-xr-xtests/bc/scripts/bessel.bc9
5 files changed, 26 insertions, 3 deletions
diff --git a/tests/bc/length.txt b/tests/bc/length.txt
index 5461f76cbf59..feb4134ffabd 100644
--- a/tests/bc/length.txt
+++ b/tests/bc/length.txt
@@ -1,4 +1,7 @@
length(0)
+length(0.0000)
+length(0.00000000)
+length(0.00000000000)
length(1)
length(12)
length(123)
diff --git a/tests/bc/length_results.txt b/tests/bc/length_results.txt
index 53a58e2be678..3501dea2a063 100644
--- a/tests/bc/length_results.txt
+++ b/tests/bc/length_results.txt
@@ -1,4 +1,7 @@
-0
+1
+4
+8
+11
1
2
3
diff --git a/tests/bc/lib2.txt b/tests/bc/lib2.txt
index 9fdf50d06141..076e62b8ea61 100644
--- a/tests/bc/lib2.txt
+++ b/tests/bc/lib2.txt
@@ -84,6 +84,12 @@ cbrt(27)
cbrt(-27)
cbrt(4096)
cbrt(-4096)
+root(0, 3)
+root(0, 4)
+root(0, 5)
+root(0.0000000000000, 3)
+root(0.0000000000000, 4)
+root(0.0000000000000, 5)
root(16, 4)
root(3125, 5)
root(-3125, 5)
diff --git a/tests/bc/lib2_results.txt b/tests/bc/lib2_results.txt
index ca5a37cfce0a..ca790604e07b 100644
--- a/tests/bc/lib2_results.txt
+++ b/tests/bc/lib2_results.txt
@@ -84,6 +84,12 @@
-3.00000000000000000000
16.00000000000000000000
-16.00000000000000000000
+0
+0
+0
+0
+0
+0
2.00000000000000000000
5.00000000000000000000
-5.00000000000000000000
diff --git a/tests/bc/scripts/bessel.bc b/tests/bc/scripts/bessel.bc
index b82eee30d19e..c2229e50bc8e 100755
--- a/tests/bc/scripts/bessel.bc
+++ b/tests/bc/scripts/bessel.bc
@@ -15,8 +15,9 @@ t[11] = -1.74
t[12] = -2
t[13] = -3.2345
t[14] = -100
+t[15] = 0.0000000000000000
-l = 15
+l = 16
a[0] = t[0]
@@ -30,7 +31,11 @@ l -= 1
for (i = 0; i < l; ++i) {
for (j = 0; j < l; ++j) {
- print "j(", a[i], ", ", a[j], ")\n"
+ 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"
}
}