aboutsummaryrefslogtreecommitdiff
path: root/tests
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
parentf131090388ae3272660242339b6c9e010309d811 (diff)
bc: Vendor import new version 3.3.3bc/3.3.3
Diffstat (limited to 'tests')
-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
-rw-r--r--tests/dc/all.txt1
-rw-r--r--tests/dc/length.txt129
-rw-r--r--tests/dc/length_results.txt129
8 files changed, 285 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"
}
}
diff --git a/tests/dc/all.txt b/tests/dc/all.txt
index 6879541f7f1a..ec637c346ceb 100644
--- a/tests/dc/all.txt
+++ b/tests/dc/all.txt
@@ -1,4 +1,5 @@
decimal
+length
add
subtract
multiply
diff --git a/tests/dc/length.txt b/tests/dc/length.txt
new file mode 100644
index 000000000000..daa960bed23b
--- /dev/null
+++ b/tests/dc/length.txt
@@ -0,0 +1,129 @@
+0ZpR
+0.0000ZpR
+0.00000000ZpR
+0.00000000000ZpR
+1ZpR
+12ZpR
+123ZpR
+1234ZpR
+12345ZpR
+123456ZpR
+1234567ZpR
+12345678ZpR
+123456789ZpR
+1234567890ZpR
+1.0ZpR
+12.0ZpR
+123.0ZpR
+1234.0ZpR
+12345.0ZpR
+123456.0ZpR
+1234567.0ZpR
+12345678.0ZpR
+123456789.0ZpR
+1234567890.0ZpR
+.1ZpR
+.12ZpR
+.123ZpR
+.1234ZpR
+.12345ZpR
+.123456ZpR
+.1234567ZpR
+.12345678ZpR
+.123456789ZpR
+.1234567890ZpR
+.01ZpR
+.012ZpR
+.0123ZpR
+.01234ZpR
+.012345ZpR
+.0123456ZpR
+.01234567ZpR
+.012345678ZpR
+.0123456789ZpR
+.01234567890ZpR
+.001ZpR
+.0012ZpR
+.00123ZpR
+.001234ZpR
+.0012345ZpR
+.00123456ZpR
+.001234567ZpR
+.0012345678ZpR
+.00123456789ZpR
+.001234567890ZpR
+.0001ZpR
+.00012ZpR
+.000123ZpR
+.0001234ZpR
+.00012345ZpR
+.000123456ZpR
+.0001234567ZpR
+.00012345678ZpR
+.000123456789ZpR
+.0001234567890ZpR
+.00001ZpR
+.000012ZpR
+.0000123ZpR
+.00001234ZpR
+.000012345ZpR
+.0000123456ZpR
+.00001234567ZpR
+.000012345678ZpR
+.0000123456789ZpR
+.00001234567890ZpR
+.000001ZpR
+.0000012ZpR
+.00000123ZpR
+.000001234ZpR
+.0000012345ZpR
+.00000123456ZpR
+.000001234567ZpR
+.0000012345678ZpR
+.00000123456789ZpR
+.000001234567890ZpR
+.0000001ZpR
+.00000012ZpR
+.000000123ZpR
+.0000001234ZpR
+.00000012345ZpR
+.000000123456ZpR
+.0000001234567ZpR
+.00000012345678ZpR
+.000000123456789ZpR
+.0000001234567890ZpR
+.00000001ZpR
+.000000012ZpR
+.0000000123ZpR
+.00000001234ZpR
+.000000012345ZpR
+.0000000123456ZpR
+.00000001234567ZpR
+.000000012345678ZpR
+.0000000123456789ZpR
+.00000001234567890ZpR
+.000000001ZpR
+.0000000012ZpR
+.00000000123ZpR
+.000000001234ZpR
+.0000000012345ZpR
+.00000000123456ZpR
+.000000001234567ZpR
+.0000000012345678ZpR
+.00000000123456789ZpR
+.000000001234567890ZpR
+.0000000001ZpR
+.00000000012ZpR
+.000000000123ZpR
+.0000000001234ZpR
+.00000000012345ZpR
+.000000000123456ZpR
+.0000000001234567ZpR
+.00000000012345678ZpR
+.000000000123456789ZpR
+.0000000001234567890ZpR
+289.29837ZpR
+2893.00000ZpR
+289.0ZpR
+1802973.0000000238ZpR
+.000000000000000093182394080000000000ZpR
diff --git a/tests/dc/length_results.txt b/tests/dc/length_results.txt
new file mode 100644
index 000000000000..3a79696e38b7
--- /dev/null
+++ b/tests/dc/length_results.txt
@@ -0,0 +1,129 @@
+1
+4
+8
+11
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+8
+9
+4
+17
+20