aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/tests/bc/scripts/divide_09300.bc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/tests/bc/scripts/divide_09300.bc')
-rw-r--r--contrib/bc/tests/bc/scripts/divide_09300.bc23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/bc/tests/bc/scripts/divide_09300.bc b/contrib/bc/tests/bc/scripts/divide_09300.bc
new file mode 100644
index 000000000000..4a64b9347192
--- /dev/null
+++ b/contrib/bc/tests/bc/scripts/divide_09300.bc
@@ -0,0 +1,23 @@
+#! /usr/bin/bc -lq
+
+scale = 20
+x = 1234567890 * 10^(-scale)
+len = 1 + 2 * scale
+
+x
+scale += 10
+
+for (i = 0; i <= len; ++i) {
+ a[i] = x * (10^i)
+ a[i]
+}
+
+for (i = 9201; i <= 9300; ++i) {
+ for (j = 0; j < len; ++j) {
+ a[0] / a[j]
+ a[i] / a[j]
+ (a[0] * i) / a[j]
+ a[0] / (a[j] * i)
+ (a[0] * i) / (a[j] * i)
+ }
+}