summaryrefslogtreecommitdiffstats
path: root/contrib/bc/Test/sqrt1.b
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/Test/sqrt1.b')
-rw-r--r--contrib/bc/Test/sqrt1.b13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/bc/Test/sqrt1.b b/contrib/bc/Test/sqrt1.b
new file mode 100644
index 0000000..c3ca269
--- /dev/null
+++ b/contrib/bc/Test/sqrt1.b
@@ -0,0 +1,13 @@
+for (j=0; j<10; j++) {
+ a = .9;
+ b = .9+j;
+ scale = 2;
+ for (i=0; i<90; i++) {
+ scale += 1;
+ a /= 10;
+ b += a;
+ x = sqrt(b);
+ }
+ x;
+}
+quit
OpenPOWER on IntegriCloud