aboutsummaryrefslogtreecommitdiff
path: root/tests/bc/scripts/subtract_04200.bc
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2025-09-11 14:07:46 +0000
committerStefan Eßer <se@FreeBSD.org>2025-09-11 14:07:46 +0000
commit682da5a0fdb2c38ecc3951047a882471d62aa1d1 (patch)
tree9315c84201e10a5b4cec2eda91146cac4e1c904d /tests/bc/scripts/subtract_04200.bc
parent5a7f1dde93a4c681a5a4246ddabc562a7f7ce14d (diff)
vendor/bc: upgrade to version 7.1.0vendor/bc/7.1.0vendor/bc
This update fixes a few bugs: - Improper response to double SIGINT with editline. - Not letting libedit handle terminal size changes. - A dc crash from improperly handling an error. - A duplicate check for reference arrays. - Build failures with GCC 15.
Diffstat (limited to 'tests/bc/scripts/subtract_04200.bc')
-rw-r--r--tests/bc/scripts/subtract_04200.bc17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bc/scripts/subtract_04200.bc b/tests/bc/scripts/subtract_04200.bc
new file mode 100644
index 000000000000..56ff98e521b1
--- /dev/null
+++ b/tests/bc/scripts/subtract_04200.bc
@@ -0,0 +1,17 @@
+#! /usr/bin/bc -lq
+
+scale = 20
+x = 1234567890 / scale
+len = length(x) + 1 + scale
+len *= 2
+
+for (i = 0; i <= len; ++i) {
+ a[i] = x * (10^i)
+ a[i]
+}
+
+for (i = 4101; i <= 4200; ++i) {
+ for (j = 0; j < len; ++j) {
+ a[i] - a[j]
+ }
+}