aboutsummaryrefslogtreecommitdiff
path: root/tests/bc/scripts/divide_06500.bc
blob: 62c84d07f3cdf01275e1cf3f5f52aa05d94fb1e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 = 6401; i <= 6500; ++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)
	}
}