aboutsummaryrefslogtreecommitdiff
path: root/tests/bc/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bc/scripts')
-rw-r--r--tests/bc/scripts/all.txt1
-rw-r--r--tests/bc/scripts/cbrt.txt100
-rw-r--r--tests/bc/scripts/root.bc19
-rw-r--r--tests/bc/scripts/root.txt255
4 files changed, 375 insertions, 0 deletions
diff --git a/tests/bc/scripts/all.txt b/tests/bc/scripts/all.txt
index e2d2aa320c6f..a226bed54234 100644
--- a/tests/bc/scripts/all.txt
+++ b/tests/bc/scripts/all.txt
@@ -4,6 +4,7 @@ subtract.bc
add.bc
print.bc
parse.bc
+root.bc
array.bc
array2.bc
atan.bc
diff --git a/tests/bc/scripts/cbrt.txt b/tests/bc/scripts/cbrt.txt
new file mode 100644
index 000000000000..bae7f3af0578
--- /dev/null
+++ b/tests/bc/scripts/cbrt.txt
@@ -0,0 +1,100 @@
+.464158883361277889241007635091
+.215443469003188372175929356651
+.100000000000000000000000000000
+.046415888336127788924100763509
+.021544346900318837217592935665
+.010000000000000000000000000000
+.004641588833612778892410076350
+.002154434690031883721759293566
+.001000000000000000000000000000
+.000464158883361277889241007635
+.000215443469003188372175929356
+.000100000000000000000000000000
+.000046415888336127788924100763
+.000021544346900318837217592935
+.000010000000000000000000000000
+.000004641588833612778892410076
+.000002154434690031883721759293
+.000001000000000000000000000000
+.000000464158883361277889241007
+.000000215443469003188372175929
+.000000100000000000000000000000
+.000000046415888336127788924100
+.000000021544346900318837217592
+.000000010000000000000000000000
+.000000004641588833612778892410
+.000000002154434690031883721759
+.000000001000000000000000000000
+.000000000464158883361277889241
+.000000000215443469003188372175
+.000000000100000000000000000000
+.000000000046415888336127788924
+.000000000021544346900318837217
+.000000000010000000000000000000
+.000000000004641588833612778892
+.000000000002154434690031883721
+.000000000001000000000000000000
+.000000000000464158883361277889
+.000000000000215443469003188372
+.000000000000100000000000000000
+.000000000000046415888336127788
+.000000000000021544346900318837
+.000000000000010000000000000000
+.000000000000004641588833612778
+.000000000000002154434690031883
+.000000000000001000000000000000
+.000000000000000464158883361277
+.000000000000000215443469003188
+.000000000000000100000000000000
+.000000000000000046415888336127
+.000000000000000021544346900318
+.000000000000000010000000000000
+.000000000000000004641588833612
+.000000000000000002154434690031
+.000000000000000001000000000000
+.000000000000000000464158883361
+.000000000000000000215443469003
+.000000000000000000100000000000
+.000000000000000000046415888336
+.000000000000000000021544346900
+.000000000000000000010000000000
+.000000000000000000004641588833
+.000000000000000000002154434690
+.000000000000000000001000000000
+.000000000000000000000464158883
+.000000000000000000000215443469
+.000000000000000000000100000000
+.000000000000000000000046415888
+.000000000000000000000021544346
+.000000000000000000000010000000
+.000000000000000000000004641588
+.000000000000000000000002154434
+.000000000000000000000001000000
+.000000000000000000000000464158
+.000000000000000000000000215443
+.000000000000000000000000100000
+.000000000000000000000000046415
+.000000000000000000000000021544
+.000000000000000000000000010000
+.000000000000000000000000004641
+.000000000000000000000000002154
+.000000000000000000000000001000
+.000000000000000000000000000464
+.000000000000000000000000000215
+.000000000000000000000000000100
+.000000000000000000000000000046
+.000000000000000000000000000021
+.000000000000000000000000000010
+.000000000000000000000000000004
+.000000000000000000000000000002
+.000000000000000000000000000001
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
diff --git a/tests/bc/scripts/root.bc b/tests/bc/scripts/root.bc
new file mode 100644
index 000000000000..95210fe290e6
--- /dev/null
+++ b/tests/bc/scripts/root.bc
@@ -0,0 +1,19 @@
+scale = 30
+
+s = 1 >> 1
+
+for (i = 0; i < 100; ++i)
+{
+ cbrt(s)
+ s >>= 1
+}
+
+s = 1 >> 1
+
+for (i = 0; i < 155; ++i)
+{
+ root(s, 5)
+ s >>= 1
+}
+
+halt
diff --git a/tests/bc/scripts/root.txt b/tests/bc/scripts/root.txt
new file mode 100644
index 000000000000..b720eb5de75f
--- /dev/null
+++ b/tests/bc/scripts/root.txt
@@ -0,0 +1,255 @@
+.464158883361277889241007635091
+.215443469003188372175929356651
+.100000000000000000000000000000
+.046415888336127788924100763509
+.021544346900318837217592935665
+.010000000000000000000000000000
+.004641588833612778892410076350
+.002154434690031883721759293566
+.001000000000000000000000000000
+.000464158883361277889241007635
+.000215443469003188372175929356
+.000100000000000000000000000000
+.000046415888336127788924100763
+.000021544346900318837217592935
+.000010000000000000000000000000
+.000004641588833612778892410076
+.000002154434690031883721759293
+.000001000000000000000000000000
+.000000464158883361277889241007
+.000000215443469003188372175929
+.000000100000000000000000000000
+.000000046415888336127788924100
+.000000021544346900318837217592
+.000000010000000000000000000000
+.000000004641588833612778892410
+.000000002154434690031883721759
+.000000001000000000000000000000
+.000000000464158883361277889241
+.000000000215443469003188372175
+.000000000100000000000000000000
+.000000000046415888336127788924
+.000000000021544346900318837217
+.000000000010000000000000000000
+.000000000004641588833612778892
+.000000000002154434690031883721
+.000000000001000000000000000000
+.000000000000464158883361277889
+.000000000000215443469003188372
+.000000000000100000000000000000
+.000000000000046415888336127788
+.000000000000021544346900318837
+.000000000000010000000000000000
+.000000000000004641588833612778
+.000000000000002154434690031883
+.000000000000001000000000000000
+.000000000000000464158883361277
+.000000000000000215443469003188
+.000000000000000100000000000000
+.000000000000000046415888336127
+.000000000000000021544346900318
+.000000000000000010000000000000
+.000000000000000004641588833612
+.000000000000000002154434690031
+.000000000000000001000000000000
+.000000000000000000464158883361
+.000000000000000000215443469003
+.000000000000000000100000000000
+.000000000000000000046415888336
+.000000000000000000021544346900
+.000000000000000000010000000000
+.000000000000000000004641588833
+.000000000000000000002154434690
+.000000000000000000001000000000
+.000000000000000000000464158883
+.000000000000000000000215443469
+.000000000000000000000100000000
+.000000000000000000000046415888
+.000000000000000000000021544346
+.000000000000000000000010000000
+.000000000000000000000004641588
+.000000000000000000000002154434
+.000000000000000000000001000000
+.000000000000000000000000464158
+.000000000000000000000000215443
+.000000000000000000000000100000
+.000000000000000000000000046415
+.000000000000000000000000021544
+.000000000000000000000000010000
+.000000000000000000000000004641
+.000000000000000000000000002154
+.000000000000000000000000001000
+.000000000000000000000000000464
+.000000000000000000000000000215
+.000000000000000000000000000100
+.000000000000000000000000000046
+.000000000000000000000000000021
+.000000000000000000000000000010
+.000000000000000000000000000004
+.000000000000000000000000000002
+.000000000000000000000000000001
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.630957344480193249434360136622
+.398107170553497250770252305087
+.251188643150958011108503206779
+.158489319246111348520210137339
+.100000000000000000000000000000
+.063095734448019324943436013662
+.039810717055349725077025230508
+.025118864315095801110850320677
+.015848931924611134852021013733
+.010000000000000000000000000000
+.006309573444801932494343601366
+.003981071705534972507702523050
+.002511886431509580111085032067
+.001584893192461113485202101373
+.001000000000000000000000000000
+.000630957344480193249434360136
+.000398107170553497250770252305
+.000251188643150958011108503206
+.000158489319246111348520210137
+.000100000000000000000000000000
+.000063095734448019324943436013
+.000039810717055349725077025230
+.000025118864315095801110850320
+.000015848931924611134852021013
+.000010000000000000000000000000
+.000006309573444801932494343601
+.000003981071705534972507702523
+.000002511886431509580111085032
+.000001584893192461113485202101
+.000001000000000000000000000000
+.000000630957344480193249434360
+.000000398107170553497250770252
+.000000251188643150958011108503
+.000000158489319246111348520210
+.000000100000000000000000000000
+.000000063095734448019324943436
+.000000039810717055349725077025
+.000000025118864315095801110850
+.000000015848931924611134852021
+.000000010000000000000000000000
+.000000006309573444801932494343
+.000000003981071705534972507702
+.000000002511886431509580111085
+.000000001584893192461113485202
+.000000001000000000000000000000
+.000000000630957344480193249434
+.000000000398107170553497250770
+.000000000251188643150958011108
+.000000000158489319246111348520
+.000000000100000000000000000000
+.000000000063095734448019324943
+.000000000039810717055349725077
+.000000000025118864315095801110
+.000000000015848931924611134852
+.000000000010000000000000000000
+.000000000006309573444801932494
+.000000000003981071705534972507
+.000000000002511886431509580111
+.000000000001584893192461113485
+.000000000001000000000000000000
+.000000000000630957344480193249
+.000000000000398107170553497250
+.000000000000251188643150958011
+.000000000000158489319246111348
+.000000000000100000000000000000
+.000000000000063095734448019324
+.000000000000039810717055349725
+.000000000000025118864315095801
+.000000000000015848931924611134
+.000000000000010000000000000000
+.000000000000006309573444801932
+.000000000000003981071705534972
+.000000000000002511886431509580
+.000000000000001584893192461113
+.000000000000001000000000000000
+.000000000000000630957344480193
+.000000000000000398107170553497
+.000000000000000251188643150958
+.000000000000000158489319246111
+.000000000000000100000000000000
+.000000000000000063095734448019
+.000000000000000039810717055349
+.000000000000000025118864315095
+.000000000000000015848931924611
+.000000000000000010000000000000
+.000000000000000006309573444801
+.000000000000000003981071705534
+.000000000000000002511886431509
+.000000000000000001584893192461
+.000000000000000001000000000000
+.000000000000000000630957344480
+.000000000000000000398107170553
+.000000000000000000251188643150
+.000000000000000000158489319246
+.000000000000000000100000000000
+.000000000000000000063095734448
+.000000000000000000039810717055
+.000000000000000000025118864315
+.000000000000000000015848931924
+.000000000000000000010000000000
+.000000000000000000006309573444
+.000000000000000000003981071705
+.000000000000000000002511886431
+.000000000000000000001584893192
+.000000000000000000001000000000
+.000000000000000000000630957344
+.000000000000000000000398107170
+.000000000000000000000251188643
+.000000000000000000000158489319
+.000000000000000000000100000000
+.000000000000000000000063095734
+.000000000000000000000039810717
+.000000000000000000000025118864
+.000000000000000000000015848931
+.000000000000000000000010000000
+.000000000000000000000006309573
+.000000000000000000000003981071
+.000000000000000000000002511886
+.000000000000000000000001584893
+.000000000000000000000001000000
+.000000000000000000000000630957
+.000000000000000000000000398107
+.000000000000000000000000251188
+.000000000000000000000000158489
+.000000000000000000000000100000
+.000000000000000000000000063095
+.000000000000000000000000039810
+.000000000000000000000000025118
+.000000000000000000000000015848
+.000000000000000000000000010000
+.000000000000000000000000006309
+.000000000000000000000000003981
+.000000000000000000000000002511
+.000000000000000000000000001584
+.000000000000000000000000001000
+.000000000000000000000000000630
+.000000000000000000000000000398
+.000000000000000000000000000251
+.000000000000000000000000000158
+.000000000000000000000000000100
+.000000000000000000000000000063
+.000000000000000000000000000039
+.000000000000000000000000000025
+.000000000000000000000000000015
+.000000000000000000000000000010
+.000000000000000000000000000006
+.000000000000000000000000000003
+.000000000000000000000000000002
+.000000000000000000000000000001
+.000000000000000000000000000001
+0
+0
+0
+0
+0