aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/bc.test91
-rw-r--r--tests/files/bc/add.txt3
-rw-r--r--tests/files/bc/add_results.txt3
-rwxr-xr-xtests/files/bc/arctan.bc12
-rw-r--r--tests/files/bc/arctan.txt301
-rw-r--r--tests/files/bc/arctan_results.txt266
-rw-r--r--tests/files/bc/arrays.txt10
-rw-r--r--tests/files/bc/arrays_results.txt3
-rw-r--r--tests/files/bc/bessel.txt842
-rw-r--r--tests/files/bc/bessel_results.txt841
-rw-r--r--tests/files/bc/boolean.txt181
-rw-r--r--tests/files/bc/boolean_results.txt181
-rw-r--r--tests/files/bc/cosine.txt44
-rw-r--r--tests/files/bc/cosine_results.txt41
-rw-r--r--tests/files/bc/decimal.txt1
-rw-r--r--tests/files/bc/decimal_results.txt2
-rw-r--r--tests/files/bc/exponent.txt22
-rw-r--r--tests/files/bc/exponent_results.txt25
-rw-r--r--tests/files/bc/log.txt22
-rw-r--r--tests/files/bc/log_results.txt22
-rw-r--r--tests/files/bc/misc.txt13
-rw-r--r--tests/files/bc/misc1.txt76
-rw-r--r--tests/files/bc/misc1_results.txt57
-rw-r--r--tests/files/bc/misc2.txt45
-rw-r--r--tests/files/bc/misc2_results.txt20
-rw-r--r--tests/files/bc/misc_results.txt4
-rw-r--r--tests/files/bc/modulus.txt3
-rw-r--r--tests/files/bc/modulus_results.txt3
-rw-r--r--tests/files/bc/multiply.txt2
-rw-r--r--tests/files/bc/multiply_results.txt2
-rwxr-xr-xtests/files/bc/parse.bc16
-rw-r--r--tests/files/bc/parse.txt14406
-rw-r--r--tests/files/bc/parse_results.txt14392
-rw-r--r--tests/files/bc/pi.txt3
-rw-r--r--tests/files/bc/pi_results.txt135
-rw-r--r--tests/files/bc/power.txt25
-rw-r--r--tests/files/bc/power_results.txt355
-rwxr-xr-xtests/files/bc/print.bc21
-rw-r--r--tests/files/bc/print.txt6841
-rw-r--r--tests/files/bc/print_results.txt6835
-rw-r--r--tests/files/bc/screen.bc19
-rw-r--r--tests/files/bc/sine.txt207
-rw-r--r--tests/files/bc/sine_results.txt204
-rw-r--r--tests/files/bc/sqrt.txt1
-rw-r--r--tests/files/bc/sqrt_results.txt1
-rw-r--r--tests/files/bc/subtract.txt2
-rw-r--r--tests/files/bc/subtract_results.txt2
-rw-r--r--tests/files/bc/vars.txt (renamed from tests/files/bc/basic.txt)4
-rw-r--r--tests/files/bc/vars_results.txt (renamed from tests/files/bc/basic_results.txt)3
-rw-r--r--toys/pending/bc.c6164
50 files changed, 49138 insertions, 3636 deletions
diff --git a/tests/bc.test b/tests/bc.test
index 213b21ab..130e049f 100644
--- a/tests/bc.test
+++ b/tests/bc.test
@@ -7,66 +7,33 @@
BDIR="$FILES/bc"
TESTDIR="./"
-results=$(cat "$BDIR/decimal_results.txt")
-testcmd "decimal" "-l $BDIR/decimal.txt" "$results\n" "$BDIR/decimal.txt" ""
-
-results=$(cat "$BDIR/add_results.txt")
-testcmd "add" "-l $BDIR/add.txt" "$results\n" "$BDIR/add.txt" ""
-
-results=$(cat "$BDIR/subtract_results.txt")
-testcmd "subtract" "-l $BDIR/subtract.txt" "$results\n" "$BDIR/subtract.txt" ""
-
-results=$(cat "$BDIR/multiply_results.txt")
-testcmd "multiply" "-l $BDIR/multiply.txt" "$results\n" "$BDIR/multiply.txt" ""
-
-results=$(cat "$BDIR/divide_results.txt")
-testcmd "divide" "-l $BDIR/divide.txt" "$results\n" "$BDIR/divide.txt" ""
-
-results=$(cat "$BDIR/modulus_results.txt")
-testcmd "modulus" "-l $BDIR/modulus.txt" "$results\n" "$BDIR/modulus.txt" ""
-
-results=$(cat "$BDIR/power_results.txt")
-testcmd "power" "-l $BDIR/power.txt" "$results\n" "$BDIR/power.txt" ""
-
-results=$(cat "$BDIR/sqrt_results.txt")
-testcmd "sqrt" "-l $BDIR/sqrt.txt" "$results\n" "$BDIR/sqrt.txt" ""
-
-results=$(cat "$BDIR/basic_results.txt")
-testcmd "basic" "-l $BDIR/basic.txt" "$results\n" "$BDIR/basic.txt" ""
-
-if [ ! -f "$TESTDIR/parse.txt" ]; then
- echo "Generating bc parse..."
- cat "$BDIR/parse.bc" | bc -l > "$TESTDIR/parse.txt"
-fi
-results=$(cat "$TESTDIR/parse.txt" | bc -l)
-testcmd "parse" "-l $TESTDIR/parse.txt" "$results\n" "$TESTDIR/parse.txt" ""
-
-if [ ! -f "$TESTDIR/print.txt" ]; then
- echo "Generating bc print..."
- cat "$BDIR/print.bc" | bc -l > "$TESTDIR/print.txt"
-fi
-results=$(cat "$TESTDIR/print.txt" | bc -l)
-testcmd "print" "-l $TESTDIR/print.txt" "$results\n" "$TESTDIR/print.txt" ""
-
-results=$(cat "$BDIR/pi.txt" | bc -l)
-testcmd "pi" "-l $BDIR/pi.txt" "$results\n" "$BDIR/pi.txt" ""
-
-if [ ! -f "$TESTDIR/arctan.txt" ]; then
- echo "Generating bc arctan..."
- cat "$BDIR/arctan.bc" | bc -l > "$TESTDIR/arctan.txt"
-fi
-results=$(cat "$TESTDIR/arctan.txt" | bc -l)
-testcmd "arctan" "-l $TESTDIR/arctan.txt" "$results\n" "$TESTDIR/arctan.txt" ""
-
-results=$(cat "$TESTDIR/arctan.txt")
-testcmd "arctan script" "-l $BDIR/arctan.bc" "$results" "$BDIR/arctan.bc" ""
-
-results=$(cat "$TESTDIR/parse.txt")
-testcmd "parse script" "-l $BDIR/parse.bc" "$results\n" "$BDIR/parse.bc" ""
-
-results=$(cat "$TESTDIR/print.txt")
-testcmd "print script" "-l $BDIR/print.bc" "$results\n" "$BDIR/print.bc" ""
-
-results=$(cat "$BDIR/screen.bc" | bc -l)
-testcmd "screen script" "-l $BDIR/screen.bc" "$results\n" "$BDIR/screen.bc" ""
+run_bc_test() {
+ tst="$1"
+ results=$(cat "$BDIR/${tst}_results.txt")
+ testcmd "$tst" "-l $BDIR/$tst.txt" "$results\n" "$BDIR/$tst.txt" ""
+}
+
+run_bc_test decimal
+run_bc_test add
+run_bc_test subtract
+run_bc_test multiply
+run_bc_test divide
+run_bc_test modulus
+run_bc_test power
+run_bc_test sqrt
+run_bc_test vars
+run_bc_test boolean
+run_bc_test parse
+run_bc_test print
+run_bc_test exponent
+run_bc_test log
+run_bc_test pi
+run_bc_test arctan
+run_bc_test sine
+run_bc_test cosine
+run_bc_test bessel
+run_bc_test arrays
+run_bc_test misc
+run_bc_test misc1
+run_bc_test misc2
diff --git a/tests/files/bc/add.txt b/tests/files/bc/add.txt
index 01ea6c80..1646354f 100644
--- a/tests/files/bc/add.txt
+++ b/tests/files/bc/add.txt
@@ -22,3 +22,6 @@
99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999899999999999999999999999999999999999999999999999999999999999999 + 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
99999999999999999999999999999999999989999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
-1889985797 + 2012747315
+0 + -14338.391079082
+-2422297 + 1.3134942556
+
diff --git a/tests/files/bc/add_results.txt b/tests/files/bc/add_results.txt
index 313fa450..d1599bd1 100644
--- a/tests/files/bc/add_results.txt
+++ b/tests/files/bc/add_results.txt
@@ -34,3 +34,6 @@
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000009999
122761518
+-14338.391079082
+-2422295.6865057444
+
diff --git a/tests/files/bc/arctan.bc b/tests/files/bc/arctan.bc
deleted file mode 100755
index 11a76953..00000000
--- a/tests/files/bc/arctan.bc
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/bc -q
-
-i = 0
-for (i = 1; i <= 100; ++i) {
- print "scale = ", i, "\n"
- print "a(.267)\n"
- print "a(1)\n"
-}
-
-"halt"
-
-halt
diff --git a/tests/files/bc/arctan.txt b/tests/files/bc/arctan.txt
new file mode 100644
index 00000000..08e1b6c9
--- /dev/null
+++ b/tests/files/bc/arctan.txt
@@ -0,0 +1,301 @@
+scale = 1
+a(.267)
+a(1)
+scale = 2
+a(.267)
+a(1)
+scale = 3
+a(.267)
+a(1)
+scale = 4
+a(.267)
+a(1)
+scale = 5
+a(.267)
+a(1)
+scale = 6
+a(.267)
+a(1)
+scale = 7
+a(.267)
+a(1)
+scale = 8
+a(.267)
+a(1)
+scale = 9
+a(.267)
+a(1)
+scale = 10
+a(.267)
+a(1)
+scale = 11
+a(.267)
+a(1)
+scale = 12
+a(.267)
+a(1)
+scale = 13
+a(.267)
+a(1)
+scale = 14
+a(.267)
+a(1)
+scale = 15
+a(.267)
+a(1)
+scale = 16
+a(.267)
+a(1)
+scale = 17
+a(.267)
+a(1)
+scale = 18
+a(.267)
+a(1)
+scale = 19
+a(.267)
+a(1)
+scale = 20
+a(.267)
+a(1)
+scale = 21
+a(.267)
+a(1)
+scale = 22
+a(.267)
+a(1)
+scale = 23
+a(.267)
+a(1)
+scale = 24
+a(.267)
+a(1)
+scale = 25
+a(.267)
+a(1)
+scale = 26
+a(.267)
+a(1)
+scale = 27
+a(.267)
+a(1)
+scale = 28
+a(.267)
+a(1)
+scale = 29
+a(.267)
+a(1)
+scale = 30
+a(.267)
+a(1)
+scale = 31
+a(.267)
+a(1)
+scale = 32
+a(.267)
+a(1)
+scale = 33
+a(.267)
+a(1)
+scale = 34
+a(.267)
+a(1)
+scale = 35
+a(.267)
+a(1)
+scale = 36
+a(.267)
+a(1)
+scale = 37
+a(.267)
+a(1)
+scale = 38
+a(.267)
+a(1)
+scale = 39
+a(.267)
+a(1)
+scale = 40
+a(.267)
+a(1)
+scale = 41
+a(.267)
+a(1)
+scale = 42
+a(.267)
+a(1)
+scale = 43
+a(.267)
+a(1)
+scale = 44
+a(.267)
+a(1)
+scale = 45
+a(.267)
+a(1)
+scale = 46
+a(.267)
+a(1)
+scale = 47
+a(.267)
+a(1)
+scale = 48
+a(.267)
+a(1)
+scale = 49
+a(.267)
+a(1)
+scale = 50
+a(.267)
+a(1)
+scale = 51
+a(.267)
+a(1)
+scale = 52
+a(.267)
+a(1)
+scale = 53
+a(.267)
+a(1)
+scale = 54
+a(.267)
+a(1)
+scale = 55
+a(.267)
+a(1)
+scale = 56
+a(.267)
+a(1)
+scale = 57
+a(.267)
+a(1)
+scale = 58
+a(.267)
+a(1)
+scale = 59
+a(.267)
+a(1)
+scale = 60
+a(.267)
+a(1)
+scale = 61
+a(.267)
+a(1)
+scale = 62
+a(.267)
+a(1)
+scale = 63
+a(.267)
+a(1)
+scale = 64
+a(.267)
+a(1)
+scale = 65
+a(.267)
+a(1)
+scale = 66
+a(.267)
+a(1)
+scale = 67
+a(.267)
+a(1)
+scale = 68
+a(.267)
+a(1)
+scale = 69
+a(.267)
+a(1)
+scale = 70
+a(.267)
+a(1)
+scale = 71
+a(.267)
+a(1)
+scale = 72
+a(.267)
+a(1)
+scale = 73
+a(.267)
+a(1)
+scale = 74
+a(.267)
+a(1)
+scale = 75
+a(.267)
+a(1)
+scale = 76
+a(.267)
+a(1)
+scale = 77
+a(.267)
+a(1)
+scale = 78
+a(.267)
+a(1)
+scale = 79
+a(.267)
+a(1)
+scale = 80
+a(.267)
+a(1)
+scale = 81
+a(.267)
+a(1)
+scale = 82
+a(.267)
+a(1)
+scale = 83
+a(.267)
+a(1)
+scale = 84
+a(.267)
+a(1)
+scale = 85
+a(.267)
+a(1)
+scale = 86
+a(.267)
+a(1)
+scale = 87
+a(.267)
+a(1)
+scale = 88
+a(.267)
+a(1)
+scale = 89
+a(.267)
+a(1)
+scale = 90
+a(.267)
+a(1)
+scale = 91
+a(.267)
+a(1)
+scale = 92
+a(.267)
+a(1)
+scale = 93
+a(.267)
+a(1)
+scale = 94
+a(.267)
+a(1)
+scale = 95
+a(.267)
+a(1)
+scale = 96
+a(.267)
+a(1)
+scale = 97
+a(.267)
+a(1)
+scale = 98
+a(.267)
+a(1)
+scale = 99
+a(.267)
+a(1)
+scale = 100
+a(.267)
+a(1)
+halt \ No newline at end of file
diff --git a/tests/files/bc/arctan_results.txt b/tests/files/bc/arctan_results.txt
new file mode 100644
index 00000000..3739c1b8
--- /dev/null
+++ b/tests/files/bc/arctan_results.txt
@@ -0,0 +1,266 @@
+.2
+.7
+.26
+.78
+.260
+.785
+.2609
+.7853
+.26091
+.78539
+.260913
+.785398
+.2609135
+.7853981
+.26091356
+.78539816
+.260913569
+.785398163
+.2609135692
+.7853981633
+.26091356923
+.78539816339
+.260913569232
+.785398163397
+.2609135692329
+.7853981633974
+.26091356923294
+.78539816339744
+.260913569232940
+.785398163397448
+.2609135692329405
+.7853981633974483
+.26091356923294057
+.78539816339744830
+.260913569232940579
+.785398163397448309
+.2609135692329405795
+.7853981633974483096
+.26091356923294057959
+.78539816339744830961
+.260913569232940579596
+.785398163397448309615
+.2609135692329405795967
+.7853981633974483096156
+.26091356923294057959678
+.78539816339744830961566
+.260913569232940579596785
+.785398163397448309615660
+.2609135692329405795967852
+.7853981633974483096156608
+.26091356923294057959678526
+.78539816339744830961566084
+.260913569232940579596785267
+.785398163397448309615660845
+.2609135692329405795967852677
+.7853981633974483096156608458
+.26091356923294057959678526777
+.78539816339744830961566084581
+.260913569232940579596785267777
+.785398163397448309615660845819
+.2609135692329405795967852677779
+.7853981633974483096156608458198
+.26091356923294057959678526777798
+.78539816339744830961566084581987
+.260913569232940579596785267777986
+.785398163397448309615660845819875
+.2609135692329405795967852677779865
+.7853981633974483096156608458198757
+.26091356923294057959678526777798656
+.78539816339744830961566084581987572
+.260913569232940579596785267777986563
+.785398163397448309615660845819875721
+.2609135692329405795967852677779865639
+.7853981633974483096156608458198757210
+.26091356923294057959678526777798656397
+.78539816339744830961566084581987572104
+.260913569232940579596785267777986563977
+.785398163397448309615660845819875721049
+.2609135692329405795967852677779865639774
+.7853981633974483096156608458198757210492
+.26091356923294057959678526777798656397747
+.78539816339744830961566084581987572104929
+.260913569232940579596785267777986563977474
+.785398163397448309615660845819875721049292
+.2609135692329405795967852677779865639774740
+.7853981633974483096156608458198757210492923
+.26091356923294057959678526777798656397747402
+.78539816339744830961566084581987572104929234
+.260913569232940579596785267777986563977474023
+.785398163397448309615660845819875721049292349
+.2609135692329405795967852677779865639774740239
+.7853981633974483096156608458198757210492923498
+.26091356923294057959678526777798656397747402398
+.78539816339744830961566084581987572104929234984
+.260913569232940579596785267777986563977474023988
+.785398163397448309615660845819875721049292349843
+.2609135692329405795967852677779865639774740239882
+.7853981633974483096156608458198757210492923498437
+.26091356923294057959678526777798656397747402398824
+.78539816339744830961566084581987572104929234984377
+.260913569232940579596785267777986563977474023988244
+.785398163397448309615660845819875721049292349843776
+.2609135692329405795967852677779865639774740239882445
+.7853981633974483096156608458198757210492923498437764
+.26091356923294057959678526777798656397747402398824458
+.78539816339744830961566084581987572104929234984377645
+.260913569232940579596785267777986563977474023988244582
+.785398163397448309615660845819875721049292349843776455
+.2609135692329405795967852677779865639774740239882445822
+.7853981633974483096156608458198757210492923498437764552
+.26091356923294057959678526777798656397747402398824458223
+.78539816339744830961566084581987572104929234984377645524
+.260913569232940579596785267777986563977474023988244582232
+.785398163397448309615660845819875721049292349843776455243
+.2609135692329405795967852677779865639774740239882445822329
+.7853981633974483096156608458198757210492923498437764552437
+.26091356923294057959678526777798656397747402398824458223298
+.78539816339744830961566084581987572104929234984377645524373
+.260913569232940579596785267777986563977474023988244582232988
+.785398163397448309615660845819875721049292349843776455243736
+.2609135692329405795967852677779865639774740239882445822329882
+.7853981633974483096156608458198757210492923498437764552437361
+.26091356923294057959678526777798656397747402398824458223298829
+.78539816339744830961566084581987572104929234984377645524373614
+.260913569232940579596785267777986563977474023988244582232988291
+.785398163397448309615660845819875721049292349843776455243736148
+.2609135692329405795967852677779865639774740239882445822329882917
+.7853981633974483096156608458198757210492923498437764552437361480
+.26091356923294057959678526777798656397747402398824458223298829172
+.78539816339744830961566084581987572104929234984377645524373614807
+.260913569232940579596785267777986563977474023988244582232988291723
+.785398163397448309615660845819875721049292349843776455243736148076
+.2609135692329405795967852677779865639774740239882445822329882917230
+.7853981633974483096156608458198757210492923498437764552437361480769
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054918
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965700
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549182
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657008
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491823
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570087
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054918230
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965700870
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549182304
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657008706
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491823044
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570087063
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054918230445
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965700870633
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549182304453
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657008706335
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491823044536
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570087063355
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054918230445369
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965700870633552
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549182304453695
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657008706335529
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491823044536954
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570087063355292
+.2609135692329405795967852677779865639774740239882445822329882917230\
+6505919346449054918230445369549
+.7853981633974483096156608458198757210492923498437764552437361480769\
+5410157155224965700870633552926
+.2609135692329405795967852677779865639774740239882445822329882917230\
+65059193464490549182304453695497
+.7853981633974483096156608458198757210492923498437764552437361480769\
+54101571552249657008706335529266
+.2609135692329405795967852677779865639774740239882445822329882917230\
+650591934644905491823044536954978
+.7853981633974483096156608458198757210492923498437764552437361480769\
+541015715522496570087063355292669
diff --git a/tests/files/bc/arrays.txt b/tests/files/bc/arrays.txt
new file mode 100644
index 00000000..26a284b8
--- /dev/null
+++ b/tests/files/bc/arrays.txt
@@ -0,0 +1,10 @@
+a[0] = 1
+a[2-1] = 2
+
+a[0]+a[0]
+
+a[2-1]+a[2-1]
+
+a[5] = 2
+a[5.789]
+
diff --git a/tests/files/bc/arrays_results.txt b/tests/files/bc/arrays_results.txt
new file mode 100644
index 00000000..200035ff
--- /dev/null
+++ b/tests/files/bc/arrays_results.txt
@@ -0,0 +1,3 @@
+2
+4
+2
diff --git a/tests/files/bc/bessel.txt b/tests/files/bc/bessel.txt
new file mode 100644
index 00000000..c2014202
--- /dev/null
+++ b/tests/files/bc/bessel.txt
@@ -0,0 +1,842 @@
+j(0, 0)
+j(0, .5)
+j(0, -.5)
+j(0, 1)
+j(0, -1)
+j(0, 1.5)
+j(0, -1.5)
+j(0, 1.74)
+j(0, -1.74)
+j(0, 2)
+j(0, -2)
+j(0, 3.2345)
+j(0, -3.2345)
+j(0, 100)
+j(0, -100)
+j(0, -.5)
+j(0, .5)
+j(0, -1)
+j(0, 1)
+j(0, -1.5)
+j(0, 1.5)
+j(0, -1.74)
+j(0, 1.74)
+j(0, -2)
+j(0, 2)
+j(0, -3.2345)
+j(0, 3.2345)
+j(0, -100)
+j(0, 100)
+j(.5, 0)
+j(.5, .5)
+j(.5, -.5)
+j(.5, 1)
+j(.5, -1)
+j(.5, 1.5)
+j(.5, -1.5)
+j(.5, 1.74)
+j(.5, -1.74)
+j(.5, 2)
+j(.5, -2)
+j(.5, 3.2345)
+j(.5, -3.2345)
+j(.5, 100)
+j(.5, -100)
+j(.5, -.5)
+j(.5, .5)
+j(.5, -1)
+j(.5, 1)
+j(.5, -1.5)
+j(.5, 1.5)
+j(.5, -1.74)
+j(.5, 1.74)
+j(.5, -2)
+j(.5, 2)
+j(.5, -3.2345)
+j(.5, 3.2345)
+j(.5, -100)
+j(.5, 100)
+j(-.5, 0)
+j(-.5, .5)
+j(-.5, -.5)
+j(-.5, 1)
+j(-.5, -1)
+j(-.5, 1.5)
+j(-.5, -1.5)
+j(-.5, 1.74)
+j(-.5, -1.74)
+j(-.5, 2)
+j(-.5, -2)
+j(-.5, 3.2345)
+j(-.5, -3.2345)
+j(-.5, 100)
+j(-.5, -100)
+j(-.5, -.5)
+j(-.5, .5)
+j(-.5, -1)
+j(-.5, 1)
+j(-.5, -1.5)
+j(-.5, 1.5)
+j(-.5, -1.74)
+j(-.5, 1.74)
+j(-.5, -2)
+j(-.5, 2)
+j(-.5, -3.2345)
+j(-.5, 3.2345)
+j(-.5, -100)
+j(-.5, 100)
+j(1, 0)
+j(1, .5)
+j(1, -.5)
+j(1, 1)
+j(1, -1)
+j(1, 1.5)
+j(1, -1.5)
+j(1, 1.74)
+j(1, -1.74)
+j(1, 2)
+j(1, -2)
+j(1, 3.2345)
+j(1, -3.2345)
+j(1, 100)
+j(1, -100)
+j(1, -.5)
+j(1, .5)
+j(1, -1)
+j(1, 1)
+j(1, -1.5)
+j(1, 1.5)
+j(1, -1.74)
+j(1, 1.74)
+j(1, -2)
+j(1, 2)
+j(1, -3.2345)
+j(1, 3.2345)
+j(1, -100)
+j(1, 100)
+j(-1, 0)
+j(-1, .5)
+j(-1, -.5)
+j(-1, 1)
+j(-1, -1)
+j(-1, 1.5)
+j(-1, -1.5)
+j(-1, 1.74)
+j(-1, -1.74)
+j(-1, 2)
+j(-1, -2)
+j(-1, 3.2345)
+j(-1, -3.2345)
+j(-1, 100)
+j(-1, -100)
+j(-1, -.5)
+j(-1, .5)
+j(-1, -1)
+j(-1, 1)
+j(-1, -1.5)
+j(-1, 1.5)
+j(-1, -1.74)
+j(-1, 1.74)
+j(-1, -2)
+j(-1, 2)
+j(-1, -3.2345)
+j(-1, 3.2345)
+j(-1, -100)
+j(-1, 100)
+j(1.5, 0)
+j(1.5, .5)
+j(1.5, -.5)
+j(1.5, 1)
+j(1.5, -1)
+j(1.5, 1.5)
+j(1.5, -1.5)
+j(1.5, 1.74)
+j(1.5, -1.74)
+j(1.5, 2)
+j(1.5, -2)
+j(1.5, 3.2345)
+j(1.5, -3.2345)
+j(1.5, 100)
+j(1.5, -100)
+j(1.5, -.5)
+j(1.5, .5)
+j(1.5, -1)
+j(1.5, 1)
+j(1.5, -1.5)
+j(1.5, 1.5)
+j(1.5, -1.74)
+j(1.5, 1.74)
+j(1.5, -2)
+j(1.5, 2)
+j(1.5, -3.2345)
+j(1.5, 3.2345)
+j(1.5, -100)
+j(1.5, 100)
+j(-1.5, 0)
+j(-1.5, .5)
+j(-1.5, -.5)
+j(-1.5, 1)
+j(-1.5, -1)
+j(-1.5, 1.5)
+j(-1.5, -1.5)
+j(-1.5, 1.74)
+j(-1.5, -1.74)
+j(-1.5, 2)
+j(-1.5, -2)
+j(-1.5, 3.2345)
+j(-1.5, -3.2345)
+j(-1.5, 100)
+j(-1.5, -100)
+j(-1.5, -.5)
+j(-1.5, .5)
+j(-1.5, -1)
+j(-1.5, 1)
+j(-1.5, -1.5)
+j(-1.5, 1.5)
+j(-1.5, -1.74)
+j(-1.5, 1.74)
+j(-1.5, -2)
+j(-1.5, 2)
+j(-1.5, -3.2345)
+j(-1.5, 3.2345)
+j(-1.5, -100)
+j(-1.5, 100)
+j(1.74, 0)
+j(1.74, .5)
+j(1.74, -.5)
+j(1.74, 1)
+j(1.74, -1)
+j(1.74, 1.5)
+j(1.74, -1.5)
+j(1.74, 1.74)
+j(1.74, -1.74)
+j(1.74, 2)
+j(1.74, -2)
+j(1.74, 3.2345)
+j(1.74, -3.2345)
+j(1.74, 100)
+j(1.74, -100)
+j(1.74, -.5)
+j(1.74, .5)
+j(1.74, -1)
+j(1.74, 1)
+j(1.74, -1.5)
+j(1.74, 1.5)
+j(1.74, -1.74)
+j(1.74, 1.74)
+j(1.74, -2)
+j(1.74, 2)
+j(1.74, -3.2345)
+j(1.74, 3.2345)
+j(1.74, -100)
+j(1.74, 100)
+j(-1.74, 0)
+j(-1.74, .5)
+j(-1.74, -.5)
+j(-1.74, 1)
+j(-1.74, -1)
+j(-1.74, 1.5)
+j(-1.74, -1.5)
+j(-1.74, 1.74)
+j(-1.74, -1.74)
+j(-1.74, 2)
+j(-1.74, -2)
+j(-1.74, 3.2345)
+j(-1.74, -3.2345)
+j(-1.74, 100)
+j(-1.74, -100)
+j(-1.74, -.5)
+j(-1.74, .5)
+j(-1.74, -1)
+j(-1.74, 1)
+j(-1.74, -1.5)
+j(-1.74, 1.5)
+j(-1.74, -1.74)
+j(-1.74, 1.74)
+j(-1.74, -2)
+j(-1.74, 2)
+j(-1.74, -3.2345)
+j(-1.74, 3.2345)
+j(-1.74, -100)
+j(-1.74, 100)
+j(2, 0)
+j(2, .5)
+j(2, -.5)
+j(2, 1)
+j(2, -1)
+j(2, 1.5)
+j(2, -1.5)
+j(2, 1.74)
+j(2, -1.74)
+j(2, 2)
+j(2, -2)
+j(2, 3.2345)
+j(2, -3.2345)
+j(2, 100)
+j(2, -100)
+j(2, -.5)
+j(2, .5)
+j(2, -1)
+j(2, 1)
+j(2, -1.5)
+j(2, 1.5)
+j(2, -1.74)
+j(2, 1.74)
+j(2, -2)
+j(2, 2)
+j(2, -3.2345)
+j(2, 3.2345)
+j(2, -100)
+j(2, 100)
+j(-2, 0)
+j(-2, .5)
+j(-2, -.5)
+j(-2, 1)
+j(-2, -1)
+j(-2, 1.5)
+j(-2, -1.5)
+j(-2, 1.74)
+j(-2, -1.74)
+j(-2, 2)
+j(-2, -2)
+j(-2, 3.2345)
+j(-2, -3.2345)
+j(-2, 100)
+j(-2, -100)
+j(-2, -.5)
+j(-2, .5)
+j(-2, -1)
+j(-2, 1)
+j(-2, -1.5)
+j(-2, 1.5)
+j(-2, -1.74)
+j(-2, 1.74)
+j(-2, -2)
+j(-2, 2)
+j(-2, -3.2345)
+j(-2, 3.2345)
+j(-2, -100)
+j(-2, 100)
+j(3.2345, 0)
+j(3.2345, .5)
+j(3.2345, -.5)
+j(3.2345, 1)
+j(3.2345, -1)
+j(3.2345, 1.5)
+j(3.2345, -1.5)
+j(3.2345, 1.74)
+j(3.2345, -1.74)
+j(3.2345, 2)
+j(3.2345, -2)
+j(3.2345, 3.2345)
+j(3.2345, -3.2345)
+j(3.2345, 100)
+j(3.2345, -100)
+j(3.2345, -.5)
+j(3.2345, .5)
+j(3.2345, -1)
+j(3.2345, 1)
+j(3.2345, -1.5)
+j(3.2345, 1.5)
+j(3.2345, -1.74)
+j(3.2345, 1.74)
+j(3.2345, -2)
+j(3.2345, 2)
+j(3.2345, -3.2345)
+j(3.2345, 3.2345)
+j(3.2345, -100)
+j(3.2345, 100)
+j(-3.2345, 0)
+j(-3.2345, .5)
+j(-3.2345, -.5)
+j(-3.2345, 1)
+j(-3.2345, -1)
+j(-3.2345, 1.5)
+j(-3.2345, -1.5)
+j(-3.2345, 1.74)
+j(-3.2345, -1.74)
+j(-3.2345, 2)
+j(-3.2345, -2)
+j(-3.2345, 3.2345)
+j(-3.2345, -3.2345)
+j(-3.2345, 100)
+j(-3.2345, -100)
+j(-3.2345, -.5)
+j(-3.2345, .5)
+j(-3.2345, -1)
+j(-3.2345, 1)
+j(-3.2345, -1.5)
+j(-3.2345, 1.5)
+j(-3.2345, -1.74)
+j(-3.2345, 1.74)
+j(-3.2345, -2)
+j(-3.2345, 2)
+j(-3.2345, -3.2345)
+j(-3.2345, 3.2345)
+j(-3.2345, -100)
+j(-3.2345, 100)
+j(100, 0)
+j(100, .5)
+j(100, -.5)
+j(100, 1)
+j(100, -1)
+j(100, 1.5)
+j(100, -1.5)
+j(100, 1.74)
+j(100, -1.74)
+j(100, 2)
+j(100, -2)
+j(100, 3.2345)
+j(100, -3.2345)
+j(100, 100)
+j(100, -100)
+j(100, -.5)
+j(100, .5)
+j(100, -1)
+j(100, 1)
+j(100, -1.5)
+j(100, 1.5)
+j(100, -1.74)
+j(100, 1.74)
+j(100, -2)
+j(100, 2)
+j(100, -3.2345)
+j(100, 3.2345)
+j(100, -100)
+j(100, 100)
+j(-100, 0)
+j(-100, .5)
+j(-100, -.5)
+j(-100, 1)
+j(-100, -1)
+j(-100, 1.5)
+j(-100, -1.5)
+j(-100, 1.74)
+j(-100, -1.74)
+j(-100, 2)
+j(-100, -2)
+j(-100, 3.2345)
+j(-100, -3.2345)
+j(-100, 100)
+j(-100, -100)
+j(-100, -.5)
+j(-100, .5)
+j(-100, -1)
+j(-100, 1)
+j(-100, -1.5)
+j(-100, 1.5)
+j(-100, -1.74)
+j(-100, 1.74)
+j(-100, -2)
+j(-100, 2)
+j(-100, -3.2345)
+j(-100, 3.2345)
+j(-100, -100)
+j(-100, 100)
+j(-.5, 0)
+j(-.5, .5)
+j(-.5, -.5)
+j(-.5, 1)
+j(-.5, -1)
+j(-.5, 1.5)
+j(-.5, -1.5)
+j(-.5, 1.74)
+j(-.5, -1.74)
+j(-.5, 2)
+j(-.5, -2)
+j(-.5, 3.2345)
+j(-.5, -3.2345)
+j(-.5, 100)
+j(-.5, -100)
+j(-.5, -.5)
+j(-.5, .5)
+j(-.5, -1)
+j(-.5, 1)
+j(-.5, -1.5)
+j(-.5, 1.5)
+j(-.5, -1.74)
+j(-.5, 1.74)
+j(-.5, -2)
+j(-.5, 2)
+j(-.5, -3.2345)
+j(-.5, 3.2345)
+j(-.5, -100)
+j(-.5, 100)
+j(.5, 0)
+j(.5, .5)
+j(.5, -.5)
+j(.5, 1)
+j(.5, -1)
+j(.5, 1.5)
+j(.5, -1.5)
+j(.5, 1.74)
+j(.5, -1.74)
+j(.5, 2)
+j(.5, -2)
+j(.5, 3.2345)
+j(.5, -3.2345)
+j(.5, 100)
+j(.5, -100)
+j(.5, -.5)
+j(.5, .5)
+j(.5, -1)
+j(.5, 1)
+j(.5, -1.5)
+j(.5, 1.5)
+j(.5, -1.74)
+j(.5, 1.74)
+j(.5, -2)
+j(.5, 2)
+j(.5, -3.2345)
+j(.5, 3.2345)
+j(.5, -100)
+j(.5, 100)
+j(-1, 0)
+j(-1, .5)
+j(-1, -.5)
+j(-1, 1)
+j(-1, -1)
+j(-1, 1.5)
+j(-1, -1.5)
+j(-1, 1.74)
+j(-1, -1.74)
+j(-1, 2)
+j(-1, -2)
+j(-1, 3.2345)
+j(-1, -3.2345)
+j(-1, 100)
+j(-1, -100)
+j(-1, -.5)
+j(-1, .5)
+j(-1, -1)
+j(-1, 1)
+j(-1, -1.5)
+j(-1, 1.5)
+j(-1, -1.74)
+j(-1, 1.74)
+j(-1, -2)
+j(-1, 2)
+j(-1, -3.2345)
+j(-1, 3.2345)
+j(-1, -100)
+j(-1, 100)
+j(1, 0)
+j(1, .5)
+j(1, -.5)
+j(1, 1)
+j(1, -1)
+j(1, 1.5)
+j(1, -1.5)
+j(1, 1.74)
+j(1, -1.74)
+j(1, 2)
+j(1, -2)
+j(1, 3.2345)
+j(1, -3.2345)
+j(1, 100)
+j(1, -100)
+j(1, -.5)
+j(1, .5)
+j(1, -1)
+j(1, 1)
+j(1, -1.5)
+j(1, 1.5)
+j(1, -1.74)
+j(1, 1.74)
+j(1, -2)
+j(1, 2)
+j(1, -3.2345)
+j(1, 3.2345)
+j(1, -100)
+j(1, 100)
+j(-1.5, 0)
+j(-1.5, .5)
+j(-1.5, -.5)
+j(-1.5, 1)
+j(-1.5, -1)
+j(-1.5, 1.5)
+j(-1.5, -1.5)
+j(-1.5, 1.74)
+j(-1.5, -1.74)
+j(-1.5, 2)
+j(-1.5, -2)
+j(-1.5, 3.2345)
+j(-1.5, -3.2345)
+j(-1.5, 100)
+j(-1.5, -100)
+j(-1.5, -.5)
+j(-1.5, .5)
+j(-1.5, -1)
+j(-1.5, 1)
+j(-1.5, -1.5)
+j(-1.5, 1.5)
+j(-1.5, -1.74)
+j(-1.5, 1.74)
+j(-1.5, -2)
+j(-1.5, 2)
+j(-1.5, -3.2345)
+j(-1.5, 3.2345)
+j(-1.5, -100)
+j(-1.5, 100)
+j(1.5, 0)
+j(1.5, .5)
+j(1.5, -.5)
+j(1.5, 1)
+j(1.5, -1)
+j(1.5, 1.5)
+j(1.5, -1.5)
+j(1.5, 1.74)
+j(1.5, -1.74)
+j(1.5, 2)
+j(1.5, -2)
+j(1.5, 3.2345)
+j(1.5, -3.2345)
+j(1.5, 100)
+j(1.5, -100)
+j(1.5, -.5)
+j(1.5, .5)
+j(1.5, -1)
+j(1.5, 1)
+j(1.5, -1.5)
+j(1.5, 1.5)
+j(1.5, -1.74)
+j(1.5, 1.74)
+j(1.5, -2)
+j(1.5, 2)
+j(1.5, -3.2345)
+j(1.5, 3.2345)
+j(1.5, -100)
+j(1.5, 100)
+j(-1.74, 0)
+j(-1.74, .5)
+j(-1.74, -.5)
+j(-1.74, 1)
+j(-1.74, -1)
+j(-1.74, 1.5)
+j(-1.74, -1.5)
+j(-1.74, 1.74)
+j(-1.74, -1.74)
+j(-1.74, 2)
+j(-1.74, -2)
+j(-1.74, 3.2345)
+j(-1.74, -3.2345)
+j(-1.74, 100)
+j(-1.74, -100)
+j(-1.74, -.5)
+j(-1.74, .5)
+j(-1.74, -1)
+j(-1.74, 1)
+j(-1.74, -1.5)
+j(-1.74, 1.5)
+j(-1.74, -1.74)
+j(-1.74, 1.74)
+j(-1.74, -2)
+j(-1.74, 2)
+j(-1.74, -3.2345)
+j(-1.74, 3.2345)
+j(-1.74, -100)
+j(-1.74, 100)
+j(1.74, 0)
+j(1.74, .5)
+j(1.74, -.5)
+j(1.74, 1)
+j(1.74, -1)
+j(1.74, 1.5)
+j(1.74, -1.5)
+j(1.74, 1.74)
+j(1.74, -1.74)
+j(1.74, 2)
+j(1.74, -2)
+j(1.74, 3.2345)
+j(1.74, -3.2345)
+j(1.74, 100)
+j(1.74, -100)
+j(1.74, -.5)
+j(1.74, .5)
+j(1.74, -1)
+j(1.74, 1)
+j(1.74, -1.5)
+j(1.74, 1.5)
+j(1.74, -1.74)
+j(1.74, 1.74)
+j(1.74, -2)
+j(1.74, 2)
+j(1.74, -3.2345)
+j(1.74, 3.2345)
+j(1.74, -100)
+j(1.74, 100)
+j(-2, 0)
+j(-2, .5)
+j(-2, -.5)
+j(-2, 1)
+j(-2, -1)
+j(-2, 1.5)
+j(-2, -1.5)
+j(-2, 1.74)
+j(-2, -1.74)
+j(-2, 2)
+j(-2, -2)
+j(-2, 3.2345)
+j(-2, -3.2345)
+j(-2, 100)
+j(-2, -100)
+j(-2, -.5)
+j(-2, .5)
+j(-2, -1)
+j(-2, 1)
+j(-2, -1.5)
+j(-2, 1.5)
+j(-2, -1.74)
+j(-2, 1.74)
+j(-2, -2)
+j(-2, 2)
+j(-2, -3.2345)
+j(-2, 3.2345)
+j(-2, -100)
+j(-2, 100)
+j(2, 0)
+j(2, .5)
+j(2, -.5)
+j(2, 1)
+j(2, -1)
+j(2, 1.5)
+j(2, -1.5)
+j(2, 1.74)
+j(2, -1.74)
+j(2, 2)
+j(2, -2)
+j(2, 3.2345)
+j(2, -3.2345)
+j(2, 100)
+j(2, -100)
+j(2, -.5)
+j(2, .5)
+j(2, -1)
+j(2, 1)
+j(2, -1.5)
+j(2, 1.5)
+j(2, -1.74)
+j(2, 1.74)
+j(2, -2)
+j(2, 2)
+j(2, -3.2345)
+j(2, 3.2345)
+j(2, -100)
+j(2, 100)
+j(-3.2345, 0)
+j(-3.2345, .5)
+j(-3.2345, -.5)
+j(-3.2345, 1)
+j(-3.2345, -1)
+j(-3.2345, 1.5)
+j(-3.2345, -1.5)
+j(-3.2345, 1.74)
+j(-3.2345, -1.74)
+j(-3.2345, 2)
+j(-3.2345, -2)
+j(-3.2345, 3.2345)
+j(-3.2345, -3.2345)
+j(-3.2345, 100)
+j(-3.2345, -100)
+j(-3.2345, -.5)
+j(-3.2345, .5)
+j(-3.2345, -1)
+j(-3.2345, 1)
+j(-3.2345, -1.5)
+j(-3.2345, 1.5)
+j(-3.2345, -1.74)
+j(-3.2345, 1.74)
+j(-3.2345, -2)
+j(-3.2345, 2)
+j(-3.2345, -3.2345)
+j(-3.2345, 3.2345)
+j(-3.2345, -100)
+j(-3.2345, 100)
+j(3.2345, 0)
+j(3.2345, .5)
+j(3.2345, -.5)
+j(3.2345, 1)
+j(3.2345, -1)
+j(3.2345, 1.5)
+j(3.2345, -1.5)
+j(3.2345, 1.74)
+j(3.2345, -1.74)
+j(3.2345, 2)
+j(3.2345, -2)
+j(3.2345, 3.2345)
+j(3.2345, -3.2345)
+j(3.2345, 100)
+j(3.2345, -100)
+j(3.2345, -.5)
+j(3.2345, .5)
+j(3.2345, -1)
+j(3.2345, 1)
+j(3.2345, -1.5)
+j(3.2345, 1.5)
+j(3.2345, -1.74)
+j(3.2345, 1.74)
+j(3.2345, -2)
+j(3.2345, 2)
+j(3.2345, -3.2345)
+j(3.2345, 3.2345)
+j(3.2345, -100)
+j(3.2345, 100)
+j(-100, 0)
+j(-100, .5)
+j(-100, -.5)
+j(-100, 1)
+j(-100, -1)
+j(-100, 1.5)
+j(-100, -1.5)
+j(-100, 1.74)
+j(-100, -1.74)
+j(-100, 2)
+j(-100, -2)
+j(-100, 3.2345)
+j(-100, -3.2345)
+j(-100, 100)
+j(-100, -100)
+j(-100, -.5)
+j(-100, .5)
+j(-100, -1)
+j(-100, 1)
+j(-100, -1.5)
+j(-100, 1.5)
+j(-100, -1.74)
+j(-100, 1.74)
+j(-100, -2)
+j(-100, 2)
+j(-100, -3.2345)
+j(-100, 3.2345)
+j(-100, -100)
+j(-100, 100)
+j(100, 0)
+j(100, .5)
+j(100, -.5)
+j(100, 1)
+j(100, -1)
+j(100, 1.5)
+j(100, -1.5)
+j(100, 1.74)
+j(100, -1.74)
+j(100, 2)
+j(100, -2)
+j(100, 3.2345)
+j(100, -3.2345)
+j(100, 100)
+j(100, -100)
+j(100, -.5)
+j(100, .5)
+j(100, -1)
+j(100, 1)
+j(100, -1.5)
+j(100, 1.5)
+j(100, -1.74)
+j(100, 1.74)
+j(100, -2)
+j(100, 2)
+j(100, -3.2345)
+j(100, 3.2345)
+j(100, -100)
+j(100, 100)
+halt \ No newline at end of file
diff --git a/tests/files/bc/bessel_results.txt b/tests/files/bc/bessel_results.txt
new file mode 100644
index 00000000..6e48f46b
--- /dev/null
+++ b/tests/files/bc/bessel_results.txt
@@ -0,0 +1,841 @@
+1.00000000000000000000
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+1.00000000000000000000
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+1.00000000000000000000
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+0
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+0
+.00256372999458724407
+-.00256372999458724407
+.01956335398266840591
+-.01956335398266840591
+.06096395114113963064
+-.06096395114113963064
+.09049051186641988137
+-.09049051186641988137
+.12894324947440205109
+-.12894324947440205109
+.34859607875298354805
+-.34859607875298354805
+.07628420172033194340
+-.07628420172033194340
+-.00256372999458724407
+.00256372999458724407
+-.01956335398266840591
+.01956335398266840591
+-.06096395114113963064
+.06096395114113963064
+-.09049051186641988137
+.09049051186641988137
+-.12894324947440205109
+.12894324947440205109
+-.34859607875298354805
+.34859607875298354805
+-.07628420172033194340
+.07628420172033194340
+0
+-.00256372999458724407
+.00256372999458724407
+-.01956335398266840591
+.01956335398266840591
+-.06096395114113963064
+.06096395114113963064
+-.09049051186641988137
+.09049051186641988137
+-.12894324947440205109
+.12894324947440205109
+-.34859607875298354805
+.34859607875298354805
+-.07628420172033194340
+.07628420172033194340
+.00256372999458724407
+-.00256372999458724407
+.01956335398266840591
+-.01956335398266840591
+.06096395114113963064
+-.06096395114113963064
+.09049051186641988137
+-.09049051186641988137
+.12894324947440205109
+-.12894324947440205109
+.34859607875298354805
+-.34859607875298354805
+.07628420172033194340
+-.07628420172033194340
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+1.00000000000000000000
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+1.00000000000000000000
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+.93846980724081290422
+.93846980724081290422
+.76519768655796655144
+.76519768655796655144
+.51182767173591812874
+.51182767173591812874
+.37483214773176892693
+.37483214773176892693
+.22389077914123566805
+.22389077914123566805
+-.32896462175888702221
+-.32896462175888702221
+.01998585030422312242
+.01998585030422312242
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+0
+.24226845767487388638
+-.24226845767487388638
+.44005058574493351595
+-.44005058574493351595
+.55793650791009964199
+-.55793650791009964199
+.57976044202797131452
+-.57976044202797131452
+.57672480775687338720
+-.57672480775687338720
+.24741588607612652213
+-.24741588607612652213
+-.07714535201411215803
+.07714535201411215803
+-.24226845767487388638
+.24226845767487388638
+-.44005058574493351595
+.44005058574493351595
+-.55793650791009964199
+.55793650791009964199
+-.57976044202797131452
+.57976044202797131452
+-.57672480775687338720
+.57672480775687338720
+-.24741588607612652213
+.24741588607612652213
+.07714535201411215803
+-.07714535201411215803
+0
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+0
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+.03060402345868264130
+.03060402345868264130
+.11490348493190048046
+.11490348493190048046
+.23208767214421472723
+.23208767214421472723
+.29155916494406017021
+.29155916494406017021
+.35283402861563771915
+.35283402861563771915
+.48195017505993913050
+.48195017505993913050
+-.02152875734450536558
+-.02152875734450536558
+0
+-.00256372999458724407
+.00256372999458724407
+-.01956335398266840591
+.01956335398266840591
+-.06096395114113963064
+.06096395114113963064
+-.09049051186641988137
+.09049051186641988137
+-.12894324947440205109
+.12894324947440205109
+-.34859607875298354805
+.34859607875298354805
+-.07628420172033194340
+.07628420172033194340
+.00256372999458724407
+-.00256372999458724407
+.01956335398266840591
+-.01956335398266840591
+.06096395114113963064
+-.06096395114113963064
+.09049051186641988137
+-.09049051186641988137
+.12894324947440205109
+-.12894324947440205109
+.34859607875298354805
+-.34859607875298354805
+.07628420172033194340
+-.07628420172033194340
+0
+.00256372999458724407
+-.00256372999458724407
+.01956335398266840591
+-.01956335398266840591
+.06096395114113963064
+-.06096395114113963064
+.09049051186641988137
+-.09049051186641988137
+.12894324947440205109
+-.12894324947440205109
+.34859607875298354805
+-.34859607875298354805
+.07628420172033194340
+-.07628420172033194340
+-.00256372999458724407
+.00256372999458724407
+-.01956335398266840591
+.01956335398266840591
+-.06096395114113963064
+.06096395114113963064
+-.09049051186641988137
+.09049051186641988137
+-.12894324947440205109
+.12894324947440205109
+-.34859607875298354805
+.34859607875298354805
+-.07628420172033194340
+.07628420172033194340
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+.09636667329586155967
+.09636667329586155967
diff --git a/tests/files/bc/boolean.txt b/tests/files/bc/boolean.txt
new file mode 100644
index 00000000..021afc5f
--- /dev/null
+++ b/tests/files/bc/boolean.txt
@@ -0,0 +1,181 @@
+!0
+!1
+!(-129)
+4 && 5
+4 && 0
+0 && 5
+4 && 5 && 7
+4 && 0 && 7
+0 && 5 && 7
+4 && 5 && 0
+0 && 0 && 7
+4 && 0 && 0
+0 && 5 && 0
+!4 && 5
+!4 && 0
+!0 && 5
+4 && !5
+4 && !0
+0 && !5
+!4 && 5 && 7
+!4 && 0 && 7
+!0 && 5 && 7
+!4 && 5 && 0
+!0 && 0 && 7
+!4 && 0 && 0
+!0 && 5 && 0
+4 && !5 && 7
+4 && !0 && 7
+0 && !5 && 7
+4 && !5 && 0
+0 && !0 && 7
+4 && !0 && 0
+0 && !5 && 0
+4 && 5 && !7
+4 && 0 && !7
+0 && 5 && !7
+4 && 5 && !0
+0 && 0 && !7
+4 && 0 && !0
+0 && 5 && !0
+!4 && !5 && 7
+!4 && !0 && 7
+!0 && !5 && 7
+!4 && !5 && 0
+!0 && !0 && 7
+!4 && !0 && 0
+!0 && !5 && 0
+!4 && 5 && !7
+!4 && 0 && !7
+!0 && 5 && !7
+!4 && 5 && !0
+!0 && 0 && !7
+!4 && 0 && !0
+!0 && 5 && !0
+4 && !5 && !7
+4 && !0 && !7
+0 && !5 && !7
+4 && !5 && !0
+0 && !0 && !7
+4 && !0 && !0
+0 && !5 && !0
+!4 && !5 && !7
+!4 && !0 && !7
+!0 && !5 && !7
+!4 && !5 && !0
+!0 && !0 && !7
+!4 && !0 && !0
+!0 && !5 && !0
+3 < 4 && 7
+3 && 4 >= 4
+3 > 4 && 7
+3 && 4 >= 5
+3 < 4 && 0
+0 && 4 >= 4
+3 > 4 && 0
+0 && 4 >= 5
+3 > 4 && 0
+0 && 4 < 4
+3 >= 4 && 0
+0 && 4 >= 5
+3 < 4 && 7
+3 && 4 >= 4
+3 > 4 && 7 > 4
+3 >= 2 && 4 >= 5
+3 < 4 && 0 > -1
+4 < 3 && 4 >= 4
+3 > 4 && 3 == 3
+3 != 3 && 4 >= 5
+3 > 4 && 0 > 1
+0 >= 0 && 4 < 4
+3 >= 4 && 0 >= 1
+0 <= -1 && 4 >= 5
+4 || 5
+4 || 0
+0 || 5
+4 || 5 || 7
+4 || 0 || 7
+0 || 5 || 7
+4 || 5 || 0
+0 || 0 || 7
+4 || 0 || 0
+0 || 5 || 0
+!4 || 5
+!4 || 0
+!0 || 5
+4 || !5
+4 || !0
+0 || !5
+!4 || 5 || 7
+!4 || 0 || 7
+!0 || 5 || 7
+!4 || 5 || 0
+!0 || 0 || 7
+!4 || 0 || 0
+!0 || 5 || 0
+4 || !5 || 7
+4 || !0 || 7
+0 || !5 || 7
+4 || !5 || 0
+0 || !0 || 7
+4 || !0 || 0
+0 || !5 || 0
+4 || 5 || !7
+4 || 0 || !7
+0 || 5 || !7
+4 || 5 || !0
+0 || 0 || !7
+4 || 0 || !0
+0 || 5 || !0
+!4 || !5 || 7
+!4 || !0 || 7
+!0 || !5 || 7
+!4 || !5 || 0
+!0 || !0 || 7
+!4 || !0 || 0
+!0 || !5 || 0
+!4 || 5 || !7
+!4 || 0 || !7
+!0 || 5 || !7
+!4 || 5 || !0
+!0 || 0 || !7
+!4 || 0 || !0
+!0 || 5 || !0
+4 || !5 || !7
+4 || !0 || !7
+0 || !5 || !7
+4 || !5 || !0
+0 || !0 || !7
+4 || !0 || !0
+0 || !5 || !0
+!4 || !5 || !7
+!4 || !0 || !7
+!0 || !5 || !7
+!4 || !5 || !0
+!0 || !0 || !7
+!4 || !0 || !0
+!0 || !5 || !0
+3 < 4 || 7
+3 || 4 >= 4
+3 > 4 || 7
+3 || 4 >= 5
+3 < 4 || 0
+0 || 4 >= 4
+3 > 4 || 0
+0 || 4 >= 5
+3 > 4 || 0
+0 || 4 < 4
+3 >= 4 || 0
+0 || 4 >= 5
+3 < 4 || 7
+3 || 4 >= 4
+3 > 4 || 7 > 4
+3 >= 2 || 4 >= 5
+3 < 4 || 0 > -1
+4 < 3 || 4 >= 4
+3 > 4 || 3 == 3
+3 != 3 || 4 >= 5
+3 > 4 || 0 > 1
+0 >= 0 || 4 < 4
+3 >= 4 || 0 >= 1
+0 <= -1 || 4 >= 5
diff --git a/tests/files/bc/boolean_results.txt b/tests/files/bc/boolean_results.txt
new file mode 100644
index 00000000..ea59389c
--- /dev/null
+++ b/tests/files/bc/boolean_results.txt
@@ -0,0 +1,181 @@
+1
+0
+0
+1
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+1
+0
+0
+0
+1
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+0
+0
+1
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+1
+1
+1
+0
+1
+1
+1
+1
+1
+0
+1
+1
+1
+1
+1
+1
+1
+0
+1
+1
+1
+1
+0
+1
+1
+1
+1
+1
+0
+1
+1
+1
+1
+0
+1
+1
+1
+1
+1
+1
+1
+0
+1
+1
+1
+1
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+0
+0
+1
+0
+0
diff --git a/tests/files/bc/cosine.txt b/tests/files/bc/cosine.txt
new file mode 100644
index 00000000..9e67df4c
--- /dev/null
+++ b/tests/files/bc/cosine.txt
@@ -0,0 +1,44 @@
+scale = 25
+p = 4 * a(1)
+scale = 20
+c(0)
+c(0.5)
+c(1)
+c(2)
+c(3)
+c(-0.5)
+c(-1)
+c(-2)
+c(-3)
+c(p / 7)
+c(-p / 7)
+c(p / 4)
+c(-p / 4)
+c(p / 3)
+c(-p / 3)
+c(p / 2)
+c(-p / 2)
+c(3 * p / 4)
+c(3 * -p / 4)
+c(p)
+c(-p)
+c(3 * p / 2)
+c(3 * -p / 2)
+c(7 * p / 4)
+c(7 * -p / 4)
+c(13 * p / 4)
+c(13 * -p / 4)
+c(2 * p)
+c(2 * -p)
+c(131231)
+c(-131231)
+c(859799894.3562378245)
+c(859799894.3562378245)
+c(4307371)
+c(3522556.3323810191)
+c(44961070)
+c(6918619.1574479809)
+c(190836996.2180244164)
+c(34934)
+c(2483599)
+c(13720376)
diff --git a/tests/files/bc/cosine_results.txt b/tests/files/bc/cosine_results.txt
new file mode 100644
index 00000000..43d640f0
--- /dev/null
+++ b/tests/files/bc/cosine_results.txt
@@ -0,0 +1,41 @@
+1.00000000000000000000
+.87758256189037271611
+.54030230586813971740
+-.41614683654714238699
+-.98999249660044545727
+.87758256189037271611
+.54030230586813971740
+-.41614683654714238699
+-.98999249660044545727
+.90096886790241912623
+.90096886790241912623
+.70710678118654752440
+.70710678118654752440
+.50000000000000000000
+.50000000000000000000
+0
+0
+-.70710678118654752439
+-.70710678118654752439
+-1.00000000000000000000
+-1.00000000000000000000
+0
+0
+.70710678118654752439
+.70710678118654752439
+-.70710678118654752440
+-.70710678118654752440
+1.00000000000000000000
+1.00000000000000000000
+.92427123447397657316
+.92427123447397657316
+-.04198856352825241211
+-.04198856352825241211
+-.75581969921220636368
+-.01644924448939844182
+-.97280717522127222547
+-.92573947460230585966
+-.14343824233852988038
+.87259414746802343203
+.93542606623067050616
+-.52795540572178251550
diff --git a/tests/files/bc/decimal.txt b/tests/files/bc/decimal.txt
index a58f9304..5c6bd327 100644
--- a/tests/files/bc/decimal.txt
+++ b/tests/files/bc/decimal.txt
@@ -32,3 +32,4 @@
-356784356.934568495770004586495678300000000
74325437345273852773827101738273127312738521733017537073520735207307570358738257390761276072160719802671980267018728630178.7082681027680521760217867841276127681270867827821768173178207830710978017738178678012767377058785378278207385237085237803278203782037237582795870
-756752732785273851273728537852738257837283678965738527385272983678372867327835672967385278372637862738627836279863782673862783670.71738178361738718367186378610738617836781603760178367018603760178107735278372832783728367826738627836278378260736270367362073867097307925
+9812734012837410982345719208345712908357412903587192048571920458712.23957182459817249058172945781
diff --git a/tests/files/bc/decimal_results.txt b/tests/files/bc/decimal_results.txt
index 01bfa586..0e9c0647 100644
--- a/tests/files/bc/decimal_results.txt
+++ b/tests/files/bc/decimal_results.txt
@@ -46,3 +46,5 @@
72867327835672967385278372637862738627836279863782673862783670.71738\
17836173871836718637861073861783678160376017836701860376017810773527\
8372832783728367826738627836278378260736270367362073867097307925
+9812734012837410982345719208345712908357412903587192048571920458712.\
+23957182459817249058172945781
diff --git a/tests/files/bc/exponent.txt b/tests/files/bc/exponent.txt
new file mode 100644
index 00000000..40bcf3c5
--- /dev/null
+++ b/tests/files/bc/exponent.txt
@@ -0,0 +1,22 @@
+e(0)
+e(0.5)
+e(1)
+e(1.5)
+e(1.74)
+e(2)
+e(3.2345)
+e(5.283957)
+e(13.23857)
+e(100)
+e(283.238957)
+e(-0.5)
+e(-1)
+e(-1.5)
+e(-1.74)
+e(-2)
+e(-3.2345)
+e(-5.283957)
+e(-13.23857)
+e(-100)
+e(-283.238957)
+e(142.749502399)
diff --git a/tests/files/bc/exponent_results.txt b/tests/files/bc/exponent_results.txt
new file mode 100644
index 00000000..a1f1fe2b
--- /dev/null
+++ b/tests/files/bc/exponent_results.txt
@@ -0,0 +1,25 @@
+1.00000000000000000000
+1.64872127070012814684
+2.71828182845904523536
+4.48168907033806482260
+5.69734342267199101193
+7.38905609893065022723
+25.39367176822616278859
+197.14845034328553587817
+561613.96621445383501864766
+26881171418161354484126255515800135873611118.77374192241519160861
+10212124131159922810249757193864245307850725332411569566443792548720\
+75182918653384240389953781407569563117008113027037939783.70141667971\
+570827872
+.60653065971263342360
+.36787944117144232159
+.22313016014842982893
+.17552040061699687169
+.13533528323661269189
+.03937988996342191888
+.00507231985977442865
+.00000178058250000525
+0
+0
+98928445824097165243611240348236907682258759298273030827411201.25833\
+645622510213538
diff --git a/tests/files/bc/log.txt b/tests/files/bc/log.txt
new file mode 100644
index 00000000..54115e38
--- /dev/null
+++ b/tests/files/bc/log.txt
@@ -0,0 +1,22 @@
+l(0)
+l(0.5)
+l(1)
+l(1.5)
+l(1.74)
+l(2)
+l(3.2345)
+l(5.283957)
+l(13.23857)
+l(100)
+l(283.238957)
+l(-0.5)
+l(-1)
+l(-1.5)
+l(-1.74)
+l(-2)
+l(-3.2345)
+l(-5.283957)
+l(-13.23857)
+l(-100)
+l(-283.238957)
+l(10430710.3325472917)
diff --git a/tests/files/bc/log_results.txt b/tests/files/bc/log_results.txt
new file mode 100644
index 00000000..ce840a0d
--- /dev/null
+++ b/tests/files/bc/log_results.txt
@@ -0,0 +1,22 @@
+-99999999999999999999.00000000000000000000
+-.69314718055994530941
+0
+.40546510810816438197
+.55388511322643765995
+.69314718055994530941
+1.17387435650190306676
+1.66467524885255369652
+2.58313453863349348434
+4.60517018598809136803
+5.64629091238730017971
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+-99999999999999999999.00000000000000000000
+16.16026492940839137014
diff --git a/tests/files/bc/misc.txt b/tests/files/bc/misc.txt
new file mode 100644
index 00000000..571f4a87
--- /dev/null
+++ b/tests/files/bc/misc.txt
@@ -0,0 +1,13 @@
+4.1*1.-13^ - 74 - 1284597623841*1.-13^ - 757
+4.1*1.\
+-1\
+3^ - 74 - 1284597623841*1.\
+-1\
+3^ - 757
+obase = 9
+4.1*1.-13^ - 74 - 1284597623841*1.-13^ - 757
+4.1*1.\
+-1\
+3^ - 74 - 1284597623841*1.\
+-1\
+3^ - 757
diff --git a/tests/files/bc/misc1.txt b/tests/files/bc/misc1.txt
new file mode 100644
index 00000000..7e9d9660
--- /dev/null
+++ b/tests/files/bc/misc1.txt
@@ -0,0 +1,76 @@
+define x(x) {
+ return(x)
+}
+define y() {
+ return;
+}
+define z() {
+ return ();
+}
+scale = 0
+x=2
+x[0]=3
+x
+x[0]
+scale
+ibase
+obase
+x ( 7 )
+x + x( 8 )
+x - x[0]
+321 * x
+2 ^ x[0]
+x++
+--x
+x += 9
+x
+length(2381)
+sqrt(9)
+scale(238.1)
+x=2
+x[0]=3
+(x)
+(x[0])
+(scale)
+(ibase)
+(obase)
+(x ( 7 ))
+(x + x( 8 ))
+(x - x[0])
+(321 * x)
+(2 ^ x[0])
+(x++)
+(--x)
+(x += 9)
+(length(2381))
+(sqrt(9))
+(scale(238.1))
+(scale = 0)
+(x = 10)
+(x += 100)
+(x -= 10)
+(x *= 10)
+(x /= 100)
+(x ^= 10)
+(x = sqrt(x))
+(x[1 - 1])
+x[(1 - 1)]
+2 + \
+3
+++ibase
+--ibase
+++obase
+--obase
+++last
+--last
+last
+last = 100
+last
+. = 150
+.
+++scale
+--scale
+y()
+z()
+2 + /*
+*/3
diff --git a/tests/files/bc/misc1_results.txt b/tests/files/bc/misc1_results.txt
new file mode 100644
index 00000000..a9c27806
--- /dev/null
+++ b/tests/files/bc/misc1_results.txt
@@ -0,0 +1,57 @@
+2
+3
+0
+10
+10
+7
+10
+-1
+642
+8
+2
+2
+11
+4
+3
+1
+2
+3
+0
+10
+10
+7
+10
+-1
+642
+8
+2
+2
+11
+4
+3
+1
+0
+10
+110
+100
+1000
+10
+10000000000
+100000
+3
+3
+5
+11
+10
+10
+10
+11
+10
+10
+100
+150
+1
+0
+0
+0
+5
diff --git a/tests/files/bc/misc2.txt b/tests/files/bc/misc2.txt
new file mode 100644
index 00000000..f5a6a6b1
--- /dev/null
+++ b/tests/files/bc/misc2.txt
@@ -0,0 +1,45 @@
+define x() {
+"x"
+return ( 1 )
+}
+define y() {
+"y"
+return (2)
+}
+define z() {
+"z"
+return (3)
+}
+
+if ( x() == y() ) {1}
+1
+if ( x() <= y() ) {2}
+if ( y() >= x() ) {3}
+if ( x() != y() ) {4}
+if ( x() < y() ) {5}
+if ( y() > x() ) {6}
+
+if ( x() == z() ) {11}
+11
+if ( x() <= z() ) {12}
+if ( z() >= x() ) {13}
+if ( x() != z() ) {14}
+if ( x() < z() ) {15}
+if ( z() > x() ) {16}
+
+x = -10
+while (x <= 0) {
+ x
+ if (x == -5) break;
+ x += 1
+}
+
+define u() {
+ auto a[];
+ return a[0]
+}
+
+u()
+
+if (x == -4) x
+else x - 4
diff --git a/tests/files/bc/misc2_results.txt b/tests/files/bc/misc2_results.txt
new file mode 100644
index 00000000..022ca872
--- /dev/null
+++ b/tests/files/bc/misc2_results.txt
@@ -0,0 +1,20 @@
+xy1
+xy2
+yx3
+xy4
+xy5
+yx6
+xz11
+xz12
+zx13
+xz14
+xz15
+zx16
+-10
+-9
+-8
+-7
+-6
+-5
+0
+-9
diff --git a/tests/files/bc/misc_results.txt b/tests/files/bc/misc_results.txt
new file mode 100644
index 00000000..e2db76e0
--- /dev/null
+++ b/tests/files/bc/misc_results.txt
@@ -0,0 +1,4 @@
+-1284597623836.9
+-1284597623836.9
+-4483684050181.80
+-4483684050181.80
diff --git a/tests/files/bc/modulus.txt b/tests/files/bc/modulus.txt
index e2539892..965600c1 100644
--- a/tests/files/bc/modulus.txt
+++ b/tests/files/bc/modulus.txt
@@ -64,3 +64,6 @@ scale = 0
-12784956 % -32746
-127849612 % -23712347682193
-3191280681 % 641165986
+scale = 0; -899510228 % -2448300078.40314
+scale = 0; -7424863 % -207.2609738667
+scale = 0; 3769798918 % 0.6
diff --git a/tests/files/bc/modulus_results.txt b/tests/files/bc/modulus_results.txt
index 323b3a7d..7d718d22 100644
--- a/tests/files/bc/modulus_results.txt
+++ b/tests/files/bc/modulus_results.txt
@@ -63,3 +63,6 @@
-14016
-127849612
-626616737
+-899510228.00000
+-153.1331732059
+.4
diff --git a/tests/files/bc/multiply.txt b/tests/files/bc/multiply.txt
index 5ef49c4c..d960f02a 100644
--- a/tests/files/bc/multiply.txt
+++ b/tests/files/bc/multiply.txt
@@ -1,4 +1,5 @@
0 * 0
+0.000 * 0
1 * 0
0 * 1
0 * 2498752389672835476
@@ -37,3 +38,4 @@
-378621971598721837710387 * -98465373878350798.09743896037963078560
37164201 * 2931559660
679468076118972457796560530571.46287161642138401685 * 93762.2836
+.000000000000000000000000001 * .0000000000000000000000001
diff --git a/tests/files/bc/multiply_results.txt b/tests/files/bc/multiply_results.txt
index c8167dbe..6dac3b71 100644
--- a/tests/files/bc/multiply_results.txt
+++ b/tests/files/bc/multiply_results.txt
@@ -3,6 +3,7 @@
0
0
0
+0
472638590273489273456
12374861230476103672835496
1
@@ -38,3 +39,4 @@
37281153992026463004361915151761464058058.54968338992209002720
108949072447731660
63708478450213482928510139572007971.83536929222529239687
+0
diff --git a/tests/files/bc/parse.bc b/tests/files/bc/parse.bc
deleted file mode 100755
index 8cc7472f..00000000
--- a/tests/files/bc/parse.bc
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/bc -q
-
-for (b = 2; b <= 16; ++b) {
- if (b == 10) continue
- obase = 10
- print "ibase = A; ibase = ", b, "\n"
- obase = b
- for (i = 0; i <= 65536; ++i) {
- i
- print "0.", i, "\n"
- print "1.", i, "\n"
- print i, ".", i, "\n"
- }
-}
-
-halt
diff --git a/tests/files/bc/parse.txt b/tests/files/bc/parse.txt
new file mode 100644
index 00000000..ba99df57
--- /dev/null
+++ b/tests/files/bc/parse.txt
@@ -0,0 +1,14406 @@
+ibase = A; ibase = 2
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+1000
+0.1000
+1.1000
+1000.1000
+1001
+0.1001
+1.1001
+1001.1001
+1010
+0.1010
+1.1010
+1010.1010
+1011
+0.1011
+1.1011
+1011.1011
+1100
+0.1100
+1.1100
+1100.1100
+1101
+0.1101
+1.1101
+1101.1101
+1110
+0.1110
+1.1110
+1110.1110
+1111
+0.1111
+1.1111
+1111.1111
+10000
+0.10000
+1.10000
+10000.10000
+10001
+0.10001
+1.10001
+10001.10001
+10010
+0.10010
+1.10010
+10010.10010
+10011
+0.10011
+1.10011
+10011.10011
+10100
+0.10100
+1.10100
+10100.10100
+10101
+0.10101
+1.10101
+10101.10101
+10110
+0.10110
+1.10110
+10110.10110
+10111
+0.10111
+1.10111
+10111.10111
+11000
+0.11000
+1.11000
+11000.11000
+11001
+0.11001
+1.11001
+11001.11001
+11010
+0.11010
+1.11010
+11010.11010
+11011
+0.11011
+1.11011
+11011.11011
+11100
+0.11100
+1.11100
+11100.11100
+11101
+0.11101
+1.11101
+11101.11101
+11110
+0.11110
+1.11110
+11110.11110
+11111
+0.11111
+1.11111
+11111.11111
+100000
+0.100000
+1.100000
+100000.100000
+100001
+0.100001
+1.100001
+100001.100001
+100010
+0.100010
+1.100010
+100010.100010
+100011
+0.100011
+1.100011
+100011.100011
+100100
+0.100100
+1.100100
+100100.100100
+100101
+0.100101
+1.100101
+100101.100101
+100110
+0.100110
+1.100110
+100110.100110
+100111
+0.100111
+1.100111
+100111.100111
+101000
+0.101000
+1.101000
+101000.101000
+101001
+0.101001
+1.101001
+101001.101001
+101010
+0.101010
+1.101010
+101010.101010
+101011
+0.101011
+1.101011
+101011.101011
+101100
+0.101100
+1.101100
+101100.101100
+101101
+0.101101
+1.101101
+101101.101101
+101110
+0.101110
+1.101110
+101110.101110
+101111
+0.101111
+1.101111
+101111.101111
+110000
+0.110000
+1.110000
+110000.110000
+110001
+0.110001
+1.110001
+110001.110001
+110010
+0.110010
+1.110010
+110010.110010
+110011
+0.110011
+1.110011
+110011.110011
+110100
+0.110100
+1.110100
+110100.110100
+110101
+0.110101
+1.110101
+110101.110101
+110110
+0.110110
+1.110110
+110110.110110
+110111
+0.110111
+1.110111
+110111.110111
+111000
+0.111000
+1.111000
+111000.111000
+111001
+0.111001
+1.111001
+111001.111001
+111010
+0.111010
+1.111010
+111010.111010
+111011
+0.111011
+1.111011
+111011.111011
+111100
+0.111100
+1.111100
+111100.111100
+111101
+0.111101
+1.111101
+111101.111101
+111110
+0.111110
+1.111110
+111110.111110
+111111
+0.111111
+1.111111
+111111.111111
+1000000
+0.1000000
+1.1000000
+1000000.1000000
+1000001
+0.1000001
+1.1000001
+1000001.1000001
+1000010
+0.1000010
+1.1000010
+1000010.1000010
+1000011
+0.1000011
+1.1000011
+1000011.1000011
+1000100
+0.1000100
+1.1000100
+1000100.1000100
+1000101
+0.1000101
+1.1000101
+1000101.1000101
+1000110
+0.1000110
+1.1000110
+1000110.1000110
+1000111
+0.1000111
+1.1000111
+1000111.1000111
+1001000
+0.1001000
+1.1001000
+1001000.1001000
+1001001
+0.1001001
+1.1001001
+1001001.1001001
+1001010
+0.1001010
+1.1001010
+1001010.1001010
+1001011
+0.1001011
+1.1001011
+1001011.1001011
+1001100
+0.1001100
+1.1001100
+1001100.1001100
+1001101
+0.1001101
+1.1001101
+1001101.1001101
+1001110
+0.1001110
+1.1001110
+1001110.1001110
+1001111
+0.1001111
+1.1001111
+1001111.1001111
+1010000
+0.1010000
+1.1010000
+1010000.1010000
+1010001
+0.1010001
+1.1010001
+1010001.1010001
+1010010
+0.1010010
+1.1010010
+1010010.1010010
+1010011
+0.1010011
+1.1010011
+1010011.1010011
+1010100
+0.1010100
+1.1010100
+1010100.1010100
+1010101
+0.1010101
+1.1010101
+1010101.1010101
+1010110
+0.1010110
+1.1010110
+1010110.1010110
+1010111
+0.1010111
+1.1010111
+1010111.1010111
+1011000
+0.1011000
+1.1011000
+1011000.1011000
+1011001
+0.1011001
+1.1011001
+1011001.1011001
+1011010
+0.1011010
+1.1011010
+1011010.1011010
+1011011
+0.1011011
+1.1011011
+1011011.1011011
+1011100
+0.1011100
+1.1011100
+1011100.1011100
+1011101
+0.1011101
+1.1011101
+1011101.1011101
+1011110
+0.1011110
+1.1011110
+1011110.1011110
+1011111
+0.1011111
+1.1011111
+1011111.1011111
+1100000
+0.1100000
+1.1100000
+1100000.1100000
+1100001
+0.1100001
+1.1100001
+1100001.1100001
+1100010
+0.1100010
+1.1100010
+1100010.1100010
+1100011
+0.1100011
+1.1100011
+1100011.1100011
+1100100
+0.1100100
+1.1100100
+1100100.1100100
+1100101
+0.1100101
+1.1100101
+1100101.1100101
+1100110
+0.1100110
+1.1100110
+1100110.1100110
+1100111
+0.1100111
+1.1100111
+1100111.1100111
+1101000
+0.1101000
+1.1101000
+1101000.1101000
+1101001
+0.1101001
+1.1101001
+1101001.1101001
+1101010
+0.1101010
+1.1101010
+1101010.1101010
+1101011
+0.1101011
+1.1101011
+1101011.1101011
+1101100
+0.1101100
+1.1101100
+1101100.1101100
+1101101
+0.1101101
+1.1101101
+1101101.1101101
+1101110
+0.1101110
+1.1101110
+1101110.1101110
+1101111
+0.1101111
+1.1101111
+1101111.1101111
+1110000
+0.1110000
+1.1110000
+1110000.1110000
+1110001
+0.1110001
+1.1110001
+1110001.1110001
+1110010
+0.1110010
+1.1110010
+1110010.1110010
+1110011
+0.1110011
+1.1110011
+1110011.1110011
+1110100
+0.1110100
+1.1110100
+1110100.1110100
+1110101
+0.1110101
+1.1110101
+1110101.1110101
+1110110
+0.1110110
+1.1110110
+1110110.1110110
+1110111
+0.1110111
+1.1110111
+1110111.1110111
+1111000
+0.1111000
+1.1111000
+1111000.1111000
+1111001
+0.1111001
+1.1111001
+1111001.1111001
+1111010
+0.1111010
+1.1111010
+1111010.1111010
+1111011
+0.1111011
+1.1111011
+1111011.1111011
+1111100
+0.1111100
+1.1111100
+1111100.1111100
+1111101
+0.1111101
+1.1111101
+1111101.1111101
+1111110
+0.1111110
+1.1111110
+1111110.1111110
+1111111
+0.1111111
+1.1111111
+1111111.1111111
+10000000
+0.10000000
+1.10000000
+10000000.10000000
+10000001
+0.10000001
+1.10000001
+10000001.10000001
+10000010
+0.10000010
+1.10000010
+10000010.10000010
+10000011
+0.10000011
+1.10000011
+10000011.10000011
+10000100
+0.10000100
+1.10000100
+10000100.10000100
+10000101
+0.10000101
+1.10000101
+10000101.10000101
+10000110
+0.10000110
+1.10000110
+10000110.10000110
+10000111
+0.10000111
+1.10000111
+10000111.10000111
+10001000
+0.10001000
+1.10001000
+10001000.10001000
+10001001
+0.10001001
+1.10001001
+10001001.10001001
+10001010
+0.10001010
+1.10001010
+10001010.10001010
+10001011
+0.10001011
+1.10001011
+10001011.10001011
+10001100
+0.10001100
+1.10001100
+10001100.10001100
+10001101
+0.10001101
+1.10001101
+10001101.10001101
+10001110
+0.10001110
+1.10001110
+10001110.10001110
+10001111
+0.10001111
+1.10001111
+10001111.10001111
+10010000
+0.10010000
+1.10010000
+10010000.10010000
+10010001
+0.10010001
+1.10010001
+10010001.10010001
+10010010
+0.10010010
+1.10010010
+10010010.10010010
+10010011
+0.10010011
+1.10010011
+10010011.10010011
+10010100
+0.10010100
+1.10010100
+10010100.10010100
+10010101
+0.10010101
+1.10010101
+10010101.10010101
+10010110
+0.10010110
+1.10010110
+10010110.10010110
+10010111
+0.10010111
+1.10010111
+10010111.10010111
+10011000
+0.10011000
+1.10011000
+10011000.10011000
+10011001
+0.10011001
+1.10011001
+10011001.10011001
+10011010
+0.10011010
+1.10011010
+10011010.10011010
+10011011
+0.10011011
+1.10011011
+10011011.10011011
+10011100
+0.10011100
+1.10011100
+10011100.10011100
+10011101
+0.10011101
+1.10011101
+10011101.10011101
+10011110
+0.10011110
+1.10011110
+10011110.10011110
+10011111
+0.10011111
+1.10011111
+10011111.10011111
+10100000
+0.10100000
+1.10100000
+10100000.10100000
+10100001
+0.10100001
+1.10100001
+10100001.10100001
+10100010
+0.10100010
+1.10100010
+10100010.10100010
+10100011
+0.10100011
+1.10100011
+10100011.10100011
+10100100
+0.10100100
+1.10100100
+10100100.10100100
+10100101
+0.10100101
+1.10100101
+10100101.10100101
+10100110
+0.10100110
+1.10100110
+10100110.10100110
+10100111
+0.10100111
+1.10100111
+10100111.10100111
+10101000
+0.10101000
+1.10101000
+10101000.10101000
+10101001
+0.10101001
+1.10101001
+10101001.10101001
+10101010
+0.10101010
+1.10101010
+10101010.10101010
+10101011
+0.10101011
+1.10101011
+10101011.10101011
+10101100
+0.10101100
+1.10101100
+10101100.10101100
+10101101
+0.10101101
+1.10101101
+10101101.10101101
+10101110
+0.10101110
+1.10101110
+10101110.10101110
+10101111
+0.10101111
+1.10101111
+10101111.10101111
+10110000
+0.10110000
+1.10110000
+10110000.10110000
+10110001
+0.10110001
+1.10110001
+10110001.10110001
+10110010
+0.10110010
+1.10110010
+10110010.10110010
+10110011
+0.10110011
+1.10110011
+10110011.10110011
+10110100
+0.10110100
+1.10110100
+10110100.10110100
+10110101
+0.10110101
+1.10110101
+10110101.10110101
+10110110
+0.10110110
+1.10110110
+10110110.10110110
+10110111
+0.10110111
+1.10110111
+10110111.10110111
+10111000
+0.10111000
+1.10111000
+10111000.10111000
+10111001
+0.10111001
+1.10111001
+10111001.10111001
+10111010
+0.10111010
+1.10111010
+10111010.10111010
+10111011
+0.10111011
+1.10111011
+10111011.10111011
+10111100
+0.10111100
+1.10111100
+10111100.10111100
+10111101
+0.10111101
+1.10111101
+10111101.10111101
+10111110
+0.10111110
+1.10111110
+10111110.10111110
+10111111
+0.10111111
+1.10111111
+10111111.10111111
+11000000
+0.11000000
+1.11000000
+11000000.11000000
+11000001
+0.11000001
+1.11000001
+11000001.11000001
+11000010
+0.11000010
+1.11000010
+11000010.11000010
+11000011
+0.11000011
+1.11000011
+11000011.11000011
+11000100
+0.11000100
+1.11000100
+11000100.11000100
+11000101
+0.11000101
+1.11000101
+11000101.11000101
+11000110
+0.11000110
+1.11000110
+11000110.11000110
+11000111
+0.11000111
+1.11000111
+11000111.11000111
+11001000
+0.11001000
+1.11001000
+11001000.11001000
+11001001
+0.11001001
+1.11001001
+11001001.11001001
+11001010
+0.11001010
+1.11001010
+11001010.11001010
+11001011
+0.11001011
+1.11001011
+11001011.11001011
+11001100
+0.11001100
+1.11001100
+11001100.11001100
+11001101
+0.11001101
+1.11001101
+11001101.11001101
+11001110
+0.11001110
+1.11001110
+11001110.11001110
+11001111
+0.11001111
+1.11001111
+11001111.11001111
+11010000
+0.11010000
+1.11010000
+11010000.11010000
+11010001
+0.11010001
+1.11010001
+11010001.11010001
+11010010
+0.11010010
+1.11010010
+11010010.11010010
+11010011
+0.11010011
+1.11010011
+11010011.11010011
+11010100
+0.11010100
+1.11010100
+11010100.11010100
+11010101
+0.11010101
+1.11010101
+11010101.11010101
+11010110
+0.11010110
+1.11010110
+11010110.11010110
+11010111
+0.11010111
+1.11010111
+11010111.11010111
+11011000
+0.11011000
+1.11011000
+11011000.11011000
+11011001
+0.11011001
+1.11011001
+11011001.11011001
+11011010
+0.11011010
+1.11011010
+11011010.11011010
+11011011
+0.11011011
+1.11011011
+11011011.11011011
+11011100
+0.11011100
+1.11011100
+11011100.11011100
+11011101
+0.11011101
+1.11011101
+11011101.11011101
+11011110
+0.11011110
+1.11011110
+11011110.11011110
+11011111
+0.11011111
+1.11011111
+11011111.11011111
+11100000
+0.11100000
+1.11100000
+11100000.11100000
+11100001
+0.11100001
+1.11100001
+11100001.11100001
+11100010
+0.11100010
+1.11100010
+11100010.11100010
+11100011
+0.11100011
+1.11100011
+11100011.11100011
+11100100
+0.11100100
+1.11100100
+11100100.11100100
+11100101
+0.11100101
+1.11100101
+11100101.11100101
+11100110
+0.11100110
+1.11100110
+11100110.11100110
+11100111
+0.11100111
+1.11100111
+11100111.11100111
+11101000
+0.11101000
+1.11101000
+11101000.11101000
+11101001
+0.11101001
+1.11101001
+11101001.11101001
+11101010
+0.11101010
+1.11101010
+11101010.11101010
+11101011
+0.11101011
+1.11101011
+11101011.11101011
+11101100
+0.11101100
+1.11101100
+11101100.11101100
+11101101
+0.11101101
+1.11101101
+11101101.11101101
+11101110
+0.11101110
+1.11101110
+11101110.11101110
+11101111
+0.11101111
+1.11101111
+11101111.11101111
+11110000
+0.11110000
+1.11110000
+11110000.11110000
+11110001
+0.11110001
+1.11110001
+11110001.11110001
+11110010
+0.11110010
+1.11110010
+11110010.11110010
+11110011
+0.11110011
+1.11110011
+11110011.11110011
+11110100
+0.11110100
+1.11110100
+11110100.11110100
+11110101
+0.11110101
+1.11110101
+11110101.11110101
+11110110
+0.11110110
+1.11110110
+11110110.11110110
+11110111
+0.11110111
+1.11110111
+11110111.11110111
+11111000
+0.11111000
+1.11111000
+11111000.11111000
+11111001
+0.11111001
+1.11111001
+11111001.11111001
+11111010
+0.11111010
+1.11111010
+11111010.11111010
+11111011
+0.11111011
+1.11111011
+11111011.11111011
+11111100
+0.11111100
+1.11111100
+11111100.11111100
+11111101
+0.11111101
+1.11111101
+11111101.11111101
+11111110
+0.11111110
+1.11111110
+11111110.11111110
+11111111
+0.11111111
+1.11111111
+11111111.11111111
+100000000
+0.100000000
+1.100000000
+100000000.100000000
+ibase = A; ibase = 3
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+1000
+0.1000
+1.1000
+1000.1000
+1001
+0.1001
+1.1001
+1001.1001
+1002
+0.1002
+1.1002
+1002.1002
+1010
+0.1010
+1.1010
+1010.1010
+1011
+0.1011
+1.1011
+1011.1011
+1012
+0.1012
+1.1012
+1012.1012
+1020
+0.1020
+1.1020
+1020.1020
+1021
+0.1021
+1.1021
+1021.1021
+1022
+0.1022
+1.1022
+1022.1022
+1100
+0.1100
+1.1100
+1100.1100
+1101
+0.1101
+1.1101
+1101.1101
+1102
+0.1102
+1.1102
+1102.1102
+1110
+0.1110
+1.1110
+1110.1110
+1111
+0.1111
+1.1111
+1111.1111
+1112
+0.1112
+1.1112
+1112.1112
+1120
+0.1120
+1.1120
+1120.1120
+1121
+0.1121
+1.1121
+1121.1121
+1122
+0.1122
+1.1122
+1122.1122
+1200
+0.1200
+1.1200
+1200.1200
+1201
+0.1201
+1.1201
+1201.1201
+1202
+0.1202
+1.1202
+1202.1202
+1210
+0.1210
+1.1210
+1210.1210
+1211
+0.1211
+1.1211
+1211.1211
+1212
+0.1212
+1.1212
+1212.1212
+1220
+0.1220
+1.1220
+1220.1220
+1221
+0.1221
+1.1221
+1221.1221
+1222
+0.1222
+1.1222
+1222.1222
+2000
+0.2000
+1.2000
+2000.2000
+2001
+0.2001
+1.2001
+2001.2001
+2002
+0.2002
+1.2002
+2002.2002
+2010
+0.2010
+1.2010
+2010.2010
+2011
+0.2011
+1.2011
+2011.2011
+2012
+0.2012
+1.2012
+2012.2012
+2020
+0.2020
+1.2020
+2020.2020
+2021
+0.2021
+1.2021
+2021.2021
+2022
+0.2022
+1.2022
+2022.2022
+2100
+0.2100
+1.2100
+2100.2100
+2101
+0.2101
+1.2101
+2101.2101
+2102
+0.2102
+1.2102
+2102.2102
+2110
+0.2110
+1.2110
+2110.2110
+2111
+0.2111
+1.2111
+2111.2111
+2112
+0.2112
+1.2112
+2112.2112
+2120
+0.2120
+1.2120
+2120.2120
+2121
+0.2121
+1.2121
+2121.2121
+2122
+0.2122
+1.2122
+2122.2122
+2200
+0.2200
+1.2200
+2200.2200
+2201
+0.2201
+1.2201
+2201.2201
+2202
+0.2202
+1.2202
+2202.2202
+2210
+0.2210
+1.2210
+2210.2210
+2211
+0.2211
+1.2211
+2211.2211
+2212
+0.2212
+1.2212
+2212.2212
+2220
+0.2220
+1.2220
+2220.2220
+2221
+0.2221
+1.2221
+2221.2221
+2222
+0.2222
+1.2222
+2222.2222
+10000
+0.10000
+1.10000
+10000.10000
+10001
+0.10001
+1.10001
+10001.10001
+10002
+0.10002
+1.10002
+10002.10002
+10010
+0.10010
+1.10010
+10010.10010
+10011
+0.10011
+1.10011
+10011.10011
+10012
+0.10012
+1.10012
+10012.10012
+10020
+0.10020
+1.10020
+10020.10020
+10021
+0.10021
+1.10021
+10021.10021
+10022
+0.10022
+1.10022
+10022.10022
+10100
+0.10100
+1.10100
+10100.10100
+10101
+0.10101
+1.10101
+10101.10101
+10102
+0.10102
+1.10102
+10102.10102
+10110
+0.10110
+1.10110
+10110.10110
+10111
+0.10111
+1.10111
+10111.10111
+10112
+0.10112
+1.10112
+10112.10112
+10120
+0.10120
+1.10120
+10120.10120
+10121
+0.10121
+1.10121
+10121.10121
+10122
+0.10122
+1.10122
+10122.10122
+10200
+0.10200
+1.10200
+10200.10200
+10201
+0.10201
+1.10201
+10201.10201
+10202
+0.10202
+1.10202
+10202.10202
+10210
+0.10210
+1.10210
+10210.10210
+10211
+0.10211
+1.10211
+10211.10211
+10212
+0.10212
+1.10212
+10212.10212
+10220
+0.10220
+1.10220
+10220.10220
+10221
+0.10221
+1.10221
+10221.10221
+10222
+0.10222
+1.10222
+10222.10222
+11000
+0.11000
+1.11000
+11000.11000
+11001
+0.11001
+1.11001
+11001.11001
+11002
+0.11002
+1.11002
+11002.11002
+11010
+0.11010
+1.11010
+11010.11010
+11011
+0.11011
+1.11011
+11011.11011
+11012
+0.11012
+1.11012
+11012.11012
+11020
+0.11020
+1.11020
+11020.11020
+11021
+0.11021
+1.11021
+11021.11021
+11022
+0.11022
+1.11022
+11022.11022
+11100
+0.11100
+1.11100
+11100.11100
+11101
+0.11101
+1.11101
+11101.11101
+11102
+0.11102
+1.11102
+11102.11102
+11110
+0.11110
+1.11110
+11110.11110
+11111
+0.11111
+1.11111
+11111.11111
+11112
+0.11112
+1.11112
+11112.11112
+11120
+0.11120
+1.11120
+11120.11120
+11121
+0.11121
+1.11121
+11121.11121
+11122
+0.11122
+1.11122
+11122.11122
+11200
+0.11200
+1.11200
+11200.11200
+11201
+0.11201
+1.11201
+11201.11201
+11202
+0.11202
+1.11202
+11202.11202
+11210
+0.11210
+1.11210
+11210.11210
+11211
+0.11211
+1.11211
+11211.11211
+11212
+0.11212
+1.11212
+11212.11212
+11220
+0.11220
+1.11220
+11220.11220
+11221
+0.11221
+1.11221
+11221.11221
+11222
+0.11222
+1.11222
+11222.11222
+12000
+0.12000
+1.12000
+12000.12000
+12001
+0.12001
+1.12001
+12001.12001
+12002
+0.12002
+1.12002
+12002.12002
+12010
+0.12010
+1.12010
+12010.12010
+12011
+0.12011
+1.12011
+12011.12011
+12012
+0.12012
+1.12012
+12012.12012
+12020
+0.12020
+1.12020
+12020.12020
+12021
+0.12021
+1.12021
+12021.12021
+12022
+0.12022
+1.12022
+12022.12022
+12100
+0.12100
+1.12100
+12100.12100
+12101
+0.12101
+1.12101
+12101.12101
+12102
+0.12102
+1.12102
+12102.12102
+12110
+0.12110
+1.12110
+12110.12110
+12111
+0.12111
+1.12111
+12111.12111
+12112
+0.12112
+1.12112
+12112.12112
+12120
+0.12120
+1.12120
+12120.12120
+12121
+0.12121
+1.12121
+12121.12121
+12122
+0.12122
+1.12122
+12122.12122
+12200
+0.12200
+1.12200
+12200.12200
+12201
+0.12201
+1.12201
+12201.12201
+12202
+0.12202
+1.12202
+12202.12202
+12210
+0.12210
+1.12210
+12210.12210
+12211
+0.12211
+1.12211
+12211.12211
+12212
+0.12212
+1.12212
+12212.12212
+12220
+0.12220
+1.12220
+12220.12220
+12221
+0.12221
+1.12221
+12221.12221
+12222
+0.12222
+1.12222
+12222.12222
+20000
+0.20000
+1.20000
+20000.20000
+20001
+0.20001
+1.20001
+20001.20001
+20002
+0.20002
+1.20002
+20002.20002
+20010
+0.20010
+1.20010
+20010.20010
+20011
+0.20011
+1.20011
+20011.20011
+20012
+0.20012
+1.20012
+20012.20012
+20020
+0.20020
+1.20020
+20020.20020
+20021
+0.20021
+1.20021
+20021.20021
+20022
+0.20022
+1.20022
+20022.20022
+20100
+0.20100
+1.20100
+20100.20100
+20101
+0.20101
+1.20101
+20101.20101
+20102
+0.20102
+1.20102
+20102.20102
+20110
+0.20110
+1.20110
+20110.20110
+20111
+0.20111
+1.20111
+20111.20111
+20112
+0.20112
+1.20112
+20112.20112
+20120
+0.20120
+1.20120
+20120.20120
+20121
+0.20121
+1.20121
+20121.20121
+20122
+0.20122
+1.20122
+20122.20122
+20200
+0.20200
+1.20200
+20200.20200
+20201
+0.20201
+1.20201
+20201.20201
+20202
+0.20202
+1.20202
+20202.20202
+20210
+0.20210
+1.20210
+20210.20210
+20211
+0.20211
+1.20211
+20211.20211
+20212
+0.20212
+1.20212
+20212.20212
+20220
+0.20220
+1.20220
+20220.20220
+20221
+0.20221
+1.20221
+20221.20221
+20222
+0.20222
+1.20222
+20222.20222
+21000
+0.21000
+1.21000
+21000.21000
+21001
+0.21001
+1.21001
+21001.21001
+21002
+0.21002
+1.21002
+21002.21002
+21010
+0.21010
+1.21010
+21010.21010
+21011
+0.21011
+1.21011
+21011.21011
+21012
+0.21012
+1.21012
+21012.21012
+21020
+0.21020
+1.21020
+21020.21020
+21021
+0.21021
+1.21021
+21021.21021
+21022
+0.21022
+1.21022
+21022.21022
+21100
+0.21100
+1.21100
+21100.21100
+21101
+0.21101
+1.21101
+21101.21101
+21102
+0.21102
+1.21102
+21102.21102
+21110
+0.21110
+1.21110
+21110.21110
+21111
+0.21111
+1.21111
+21111.21111
+21112
+0.21112
+1.21112
+21112.21112
+21120
+0.21120
+1.21120
+21120.21120
+21121
+0.21121
+1.21121
+21121.21121
+21122
+0.21122
+1.21122
+21122.21122
+21200
+0.21200
+1.21200
+21200.21200
+21201
+0.21201
+1.21201
+21201.21201
+21202
+0.21202
+1.21202
+21202.21202
+21210
+0.21210
+1.21210
+21210.21210
+21211
+0.21211
+1.21211
+21211.21211
+21212
+0.21212
+1.21212
+21212.21212
+21220
+0.21220
+1.21220
+21220.21220
+21221
+0.21221
+1.21221
+21221.21221
+21222
+0.21222
+1.21222
+21222.21222
+22000
+0.22000
+1.22000
+22000.22000
+22001
+0.22001
+1.22001
+22001.22001
+22002
+0.22002
+1.22002
+22002.22002
+22010
+0.22010
+1.22010
+22010.22010
+22011
+0.22011
+1.22011
+22011.22011
+22012
+0.22012
+1.22012
+22012.22012
+22020
+0.22020
+1.22020
+22020.22020
+22021
+0.22021
+1.22021
+22021.22021
+22022
+0.22022
+1.22022
+22022.22022
+22100
+0.22100
+1.22100
+22100.22100
+22101
+0.22101
+1.22101
+22101.22101
+22102
+0.22102
+1.22102
+22102.22102
+22110
+0.22110
+1.22110
+22110.22110
+22111
+0.22111
+1.22111
+22111.22111
+22112
+0.22112
+1.22112
+22112.22112
+22120
+0.22120
+1.22120
+22120.22120
+22121
+0.22121
+1.22121
+22121.22121
+22122
+0.22122
+1.22122
+22122.22122
+22200
+0.22200
+1.22200
+22200.22200
+22201
+0.22201
+1.22201
+22201.22201
+22202
+0.22202
+1.22202
+22202.22202
+22210
+0.22210
+1.22210
+22210.22210
+22211
+0.22211
+1.22211
+22211.22211
+22212
+0.22212
+1.22212
+22212.22212
+22220
+0.22220
+1.22220
+22220.22220
+22221
+0.22221
+1.22221
+22221.22221
+22222
+0.22222
+1.22222
+22222.22222
+100000
+0.100000
+1.100000
+100000.100000
+100001
+0.100001
+1.100001
+100001.100001
+100002
+0.100002
+1.100002
+100002.100002
+100010
+0.100010
+1.100010
+100010.100010
+100011
+0.100011
+1.100011
+100011.100011
+100012
+0.100012
+1.100012
+100012.100012
+100020
+0.100020
+1.100020
+100020.100020
+100021
+0.100021
+1.100021
+100021.100021
+100022
+0.100022
+1.100022
+100022.100022
+100100
+0.100100
+1.100100
+100100.100100
+100101
+0.100101
+1.100101
+100101.100101
+100102
+0.100102
+1.100102
+100102.100102
+100110
+0.100110
+1.100110
+100110.100110
+100111
+0.100111
+1.100111
+100111.100111
+ibase = A; ibase = 4
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+320
+0.320
+1.320
+320.320
+321
+0.321
+1.321
+321.321
+322
+0.322
+1.322
+322.322
+323
+0.323
+1.323
+323.323
+330
+0.330
+1.330
+330.330
+331
+0.331
+1.331
+331.331
+332
+0.332
+1.332
+332.332
+333
+0.333
+1.333
+333.333
+1000
+0.1000
+1.1000
+1000.1000
+1001
+0.1001
+1.1001
+1001.1001
+1002
+0.1002
+1.1002
+1002.1002
+1003
+0.1003
+1.1003
+1003.1003
+1010
+0.1010
+1.1010
+1010.1010
+1011
+0.1011
+1.1011
+1011.1011
+1012
+0.1012
+1.1012
+1012.1012
+1013
+0.1013
+1.1013
+1013.1013
+1020
+0.1020
+1.1020
+1020.1020
+1021
+0.1021
+1.1021
+1021.1021
+1022
+0.1022
+1.1022
+1022.1022
+1023
+0.1023
+1.1023
+1023.1023
+1030
+0.1030
+1.1030
+1030.1030
+1031
+0.1031
+1.1031
+1031.1031
+1032
+0.1032
+1.1032
+1032.1032
+1033
+0.1033
+1.1033
+1033.1033
+1100
+0.1100
+1.1100
+1100.1100
+1101
+0.1101
+1.1101
+1101.1101
+1102
+0.1102
+1.1102
+1102.1102
+1103
+0.1103
+1.1103
+1103.1103
+1110
+0.1110
+1.1110
+1110.1110
+1111
+0.1111
+1.1111
+1111.1111
+1112
+0.1112
+1.1112
+1112.1112
+1113
+0.1113
+1.1113
+1113.1113
+1120
+0.1120
+1.1120
+1120.1120
+1121
+0.1121
+1.1121
+1121.1121
+1122
+0.1122
+1.1122
+1122.1122
+1123
+0.1123
+1.1123
+1123.1123
+1130
+0.1130
+1.1130
+1130.1130
+1131
+0.1131
+1.1131
+1131.1131
+1132
+0.1132
+1.1132
+1132.1132
+1133
+0.1133
+1.1133
+1133.1133
+1200
+0.1200
+1.1200
+1200.1200
+1201
+0.1201
+1.1201
+1201.1201
+1202
+0.1202
+1.1202
+1202.1202
+1203
+0.1203
+1.1203
+1203.1203
+1210
+0.1210
+1.1210
+1210.1210
+1211
+0.1211
+1.1211
+1211.1211
+1212
+0.1212
+1.1212
+1212.1212
+1213
+0.1213
+1.1213
+1213.1213
+1220
+0.1220
+1.1220
+1220.1220
+1221
+0.1221
+1.1221
+1221.1221
+1222
+0.1222
+1.1222
+1222.1222
+1223
+0.1223
+1.1223
+1223.1223
+1230
+0.1230
+1.1230
+1230.1230
+1231
+0.1231
+1.1231
+1231.1231
+1232
+0.1232
+1.1232
+1232.1232
+1233
+0.1233
+1.1233
+1233.1233
+1300
+0.1300
+1.1300
+1300.1300
+1301
+0.1301
+1.1301
+1301.1301
+1302
+0.1302
+1.1302
+1302.1302
+1303
+0.1303
+1.1303
+1303.1303
+1310
+0.1310
+1.1310
+1310.1310
+1311
+0.1311
+1.1311
+1311.1311
+1312
+0.1312
+1.1312
+1312.1312
+1313
+0.1313
+1.1313
+1313.1313
+1320
+0.1320
+1.1320
+1320.1320
+1321
+0.1321
+1.1321
+1321.1321
+1322
+0.1322
+1.1322
+1322.1322
+1323
+0.1323
+1.1323
+1323.1323
+1330
+0.1330
+1.1330
+1330.1330
+1331
+0.1331
+1.1331
+1331.1331
+1332
+0.1332
+1.1332
+1332.1332
+1333
+0.1333
+1.1333
+1333.1333
+2000
+0.2000
+1.2000
+2000.2000
+2001
+0.2001
+1.2001
+2001.2001
+2002
+0.2002
+1.2002
+2002.2002
+2003
+0.2003
+1.2003
+2003.2003
+2010
+0.2010
+1.2010
+2010.2010
+2011
+0.2011
+1.2011
+2011.2011
+2012
+0.2012
+1.2012
+2012.2012
+2013
+0.2013
+1.2013
+2013.2013
+2020
+0.2020
+1.2020
+2020.2020
+2021
+0.2021
+1.2021
+2021.2021
+2022
+0.2022
+1.2022
+2022.2022
+2023
+0.2023
+1.2023
+2023.2023
+2030
+0.2030
+1.2030
+2030.2030
+2031
+0.2031
+1.2031
+2031.2031
+2032
+0.2032
+1.2032
+2032.2032
+2033
+0.2033
+1.2033
+2033.2033
+2100
+0.2100
+1.2100
+2100.2100
+2101
+0.2101
+1.2101
+2101.2101
+2102
+0.2102
+1.2102
+2102.2102
+2103
+0.2103
+1.2103
+2103.2103
+2110
+0.2110
+1.2110
+2110.2110
+2111
+0.2111
+1.2111
+2111.2111
+2112
+0.2112
+1.2112
+2112.2112
+2113
+0.2113
+1.2113
+2113.2113
+2120
+0.2120
+1.2120
+2120.2120
+2121
+0.2121
+1.2121
+2121.2121
+2122
+0.2122
+1.2122
+2122.2122
+2123
+0.2123
+1.2123
+2123.2123
+2130
+0.2130
+1.2130
+2130.2130
+2131
+0.2131
+1.2131
+2131.2131
+2132
+0.2132
+1.2132
+2132.2132
+2133
+0.2133
+1.2133
+2133.2133
+2200
+0.2200
+1.2200
+2200.2200
+2201
+0.2201
+1.2201
+2201.2201
+2202
+0.2202
+1.2202
+2202.2202
+2203
+0.2203
+1.2203
+2203.2203
+2210
+0.2210
+1.2210
+2210.2210
+2211
+0.2211
+1.2211
+2211.2211
+2212
+0.2212
+1.2212
+2212.2212
+2213
+0.2213
+1.2213
+2213.2213
+2220
+0.2220
+1.2220
+2220.2220
+2221
+0.2221
+1.2221
+2221.2221
+2222
+0.2222
+1.2222
+2222.2222
+2223
+0.2223
+1.2223
+2223.2223
+2230
+0.2230
+1.2230
+2230.2230
+2231
+0.2231
+1.2231
+2231.2231
+2232
+0.2232
+1.2232
+2232.2232
+2233
+0.2233
+1.2233
+2233.2233
+2300
+0.2300
+1.2300
+2300.2300
+2301
+0.2301
+1.2301
+2301.2301
+2302
+0.2302
+1.2302
+2302.2302
+2303
+0.2303
+1.2303
+2303.2303
+2310
+0.2310
+1.2310
+2310.2310
+2311
+0.2311
+1.2311
+2311.2311
+2312
+0.2312
+1.2312
+2312.2312
+2313
+0.2313
+1.2313
+2313.2313
+2320
+0.2320
+1.2320
+2320.2320
+2321
+0.2321
+1.2321
+2321.2321
+2322
+0.2322
+1.2322
+2322.2322
+2323
+0.2323
+1.2323
+2323.2323
+2330
+0.2330
+1.2330
+2330.2330
+2331
+0.2331
+1.2331
+2331.2331
+2332
+0.2332
+1.2332
+2332.2332
+2333
+0.2333
+1.2333
+2333.2333
+3000
+0.3000
+1.3000
+3000.3000
+3001
+0.3001
+1.3001
+3001.3001
+3002
+0.3002
+1.3002
+3002.3002
+3003
+0.3003
+1.3003
+3003.3003
+3010
+0.3010
+1.3010
+3010.3010
+3011
+0.3011
+1.3011
+3011.3011
+3012
+0.3012
+1.3012
+3012.3012
+3013
+0.3013
+1.3013
+3013.3013
+3020
+0.3020
+1.3020
+3020.3020
+3021
+0.3021
+1.3021
+3021.3021
+3022
+0.3022
+1.3022
+3022.3022
+3023
+0.3023
+1.3023
+3023.3023
+3030
+0.3030
+1.3030
+3030.3030
+3031
+0.3031
+1.3031
+3031.3031
+3032
+0.3032
+1.3032
+3032.3032
+3033
+0.3033
+1.3033
+3033.3033
+3100
+0.3100
+1.3100
+3100.3100
+3101
+0.3101
+1.3101
+3101.3101
+3102
+0.3102
+1.3102
+3102.3102
+3103
+0.3103
+1.3103
+3103.3103
+3110
+0.3110
+1.3110
+3110.3110
+3111
+0.3111
+1.3111
+3111.3111
+3112
+0.3112
+1.3112
+3112.3112
+3113
+0.3113
+1.3113
+3113.3113
+3120
+0.3120
+1.3120
+3120.3120
+3121
+0.3121
+1.3121
+3121.3121
+3122
+0.3122
+1.3122
+3122.3122
+3123
+0.3123
+1.3123
+3123.3123
+3130
+0.3130
+1.3130
+3130.3130
+3131
+0.3131
+1.3131
+3131.3131
+3132
+0.3132
+1.3132
+3132.3132
+3133
+0.3133
+1.3133
+3133.3133
+3200
+0.3200
+1.3200
+3200.3200
+3201
+0.3201
+1.3201
+3201.3201
+3202
+0.3202
+1.3202
+3202.3202
+3203
+0.3203
+1.3203
+3203.3203
+3210
+0.3210
+1.3210
+3210.3210
+3211
+0.3211
+1.3211
+3211.3211
+3212
+0.3212
+1.3212
+3212.3212
+3213
+0.3213
+1.3213
+3213.3213
+3220
+0.3220
+1.3220
+3220.3220
+3221
+0.3221
+1.3221
+3221.3221
+3222
+0.3222
+1.3222
+3222.3222
+3223
+0.3223
+1.3223
+3223.3223
+3230
+0.3230
+1.3230
+3230.3230
+3231
+0.3231
+1.3231
+3231.3231
+3232
+0.3232
+1.3232
+3232.3232
+3233
+0.3233
+1.3233
+3233.3233
+3300
+0.3300
+1.3300
+3300.3300
+3301
+0.3301
+1.3301
+3301.3301
+3302
+0.3302
+1.3302
+3302.3302
+3303
+0.3303
+1.3303
+3303.3303
+3310
+0.3310
+1.3310
+3310.3310
+3311
+0.3311
+1.3311
+3311.3311
+3312
+0.3312
+1.3312
+3312.3312
+3313
+0.3313
+1.3313
+3313.3313
+3320
+0.3320
+1.3320
+3320.3320
+3321
+0.3321
+1.3321
+3321.3321
+3322
+0.3322
+1.3322
+3322.3322
+3323
+0.3323
+1.3323
+3323.3323
+3330
+0.3330
+1.3330
+3330.3330
+3331
+0.3331
+1.3331
+3331.3331
+3332
+0.3332
+1.3332
+3332.3332
+3333
+0.3333
+1.3333
+3333.3333
+10000
+0.10000
+1.10000
+10000.10000
+ibase = A; ibase = 5
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+304
+0.304
+1.304
+304.304
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+314
+0.314
+1.314
+314.314
+320
+0.320
+1.320
+320.320
+321
+0.321
+1.321
+321.321
+322
+0.322
+1.322
+322.322
+323
+0.323
+1.323
+323.323
+324
+0.324
+1.324
+324.324
+330
+0.330
+1.330
+330.330
+331
+0.331
+1.331
+331.331
+332
+0.332
+1.332
+332.332
+333
+0.333
+1.333
+333.333
+334
+0.334
+1.334
+334.334
+340
+0.340
+1.340
+340.340
+341
+0.341
+1.341
+341.341
+342
+0.342
+1.342
+342.342
+343
+0.343
+1.343
+343.343
+344
+0.344
+1.344
+344.344
+400
+0.400
+1.400
+400.400
+401
+0.401
+1.401
+401.401
+402
+0.402
+1.402
+402.402
+403
+0.403
+1.403
+403.403
+404
+0.404
+1.404
+404.404
+410
+0.410
+1.410
+410.410
+411
+0.411
+1.411
+411.411
+412
+0.412
+1.412
+412.412
+413
+0.413
+1.413
+413.413
+414
+0.414
+1.414
+414.414
+420
+0.420
+1.420
+420.420
+421
+0.421
+1.421
+421.421
+422
+0.422
+1.422
+422.422
+423
+0.423
+1.423
+423.423
+424
+0.424
+1.424
+424.424
+430
+0.430
+1.430
+430.430
+431
+0.431
+1.431
+431.431
+432
+0.432
+1.432
+432.432
+433
+0.433
+1.433
+433.433
+434
+0.434
+1.434
+434.434
+440
+0.440
+1.440
+440.440
+441
+0.441
+1.441
+441.441
+442
+0.442
+1.442
+442.442
+443
+0.443
+1.443
+443.443
+444
+0.444
+1.444
+444.444
+1000
+0.1000
+1.1000
+1000.1000
+1001
+0.1001
+1.1001
+1001.1001
+1002
+0.1002
+1.1002
+1002.1002
+1003
+0.1003
+1.1003
+1003.1003
+1004
+0.1004
+1.1004
+1004.1004
+1010
+0.1010
+1.1010
+1010.1010
+1011
+0.1011
+1.1011
+1011.1011
+1012
+0.1012
+1.1012
+1012.1012
+1013
+0.1013
+1.1013
+1013.1013
+1014
+0.1014
+1.1014
+1014.1014
+1020
+0.1020
+1.1020
+1020.1020
+1021
+0.1021
+1.1021
+1021.1021
+1022
+0.1022
+1.1022
+1022.1022
+1023
+0.1023
+1.1023
+1023.1023
+1024
+0.1024
+1.1024
+1024.1024
+1030
+0.1030
+1.1030
+1030.1030
+1031
+0.1031
+1.1031
+1031.1031
+1032
+0.1032
+1.1032
+1032.1032
+1033
+0.1033
+1.1033
+1033.1033
+1034
+0.1034
+1.1034
+1034.1034
+1040
+0.1040
+1.1040
+1040.1040
+1041
+0.1041
+1.1041
+1041.1041
+1042
+0.1042
+1.1042
+1042.1042
+1043
+0.1043
+1.1043
+1043.1043
+1044
+0.1044
+1.1044
+1044.1044
+1100
+0.1100
+1.1100
+1100.1100
+1101
+0.1101
+1.1101
+1101.1101
+1102
+0.1102
+1.1102
+1102.1102
+1103
+0.1103
+1.1103
+1103.1103
+1104
+0.1104
+1.1104
+1104.1104
+1110
+0.1110
+1.1110
+1110.1110
+1111
+0.1111
+1.1111
+1111.1111
+1112
+0.1112
+1.1112
+1112.1112
+1113
+0.1113
+1.1113
+1113.1113
+1114
+0.1114
+1.1114
+1114.1114
+1120
+0.1120
+1.1120
+1120.1120
+1121
+0.1121
+1.1121
+1121.1121
+1122
+0.1122
+1.1122
+1122.1122
+1123
+0.1123
+1.1123
+1123.1123
+1124
+0.1124
+1.1124
+1124.1124
+1130
+0.1130
+1.1130
+1130.1130
+1131
+0.1131
+1.1131
+1131.1131
+1132
+0.1132
+1.1132
+1132.1132
+1133
+0.1133
+1.1133
+1133.1133
+1134
+0.1134
+1.1134
+1134.1134
+1140
+0.1140
+1.1140
+1140.1140
+1141
+0.1141
+1.1141
+1141.1141
+1142
+0.1142
+1.1142
+1142.1142
+1143
+0.1143
+1.1143
+1143.1143
+1144
+0.1144
+1.1144
+1144.1144
+1200
+0.1200
+1.1200
+1200.1200
+1201
+0.1201
+1.1201
+1201.1201
+1202
+0.1202
+1.1202
+1202.1202
+1203
+0.1203
+1.1203
+1203.1203
+1204
+0.1204
+1.1204
+1204.1204
+1210
+0.1210
+1.1210
+1210.1210
+1211
+0.1211
+1.1211
+1211.1211
+1212
+0.1212
+1.1212
+1212.1212
+1213
+0.1213
+1.1213
+1213.1213
+1214
+0.1214
+1.1214
+1214.1214
+1220
+0.1220
+1.1220
+1220.1220
+1221
+0.1221
+1.1221
+1221.1221
+1222
+0.1222
+1.1222
+1222.1222
+1223
+0.1223
+1.1223
+1223.1223
+1224
+0.1224
+1.1224
+1224.1224
+1230
+0.1230
+1.1230
+1230.1230
+1231
+0.1231
+1.1231
+1231.1231
+1232
+0.1232
+1.1232
+1232.1232
+1233
+0.1233
+1.1233
+1233.1233
+1234
+0.1234
+1.1234
+1234.1234
+1240
+0.1240
+1.1240
+1240.1240
+1241
+0.1241
+1.1241
+1241.1241
+1242
+0.1242
+1.1242
+1242.1242
+1243
+0.1243
+1.1243
+1243.1243
+1244
+0.1244
+1.1244
+1244.1244
+1300
+0.1300
+1.1300
+1300.1300
+1301
+0.1301
+1.1301
+1301.1301
+1302
+0.1302
+1.1302
+1302.1302
+1303
+0.1303
+1.1303
+1303.1303
+1304
+0.1304
+1.1304
+1304.1304
+1310
+0.1310
+1.1310
+1310.1310
+1311
+0.1311
+1.1311
+1311.1311
+1312
+0.1312
+1.1312
+1312.1312
+1313
+0.1313
+1.1313
+1313.1313
+1314
+0.1314
+1.1314
+1314.1314
+1320
+0.1320
+1.1320
+1320.1320
+1321
+0.1321
+1.1321
+1321.1321
+1322
+0.1322
+1.1322
+1322.1322
+1323
+0.1323
+1.1323
+1323.1323
+1324
+0.1324
+1.1324
+1324.1324
+1330
+0.1330
+1.1330
+1330.1330
+1331
+0.1331
+1.1331
+1331.1331
+1332
+0.1332
+1.1332
+1332.1332
+1333
+0.1333
+1.1333
+1333.1333
+1334
+0.1334
+1.1334
+1334.1334
+1340
+0.1340
+1.1340
+1340.1340
+1341
+0.1341
+1.1341
+1341.1341
+1342
+0.1342
+1.1342
+1342.1342
+1343
+0.1343
+1.1343
+1343.1343
+1344
+0.1344
+1.1344
+1344.1344
+1400
+0.1400
+1.1400
+1400.1400
+1401
+0.1401
+1.1401
+1401.1401
+1402
+0.1402
+1.1402
+1402.1402
+1403
+0.1403
+1.1403
+1403.1403
+1404
+0.1404
+1.1404
+1404.1404
+1410
+0.1410
+1.1410
+1410.1410
+1411
+0.1411
+1.1411
+1411.1411
+1412
+0.1412
+1.1412
+1412.1412
+1413
+0.1413
+1.1413
+1413.1413
+1414
+0.1414
+1.1414
+1414.1414
+1420
+0.1420
+1.1420
+1420.1420
+1421
+0.1421
+1.1421
+1421.1421
+1422
+0.1422
+1.1422
+1422.1422
+1423
+0.1423
+1.1423
+1423.1423
+1424
+0.1424
+1.1424
+1424.1424
+1430
+0.1430
+1.1430
+1430.1430
+1431
+0.1431
+1.1431
+1431.1431
+1432
+0.1432
+1.1432
+1432.1432
+1433
+0.1433
+1.1433
+1433.1433
+1434
+0.1434
+1.1434
+1434.1434
+1440
+0.1440
+1.1440
+1440.1440
+1441
+0.1441
+1.1441
+1441.1441
+1442
+0.1442
+1.1442
+1442.1442
+1443
+0.1443
+1.1443
+1443.1443
+1444
+0.1444
+1.1444
+1444.1444
+2000
+0.2000
+1.2000
+2000.2000
+2001
+0.2001
+1.2001
+2001.2001
+2002
+0.2002
+1.2002
+2002.2002
+2003
+0.2003
+1.2003
+2003.2003
+2004
+0.2004
+1.2004
+2004.2004
+2010
+0.2010
+1.2010
+2010.2010
+2011
+0.2011
+1.2011
+2011.2011
+ibase = A; ibase = 6
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+304
+0.304
+1.304
+304.304
+305
+0.305
+1.305
+305.305
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+314
+0.314
+1.314
+314.314
+315
+0.315
+1.315
+315.315
+320
+0.320
+1.320
+320.320
+321
+0.321
+1.321
+321.321
+322
+0.322
+1.322
+322.322
+323
+0.323
+1.323
+323.323
+324
+0.324
+1.324
+324.324
+325
+0.325
+1.325
+325.325
+330
+0.330
+1.330
+330.330
+331
+0.331
+1.331
+331.331
+332
+0.332
+1.332
+332.332
+333
+0.333
+1.333
+333.333
+334
+0.334
+1.334
+334.334
+335
+0.335
+1.335
+335.335
+340
+0.340
+1.340
+340.340
+341
+0.341
+1.341
+341.341
+342
+0.342
+1.342
+342.342
+343
+0.343
+1.343
+343.343
+344
+0.344
+1.344
+344.344
+345
+0.345
+1.345
+345.345
+350
+0.350
+1.350
+350.350
+351
+0.351
+1.351
+351.351
+352
+0.352
+1.352
+352.352
+353
+0.353
+1.353
+353.353
+354
+0.354
+1.354
+354.354
+355
+0.355
+1.355
+355.355
+400
+0.400
+1.400
+400.400
+401
+0.401
+1.401
+401.401
+402
+0.402
+1.402
+402.402
+403
+0.403
+1.403
+403.403
+404
+0.404
+1.404
+404.404
+405
+0.405
+1.405
+405.405
+410
+0.410
+1.410
+410.410
+411
+0.411
+1.411
+411.411
+412
+0.412
+1.412
+412.412
+413
+0.413
+1.413
+413.413
+414
+0.414
+1.414
+414.414
+415
+0.415
+1.415
+415.415
+420
+0.420
+1.420
+420.420
+421
+0.421
+1.421
+421.421
+422
+0.422
+1.422
+422.422
+423
+0.423
+1.423
+423.423
+424
+0.424
+1.424
+424.424
+425
+0.425
+1.425
+425.425
+430
+0.430
+1.430
+430.430
+431
+0.431
+1.431
+431.431
+432
+0.432
+1.432
+432.432
+433
+0.433
+1.433
+433.433
+434
+0.434
+1.434
+434.434
+435
+0.435
+1.435
+435.435
+440
+0.440
+1.440
+440.440
+441
+0.441
+1.441
+441.441
+442
+0.442
+1.442
+442.442
+443
+0.443
+1.443
+443.443
+444
+0.444
+1.444
+444.444
+445
+0.445
+1.445
+445.445
+450
+0.450
+1.450
+450.450
+451
+0.451
+1.451
+451.451
+452
+0.452
+1.452
+452.452
+453
+0.453
+1.453
+453.453
+454
+0.454
+1.454
+454.454
+455
+0.455
+1.455
+455.455
+500
+0.500
+1.500
+500.500
+501
+0.501
+1.501
+501.501
+502
+0.502
+1.502
+502.502
+503
+0.503
+1.503
+503.503
+504
+0.504
+1.504
+504.504
+505
+0.505
+1.505
+505.505
+510
+0.510
+1.510
+510.510
+511
+0.511
+1.511
+511.511
+512
+0.512
+1.512
+512.512
+513
+0.513
+1.513
+513.513
+514
+0.514
+1.514
+514.514
+515
+0.515
+1.515
+515.515
+520
+0.520
+1.520
+520.520
+521
+0.521
+1.521
+521.521
+522
+0.522
+1.522
+522.522
+523
+0.523
+1.523
+523.523
+524
+0.524
+1.524
+524.524
+525
+0.525
+1.525
+525.525
+530
+0.530
+1.530
+530.530
+531
+0.531
+1.531
+531.531
+532
+0.532
+1.532
+532.532
+533
+0.533
+1.533
+533.533
+534
+0.534
+1.534
+534.534
+535
+0.535
+1.535
+535.535
+540
+0.540
+1.540
+540.540
+541
+0.541
+1.541
+541.541
+542
+0.542
+1.542
+542.542
+543
+0.543
+1.543
+543.543
+544
+0.544
+1.544
+544.544
+545
+0.545
+1.545
+545.545
+550
+0.550
+1.550
+550.550
+551
+0.551
+1.551
+551.551
+552
+0.552
+1.552
+552.552
+553
+0.553
+1.553
+553.553
+554
+0.554
+1.554
+554.554
+555
+0.555
+1.555
+555.555
+1000
+0.1000
+1.1000
+1000.1000
+1001
+0.1001
+1.1001
+1001.1001
+1002
+0.1002
+1.1002
+1002.1002
+1003
+0.1003
+1.1003
+1003.1003
+1004
+0.1004
+1.1004
+1004.1004
+1005
+0.1005
+1.1005
+1005.1005
+1010
+0.1010
+1.1010
+1010.1010
+1011
+0.1011
+1.1011
+1011.1011
+1012
+0.1012
+1.1012
+1012.1012
+1013
+0.1013
+1.1013
+1013.1013
+1014
+0.1014
+1.1014
+1014.1014
+1015
+0.1015
+1.1015
+1015.1015
+1020
+0.1020
+1.1020
+1020.1020
+1021
+0.1021
+1.1021
+1021.1021
+1022
+0.1022
+1.1022
+1022.1022
+1023
+0.1023
+1.1023
+1023.1023
+1024
+0.1024
+1.1024
+1024.1024
+1025
+0.1025
+1.1025
+1025.1025
+1030
+0.1030
+1.1030
+1030.1030
+1031
+0.1031
+1.1031
+1031.1031
+1032
+0.1032
+1.1032
+1032.1032
+1033
+0.1033
+1.1033
+1033.1033
+1034
+0.1034
+1.1034
+1034.1034
+1035
+0.1035
+1.1035
+1035.1035
+1040
+0.1040
+1.1040
+1040.1040
+1041
+0.1041
+1.1041
+1041.1041
+1042
+0.1042
+1.1042
+1042.1042
+1043
+0.1043
+1.1043
+1043.1043
+1044
+0.1044
+1.1044
+1044.1044
+1045
+0.1045
+1.1045
+1045.1045
+1050
+0.1050
+1.1050
+1050.1050
+1051
+0.1051
+1.1051
+1051.1051
+1052
+0.1052
+1.1052
+1052.1052
+1053
+0.1053
+1.1053
+1053.1053
+1054
+0.1054
+1.1054
+1054.1054
+1055
+0.1055
+1.1055
+1055.1055
+1100
+0.1100
+1.1100
+1100.1100
+1101
+0.1101
+1.1101
+1101.1101
+1102
+0.1102
+1.1102
+1102.1102
+1103
+0.1103
+1.1103
+1103.1103
+1104
+0.1104
+1.1104
+1104.1104
+ibase = A; ibase = 7
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+226
+0.226
+1.226
+226.226
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+236
+0.236
+1.236
+236.236
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+246
+0.246
+1.246
+246.246
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+256
+0.256
+1.256
+256.256
+260
+0.260
+1.260
+260.260
+261
+0.261
+1.261
+261.261
+262
+0.262
+1.262
+262.262
+263
+0.263
+1.263
+263.263
+264
+0.264
+1.264
+264.264
+265
+0.265
+1.265
+265.265
+266
+0.266
+1.266
+266.266
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+304
+0.304
+1.304
+304.304
+305
+0.305
+1.305
+305.305
+306
+0.306
+1.306
+306.306
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+314
+0.314
+1.314
+314.314
+315
+0.315
+1.315
+315.315
+316
+0.316
+1.316
+316.316
+320
+0.320
+1.320
+320.320
+321
+0.321
+1.321
+321.321
+322
+0.322
+1.322
+322.322
+323
+0.323
+1.323
+323.323
+324
+0.324
+1.324
+324.324
+325
+0.325
+1.325
+325.325
+326
+0.326
+1.326
+326.326
+330
+0.330
+1.330
+330.330
+331
+0.331
+1.331
+331.331
+332
+0.332
+1.332
+332.332
+333
+0.333
+1.333
+333.333
+334
+0.334
+1.334
+334.334
+335
+0.335
+1.335
+335.335
+336
+0.336
+1.336
+336.336
+340
+0.340
+1.340
+340.340
+341
+0.341
+1.341
+341.341
+342
+0.342
+1.342
+342.342
+343
+0.343
+1.343
+343.343
+344
+0.344
+1.344
+344.344
+345
+0.345
+1.345
+345.345
+346
+0.346
+1.346
+346.346
+350
+0.350
+1.350
+350.350
+351
+0.351
+1.351
+351.351
+352
+0.352
+1.352
+352.352
+353
+0.353
+1.353
+353.353
+354
+0.354
+1.354
+354.354
+355
+0.355
+1.355
+355.355
+356
+0.356
+1.356
+356.356
+360
+0.360
+1.360
+360.360
+361
+0.361
+1.361
+361.361
+362
+0.362
+1.362
+362.362
+363
+0.363
+1.363
+363.363
+364
+0.364
+1.364
+364.364
+365
+0.365
+1.365
+365.365
+366
+0.366
+1.366
+366.366
+400
+0.400
+1.400
+400.400
+401
+0.401
+1.401
+401.401
+402
+0.402
+1.402
+402.402
+403
+0.403
+1.403
+403.403
+404
+0.404
+1.404
+404.404
+405
+0.405
+1.405
+405.405
+406
+0.406
+1.406
+406.406
+410
+0.410
+1.410
+410.410
+411
+0.411
+1.411
+411.411
+412
+0.412
+1.412
+412.412
+413
+0.413
+1.413
+413.413
+414
+0.414
+1.414
+414.414
+415
+0.415
+1.415
+415.415
+416
+0.416
+1.416
+416.416
+420
+0.420
+1.420
+420.420
+421
+0.421
+1.421
+421.421
+422
+0.422
+1.422
+422.422
+423
+0.423
+1.423
+423.423
+424
+0.424
+1.424
+424.424
+425
+0.425
+1.425
+425.425
+426
+0.426
+1.426
+426.426
+430
+0.430
+1.430
+430.430
+431
+0.431
+1.431
+431.431
+432
+0.432
+1.432
+432.432
+433
+0.433
+1.433
+433.433
+434
+0.434
+1.434
+434.434
+435
+0.435
+1.435
+435.435
+436
+0.436
+1.436
+436.436
+440
+0.440
+1.440
+440.440
+441
+0.441
+1.441
+441.441
+442
+0.442
+1.442
+442.442
+443
+0.443
+1.443
+443.443
+444
+0.444
+1.444
+444.444
+445
+0.445
+1.445
+445.445
+446
+0.446
+1.446
+446.446
+450
+0.450
+1.450
+450.450
+451
+0.451
+1.451
+451.451
+452
+0.452
+1.452
+452.452
+453
+0.453
+1.453
+453.453
+454
+0.454
+1.454
+454.454
+455
+0.455
+1.455
+455.455
+456
+0.456
+1.456
+456.456
+460
+0.460
+1.460
+460.460
+461
+0.461
+1.461
+461.461
+462
+0.462
+1.462
+462.462
+463
+0.463
+1.463
+463.463
+464
+0.464
+1.464
+464.464
+465
+0.465
+1.465
+465.465
+466
+0.466
+1.466
+466.466
+500
+0.500
+1.500
+500.500
+501
+0.501
+1.501
+501.501
+502
+0.502
+1.502
+502.502
+503
+0.503
+1.503
+503.503
+504
+0.504
+1.504
+504.504
+505
+0.505
+1.505
+505.505
+506
+0.506
+1.506
+506.506
+510
+0.510
+1.510
+510.510
+511
+0.511
+1.511
+511.511
+512
+0.512
+1.512
+512.512
+513
+0.513
+1.513
+513.513
+514
+0.514
+1.514
+514.514
+ibase = A; ibase = 8
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+217
+0.217
+1.217
+217.217
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+226
+0.226
+1.226
+226.226
+227
+0.227
+1.227
+227.227
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+236
+0.236
+1.236
+236.236
+237
+0.237
+1.237
+237.237
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+246
+0.246
+1.246
+246.246
+247
+0.247
+1.247
+247.247
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+256
+0.256
+1.256
+256.256
+257
+0.257
+1.257
+257.257
+260
+0.260
+1.260
+260.260
+261
+0.261
+1.261
+261.261
+262
+0.262
+1.262
+262.262
+263
+0.263
+1.263
+263.263
+264
+0.264
+1.264
+264.264
+265
+0.265
+1.265
+265.265
+266
+0.266
+1.266
+266.266
+267
+0.267
+1.267
+267.267
+270
+0.270
+1.270
+270.270
+271
+0.271
+1.271
+271.271
+272
+0.272
+1.272
+272.272
+273
+0.273
+1.273
+273.273
+274
+0.274
+1.274
+274.274
+275
+0.275
+1.275
+275.275
+276
+0.276
+1.276
+276.276
+277
+0.277
+1.277
+277.277
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+304
+0.304
+1.304
+304.304
+305
+0.305
+1.305
+305.305
+306
+0.306
+1.306
+306.306
+307
+0.307
+1.307
+307.307
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+314
+0.314
+1.314
+314.314
+315
+0.315
+1.315
+315.315
+316
+0.316
+1.316
+316.316
+317
+0.317
+1.317
+317.317
+320
+0.320
+1.320
+320.320
+321
+0.321
+1.321
+321.321
+322
+0.322
+1.322
+322.322
+323
+0.323
+1.323
+323.323
+324
+0.324
+1.324
+324.324
+325
+0.325
+1.325
+325.325
+326
+0.326
+1.326
+326.326
+327
+0.327
+1.327
+327.327
+330
+0.330
+1.330
+330.330
+331
+0.331
+1.331
+331.331
+332
+0.332
+1.332
+332.332
+333
+0.333
+1.333
+333.333
+334
+0.334
+1.334
+334.334
+335
+0.335
+1.335
+335.335
+336
+0.336
+1.336
+336.336
+337
+0.337
+1.337
+337.337
+340
+0.340
+1.340
+340.340
+341
+0.341
+1.341
+341.341
+342
+0.342
+1.342
+342.342
+343
+0.343
+1.343
+343.343
+344
+0.344
+1.344
+344.344
+345
+0.345
+1.345
+345.345
+346
+0.346
+1.346
+346.346
+347
+0.347
+1.347
+347.347
+350
+0.350
+1.350
+350.350
+351
+0.351
+1.351
+351.351
+352
+0.352
+1.352
+352.352
+353
+0.353
+1.353
+353.353
+354
+0.354
+1.354
+354.354
+355
+0.355
+1.355
+355.355
+356
+0.356
+1.356
+356.356
+357
+0.357
+1.357
+357.357
+360
+0.360
+1.360
+360.360
+361
+0.361
+1.361
+361.361
+362
+0.362
+1.362
+362.362
+363
+0.363
+1.363
+363.363
+364
+0.364
+1.364
+364.364
+365
+0.365
+1.365
+365.365
+366
+0.366
+1.366
+366.366
+367
+0.367
+1.367
+367.367
+370
+0.370
+1.370
+370.370
+371
+0.371
+1.371
+371.371
+372
+0.372
+1.372
+372.372
+373
+0.373
+1.373
+373.373
+374
+0.374
+1.374
+374.374
+375
+0.375
+1.375
+375.375
+376
+0.376
+1.376
+376.376
+377
+0.377
+1.377
+377.377
+400
+0.400
+1.400
+400.400
+ibase = A; ibase = 9
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+208
+0.208
+1.208
+208.208
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+217
+0.217
+1.217
+217.217
+218
+0.218
+1.218
+218.218
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+226
+0.226
+1.226
+226.226
+227
+0.227
+1.227
+227.227
+228
+0.228
+1.228
+228.228
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+236
+0.236
+1.236
+236.236
+237
+0.237
+1.237
+237.237
+238
+0.238
+1.238
+238.238
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+246
+0.246
+1.246
+246.246
+247
+0.247
+1.247
+247.247
+248
+0.248
+1.248
+248.248
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+256
+0.256
+1.256
+256.256
+257
+0.257
+1.257
+257.257
+258
+0.258
+1.258
+258.258
+260
+0.260
+1.260
+260.260
+261
+0.261
+1.261
+261.261
+262
+0.262
+1.262
+262.262
+263
+0.263
+1.263
+263.263
+264
+0.264
+1.264
+264.264
+265
+0.265
+1.265
+265.265
+266
+0.266
+1.266
+266.266
+267
+0.267
+1.267
+267.267
+268
+0.268
+1.268
+268.268
+270
+0.270
+1.270
+270.270
+271
+0.271
+1.271
+271.271
+272
+0.272
+1.272
+272.272
+273
+0.273
+1.273
+273.273
+274
+0.274
+1.274
+274.274
+275
+0.275
+1.275
+275.275
+276
+0.276
+1.276
+276.276
+277
+0.277
+1.277
+277.277
+278
+0.278
+1.278
+278.278
+280
+0.280
+1.280
+280.280
+281
+0.281
+1.281
+281.281
+282
+0.282
+1.282
+282.282
+283
+0.283
+1.283
+283.283
+284
+0.284
+1.284
+284.284
+285
+0.285
+1.285
+285.285
+286
+0.286
+1.286
+286.286
+287
+0.287
+1.287
+287.287
+288
+0.288
+1.288
+288.288
+300
+0.300
+1.300
+300.300
+301
+0.301
+1.301
+301.301
+302
+0.302
+1.302
+302.302
+303
+0.303
+1.303
+303.303
+304
+0.304
+1.304
+304.304
+305
+0.305
+1.305
+305.305
+306
+0.306
+1.306
+306.306
+307
+0.307
+1.307
+307.307
+308
+0.308
+1.308
+308.308
+310
+0.310
+1.310
+310.310
+311
+0.311
+1.311
+311.311
+312
+0.312
+1.312
+312.312
+313
+0.313
+1.313
+313.313
+314
+0.314
+1.314
+314.314
+ibase = A; ibase = 11
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+10A
+0.10A
+1.10A
+10A.10A
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+11A
+0.11A
+1.11A
+11A.11A
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+12A
+0.12A
+1.12A
+12A.12A
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+13A
+0.13A
+1.13A
+13A.13A
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+14A
+0.14A
+1.14A
+14A.14A
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+15A
+0.15A
+1.15A
+15A.15A
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+16A
+0.16A
+1.16A
+16A.16A
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+17A
+0.17A
+1.17A
+17A.17A
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+18A
+0.18A
+1.18A
+18A.18A
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+195
+0.195
+1.195
+195.195
+196
+0.196
+1.196
+196.196
+197
+0.197
+1.197
+197.197
+198
+0.198
+1.198
+198.198
+199
+0.199
+1.199
+199.199
+19A
+0.19A
+1.19A
+19A.19A
+1A0
+0.1A0
+1.1A0
+1A0.1A0
+1A1
+0.1A1
+1.1A1
+1A1.1A1
+1A2
+0.1A2
+1.1A2
+1A2.1A2
+1A3
+0.1A3
+1.1A3
+1A3.1A3
+1A4
+0.1A4
+1.1A4
+1A4.1A4
+1A5
+0.1A5
+1.1A5
+1A5.1A5
+1A6
+0.1A6
+1.1A6
+1A6.1A6
+1A7
+0.1A7
+1.1A7
+1A7.1A7
+1A8
+0.1A8
+1.1A8
+1A8.1A8
+1A9
+0.1A9
+1.1A9
+1A9.1A9
+1AA
+0.1AA
+1.1AA
+1AA.1AA
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+208
+0.208
+1.208
+208.208
+209
+0.209
+1.209
+209.209
+20A
+0.20A
+1.20A
+20A.20A
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+ibase = A; ibase = 12
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+B
+0.B
+1.B
+B.B
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+1B
+0.1B
+1.1B
+1B.1B
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+2B
+0.2B
+1.2B
+2B.2B
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+3B
+0.3B
+1.3B
+3B.3B
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+4B
+0.4B
+1.4B
+4B.4B
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+5B
+0.5B
+1.5B
+5B.5B
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+6B
+0.6B
+1.6B
+6B.6B
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+7B
+0.7B
+1.7B
+7B.7B
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+8B
+0.8B
+1.8B
+8B.8B
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+9B
+0.9B
+1.9B
+9B.9B
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+AB
+0.AB
+1.AB
+AB.AB
+B0
+0.B0
+1.B0
+B0.B0
+B1
+0.B1
+1.B1
+B1.B1
+B2
+0.B2
+1.B2
+B2.B2
+B3
+0.B3
+1.B3
+B3.B3
+B4
+0.B4
+1.B4
+B4.B4
+B5
+0.B5
+1.B5
+B5.B5
+B6
+0.B6
+1.B6
+B6.B6
+B7
+0.B7
+1.B7
+B7.B7
+B8
+0.B8
+1.B8
+B8.B8
+B9
+0.B9
+1.B9
+B9.B9
+BA
+0.BA
+1.BA
+BA.BA
+BB
+0.BB
+1.BB
+BB.BB
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+10A
+0.10A
+1.10A
+10A.10A
+10B
+0.10B
+1.10B
+10B.10B
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+11A
+0.11A
+1.11A
+11A.11A
+11B
+0.11B
+1.11B
+11B.11B
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+12A
+0.12A
+1.12A
+12A.12A
+12B
+0.12B
+1.12B
+12B.12B
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+13A
+0.13A
+1.13A
+13A.13A
+13B
+0.13B
+1.13B
+13B.13B
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+14A
+0.14A
+1.14A
+14A.14A
+14B
+0.14B
+1.14B
+14B.14B
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+15A
+0.15A
+1.15A
+15A.15A
+15B
+0.15B
+1.15B
+15B.15B
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+16A
+0.16A
+1.16A
+16A.16A
+16B
+0.16B
+1.16B
+16B.16B
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+17A
+0.17A
+1.17A
+17A.17A
+17B
+0.17B
+1.17B
+17B.17B
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+18A
+0.18A
+1.18A
+18A.18A
+18B
+0.18B
+1.18B
+18B.18B
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+ibase = A; ibase = 13
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+B
+0.B
+1.B
+B.B
+C
+0.C
+1.C
+C.C
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+1B
+0.1B
+1.1B
+1B.1B
+1C
+0.1C
+1.1C
+1C.1C
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+2B
+0.2B
+1.2B
+2B.2B
+2C
+0.2C
+1.2C
+2C.2C
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+3B
+0.3B
+1.3B
+3B.3B
+3C
+0.3C
+1.3C
+3C.3C
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+4B
+0.4B
+1.4B
+4B.4B
+4C
+0.4C
+1.4C
+4C.4C
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+5B
+0.5B
+1.5B
+5B.5B
+5C
+0.5C
+1.5C
+5C.5C
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+6B
+0.6B
+1.6B
+6B.6B
+6C
+0.6C
+1.6C
+6C.6C
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+7B
+0.7B
+1.7B
+7B.7B
+7C
+0.7C
+1.7C
+7C.7C
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+8B
+0.8B
+1.8B
+8B.8B
+8C
+0.8C
+1.8C
+8C.8C
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+9B
+0.9B
+1.9B
+9B.9B
+9C
+0.9C
+1.9C
+9C.9C
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+AB
+0.AB
+1.AB
+AB.AB
+AC
+0.AC
+1.AC
+AC.AC
+B0
+0.B0
+1.B0
+B0.B0
+B1
+0.B1
+1.B1
+B1.B1
+B2
+0.B2
+1.B2
+B2.B2
+B3
+0.B3
+1.B3
+B3.B3
+B4
+0.B4
+1.B4
+B4.B4
+B5
+0.B5
+1.B5
+B5.B5
+B6
+0.B6
+1.B6
+B6.B6
+B7
+0.B7
+1.B7
+B7.B7
+B8
+0.B8
+1.B8
+B8.B8
+B9
+0.B9
+1.B9
+B9.B9
+BA
+0.BA
+1.BA
+BA.BA
+BB
+0.BB
+1.BB
+BB.BB
+BC
+0.BC
+1.BC
+BC.BC
+C0
+0.C0
+1.C0
+C0.C0
+C1
+0.C1
+1.C1
+C1.C1
+C2
+0.C2
+1.C2
+C2.C2
+C3
+0.C3
+1.C3
+C3.C3
+C4
+0.C4
+1.C4
+C4.C4
+C5
+0.C5
+1.C5
+C5.C5
+C6
+0.C6
+1.C6
+C6.C6
+C7
+0.C7
+1.C7
+C7.C7
+C8
+0.C8
+1.C8
+C8.C8
+C9
+0.C9
+1.C9
+C9.C9
+CA
+0.CA
+1.CA
+CA.CA
+CB
+0.CB
+1.CB
+CB.CB
+CC
+0.CC
+1.CC
+CC.CC
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+10A
+0.10A
+1.10A
+10A.10A
+10B
+0.10B
+1.10B
+10B.10B
+10C
+0.10C
+1.10C
+10C.10C
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+11A
+0.11A
+1.11A
+11A.11A
+11B
+0.11B
+1.11B
+11B.11B
+11C
+0.11C
+1.11C
+11C.11C
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+12A
+0.12A
+1.12A
+12A.12A
+12B
+0.12B
+1.12B
+12B.12B
+12C
+0.12C
+1.12C
+12C.12C
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+13A
+0.13A
+1.13A
+13A.13A
+13B
+0.13B
+1.13B
+13B.13B
+13C
+0.13C
+1.13C
+13C.13C
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+14A
+0.14A
+1.14A
+14A.14A
+14B
+0.14B
+1.14B
+14B.14B
+14C
+0.14C
+1.14C
+14C.14C
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+15A
+0.15A
+1.15A
+15A.15A
+15B
+0.15B
+1.15B
+15B.15B
+15C
+0.15C
+1.15C
+15C.15C
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+ibase = A; ibase = 14
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+B
+0.B
+1.B
+B.B
+C
+0.C
+1.C
+C.C
+D
+0.D
+1.D
+D.D
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+1B
+0.1B
+1.1B
+1B.1B
+1C
+0.1C
+1.1C
+1C.1C
+1D
+0.1D
+1.1D
+1D.1D
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+2B
+0.2B
+1.2B
+2B.2B
+2C
+0.2C
+1.2C
+2C.2C
+2D
+0.2D
+1.2D
+2D.2D
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+3B
+0.3B
+1.3B
+3B.3B
+3C
+0.3C
+1.3C
+3C.3C
+3D
+0.3D
+1.3D
+3D.3D
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+4B
+0.4B
+1.4B
+4B.4B
+4C
+0.4C
+1.4C
+4C.4C
+4D
+0.4D
+1.4D
+4D.4D
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+5B
+0.5B
+1.5B
+5B.5B
+5C
+0.5C
+1.5C
+5C.5C
+5D
+0.5D
+1.5D
+5D.5D
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+6B
+0.6B
+1.6B
+6B.6B
+6C
+0.6C
+1.6C
+6C.6C
+6D
+0.6D
+1.6D
+6D.6D
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+7B
+0.7B
+1.7B
+7B.7B
+7C
+0.7C
+1.7C
+7C.7C
+7D
+0.7D
+1.7D
+7D.7D
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+8B
+0.8B
+1.8B
+8B.8B
+8C
+0.8C
+1.8C
+8C.8C
+8D
+0.8D
+1.8D
+8D.8D
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+9B
+0.9B
+1.9B
+9B.9B
+9C
+0.9C
+1.9C
+9C.9C
+9D
+0.9D
+1.9D
+9D.9D
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+AB
+0.AB
+1.AB
+AB.AB
+AC
+0.AC
+1.AC
+AC.AC
+AD
+0.AD
+1.AD
+AD.AD
+B0
+0.B0
+1.B0
+B0.B0
+B1
+0.B1
+1.B1
+B1.B1
+B2
+0.B2
+1.B2
+B2.B2
+B3
+0.B3
+1.B3
+B3.B3
+B4
+0.B4
+1.B4
+B4.B4
+B5
+0.B5
+1.B5
+B5.B5
+B6
+0.B6
+1.B6
+B6.B6
+B7
+0.B7
+1.B7
+B7.B7
+B8
+0.B8
+1.B8
+B8.B8
+B9
+0.B9
+1.B9
+B9.B9
+BA
+0.BA
+1.BA
+BA.BA
+BB
+0.BB
+1.BB
+BB.BB
+BC
+0.BC
+1.BC
+BC.BC
+BD
+0.BD
+1.BD
+BD.BD
+C0
+0.C0
+1.C0
+C0.C0
+C1
+0.C1
+1.C1
+C1.C1
+C2
+0.C2
+1.C2
+C2.C2
+C3
+0.C3
+1.C3
+C3.C3
+C4
+0.C4
+1.C4
+C4.C4
+C5
+0.C5
+1.C5
+C5.C5
+C6
+0.C6
+1.C6
+C6.C6
+C7
+0.C7
+1.C7
+C7.C7
+C8
+0.C8
+1.C8
+C8.C8
+C9
+0.C9
+1.C9
+C9.C9
+CA
+0.CA
+1.CA
+CA.CA
+CB
+0.CB
+1.CB
+CB.CB
+CC
+0.CC
+1.CC
+CC.CC
+CD
+0.CD
+1.CD
+CD.CD
+D0
+0.D0
+1.D0
+D0.D0
+D1
+0.D1
+1.D1
+D1.D1
+D2
+0.D2
+1.D2
+D2.D2
+D3
+0.D3
+1.D3
+D3.D3
+D4
+0.D4
+1.D4
+D4.D4
+D5
+0.D5
+1.D5
+D5.D5
+D6
+0.D6
+1.D6
+D6.D6
+D7
+0.D7
+1.D7
+D7.D7
+D8
+0.D8
+1.D8
+D8.D8
+D9
+0.D9
+1.D9
+D9.D9
+DA
+0.DA
+1.DA
+DA.DA
+DB
+0.DB
+1.DB
+DB.DB
+DC
+0.DC
+1.DC
+DC.DC
+DD
+0.DD
+1.DD
+DD.DD
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+10A
+0.10A
+1.10A
+10A.10A
+10B
+0.10B
+1.10B
+10B.10B
+10C
+0.10C
+1.10C
+10C.10C
+10D
+0.10D
+1.10D
+10D.10D
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+11A
+0.11A
+1.11A
+11A.11A
+11B
+0.11B
+1.11B
+11B.11B
+11C
+0.11C
+1.11C
+11C.11C
+11D
+0.11D
+1.11D
+11D.11D
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+12A
+0.12A
+1.12A
+12A.12A
+12B
+0.12B
+1.12B
+12B.12B
+12C
+0.12C
+1.12C
+12C.12C
+12D
+0.12D
+1.12D
+12D.12D
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+13A
+0.13A
+1.13A
+13A.13A
+13B
+0.13B
+1.13B
+13B.13B
+13C
+0.13C
+1.13C
+13C.13C
+13D
+0.13D
+1.13D
+13D.13D
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+ibase = A; ibase = 15
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+B
+0.B
+1.B
+B.B
+C
+0.C
+1.C
+C.C
+D
+0.D
+1.D
+D.D
+E
+0.E
+1.E
+E.E
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+1B
+0.1B
+1.1B
+1B.1B
+1C
+0.1C
+1.1C
+1C.1C
+1D
+0.1D
+1.1D
+1D.1D
+1E
+0.1E
+1.1E
+1E.1E
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+2B
+0.2B
+1.2B
+2B.2B
+2C
+0.2C
+1.2C
+2C.2C
+2D
+0.2D
+1.2D
+2D.2D
+2E
+0.2E
+1.2E
+2E.2E
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+3B
+0.3B
+1.3B
+3B.3B
+3C
+0.3C
+1.3C
+3C.3C
+3D
+0.3D
+1.3D
+3D.3D
+3E
+0.3E
+1.3E
+3E.3E
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+4B
+0.4B
+1.4B
+4B.4B
+4C
+0.4C
+1.4C
+4C.4C
+4D
+0.4D
+1.4D
+4D.4D
+4E
+0.4E
+1.4E
+4E.4E
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+5B
+0.5B
+1.5B
+5B.5B
+5C
+0.5C
+1.5C
+5C.5C
+5D
+0.5D
+1.5D
+5D.5D
+5E
+0.5E
+1.5E
+5E.5E
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+6B
+0.6B
+1.6B
+6B.6B
+6C
+0.6C
+1.6C
+6C.6C
+6D
+0.6D
+1.6D
+6D.6D
+6E
+0.6E
+1.6E
+6E.6E
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+7B
+0.7B
+1.7B
+7B.7B
+7C
+0.7C
+1.7C
+7C.7C
+7D
+0.7D
+1.7D
+7D.7D
+7E
+0.7E
+1.7E
+7E.7E
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+8B
+0.8B
+1.8B
+8B.8B
+8C
+0.8C
+1.8C
+8C.8C
+8D
+0.8D
+1.8D
+8D.8D
+8E
+0.8E
+1.8E
+8E.8E
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+9B
+0.9B
+1.9B
+9B.9B
+9C
+0.9C
+1.9C
+9C.9C
+9D
+0.9D
+1.9D
+9D.9D
+9E
+0.9E
+1.9E
+9E.9E
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+AB
+0.AB
+1.AB
+AB.AB
+AC
+0.AC
+1.AC
+AC.AC
+AD
+0.AD
+1.AD
+AD.AD
+AE
+0.AE
+1.AE
+AE.AE
+B0
+0.B0
+1.B0
+B0.B0
+B1
+0.B1
+1.B1
+B1.B1
+B2
+0.B2
+1.B2
+B2.B2
+B3
+0.B3
+1.B3
+B3.B3
+B4
+0.B4
+1.B4
+B4.B4
+B5
+0.B5
+1.B5
+B5.B5
+B6
+0.B6
+1.B6
+B6.B6
+B7
+0.B7
+1.B7
+B7.B7
+B8
+0.B8
+1.B8
+B8.B8
+B9
+0.B9
+1.B9
+B9.B9
+BA
+0.BA
+1.BA
+BA.BA
+BB
+0.BB
+1.BB
+BB.BB
+BC
+0.BC
+1.BC
+BC.BC
+BD
+0.BD
+1.BD
+BD.BD
+BE
+0.BE
+1.BE
+BE.BE
+C0
+0.C0
+1.C0
+C0.C0
+C1
+0.C1
+1.C1
+C1.C1
+C2
+0.C2
+1.C2
+C2.C2
+C3
+0.C3
+1.C3
+C3.C3
+C4
+0.C4
+1.C4
+C4.C4
+C5
+0.C5
+1.C5
+C5.C5
+C6
+0.C6
+1.C6
+C6.C6
+C7
+0.C7
+1.C7
+C7.C7
+C8
+0.C8
+1.C8
+C8.C8
+C9
+0.C9
+1.C9
+C9.C9
+CA
+0.CA
+1.CA
+CA.CA
+CB
+0.CB
+1.CB
+CB.CB
+CC
+0.CC
+1.CC
+CC.CC
+CD
+0.CD
+1.CD
+CD.CD
+CE
+0.CE
+1.CE
+CE.CE
+D0
+0.D0
+1.D0
+D0.D0
+D1
+0.D1
+1.D1
+D1.D1
+D2
+0.D2
+1.D2
+D2.D2
+D3
+0.D3
+1.D3
+D3.D3
+D4
+0.D4
+1.D4
+D4.D4
+D5
+0.D5
+1.D5
+D5.D5
+D6
+0.D6
+1.D6
+D6.D6
+D7
+0.D7
+1.D7
+D7.D7
+D8
+0.D8
+1.D8
+D8.D8
+D9
+0.D9
+1.D9
+D9.D9
+DA
+0.DA
+1.DA
+DA.DA
+DB
+0.DB
+1.DB
+DB.DB
+DC
+0.DC
+1.DC
+DC.DC
+DD
+0.DD
+1.DD
+DD.DD
+DE
+0.DE
+1.DE
+DE.DE
+E0
+0.E0
+1.E0
+E0.E0
+E1
+0.E1
+1.E1
+E1.E1
+E2
+0.E2
+1.E2
+E2.E2
+E3
+0.E3
+1.E3
+E3.E3
+E4
+0.E4
+1.E4
+E4.E4
+E5
+0.E5
+1.E5
+E5.E5
+E6
+0.E6
+1.E6
+E6.E6
+E7
+0.E7
+1.E7
+E7.E7
+E8
+0.E8
+1.E8
+E8.E8
+E9
+0.E9
+1.E9
+E9.E9
+EA
+0.EA
+1.EA
+EA.EA
+EB
+0.EB
+1.EB
+EB.EB
+EC
+0.EC
+1.EC
+EC.EC
+ED
+0.ED
+1.ED
+ED.ED
+EE
+0.EE
+1.EE
+EE.EE
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+10A
+0.10A
+1.10A
+10A.10A
+10B
+0.10B
+1.10B
+10B.10B
+10C
+0.10C
+1.10C
+10C.10C
+10D
+0.10D
+1.10D
+10D.10D
+10E
+0.10E
+1.10E
+10E.10E
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+11A
+0.11A
+1.11A
+11A.11A
+11B
+0.11B
+1.11B
+11B.11B
+11C
+0.11C
+1.11C
+11C.11C
+11D
+0.11D
+1.11D
+11D.11D
+11E
+0.11E
+1.11E
+11E.11E
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+ibase = A; ibase = 16
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+A
+0.A
+1.A
+A.A
+B
+0.B
+1.B
+B.B
+C
+0.C
+1.C
+C.C
+D
+0.D
+1.D
+D.D
+E
+0.E
+1.E
+E.E
+F
+0.F
+1.F
+F.F
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+1A
+0.1A
+1.1A
+1A.1A
+1B
+0.1B
+1.1B
+1B.1B
+1C
+0.1C
+1.1C
+1C.1C
+1D
+0.1D
+1.1D
+1D.1D
+1E
+0.1E
+1.1E
+1E.1E
+1F
+0.1F
+1.1F
+1F.1F
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+2A
+0.2A
+1.2A
+2A.2A
+2B
+0.2B
+1.2B
+2B.2B
+2C
+0.2C
+1.2C
+2C.2C
+2D
+0.2D
+1.2D
+2D.2D
+2E
+0.2E
+1.2E
+2E.2E
+2F
+0.2F
+1.2F
+2F.2F
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+3A
+0.3A
+1.3A
+3A.3A
+3B
+0.3B
+1.3B
+3B.3B
+3C
+0.3C
+1.3C
+3C.3C
+3D
+0.3D
+1.3D
+3D.3D
+3E
+0.3E
+1.3E
+3E.3E
+3F
+0.3F
+1.3F
+3F.3F
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+4A
+0.4A
+1.4A
+4A.4A
+4B
+0.4B
+1.4B
+4B.4B
+4C
+0.4C
+1.4C
+4C.4C
+4D
+0.4D
+1.4D
+4D.4D
+4E
+0.4E
+1.4E
+4E.4E
+4F
+0.4F
+1.4F
+4F.4F
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+5A
+0.5A
+1.5A
+5A.5A
+5B
+0.5B
+1.5B
+5B.5B
+5C
+0.5C
+1.5C
+5C.5C
+5D
+0.5D
+1.5D
+5D.5D
+5E
+0.5E
+1.5E
+5E.5E
+5F
+0.5F
+1.5F
+5F.5F
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+6A
+0.6A
+1.6A
+6A.6A
+6B
+0.6B
+1.6B
+6B.6B
+6C
+0.6C
+1.6C
+6C.6C
+6D
+0.6D
+1.6D
+6D.6D
+6E
+0.6E
+1.6E
+6E.6E
+6F
+0.6F
+1.6F
+6F.6F
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+7A
+0.7A
+1.7A
+7A.7A
+7B
+0.7B
+1.7B
+7B.7B
+7C
+0.7C
+1.7C
+7C.7C
+7D
+0.7D
+1.7D
+7D.7D
+7E
+0.7E
+1.7E
+7E.7E
+7F
+0.7F
+1.7F
+7F.7F
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+8A
+0.8A
+1.8A
+8A.8A
+8B
+0.8B
+1.8B
+8B.8B
+8C
+0.8C
+1.8C
+8C.8C
+8D
+0.8D
+1.8D
+8D.8D
+8E
+0.8E
+1.8E
+8E.8E
+8F
+0.8F
+1.8F
+8F.8F
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+9A
+0.9A
+1.9A
+9A.9A
+9B
+0.9B
+1.9B
+9B.9B
+9C
+0.9C
+1.9C
+9C.9C
+9D
+0.9D
+1.9D
+9D.9D
+9E
+0.9E
+1.9E
+9E.9E
+9F
+0.9F
+1.9F
+9F.9F
+A0
+0.A0
+1.A0
+A0.A0
+A1
+0.A1
+1.A1
+A1.A1
+A2
+0.A2
+1.A2
+A2.A2
+A3
+0.A3
+1.A3
+A3.A3
+A4
+0.A4
+1.A4
+A4.A4
+A5
+0.A5
+1.A5
+A5.A5
+A6
+0.A6
+1.A6
+A6.A6
+A7
+0.A7
+1.A7
+A7.A7
+A8
+0.A8
+1.A8
+A8.A8
+A9
+0.A9
+1.A9
+A9.A9
+AA
+0.AA
+1.AA
+AA.AA
+AB
+0.AB
+1.AB
+AB.AB
+AC
+0.AC
+1.AC
+AC.AC
+AD
+0.AD
+1.AD
+AD.AD
+AE
+0.AE
+1.AE
+AE.AE
+AF
+0.AF
+1.AF
+AF.AF
+B0
+0.B0
+1.B0
+B0.B0
+B1
+0.B1
+1.B1
+B1.B1
+B2
+0.B2
+1.B2
+B2.B2
+B3
+0.B3
+1.B3
+B3.B3
+B4
+0.B4
+1.B4
+B4.B4
+B5
+0.B5
+1.B5
+B5.B5
+B6
+0.B6
+1.B6
+B6.B6
+B7
+0.B7
+1.B7
+B7.B7
+B8
+0.B8
+1.B8
+B8.B8
+B9
+0.B9
+1.B9
+B9.B9
+BA
+0.BA
+1.BA
+BA.BA
+BB
+0.BB
+1.BB
+BB.BB
+BC
+0.BC
+1.BC
+BC.BC
+BD
+0.BD
+1.BD
+BD.BD
+BE
+0.BE
+1.BE
+BE.BE
+BF
+0.BF
+1.BF
+BF.BF
+C0
+0.C0
+1.C0
+C0.C0
+C1
+0.C1
+1.C1
+C1.C1
+C2
+0.C2
+1.C2
+C2.C2
+C3
+0.C3
+1.C3
+C3.C3
+C4
+0.C4
+1.C4
+C4.C4
+C5
+0.C5
+1.C5
+C5.C5
+C6
+0.C6
+1.C6
+C6.C6
+C7
+0.C7
+1.C7
+C7.C7
+C8
+0.C8
+1.C8
+C8.C8
+C9
+0.C9
+1.C9
+C9.C9
+CA
+0.CA
+1.CA
+CA.CA
+CB
+0.CB
+1.CB
+CB.CB
+CC
+0.CC
+1.CC
+CC.CC
+CD
+0.CD
+1.CD
+CD.CD
+CE
+0.CE
+1.CE
+CE.CE
+CF
+0.CF
+1.CF
+CF.CF
+D0
+0.D0
+1.D0
+D0.D0
+D1
+0.D1
+1.D1
+D1.D1
+D2
+0.D2
+1.D2
+D2.D2
+D3
+0.D3
+1.D3
+D3.D3
+D4
+0.D4
+1.D4
+D4.D4
+D5
+0.D5
+1.D5
+D5.D5
+D6
+0.D6
+1.D6
+D6.D6
+D7
+0.D7
+1.D7
+D7.D7
+D8
+0.D8
+1.D8
+D8.D8
+D9
+0.D9
+1.D9
+D9.D9
+DA
+0.DA
+1.DA
+DA.DA
+DB
+0.DB
+1.DB
+DB.DB
+DC
+0.DC
+1.DC
+DC.DC
+DD
+0.DD
+1.DD
+DD.DD
+DE
+0.DE
+1.DE
+DE.DE
+DF
+0.DF
+1.DF
+DF.DF
+E0
+0.E0
+1.E0
+E0.E0
+E1
+0.E1
+1.E1
+E1.E1
+E2
+0.E2
+1.E2
+E2.E2
+E3
+0.E3
+1.E3
+E3.E3
+E4
+0.E4
+1.E4
+E4.E4
+E5
+0.E5
+1.E5
+E5.E5
+E6
+0.E6
+1.E6
+E6.E6
+E7
+0.E7
+1.E7
+E7.E7
+E8
+0.E8
+1.E8
+E8.E8
+E9
+0.E9
+1.E9
+E9.E9
+EA
+0.EA
+1.EA
+EA.EA
+EB
+0.EB
+1.EB
+EB.EB
+EC
+0.EC
+1.EC
+EC.EC
+ED
+0.ED
+1.ED
+ED.ED
+EE
+0.EE
+1.EE
+EE.EE
+EF
+0.EF
+1.EF
+EF.EF
+F0
+0.F0
+1.F0
+F0.F0
+F1
+0.F1
+1.F1
+F1.F1
+F2
+0.F2
+1.F2
+F2.F2
+F3
+0.F3
+1.F3
+F3.F3
+F4
+0.F4
+1.F4
+F4.F4
+F5
+0.F5
+1.F5
+F5.F5
+F6
+0.F6
+1.F6
+F6.F6
+F7
+0.F7
+1.F7
+F7.F7
+F8
+0.F8
+1.F8
+F8.F8
+F9
+0.F9
+1.F9
+F9.F9
+FA
+0.FA
+1.FA
+FA.FA
+FB
+0.FB
+1.FB
+FB.FB
+FC
+0.FC
+1.FC
+FC.FC
+FD
+0.FD
+1.FD
+FD.FD
+FE
+0.FE
+1.FE
+FE.FE
+FF
+0.FF
+1.FF
+FF.FF
+100
+0.100
+1.100
+100.100
diff --git a/tests/files/bc/parse_results.txt b/tests/files/bc/parse_results.txt
new file mode 100644
index 00000000..3ea3fadc
--- /dev/null
+++ b/tests/files/bc/parse_results.txt
@@ -0,0 +1,14392 @@
+0
+0
+1.0
+0
+1
+.5
+1.5
+1.5
+2
+.50
+1.50
+2.50
+3
+.75
+1.75
+3.75
+4
+.500
+1.500
+4.500
+5
+.625
+1.625
+5.625
+6
+.750
+1.750
+6.750
+7
+.875
+1.875
+7.875
+8
+.5000
+1.5000
+8.5000
+9
+.5625
+1.5625
+9.5625
+10
+.6250
+1.6250
+10.6250
+11
+.6875
+1.6875
+11.6875
+12
+.7500
+1.7500
+12.7500
+13
+.8125
+1.8125
+13.8125
+14
+.8750
+1.8750
+14.8750
+15
+.9375
+1.9375
+15.9375
+16
+.50000
+1.50000
+16.50000
+17
+.53125
+1.53125
+17.53125
+18
+.56250
+1.56250
+18.56250
+19
+.59375
+1.59375
+19.59375
+20
+.62500
+1.62500
+20.62500
+21
+.65625
+1.65625
+21.65625
+22
+.68750
+1.68750
+22.68750
+23
+.71875
+1.71875
+23.71875
+24
+.75000
+1.75000
+24.75000
+25
+.78125
+1.78125
+25.78125
+26
+.81250
+1.81250
+26.81250
+27
+.84375
+1.84375
+27.84375
+28
+.87500
+1.87500
+28.87500
+29
+.90625
+1.90625
+29.90625
+30
+.93750
+1.93750
+30.93750
+31
+.96875
+1.96875
+31.96875
+32
+.500000
+1.500000
+32.500000
+33
+.515625
+1.515625
+33.515625
+34
+.531250
+1.531250
+34.531250
+35
+.546875
+1.546875
+35.546875
+36
+.562500
+1.562500
+36.562500
+37
+.578125
+1.578125
+37.578125
+38
+.593750
+1.593750
+38.593750
+39
+.609375
+1.609375
+39.609375
+40
+.625000
+1.625000
+40.625000
+41
+.640625
+1.640625
+41.640625
+42
+.656250
+1.656250
+42.656250
+43
+.671875
+1.671875
+43.671875
+44
+.687500
+1.687500
+44.687500
+45
+.703125
+1.703125
+45.703125
+46
+.718750
+1.718750
+46.718750
+47
+.734375
+1.734375
+47.734375
+48
+.750000
+1.750000
+48.750000
+49
+.765625
+1.765625
+49.765625
+50
+.781250
+1.781250
+50.781250
+51
+.796875
+1.796875
+51.796875
+52
+.812500
+1.812500
+52.812500
+53
+.828125
+1.828125
+53.828125
+54
+.843750
+1.843750
+54.843750
+55
+.859375
+1.859375
+55.859375
+56
+.875000
+1.875000
+56.875000
+57
+.890625
+1.890625
+57.890625
+58
+.906250
+1.906250
+58.906250
+59
+.921875
+1.921875
+59.921875
+60
+.937500
+1.937500
+60.937500
+61
+.953125
+1.953125
+61.953125
+62
+.968750
+1.968750
+62.968750
+63
+.984375
+1.984375
+63.984375
+64
+.5000000
+1.5000000
+64.5000000
+65
+.5078125
+1.5078125
+65.5078125
+66
+.5156250
+1.5156250
+66.5156250
+67
+.5234375
+1.5234375
+67.5234375
+68
+.5312500
+1.5312500
+68.5312500
+69
+.5390625
+1.5390625
+69.5390625
+70
+.5468750
+1.5468750
+70.5468750
+71
+.5546875
+1.5546875
+71.5546875
+72
+.5625000
+1.5625000
+72.5625000
+73
+.5703125
+1.5703125
+73.5703125
+74
+.5781250
+1.5781250
+74.5781250
+75
+.5859375
+1.5859375
+75.5859375
+76
+.5937500
+1.5937500
+76.5937500
+77
+.6015625
+1.6015625
+77.6015625
+78
+.6093750
+1.6093750
+78.6093750
+79
+.6171875
+1.6171875
+79.6171875
+80
+.6250000
+1.6250000
+80.6250000
+81
+.6328125
+1.6328125
+81.6328125
+82
+.6406250
+1.6406250
+82.6406250
+83
+.6484375
+1.6484375
+83.6484375
+84
+.6562500
+1.6562500
+84.6562500
+85
+.6640625
+1.6640625
+85.6640625
+86
+.6718750
+1.6718750
+86.6718750
+87
+.6796875
+1.6796875
+87.6796875
+88
+.6875000
+1.6875000
+88.6875000
+89
+.6953125
+1.6953125
+89.6953125
+90
+.7031250
+1.7031250
+90.7031250
+91
+.7109375
+1.7109375
+91.7109375
+92
+.7187500
+1.7187500
+92.7187500
+93
+.7265625
+1.7265625
+93.7265625
+94
+.7343750
+1.7343750
+94.7343750
+95
+.7421875
+1.7421875
+95.7421875
+96
+.7500000
+1.7500000
+96.7500000
+97
+.7578125
+1.7578125
+97.7578125
+98
+.7656250
+1.7656250
+98.7656250
+99
+.7734375
+1.7734375
+99.7734375
+100
+.7812500
+1.7812500
+100.7812500
+101
+.7890625
+1.7890625
+101.7890625
+102
+.7968750
+1.7968750
+102.7968750
+103
+.8046875
+1.8046875
+103.8046875
+104
+.8125000
+1.8125000
+104.8125000
+105
+.8203125
+1.8203125
+105.8203125
+106
+.8281250
+1.8281250
+106.8281250
+107
+.8359375
+1.8359375
+107.8359375
+108
+.8437500
+1.8437500
+108.8437500
+109
+.8515625
+1.8515625
+109.8515625
+110
+.8593750
+1.8593750
+110.8593750
+111
+.8671875
+1.8671875
+111.8671875
+112
+.8750000
+1.8750000
+112.8750000
+113
+.8828125
+1.8828125
+113.8828125
+114
+.8906250
+1.8906250
+114.8906250
+115
+.8984375
+1.8984375
+115.8984375
+116
+.9062500
+1.9062500
+116.9062500
+117
+.9140625
+1.9140625
+117.9140625
+118
+.9218750
+1.9218750
+118.9218750
+119
+.9296875
+1.9296875
+119.9296875
+120
+.9375000
+1.9375000
+120.9375000
+121
+.9453125
+1.9453125
+121.9453125
+122
+.9531250
+1.9531250
+122.9531250
+123
+.9609375
+1.9609375
+123.9609375
+124
+.9687500
+1.9687500
+124.9687500
+125
+.9765625
+1.9765625
+125.9765625
+126
+.9843750
+1.9843750
+126.9843750
+127
+.9921875
+1.9921875
+127.9921875
+128
+.50000000
+1.50000000
+128.50000000
+129
+.50390625
+1.50390625
+129.50390625
+130
+.50781250
+1.50781250
+130.50781250
+131
+.51171875
+1.51171875
+131.51171875
+132
+.51562500
+1.51562500
+132.51562500
+133
+.51953125
+1.51953125
+133.51953125
+134
+.52343750
+1.52343750
+134.52343750
+135
+.52734375
+1.52734375
+135.52734375
+136
+.53125000
+1.53125000
+136.53125000
+137
+.53515625
+1.53515625
+137.53515625
+138
+.53906250
+1.53906250
+138.53906250
+139
+.54296875
+1.54296875
+139.54296875
+140
+.54687500
+1.54687500
+140.54687500
+141
+.55078125
+1.55078125
+141.55078125
+142
+.55468750
+1.55468750
+142.55468750
+143
+.55859375
+1.55859375
+143.55859375
+144
+.56250000
+1.56250000
+144.56250000
+145
+.56640625
+1.56640625
+145.56640625
+146
+.57031250
+1.57031250
+146.57031250
+147
+.57421875
+1.57421875
+147.57421875
+148
+.57812500
+1.57812500
+148.57812500
+149
+.58203125
+1.58203125
+149.58203125
+150
+.58593750
+1.58593750
+150.58593750
+151
+.58984375
+1.58984375
+151.58984375
+152
+.59375000
+1.59375000
+152.59375000
+153
+.59765625
+1.59765625
+153.59765625
+154
+.60156250
+1.60156250
+154.60156250
+155
+.60546875
+1.60546875
+155.60546875
+156
+.60937500
+1.60937500
+156.60937500
+157
+.61328125
+1.61328125
+157.61328125
+158
+.61718750
+1.61718750
+158.61718750
+159
+.62109375
+1.62109375
+159.62109375
+160
+.62500000
+1.62500000
+160.62500000
+161
+.62890625
+1.62890625
+161.62890625
+162
+.63281250
+1.63281250
+162.63281250
+163
+.63671875
+1.63671875
+163.63671875
+164
+.64062500
+1.64062500
+164.64062500
+165
+.64453125
+1.64453125
+165.64453125
+166
+.64843750
+1.64843750
+166.64843750
+167
+.65234375
+1.65234375
+167.65234375
+168
+.65625000
+1.65625000
+168.65625000
+169
+.66015625
+1.66015625
+169.66015625
+170
+.66406250
+1.66406250
+170.66406250
+171
+.66796875
+1.66796875
+171.66796875
+172
+.67187500
+1.67187500
+172.67187500
+173
+.67578125
+1.67578125
+173.67578125
+174
+.67968750
+1.67968750
+174.67968750
+175
+.68359375
+1.68359375
+175.68359375
+176
+.68750000
+1.68750000
+176.68750000
+177
+.69140625
+1.69140625
+177.69140625
+178
+.69531250
+1.69531250
+178.69531250
+179
+.69921875
+1.69921875
+179.69921875
+180
+.70312500
+1.70312500
+180.70312500
+181
+.70703125
+1.70703125
+181.70703125
+182
+.71093750
+1.71093750
+182.71093750
+183
+.71484375
+1.71484375
+183.71484375
+184
+.71875000
+1.71875000
+184.71875000
+185
+.72265625
+1.72265625
+185.72265625
+186
+.72656250
+1.72656250
+186.72656250
+187
+.73046875
+1.73046875
+187.73046875
+188
+.73437500
+1.73437500
+188.73437500
+189
+.73828125
+1.73828125
+189.73828125
+190
+.74218750
+1.74218750
+190.74218750
+191
+.74609375
+1.74609375
+191.74609375
+192
+.75000000
+1.75000000
+192.75000000
+193
+.75390625
+1.75390625
+193.75390625
+194
+.75781250
+1.75781250
+194.75781250
+195
+.76171875
+1.76171875
+195.76171875
+196
+.76562500
+1.76562500
+196.76562500
+197
+.76953125
+1.76953125
+197.76953125
+198
+.77343750
+1.77343750
+198.77343750
+199
+.77734375
+1.77734375
+199.77734375
+200
+.78125000
+1.78125000
+200.78125000
+201
+.78515625
+1.78515625
+201.78515625
+202
+.78906250
+1.78906250
+202.78906250
+203
+.79296875
+1.79296875
+203.79296875
+204
+.79687500
+1.79687500
+204.79687500
+205
+.80078125
+1.80078125
+205.80078125
+206
+.80468750
+1.80468750
+206.80468750
+207
+.80859375
+1.80859375
+207.80859375
+208
+.81250000
+1.81250000
+208.81250000
+209
+.81640625
+1.81640625
+209.81640625
+210
+.82031250
+1.82031250
+210.82031250
+211
+.82421875
+1.82421875
+211.82421875
+212
+.82812500
+1.82812500
+212.82812500
+213
+.83203125
+1.83203125
+213.83203125
+214
+.83593750
+1.83593750
+214.83593750
+215
+.83984375
+1.83984375
+215.83984375
+216
+.84375000
+1.84375000
+216.84375000
+217
+.84765625
+1.84765625
+217.84765625
+218
+.85156250
+1.85156250
+218.85156250
+219
+.85546875
+1.85546875
+219.85546875
+220
+.85937500
+1.85937500
+220.85937500
+221
+.86328125
+1.86328125
+221.86328125
+222
+.86718750
+1.86718750
+222.86718750
+223
+.87109375
+1.87109375
+223.87109375
+224
+.87500000
+1.87500000
+224.87500000
+225
+.87890625
+1.87890625
+225.87890625
+226
+.88281250
+1.88281250
+226.88281250
+227
+.88671875
+1.88671875
+227.88671875
+228
+.89062500
+1.89062500
+228.89062500
+229
+.89453125
+1.89453125
+229.89453125
+230
+.89843750
+1.89843750
+230.89843750
+231
+.90234375
+1.90234375
+231.90234375
+232
+.90625000
+1.90625000
+232.90625000
+233
+.91015625
+1.91015625
+233.91015625
+234
+.91406250
+1.91406250
+234.91406250
+235
+.91796875
+1.91796875
+235.91796875
+236
+.92187500
+1.92187500
+236.92187500
+237
+.92578125
+1.92578125
+237.92578125
+238
+.92968750
+1.92968750
+238.92968750
+239
+.93359375
+1.93359375
+239.93359375
+240
+.93750000
+1.93750000
+240.93750000
+241
+.94140625
+1.94140625
+241.94140625
+242
+.94531250
+1.94531250
+242.94531250
+243
+.94921875
+1.94921875
+243.94921875
+244
+.95312500
+1.95312500
+244.95312500
+245
+.95703125
+1.95703125
+245.95703125
+246
+.96093750
+1.96093750
+246.96093750
+247
+.96484375
+1.96484375
+247.96484375
+248
+.96875000
+1.96875000
+248.96875000
+249
+.97265625
+1.97265625
+249.97265625
+250
+.97656250
+1.97656250
+250.97656250
+251
+.98046875
+1.98046875
+251.98046875
+252
+.98437500
+1.98437500
+252.98437500
+253
+.98828125
+1.98828125
+253.98828125
+254
+.99218750
+1.99218750
+254.99218750
+255
+.99609375
+1.99609375
+255.99609375
+256
+.500000000
+1.500000000
+256.500000000
+0
+0
+1.0
+0
+1
+.3
+1.3
+1.3
+2
+.6
+1.6
+2.6
+3
+.33
+1.33
+3.33
+4
+.44
+1.44
+4.44
+5
+.55
+1.55
+5.55
+6
+.66
+1.66
+6.66
+7
+.77
+1.77
+7.77
+8
+.88
+1.88
+8.88
+9
+.333
+1.333
+9.333
+10
+.370
+1.370
+10.370
+11
+.407
+1.407
+11.407
+12
+.444
+1.444
+12.444
+13
+.481
+1.481
+13.481
+14
+.518
+1.518
+14.518
+15
+.555
+1.555
+15.555
+16
+.592
+1.592
+16.592
+17
+.629
+1.629
+17.629
+18
+.666
+1.666
+18.666
+19
+.703
+1.703
+19.703
+20
+.740
+1.740
+20.740
+21
+.777
+1.777
+21.777
+22
+.814
+1.814
+22.814
+23
+.851
+1.851
+23.851
+24
+.888
+1.888
+24.888
+25
+.925
+1.925
+25.925
+26
+.962
+1.962
+26.962
+27
+.3333
+1.3333
+27.3333
+28
+.3456
+1.3456
+28.3456
+29
+.3580
+1.3580
+29.3580
+30
+.3703
+1.3703
+30.3703
+31
+.3827
+1.3827
+31.3827
+32
+.3950
+1.3950
+32.3950
+33
+.4074
+1.4074
+33.4074
+34
+.4197
+1.4197
+34.4197
+35
+.4320
+1.4320
+35.4320
+36
+.4444
+1.4444
+36.4444
+37
+.4567
+1.4567
+37.4567
+38
+.4691
+1.4691
+38.4691
+39
+.4814
+1.4814
+39.4814
+40
+.4938
+1.4938
+40.4938
+41
+.5061
+1.5061
+41.5061
+42
+.5185
+1.5185
+42.5185
+43
+.5308
+1.5308
+43.5308
+44
+.5432
+1.5432
+44.5432
+45
+.5555
+1.5555
+45.5555
+46
+.5679
+1.5679
+46.5679
+47
+.5802
+1.5802
+47.5802
+48
+.5925
+1.5925
+48.5925
+49
+.6049
+1.6049
+49.6049
+50
+.6172
+1.6172
+50.6172
+51
+.6296
+1.6296
+51.6296
+52
+.6419
+1.6419
+52.6419
+53
+.6543
+1.6543
+53.6543
+54
+.6666
+1.6666
+54.6666
+55
+.6790
+1.6790
+55.6790
+56
+.6913
+1.6913
+56.6913
+57
+.7037
+1.7037
+57.7037
+58
+.7160
+1.7160
+58.7160
+59
+.7283
+1.7283
+59.7283
+60
+.7407
+1.7407
+60.7407
+61
+.7530
+1.7530
+61.7530
+62
+.7654
+1.7654
+62.7654
+63
+.7777
+1.7777
+63.7777
+64
+.7901
+1.7901
+64.7901
+65
+.8024
+1.8024
+65.8024
+66
+.8148
+1.8148
+66.8148
+67
+.8271
+1.8271
+67.8271
+68
+.8395
+1.8395
+68.8395
+69
+.8518
+1.8518
+69.8518
+70
+.8641
+1.8641
+70.8641
+71
+.8765
+1.8765
+71.8765
+72
+.8888
+1.8888
+72.8888
+73
+.9012
+1.9012
+73.9012
+74
+.9135
+1.9135
+74.9135
+75
+.9259
+1.9259
+75.9259
+76
+.9382
+1.9382
+76.9382
+77
+.9506
+1.9506
+77.9506
+78
+.9629
+1.9629
+78.9629
+79
+.9753
+1.9753
+79.9753
+80
+.9876
+1.9876
+80.9876
+81
+.33333
+1.33333
+81.33333
+82
+.33744
+1.33744
+82.33744
+83
+.34156
+1.34156
+83.34156
+84
+.34567
+1.34567
+84.34567
+85
+.34979
+1.34979
+85.34979
+86
+.35390
+1.35390
+86.35390
+87
+.35802
+1.35802
+87.35802
+88
+.36213
+1.36213
+88.36213
+89
+.36625
+1.36625
+89.36625
+90
+.37037
+1.37037
+90.37037
+91
+.37448
+1.37448
+91.37448
+92
+.37860
+1.37860
+92.37860
+93
+.38271
+1.38271
+93.38271
+94
+.38683
+1.38683
+94.38683
+95
+.39094
+1.39094
+95.39094
+96
+.39506
+1.39506
+96.39506
+97
+.39917
+1.39917
+97.39917
+98
+.40329
+1.40329
+98.40329
+99
+.40740
+1.40740
+99.40740
+100
+.41152
+1.41152
+100.41152
+101
+.41563
+1.41563
+101.41563
+102
+.41975
+1.41975
+102.41975
+103
+.42386
+1.42386
+103.42386
+104
+.42798
+1.42798
+104.42798
+105
+.43209
+1.43209
+105.43209
+106
+.43621
+1.43621
+106.43621
+107
+.44032
+1.44032
+107.44032
+108
+.44444
+1.44444
+108.44444
+109
+.44855
+1.44855
+109.44855
+110
+.45267
+1.45267
+110.45267
+111
+.45679
+1.45679
+111.45679
+112
+.46090
+1.46090
+112.46090
+113
+.46502
+1.46502
+113.46502
+114
+.46913
+1.46913
+114.46913
+115
+.47325
+1.47325
+115.47325
+116
+.47736
+1.47736
+116.47736
+117
+.48148
+1.48148
+117.48148
+118
+.48559
+1.48559
+118.48559
+119
+.48971
+1.48971
+119.48971
+120
+.49382
+1.49382
+120.49382
+121
+.49794
+1.49794
+121.49794
+122
+.50205
+1.50205
+122.50205
+123
+.50617
+1.50617
+123.50617
+124
+.51028
+1.51028
+124.51028
+125
+.51440
+1.51440
+125.51440
+126
+.51851
+1.51851
+126.51851
+127
+.52263
+1.52263
+127.52263
+128
+.52674
+1.52674
+128.52674
+129
+.53086
+1.53086
+129.53086
+130
+.53497
+1.53497
+130.53497
+131
+.53909
+1.53909
+131.53909
+132
+.54320
+1.54320
+132.54320
+133
+.54732
+1.54732
+133.54732
+134
+.55144
+1.55144
+134.55144
+135
+.55555
+1.55555
+135.55555
+136
+.55967
+1.55967
+136.55967
+137
+.56378
+1.56378
+137.56378
+138
+.56790
+1.56790
+138.56790
+139
+.57201
+1.57201
+139.57201
+140
+.57613
+1.57613
+140.57613
+141
+.58024
+1.58024
+141.58024
+142
+.58436
+1.58436
+142.58436
+143
+.58847
+1.58847
+143.58847
+144
+.59259
+1.59259
+144.59259
+145
+.59670
+1.59670
+145.59670
+146
+.60082
+1.60082
+146.60082
+147
+.60493
+1.60493
+147.60493
+148
+.60905
+1.60905
+148.60905
+149
+.61316
+1.61316
+149.61316
+150
+.61728
+1.61728
+150.61728
+151
+.62139
+1.62139
+151.62139
+152
+.62551
+1.62551
+152.62551
+153
+.62962
+1.62962
+153.62962
+154
+.63374
+1.63374
+154.63374
+155
+.63786
+1.63786
+155.63786
+156
+.64197
+1.64197
+156.64197
+157
+.64609
+1.64609
+157.64609
+158
+.65020
+1.65020
+158.65020
+159
+.65432
+1.65432
+159.65432
+160
+.65843
+1.65843
+160.65843
+161
+.66255
+1.66255
+161.66255
+162
+.66666
+1.66666
+162.66666
+163
+.67078
+1.67078
+163.67078
+164
+.67489
+1.67489
+164.67489
+165
+.67901
+1.67901
+165.67901
+166
+.68312
+1.68312
+166.68312
+167
+.68724
+1.68724
+167.68724
+168
+.69135
+1.69135
+168.69135
+169
+.69547
+1.69547
+169.69547
+170
+.69958
+1.69958
+170.69958
+171
+.70370
+1.70370
+171.70370
+172
+.70781
+1.70781
+172.70781
+173
+.71193
+1.71193
+173.71193
+174
+.71604
+1.71604
+174.71604
+175
+.72016
+1.72016
+175.72016
+176
+.72427
+1.72427
+176.72427
+177
+.72839
+1.72839
+177.72839
+178
+.73251
+1.73251
+178.73251
+179
+.73662
+1.73662
+179.73662
+180
+.74074
+1.74074
+180.74074
+181
+.74485
+1.74485
+181.74485
+182
+.74897
+1.74897
+182.74897
+183
+.75308
+1.75308
+183.75308
+184
+.75720
+1.75720
+184.75720
+185
+.76131
+1.76131
+185.76131
+186
+.76543
+1.76543
+186.76543
+187
+.76954
+1.76954
+187.76954
+188
+.77366
+1.77366
+188.77366
+189
+.77777
+1.77777
+189.77777
+190
+.78189
+1.78189
+190.78189
+191
+.78600
+1.78600
+191.78600
+192
+.79012
+1.79012
+192.79012
+193
+.79423
+1.79423
+193.79423
+194
+.79835
+1.79835
+194.79835
+195
+.80246
+1.80246
+195.80246
+196
+.80658
+1.80658
+196.80658
+197
+.81069
+1.81069
+197.81069
+198
+.81481
+1.81481
+198.81481
+199
+.81893
+1.81893
+199.81893
+200
+.82304
+1.82304
+200.82304
+201
+.82716
+1.82716
+201.82716
+202
+.83127
+1.83127
+202.83127
+203
+.83539
+1.83539
+203.83539
+204
+.83950
+1.83950
+204.83950
+205
+.84362
+1.84362
+205.84362
+206
+.84773
+1.84773
+206.84773
+207
+.85185
+1.85185
+207.85185
+208
+.85596
+1.85596
+208.85596
+209
+.86008
+1.86008
+209.86008
+210
+.86419
+1.86419
+210.86419
+211
+.86831
+1.86831
+211.86831
+212
+.87242
+1.87242
+212.87242
+213
+.87654
+1.87654
+213.87654
+214
+.88065
+1.88065
+214.88065
+215
+.88477
+1.88477
+215.88477
+216
+.88888
+1.88888
+216.88888
+217
+.89300
+1.89300
+217.89300
+218
+.89711
+1.89711
+218.89711
+219
+.90123
+1.90123
+219.90123
+220
+.90534
+1.90534
+220.90534
+221
+.90946
+1.90946
+221.90946
+222
+.91358
+1.91358
+222.91358
+223
+.91769
+1.91769
+223.91769
+224
+.92181
+1.92181
+224.92181
+225
+.92592
+1.92592
+225.92592
+226
+.93004
+1.93004
+226.93004
+227
+.93415
+1.93415
+227.93415
+228
+.93827
+1.93827
+228.93827
+229
+.94238
+1.94238
+229.94238
+230
+.94650
+1.94650
+230.94650
+231
+.95061
+1.95061
+231.95061
+232
+.95473
+1.95473
+232.95473
+233
+.95884
+1.95884
+233.95884
+234
+.96296
+1.96296
+234.96296
+235
+.96707
+1.96707
+235.96707
+236
+.97119
+1.97119
+236.97119
+237
+.97530
+1.97530
+237.97530
+238
+.97942
+1.97942
+238.97942
+239
+.98353
+1.98353
+239.98353
+240
+.98765
+1.98765
+240.98765
+241
+.99176
+1.99176
+241.99176
+242
+.99588
+1.99588
+242.99588
+243
+.333333
+1.333333
+243.333333
+244
+.334705
+1.334705
+244.334705
+245
+.336076
+1.336076
+245.336076
+246
+.337448
+1.337448
+246.337448
+247
+.338820
+1.338820
+247.338820
+248
+.340192
+1.340192
+248.340192
+249
+.341563
+1.341563
+249.341563
+250
+.342935
+1.342935
+250.342935
+251
+.344307
+1.344307
+251.344307
+252
+.345679
+1.345679
+252.345679
+253
+.347050
+1.347050
+253.347050
+254
+.348422
+1.348422
+254.348422
+255
+.349794
+1.349794
+255.349794
+256
+.351165
+1.351165
+256.351165
+0
+0
+1.0
+0
+1
+.2
+1.2
+1.2
+2
+.5
+1.5
+2.5
+3
+.7
+1.7
+3.7
+4
+.25
+1.25
+4.25
+5
+.31
+1.31
+5.31
+6
+.37
+1.37
+6.37
+7
+.43
+1.43
+7.43
+8
+.50
+1.50
+8.50
+9
+.56
+1.56
+9.56
+10
+.62
+1.62
+10.62
+11
+.68
+1.68
+11.68
+12
+.75
+1.75
+12.75
+13
+.81
+1.81
+13.81
+14
+.87
+1.87
+14.87
+15
+.93
+1.93
+15.93
+16
+.250
+1.250
+16.250
+17
+.265
+1.265
+17.265
+18
+.281
+1.281
+18.281
+19
+.296
+1.296
+19.296
+20
+.312
+1.312
+20.312
+21
+.328
+1.328
+21.328
+22
+.343
+1.343
+22.343
+23
+.359
+1.359
+23.359
+24
+.375
+1.375
+24.375
+25
+.390
+1.390
+25.390
+26
+.406
+1.406
+26.406
+27
+.421
+1.421
+27.421
+28
+.437
+1.437
+28.437
+29
+.453
+1.453
+29.453
+30
+.468
+1.468
+30.468
+31
+.484
+1.484
+31.484
+32
+.500
+1.500
+32.500
+33
+.515
+1.515
+33.515
+34
+.531
+1.531
+34.531
+35
+.546
+1.546
+35.546
+36
+.562
+1.562
+36.562
+37
+.578
+1.578
+37.578
+38
+.593
+1.593
+38.593
+39
+.609
+1.609
+39.609
+40
+.625
+1.625
+40.625
+41
+.640
+1.640
+41.640
+42
+.656
+1.656
+42.656
+43
+.671
+1.671
+43.671
+44
+.687
+1.687
+44.687
+45
+.703
+1.703
+45.703
+46
+.718
+1.718
+46.718
+47
+.734
+1.734
+47.734
+48
+.750
+1.750
+48.750
+49
+.765
+1.765
+49.765
+50
+.781
+1.781
+50.781
+51
+.796
+1.796
+51.796
+52
+.812
+1.812
+52.812
+53
+.828
+1.828
+53.828
+54
+.843
+1.843
+54.843
+55
+.859
+1.859
+55.859
+56
+.875
+1.875
+56.875
+57
+.890
+1.890
+57.890
+58
+.906
+1.906
+58.906
+59
+.921
+1.921
+59.921
+60
+.937
+1.937
+60.937
+61
+.953
+1.953
+61.953
+62
+.968
+1.968
+62.968
+63
+.984
+1.984
+63.984
+64
+.2500
+1.2500
+64.2500
+65
+.2539
+1.2539
+65.2539
+66
+.2578
+1.2578
+66.2578
+67
+.2617
+1.2617
+67.2617
+68
+.2656
+1.2656
+68.2656
+69
+.2695
+1.2695
+69.2695
+70
+.2734
+1.2734
+70.2734
+71
+.2773
+1.2773
+71.2773
+72
+.2812
+1.2812
+72.2812
+73
+.2851
+1.2851
+73.2851
+74
+.2890
+1.2890
+74.2890
+75
+.2929
+1.2929
+75.2929
+76
+.2968
+1.2968
+76.2968
+77
+.3007
+1.3007
+77.3007
+78
+.3046
+1.3046
+78.3046
+79
+.3085
+1.3085
+79.3085
+80
+.3125
+1.3125
+80.3125
+81
+.3164
+1.3164
+81.3164
+82
+.3203
+1.3203
+82.3203
+83
+.3242
+1.3242
+83.3242
+84
+.3281
+1.3281
+84.3281
+85
+.3320
+1.3320
+85.3320
+86
+.3359
+1.3359
+86.3359
+87
+.3398
+1.3398
+87.3398
+88
+.3437
+1.3437
+88.3437
+89
+.3476
+1.3476
+89.3476
+90
+.3515
+1.3515
+90.3515
+91
+.3554
+1.3554
+91.3554
+92
+.3593
+1.3593
+92.3593
+93
+.3632
+1.3632
+93.3632
+94
+.3671
+1.3671
+94.3671
+95
+.3710
+1.3710
+95.3710
+96
+.3750
+1.3750
+96.3750
+97
+.3789
+1.3789
+97.3789
+98
+.3828
+1.3828
+98.3828
+99
+.3867
+1.3867
+99.3867
+100
+.3906
+1.3906
+100.3906
+101
+.3945
+1.3945
+101.3945
+102
+.3984
+1.3984
+102.3984
+103
+.4023
+1.4023
+103.4023
+104
+.4062
+1.4062
+104.4062
+105
+.4101
+1.4101
+105.4101
+106
+.4140
+1.4140
+106.4140
+107
+.4179
+1.4179
+107.4179
+108
+.4218
+1.4218
+108.4218
+109
+.4257
+1.4257
+109.4257
+110
+.4296
+1.4296
+110.4296
+111
+.4335
+1.4335
+111.4335
+112
+.4375
+1.4375
+112.4375
+113
+.4414
+1.4414
+113.4414
+114
+.4453
+1.4453
+114.4453
+115
+.4492
+1.4492
+115.4492
+116
+.4531
+1.4531
+116.4531
+117
+.4570
+1.4570
+117.4570
+118
+.4609
+1.4609
+118.4609
+119
+.4648
+1.4648
+119.4648
+120
+.4687
+1.4687
+120.4687
+121
+.4726
+1.4726
+121.4726
+122
+.4765
+1.4765
+122.4765
+123
+.4804
+1.4804
+123.4804
+124
+.4843
+1.4843
+124.4843
+125
+.4882
+1.4882
+125.4882
+126
+.4921
+1.4921
+126.4921
+127
+.4960
+1.4960
+127.4960
+128
+.5000
+1.5000
+128.5000
+129
+.5039
+1.5039
+129.5039
+130
+.5078
+1.5078
+130.5078
+131
+.5117
+1.5117
+131.5117
+132
+.5156
+1.5156
+132.5156
+133
+.5195
+1.5195
+133.5195
+134
+.5234
+1.5234
+134.5234
+135
+.5273
+1.5273
+135.5273
+136
+.5312
+1.5312
+136.5312
+137
+.5351
+1.5351
+137.5351
+138
+.5390
+1.5390
+138.5390
+139
+.5429
+1.5429
+139.5429
+140
+.5468
+1.5468
+140.5468
+141
+.5507
+1.5507
+141.5507
+142
+.5546
+1.5546
+142.5546
+143
+.5585
+1.5585
+143.5585
+144
+.5625
+1.5625
+144.5625
+145
+.5664
+1.5664
+145.5664
+146
+.5703
+1.5703
+146.5703
+147
+.5742
+1.5742
+147.5742
+148
+.5781
+1.5781
+148.5781
+149
+.5820
+1.5820
+149.5820
+150
+.5859
+1.5859
+150.5859
+151
+.5898
+1.5898
+151.5898
+152
+.5937
+1.5937
+152.5937
+153
+.5976
+1.5976
+153.5976
+154
+.6015
+1.6015
+154.6015
+155
+.6054
+1.6054
+155.6054
+156
+.6093
+1.6093
+156.6093
+157
+.6132
+1.6132
+157.6132
+158
+.6171
+1.6171
+158.6171
+159
+.6210
+1.6210
+159.6210
+160
+.6250
+1.6250
+160.6250
+161
+.6289
+1.6289
+161.6289
+162
+.6328
+1.6328
+162.6328
+163
+.6367
+1.6367
+163.6367
+164
+.6406
+1.6406
+164.6406
+165
+.6445
+1.6445
+165.6445
+166
+.6484
+1.6484
+166.6484
+167
+.6523
+1.6523
+167.6523
+168
+.6562
+1.6562
+168.6562
+169
+.6601
+1.6601
+169.6601
+170
+.6640
+1.6640
+170.6640
+171
+.6679
+1.6679
+171.6679
+172
+.6718
+1.6718
+172.6718
+173
+.6757
+1.6757
+173.6757
+174
+.6796
+1.6796
+174.6796
+175
+.6835
+1.6835
+175.6835
+176
+.6875
+1.6875
+176.6875
+177
+.6914
+1.6914
+177.6914
+178
+.6953
+1.6953
+178.6953
+179
+.6992
+1.6992
+179.6992
+180
+.7031
+1.7031
+180.7031
+181
+.7070
+1.7070
+181.7070
+182
+.7109
+1.7109
+182.7109
+183
+.7148
+1.7148
+183.7148
+184
+.7187
+1.7187
+184.7187
+185
+.7226
+1.7226
+185.7226
+186
+.7265
+1.7265
+186.7265
+187
+.7304
+1.7304
+187.7304
+188
+.7343
+1.7343
+188.7343
+189
+.7382
+1.7382
+189.7382
+190
+.7421
+1.7421
+190.7421
+191
+.7460
+1.7460
+191.7460
+192
+.7500
+1.7500
+192.7500
+193
+.7539
+1.7539
+193.7539
+194
+.7578
+1.7578
+194.7578
+195
+.7617
+1.7617
+195.7617
+196
+.7656
+1.7656
+196.7656
+197
+.7695
+1.7695
+197.7695
+198
+.7734
+1.7734
+198.7734
+199
+.7773
+1.7773
+199.7773
+200
+.7812
+1.7812
+200.7812
+201
+.7851
+1.7851
+201.7851
+202
+.7890
+1.7890
+202.7890
+203
+.7929
+1.7929
+203.7929
+204
+.7968
+1.7968
+204.7968
+205
+.8007
+1.8007
+205.8007
+206
+.8046
+1.8046
+206.8046
+207
+.8085
+1.8085
+207.8085
+208
+.8125
+1.8125
+208.8125
+209
+.8164
+1.8164
+209.8164
+210
+.8203
+1.8203
+210.8203
+211
+.8242
+1.8242
+211.8242
+212
+.8281
+1.8281
+212.8281
+213
+.8320
+1.8320
+213.8320
+214
+.8359
+1.8359
+214.8359
+215
+.8398
+1.8398
+215.8398
+216
+.8437
+1.8437
+216.8437
+217
+.8476
+1.8476
+217.8476
+218
+.8515
+1.8515
+218.8515
+219
+.8554
+1.8554
+219.8554
+220
+.8593
+1.8593
+220.8593
+221
+.8632
+1.8632
+221.8632
+222
+.8671
+1.8671
+222.8671
+223
+.8710
+1.8710
+223.8710
+224
+.8750
+1.8750
+224.8750
+225
+.8789
+1.8789
+225.8789
+226
+.8828
+1.8828
+226.8828
+227
+.8867
+1.8867
+227.8867
+228
+.8906
+1.8906
+228.8906
+229
+.8945
+1.8945
+229.8945
+230
+.8984
+1.8984
+230.8984
+231
+.9023
+1.9023
+231.9023
+232
+.9062
+1.9062
+232.9062
+233
+.9101
+1.9101
+233.9101
+234
+.9140
+1.9140
+234.9140
+235
+.9179
+1.9179
+235.9179
+236
+.9218
+1.9218
+236.9218
+237
+.9257
+1.9257
+237.9257
+238
+.9296
+1.9296
+238.9296
+239
+.9335
+1.9335
+239.9335
+240
+.9375
+1.9375
+240.9375
+241
+.9414
+1.9414
+241.9414
+242
+.9453
+1.9453
+242.9453
+243
+.9492
+1.9492
+243.9492
+244
+.9531
+1.9531
+244.9531
+245
+.9570
+1.9570
+245.9570
+246
+.9609
+1.9609
+246.9609
+247
+.9648
+1.9648
+247.9648
+248
+.9687
+1.9687
+248.9687
+249
+.9726
+1.9726
+249.9726
+250
+.9765
+1.9765
+250.9765
+251
+.9804
+1.9804
+251.9804
+252
+.9843
+1.9843
+252.9843
+253
+.9882
+1.9882
+253.9882
+254
+.9921
+1.9921
+254.9921
+255
+.9960
+1.9960
+255.9960
+256
+.25000
+1.25000
+256.25000
+0
+0
+1.0
+0
+1
+.2
+1.2
+1.2
+2
+.4
+1.4
+2.4
+3
+.6
+1.6
+3.6
+4
+.8
+1.8
+4.8
+5
+.20
+1.20
+5.20
+6
+.24
+1.24
+6.24
+7
+.28
+1.28
+7.28
+8
+.32
+1.32
+8.32
+9
+.36
+1.36
+9.36
+10
+.40
+1.40
+10.40
+11
+.44
+1.44
+11.44
+12
+.48
+1.48
+12.48
+13
+.52
+1.52
+13.52
+14
+.56
+1.56
+14.56
+15
+.60
+1.60
+15.60
+16
+.64
+1.64
+16.64
+17
+.68
+1.68
+17.68
+18
+.72
+1.72
+18.72
+19
+.76
+1.76
+19.76
+20
+.80
+1.80
+20.80
+21
+.84
+1.84
+21.84
+22
+.88
+1.88
+22.88
+23
+.92
+1.92
+23.92
+24
+.96
+1.96
+24.96
+25
+.200
+1.200
+25.200
+26
+.208
+1.208
+26.208
+27
+.216
+1.216
+27.216
+28
+.224
+1.224
+28.224
+29
+.232
+1.232
+29.232
+30
+.240
+1.240
+30.240
+31
+.248
+1.248
+31.248
+32
+.256
+1.256
+32.256
+33
+.264
+1.264
+33.264
+34
+.272
+1.272
+34.272
+35
+.280
+1.280
+35.280
+36
+.288
+1.288
+36.288
+37
+.296
+1.296
+37.296
+38
+.304
+1.304
+38.304
+39
+.312
+1.312
+39.312
+40
+.320
+1.320
+40.320
+41
+.328
+1.328
+41.328
+42
+.336
+1.336
+42.336
+43
+.344
+1.344
+43.344
+44
+.352
+1.352
+44.352
+45
+.360
+1.360
+45.360
+46
+.368
+1.368
+46.368
+47
+.376
+1.376
+47.376
+48
+.384
+1.384
+48.384
+49
+.392
+1.392
+49.392
+50
+.400
+1.400
+50.400
+51
+.408
+1.408
+51.408
+52
+.416
+1.416
+52.416
+53
+.424
+1.424
+53.424
+54
+.432
+1.432
+54.432
+55
+.440
+1.440
+55.440
+56
+.448
+1.448
+56.448
+57
+.456
+1.456
+57.456
+58
+.464
+1.464
+58.464
+59
+.472
+1.472
+59.472
+60
+.480
+1.480
+60.480
+61
+.488
+1.488
+61.488
+62
+.496
+1.496
+62.496
+63
+.504
+1.504
+63.504
+64
+.512
+1.512
+64.512
+65
+.520
+1.520
+65.520
+66
+.528
+1.528
+66.528
+67
+.536
+1.536
+67.536
+68
+.544
+1.544
+68.544
+69
+.552
+1.552
+69.552
+70
+.560
+1.560
+70.560
+71
+.568
+1.568
+71.568
+72
+.576
+1.576
+72.576
+73
+.584
+1.584
+73.584
+74
+.592
+1.592
+74.592
+75
+.600
+1.600
+75.600
+76
+.608
+1.608
+76.608
+77
+.616
+1.616
+77.616
+78
+.624
+1.624
+78.624
+79
+.632
+1.632
+79.632
+80
+.640
+1.640
+80.640
+81
+.648
+1.648
+81.648
+82
+.656
+1.656
+82.656
+83
+.664
+1.664
+83.664
+84
+.672
+1.672
+84.672
+85
+.680
+1.680
+85.680
+86
+.688
+1.688
+86.688
+87
+.696
+1.696
+87.696
+88
+.704
+1.704
+88.704
+89
+.712
+1.712
+89.712
+90
+.720
+1.720
+90.720
+91
+.728
+1.728
+91.728
+92
+.736
+1.736
+92.736
+93
+.744
+1.744
+93.744
+94
+.752
+1.752
+94.752
+95
+.760
+1.760
+95.760
+96
+.768
+1.768
+96.768
+97
+.776
+1.776
+97.776
+98
+.784
+1.784
+98.784
+99
+.792
+1.792
+99.792
+100
+.800
+1.800
+100.800
+101
+.808
+1.808
+101.808
+102
+.816
+1.816
+102.816
+103
+.824
+1.824
+103.824
+104
+.832
+1.832
+104.832
+105
+.840
+1.840
+105.840
+106
+.848
+1.848
+106.848
+107
+.856
+1.856
+107.856
+108
+.864
+1.864
+108.864
+109
+.872
+1.872
+109.872
+110
+.880
+1.880
+110.880
+111
+.888
+1.888
+111.888
+112
+.896
+1.896
+112.896
+113
+.904
+1.904
+113.904
+114
+.912
+1.912
+114.912
+115
+.920
+1.920
+115.920
+116
+.928
+1.928
+116.928
+117
+.936
+1.936
+117.936
+118
+.944
+1.944
+118.944
+119
+.952
+1.952
+119.952
+120
+.960
+1.960
+120.960
+121
+.968
+1.968
+121.968
+122
+.976
+1.976
+122.976
+123
+.984
+1.984
+123.984
+124
+.992
+1.992
+124.992
+125
+.2000
+1.2000
+125.2000
+126
+.2016
+1.2016
+126.2016
+127
+.2032
+1.2032
+127.2032
+128
+.2048
+1.2048
+128.2048
+129
+.2064
+1.2064
+129.2064
+130
+.2080
+1.2080
+130.2080
+131
+.2096
+1.2096
+131.2096
+132
+.2112
+1.2112
+132.2112
+133
+.2128
+1.2128
+133.2128
+134
+.2144
+1.2144
+134.2144
+135
+.2160
+1.2160
+135.2160
+136
+.2176
+1.2176
+136.2176
+137
+.2192
+1.2192
+137.2192
+138
+.2208
+1.2208
+138.2208
+139
+.2224
+1.2224
+139.2224
+140
+.2240
+1.2240
+140.2240
+141
+.2256
+1.2256
+141.2256
+142
+.2272
+1.2272
+142.2272
+143
+.2288
+1.2288
+143.2288
+144
+.2304
+1.2304
+144.2304
+145
+.2320
+1.2320
+145.2320
+146
+.2336
+1.2336
+146.2336
+147
+.2352
+1.2352
+147.2352
+148
+.2368
+1.2368
+148.2368
+149
+.2384
+1.2384
+149.2384
+150
+.2400
+1.2400
+150.2400
+151
+.2416
+1.2416
+151.2416
+152
+.2432
+1.2432
+152.2432
+153
+.2448
+1.2448
+153.2448
+154
+.2464
+1.2464
+154.2464
+155
+.2480
+1.2480
+155.2480
+156
+.2496
+1.2496
+156.2496
+157
+.2512
+1.2512
+157.2512
+158
+.2528
+1.2528
+158.2528
+159
+.2544
+1.2544
+159.2544
+160
+.2560
+1.2560
+160.2560
+161
+.2576
+1.2576
+161.2576
+162
+.2592
+1.2592
+162.2592
+163
+.2608
+1.2608
+163.2608
+164
+.2624
+1.2624
+164.2624
+165
+.2640
+1.2640
+165.2640
+166
+.2656
+1.2656
+166.2656
+167
+.2672
+1.2672
+167.2672
+168
+.2688
+1.2688
+168.2688
+169
+.2704
+1.2704
+169.2704
+170
+.2720
+1.2720
+170.2720
+171
+.2736
+1.2736
+171.2736
+172
+.2752
+1.2752
+172.2752
+173
+.2768
+1.2768
+173.2768
+174
+.2784
+1.2784
+174.2784
+175
+.2800
+1.2800
+175.2800
+176
+.2816
+1.2816
+176.2816
+177
+.2832
+1.2832
+177.2832
+178
+.2848
+1.2848
+178.2848
+179
+.2864
+1.2864
+179.2864
+180
+.2880
+1.2880
+180.2880
+181
+.2896
+1.2896
+181.2896
+182
+.2912
+1.2912
+182.2912
+183
+.2928
+1.2928
+183.2928
+184
+.2944
+1.2944
+184.2944
+185
+.2960
+1.2960
+185.2960
+186
+.2976
+1.2976
+186.2976
+187
+.2992
+1.2992
+187.2992
+188
+.3008
+1.3008
+188.3008
+189
+.3024
+1.3024
+189.3024
+190
+.3040
+1.3040
+190.3040
+191
+.3056
+1.3056
+191.3056
+192
+.3072
+1.3072
+192.3072
+193
+.3088
+1.3088
+193.3088
+194
+.3104
+1.3104
+194.3104
+195
+.3120
+1.3120
+195.3120
+196
+.3136
+1.3136
+196.3136
+197
+.3152
+1.3152
+197.3152
+198
+.3168
+1.3168
+198.3168
+199
+.3184
+1.3184
+199.3184
+200
+.3200
+1.3200
+200.3200
+201
+.3216
+1.3216
+201.3216
+202
+.3232
+1.3232
+202.3232
+203
+.3248
+1.3248
+203.3248
+204
+.3264
+1.3264
+204.3264
+205
+.3280
+1.3280
+205.3280
+206
+.3296
+1.3296
+206.3296
+207
+.3312
+1.3312
+207.3312
+208
+.3328
+1.3328
+208.3328
+209
+.3344
+1.3344
+209.3344
+210
+.3360
+1.3360
+210.3360
+211
+.3376
+1.3376
+211.3376
+212
+.3392
+1.3392
+212.3392
+213
+.3408
+1.3408
+213.3408
+214
+.3424
+1.3424
+214.3424
+215
+.3440
+1.3440
+215.3440
+216
+.3456
+1.3456
+216.3456
+217
+.3472
+1.3472
+217.3472
+218
+.3488
+1.3488
+218.3488
+219
+.3504
+1.3504
+219.3504
+220
+.3520
+1.3520
+220.3520
+221
+.3536
+1.3536
+221.3536
+222
+.3552
+1.3552
+222.3552
+223
+.3568
+1.3568
+223.3568
+224
+.3584
+1.3584
+224.3584
+225
+.3600
+1.3600
+225.3600
+226
+.3616
+1.3616
+226.3616
+227
+.3632
+1.3632
+227.3632
+228
+.3648
+1.3648
+228.3648
+229
+.3664
+1.3664
+229.3664
+230
+.3680
+1.3680
+230.3680
+231
+.3696
+1.3696
+231.3696
+232
+.3712
+1.3712
+232.3712
+233
+.3728
+1.3728
+233.3728
+234
+.3744
+1.3744
+234.3744
+235
+.3760
+1.3760
+235.3760
+236
+.3776
+1.3776
+236.3776
+237
+.3792
+1.3792
+237.3792
+238
+.3808
+1.3808
+238.3808
+239
+.3824
+1.3824
+239.3824
+240
+.3840
+1.3840
+240.3840
+241
+.3856
+1.3856
+241.3856
+242
+.3872
+1.3872
+242.3872
+243
+.3888
+1.3888
+243.3888
+244
+.3904
+1.3904
+244.3904
+245
+.3920
+1.3920
+245.3920
+246
+.3936
+1.3936
+246.3936
+247
+.3952
+1.3952
+247.3952
+248
+.3968
+1.3968
+248.3968
+249
+.3984
+1.3984
+249.3984
+250
+.4000
+1.4000
+250.4000
+251
+.4016
+1.4016
+251.4016
+252
+.4032
+1.4032
+252.4032
+253
+.4048
+1.4048
+253.4048
+254
+.4064
+1.4064
+254.4064
+255
+.4080
+1.4080
+255.4080
+256
+.4096
+1.4096
+256.4096
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.3
+1.3
+2.3
+3
+.5
+1.5
+3.5
+4
+.6
+1.6
+4.6
+5
+.8
+1.8
+5.8
+6
+.16
+1.16
+6.16
+7
+.19
+1.19
+7.19
+8
+.22
+1.22
+8.22
+9
+.25
+1.25
+9.25
+10
+.27
+1.27
+10.27
+11
+.30
+1.30
+11.30
+12
+.33
+1.33
+12.33
+13
+.36
+1.36
+13.36
+14
+.38
+1.38
+14.38
+15
+.41
+1.41
+15.41
+16
+.44
+1.44
+16.44
+17
+.47
+1.47
+17.47
+18
+.50
+1.50
+18.50
+19
+.52
+1.52
+19.52
+20
+.55
+1.55
+20.55
+21
+.58
+1.58
+21.58
+22
+.61
+1.61
+22.61
+23
+.63
+1.63
+23.63
+24
+.66
+1.66
+24.66
+25
+.69
+1.69
+25.69
+26
+.72
+1.72
+26.72
+27
+.75
+1.75
+27.75
+28
+.77
+1.77
+28.77
+29
+.80
+1.80
+29.80
+30
+.83
+1.83
+30.83
+31
+.86
+1.86
+31.86
+32
+.88
+1.88
+32.88
+33
+.91
+1.91
+33.91
+34
+.94
+1.94
+34.94
+35
+.97
+1.97
+35.97
+36
+.166
+1.166
+36.166
+37
+.171
+1.171
+37.171
+38
+.175
+1.175
+38.175
+39
+.180
+1.180
+39.180
+40
+.185
+1.185
+40.185
+41
+.189
+1.189
+41.189
+42
+.194
+1.194
+42.194
+43
+.199
+1.199
+43.199
+44
+.203
+1.203
+44.203
+45
+.208
+1.208
+45.208
+46
+.212
+1.212
+46.212
+47
+.217
+1.217
+47.217
+48
+.222
+1.222
+48.222
+49
+.226
+1.226
+49.226
+50
+.231
+1.231
+50.231
+51
+.236
+1.236
+51.236
+52
+.240
+1.240
+52.240
+53
+.245
+1.245
+53.245
+54
+.250
+1.250
+54.250
+55
+.254
+1.254
+55.254
+56
+.259
+1.259
+56.259
+57
+.263
+1.263
+57.263
+58
+.268
+1.268
+58.268
+59
+.273
+1.273
+59.273
+60
+.277
+1.277
+60.277
+61
+.282
+1.282
+61.282
+62
+.287
+1.287
+62.287
+63
+.291
+1.291
+63.291
+64
+.296
+1.296
+64.296
+65
+.300
+1.300
+65.300
+66
+.305
+1.305
+66.305
+67
+.310
+1.310
+67.310
+68
+.314
+1.314
+68.314
+69
+.319
+1.319
+69.319
+70
+.324
+1.324
+70.324
+71
+.328
+1.328
+71.328
+72
+.333
+1.333
+72.333
+73
+.337
+1.337
+73.337
+74
+.342
+1.342
+74.342
+75
+.347
+1.347
+75.347
+76
+.351
+1.351
+76.351
+77
+.356
+1.356
+77.356
+78
+.361
+1.361
+78.361
+79
+.365
+1.365
+79.365
+80
+.370
+1.370
+80.370
+81
+.375
+1.375
+81.375
+82
+.379
+1.379
+82.379
+83
+.384
+1.384
+83.384
+84
+.388
+1.388
+84.388
+85
+.393
+1.393
+85.393
+86
+.398
+1.398
+86.398
+87
+.402
+1.402
+87.402
+88
+.407
+1.407
+88.407
+89
+.412
+1.412
+89.412
+90
+.416
+1.416
+90.416
+91
+.421
+1.421
+91.421
+92
+.425
+1.425
+92.425
+93
+.430
+1.430
+93.430
+94
+.435
+1.435
+94.435
+95
+.439
+1.439
+95.439
+96
+.444
+1.444
+96.444
+97
+.449
+1.449
+97.449
+98
+.453
+1.453
+98.453
+99
+.458
+1.458
+99.458
+100
+.462
+1.462
+100.462
+101
+.467
+1.467
+101.467
+102
+.472
+1.472
+102.472
+103
+.476
+1.476
+103.476
+104
+.481
+1.481
+104.481
+105
+.486
+1.486
+105.486
+106
+.490
+1.490
+106.490
+107
+.495
+1.495
+107.495
+108
+.500
+1.500
+108.500
+109
+.504
+1.504
+109.504
+110
+.509
+1.509
+110.509
+111
+.513
+1.513
+111.513
+112
+.518
+1.518
+112.518
+113
+.523
+1.523
+113.523
+114
+.527
+1.527
+114.527
+115
+.532
+1.532
+115.532
+116
+.537
+1.537
+116.537
+117
+.541
+1.541
+117.541
+118
+.546
+1.546
+118.546
+119
+.550
+1.550
+119.550
+120
+.555
+1.555
+120.555
+121
+.560
+1.560
+121.560
+122
+.564
+1.564
+122.564
+123
+.569
+1.569
+123.569
+124
+.574
+1.574
+124.574
+125
+.578
+1.578
+125.578
+126
+.583
+1.583
+126.583
+127
+.587
+1.587
+127.587
+128
+.592
+1.592
+128.592
+129
+.597
+1.597
+129.597
+130
+.601
+1.601
+130.601
+131
+.606
+1.606
+131.606
+132
+.611
+1.611
+132.611
+133
+.615
+1.615
+133.615
+134
+.620
+1.620
+134.620
+135
+.625
+1.625
+135.625
+136
+.629
+1.629
+136.629
+137
+.634
+1.634
+137.634
+138
+.638
+1.638
+138.638
+139
+.643
+1.643
+139.643
+140
+.648
+1.648
+140.648
+141
+.652
+1.652
+141.652
+142
+.657
+1.657
+142.657
+143
+.662
+1.662
+143.662
+144
+.666
+1.666
+144.666
+145
+.671
+1.671
+145.671
+146
+.675
+1.675
+146.675
+147
+.680
+1.680
+147.680
+148
+.685
+1.685
+148.685
+149
+.689
+1.689
+149.689
+150
+.694
+1.694
+150.694
+151
+.699
+1.699
+151.699
+152
+.703
+1.703
+152.703
+153
+.708
+1.708
+153.708
+154
+.712
+1.712
+154.712
+155
+.717
+1.717
+155.717
+156
+.722
+1.722
+156.722
+157
+.726
+1.726
+157.726
+158
+.731
+1.731
+158.731
+159
+.736
+1.736
+159.736
+160
+.740
+1.740
+160.740
+161
+.745
+1.745
+161.745
+162
+.750
+1.750
+162.750
+163
+.754
+1.754
+163.754
+164
+.759
+1.759
+164.759
+165
+.763
+1.763
+165.763
+166
+.768
+1.768
+166.768
+167
+.773
+1.773
+167.773
+168
+.777
+1.777
+168.777
+169
+.782
+1.782
+169.782
+170
+.787
+1.787
+170.787
+171
+.791
+1.791
+171.791
+172
+.796
+1.796
+172.796
+173
+.800
+1.800
+173.800
+174
+.805
+1.805
+174.805
+175
+.810
+1.810
+175.810
+176
+.814
+1.814
+176.814
+177
+.819
+1.819
+177.819
+178
+.824
+1.824
+178.824
+179
+.828
+1.828
+179.828
+180
+.833
+1.833
+180.833
+181
+.837
+1.837
+181.837
+182
+.842
+1.842
+182.842
+183
+.847
+1.847
+183.847
+184
+.851
+1.851
+184.851
+185
+.856
+1.856
+185.856
+186
+.861
+1.861
+186.861
+187
+.865
+1.865
+187.865
+188
+.870
+1.870
+188.870
+189
+.875
+1.875
+189.875
+190
+.879
+1.879
+190.879
+191
+.884
+1.884
+191.884
+192
+.888
+1.888
+192.888
+193
+.893
+1.893
+193.893
+194
+.898
+1.898
+194.898
+195
+.902
+1.902
+195.902
+196
+.907
+1.907
+196.907
+197
+.912
+1.912
+197.912
+198
+.916
+1.916
+198.916
+199
+.921
+1.921
+199.921
+200
+.925
+1.925
+200.925
+201
+.930
+1.930
+201.930
+202
+.935
+1.935
+202.935
+203
+.939
+1.939
+203.939
+204
+.944
+1.944
+204.944
+205
+.949
+1.949
+205.949
+206
+.953
+1.953
+206.953
+207
+.958
+1.958
+207.958
+208
+.962
+1.962
+208.962
+209
+.967
+1.967
+209.967
+210
+.972
+1.972
+210.972
+211
+.976
+1.976
+211.976
+212
+.981
+1.981
+212.981
+213
+.986
+1.986
+213.986
+214
+.990
+1.990
+214.990
+215
+.995
+1.995
+215.995
+216
+.1666
+1.1666
+216.1666
+217
+.1674
+1.1674
+217.1674
+218
+.1682
+1.1682
+218.1682
+219
+.1689
+1.1689
+219.1689
+220
+.1697
+1.1697
+220.1697
+221
+.1705
+1.1705
+221.1705
+222
+.1712
+1.1712
+222.1712
+223
+.1720
+1.1720
+223.1720
+224
+.1728
+1.1728
+224.1728
+225
+.1736
+1.1736
+225.1736
+226
+.1743
+1.1743
+226.1743
+227
+.1751
+1.1751
+227.1751
+228
+.1759
+1.1759
+228.1759
+229
+.1766
+1.1766
+229.1766
+230
+.1774
+1.1774
+230.1774
+231
+.1782
+1.1782
+231.1782
+232
+.1790
+1.1790
+232.1790
+233
+.1797
+1.1797
+233.1797
+234
+.1805
+1.1805
+234.1805
+235
+.1813
+1.1813
+235.1813
+236
+.1820
+1.1820
+236.1820
+237
+.1828
+1.1828
+237.1828
+238
+.1836
+1.1836
+238.1836
+239
+.1844
+1.1844
+239.1844
+240
+.1851
+1.1851
+240.1851
+241
+.1859
+1.1859
+241.1859
+242
+.1867
+1.1867
+242.1867
+243
+.1875
+1.1875
+243.1875
+244
+.1882
+1.1882
+244.1882
+245
+.1890
+1.1890
+245.1890
+246
+.1898
+1.1898
+246.1898
+247
+.1905
+1.1905
+247.1905
+248
+.1913
+1.1913
+248.1913
+249
+.1921
+1.1921
+249.1921
+250
+.1929
+1.1929
+250.1929
+251
+.1936
+1.1936
+251.1936
+252
+.1944
+1.1944
+252.1944
+253
+.1952
+1.1952
+253.1952
+254
+.1959
+1.1959
+254.1959
+255
+.1967
+1.1967
+255.1967
+256
+.1975
+1.1975
+256.1975
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.4
+1.4
+3.4
+4
+.5
+1.5
+4.5
+5
+.7
+1.7
+5.7
+6
+.8
+1.8
+6.8
+7
+.14
+1.14
+7.14
+8
+.16
+1.16
+8.16
+9
+.18
+1.18
+9.18
+10
+.20
+1.20
+10.20
+11
+.22
+1.22
+11.22
+12
+.24
+1.24
+12.24
+13
+.26
+1.26
+13.26
+14
+.28
+1.28
+14.28
+15
+.30
+1.30
+15.30
+16
+.32
+1.32
+16.32
+17
+.34
+1.34
+17.34
+18
+.36
+1.36
+18.36
+19
+.38
+1.38
+19.38
+20
+.40
+1.40
+20.40
+21
+.42
+1.42
+21.42
+22
+.44
+1.44
+22.44
+23
+.46
+1.46
+23.46
+24
+.48
+1.48
+24.48
+25
+.51
+1.51
+25.51
+26
+.53
+1.53
+26.53
+27
+.55
+1.55
+27.55
+28
+.57
+1.57
+28.57
+29
+.59
+1.59
+29.59
+30
+.61
+1.61
+30.61
+31
+.63
+1.63
+31.63
+32
+.65
+1.65
+32.65
+33
+.67
+1.67
+33.67
+34
+.69
+1.69
+34.69
+35
+.71
+1.71
+35.71
+36
+.73
+1.73
+36.73
+37
+.75
+1.75
+37.75
+38
+.77
+1.77
+38.77
+39
+.79
+1.79
+39.79
+40
+.81
+1.81
+40.81
+41
+.83
+1.83
+41.83
+42
+.85
+1.85
+42.85
+43
+.87
+1.87
+43.87
+44
+.89
+1.89
+44.89
+45
+.91
+1.91
+45.91
+46
+.93
+1.93
+46.93
+47
+.95
+1.95
+47.95
+48
+.97
+1.97
+48.97
+49
+.142
+1.142
+49.142
+50
+.145
+1.145
+50.145
+51
+.148
+1.148
+51.148
+52
+.151
+1.151
+52.151
+53
+.154
+1.154
+53.154
+54
+.157
+1.157
+54.157
+55
+.160
+1.160
+55.160
+56
+.163
+1.163
+56.163
+57
+.166
+1.166
+57.166
+58
+.169
+1.169
+58.169
+59
+.172
+1.172
+59.172
+60
+.174
+1.174
+60.174
+61
+.177
+1.177
+61.177
+62
+.180
+1.180
+62.180
+63
+.183
+1.183
+63.183
+64
+.186
+1.186
+64.186
+65
+.189
+1.189
+65.189
+66
+.192
+1.192
+66.192
+67
+.195
+1.195
+67.195
+68
+.198
+1.198
+68.198
+69
+.201
+1.201
+69.201
+70
+.204
+1.204
+70.204
+71
+.206
+1.206
+71.206
+72
+.209
+1.209
+72.209
+73
+.212
+1.212
+73.212
+74
+.215
+1.215
+74.215
+75
+.218
+1.218
+75.218
+76
+.221
+1.221
+76.221
+77
+.224
+1.224
+77.224
+78
+.227
+1.227
+78.227
+79
+.230
+1.230
+79.230
+80
+.233
+1.233
+80.233
+81
+.236
+1.236
+81.236
+82
+.239
+1.239
+82.239
+83
+.241
+1.241
+83.241
+84
+.244
+1.244
+84.244
+85
+.247
+1.247
+85.247
+86
+.250
+1.250
+86.250
+87
+.253
+1.253
+87.253
+88
+.256
+1.256
+88.256
+89
+.259
+1.259
+89.259
+90
+.262
+1.262
+90.262
+91
+.265
+1.265
+91.265
+92
+.268
+1.268
+92.268
+93
+.271
+1.271
+93.271
+94
+.274
+1.274
+94.274
+95
+.276
+1.276
+95.276
+96
+.279
+1.279
+96.279
+97
+.282
+1.282
+97.282
+98
+.285
+1.285
+98.285
+99
+.288
+1.288
+99.288
+100
+.291
+1.291
+100.291
+101
+.294
+1.294
+101.294
+102
+.297
+1.297
+102.297
+103
+.300
+1.300
+103.300
+104
+.303
+1.303
+104.303
+105
+.306
+1.306
+105.306
+106
+.309
+1.309
+106.309
+107
+.311
+1.311
+107.311
+108
+.314
+1.314
+108.314
+109
+.317
+1.317
+109.317
+110
+.320
+1.320
+110.320
+111
+.323
+1.323
+111.323
+112
+.326
+1.326
+112.326
+113
+.329
+1.329
+113.329
+114
+.332
+1.332
+114.332
+115
+.335
+1.335
+115.335
+116
+.338
+1.338
+116.338
+117
+.341
+1.341
+117.341
+118
+.344
+1.344
+118.344
+119
+.346
+1.346
+119.346
+120
+.349
+1.349
+120.349
+121
+.352
+1.352
+121.352
+122
+.355
+1.355
+122.355
+123
+.358
+1.358
+123.358
+124
+.361
+1.361
+124.361
+125
+.364
+1.364
+125.364
+126
+.367
+1.367
+126.367
+127
+.370
+1.370
+127.370
+128
+.373
+1.373
+128.373
+129
+.376
+1.376
+129.376
+130
+.379
+1.379
+130.379
+131
+.381
+1.381
+131.381
+132
+.384
+1.384
+132.384
+133
+.387
+1.387
+133.387
+134
+.390
+1.390
+134.390
+135
+.393
+1.393
+135.393
+136
+.396
+1.396
+136.396
+137
+.399
+1.399
+137.399
+138
+.402
+1.402
+138.402
+139
+.405
+1.405
+139.405
+140
+.408
+1.408
+140.408
+141
+.411
+1.411
+141.411
+142
+.413
+1.413
+142.413
+143
+.416
+1.416
+143.416
+144
+.419
+1.419
+144.419
+145
+.422
+1.422
+145.422
+146
+.425
+1.425
+146.425
+147
+.428
+1.428
+147.428
+148
+.431
+1.431
+148.431
+149
+.434
+1.434
+149.434
+150
+.437
+1.437
+150.437
+151
+.440
+1.440
+151.440
+152
+.443
+1.443
+152.443
+153
+.446
+1.446
+153.446
+154
+.448
+1.448
+154.448
+155
+.451
+1.451
+155.451
+156
+.454
+1.454
+156.454
+157
+.457
+1.457
+157.457
+158
+.460
+1.460
+158.460
+159
+.463
+1.463
+159.463
+160
+.466
+1.466
+160.466
+161
+.469
+1.469
+161.469
+162
+.472
+1.472
+162.472
+163
+.475
+1.475
+163.475
+164
+.478
+1.478
+164.478
+165
+.481
+1.481
+165.481
+166
+.483
+1.483
+166.483
+167
+.486
+1.486
+167.486
+168
+.489
+1.489
+168.489
+169
+.492
+1.492
+169.492
+170
+.495
+1.495
+170.495
+171
+.498
+1.498
+171.498
+172
+.501
+1.501
+172.501
+173
+.504
+1.504
+173.504
+174
+.507
+1.507
+174.507
+175
+.510
+1.510
+175.510
+176
+.513
+1.513
+176.513
+177
+.516
+1.516
+177.516
+178
+.518
+1.518
+178.518
+179
+.521
+1.521
+179.521
+180
+.524
+1.524
+180.524
+181
+.527
+1.527
+181.527
+182
+.530
+1.530
+182.530
+183
+.533
+1.533
+183.533
+184
+.536
+1.536
+184.536
+185
+.539
+1.539
+185.539
+186
+.542
+1.542
+186.542
+187
+.545
+1.545
+187.545
+188
+.548
+1.548
+188.548
+189
+.551
+1.551
+189.551
+190
+.553
+1.553
+190.553
+191
+.556
+1.556
+191.556
+192
+.559
+1.559
+192.559
+193
+.562
+1.562
+193.562
+194
+.565
+1.565
+194.565
+195
+.568
+1.568
+195.568
+196
+.571
+1.571
+196.571
+197
+.574
+1.574
+197.574
+198
+.577
+1.577
+198.577
+199
+.580
+1.580
+199.580
+200
+.583
+1.583
+200.583
+201
+.586
+1.586
+201.586
+202
+.588
+1.588
+202.588
+203
+.591
+1.591
+203.591
+204
+.594
+1.594
+204.594
+205
+.597
+1.597
+205.597
+206
+.600
+1.600
+206.600
+207
+.603
+1.603
+207.603
+208
+.606
+1.606
+208.606
+209
+.609
+1.609
+209.609
+210
+.612
+1.612
+210.612
+211
+.615
+1.615
+211.615
+212
+.618
+1.618
+212.618
+213
+.620
+1.620
+213.620
+214
+.623
+1.623
+214.623
+215
+.626
+1.626
+215.626
+216
+.629
+1.629
+216.629
+217
+.632
+1.632
+217.632
+218
+.635
+1.635
+218.635
+219
+.638
+1.638
+219.638
+220
+.641
+1.641
+220.641
+221
+.644
+1.644
+221.644
+222
+.647
+1.647
+222.647
+223
+.650
+1.650
+223.650
+224
+.653
+1.653
+224.653
+225
+.655
+1.655
+225.655
+226
+.658
+1.658
+226.658
+227
+.661
+1.661
+227.661
+228
+.664
+1.664
+228.664
+229
+.667
+1.667
+229.667
+230
+.670
+1.670
+230.670
+231
+.673
+1.673
+231.673
+232
+.676
+1.676
+232.676
+233
+.679
+1.679
+233.679
+234
+.682
+1.682
+234.682
+235
+.685
+1.685
+235.685
+236
+.688
+1.688
+236.688
+237
+.690
+1.690
+237.690
+238
+.693
+1.693
+238.693
+239
+.696
+1.696
+239.696
+240
+.699
+1.699
+240.699
+241
+.702
+1.702
+241.702
+242
+.705
+1.705
+242.705
+243
+.708
+1.708
+243.708
+244
+.711
+1.711
+244.711
+245
+.714
+1.714
+245.714
+246
+.717
+1.717
+246.717
+247
+.720
+1.720
+247.720
+248
+.723
+1.723
+248.723
+249
+.725
+1.725
+249.725
+250
+.728
+1.728
+250.728
+251
+.731
+1.731
+251.731
+252
+.734
+1.734
+252.734
+253
+.737
+1.737
+253.737
+254
+.740
+1.740
+254.740
+255
+.743
+1.743
+255.743
+256
+.746
+1.746
+256.746
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.3
+1.3
+3.3
+4
+.5
+1.5
+4.5
+5
+.6
+1.6
+5.6
+6
+.7
+1.7
+6.7
+7
+.8
+1.8
+7.8
+8
+.12
+1.12
+8.12
+9
+.14
+1.14
+9.14
+10
+.15
+1.15
+10.15
+11
+.17
+1.17
+11.17
+12
+.18
+1.18
+12.18
+13
+.20
+1.20
+13.20
+14
+.21
+1.21
+14.21
+15
+.23
+1.23
+15.23
+16
+.25
+1.25
+16.25
+17
+.26
+1.26
+17.26
+18
+.28
+1.28
+18.28
+19
+.29
+1.29
+19.29
+20
+.31
+1.31
+20.31
+21
+.32
+1.32
+21.32
+22
+.34
+1.34
+22.34
+23
+.35
+1.35
+23.35
+24
+.37
+1.37
+24.37
+25
+.39
+1.39
+25.39
+26
+.40
+1.40
+26.40
+27
+.42
+1.42
+27.42
+28
+.43
+1.43
+28.43
+29
+.45
+1.45
+29.45
+30
+.46
+1.46
+30.46
+31
+.48
+1.48
+31.48
+32
+.50
+1.50
+32.50
+33
+.51
+1.51
+33.51
+34
+.53
+1.53
+34.53
+35
+.54
+1.54
+35.54
+36
+.56
+1.56
+36.56
+37
+.57
+1.57
+37.57
+38
+.59
+1.59
+38.59
+39
+.60
+1.60
+39.60
+40
+.62
+1.62
+40.62
+41
+.64
+1.64
+41.64
+42
+.65
+1.65
+42.65
+43
+.67
+1.67
+43.67
+44
+.68
+1.68
+44.68
+45
+.70
+1.70
+45.70
+46
+.71
+1.71
+46.71
+47
+.73
+1.73
+47.73
+48
+.75
+1.75
+48.75
+49
+.76
+1.76
+49.76
+50
+.78
+1.78
+50.78
+51
+.79
+1.79
+51.79
+52
+.81
+1.81
+52.81
+53
+.82
+1.82
+53.82
+54
+.84
+1.84
+54.84
+55
+.85
+1.85
+55.85
+56
+.87
+1.87
+56.87
+57
+.89
+1.89
+57.89
+58
+.90
+1.90
+58.90
+59
+.92
+1.92
+59.92
+60
+.93
+1.93
+60.93
+61
+.95
+1.95
+61.95
+62
+.96
+1.96
+62.96
+63
+.98
+1.98
+63.98
+64
+.125
+1.125
+64.125
+65
+.126
+1.126
+65.126
+66
+.128
+1.128
+66.128
+67
+.130
+1.130
+67.130
+68
+.132
+1.132
+68.132
+69
+.134
+1.134
+69.134
+70
+.136
+1.136
+70.136
+71
+.138
+1.138
+71.138
+72
+.140
+1.140
+72.140
+73
+.142
+1.142
+73.142
+74
+.144
+1.144
+74.144
+75
+.146
+1.146
+75.146
+76
+.148
+1.148
+76.148
+77
+.150
+1.150
+77.150
+78
+.152
+1.152
+78.152
+79
+.154
+1.154
+79.154
+80
+.156
+1.156
+80.156
+81
+.158
+1.158
+81.158
+82
+.160
+1.160
+82.160
+83
+.162
+1.162
+83.162
+84
+.164
+1.164
+84.164
+85
+.166
+1.166
+85.166
+86
+.167
+1.167
+86.167
+87
+.169
+1.169
+87.169
+88
+.171
+1.171
+88.171
+89
+.173
+1.173
+89.173
+90
+.175
+1.175
+90.175
+91
+.177
+1.177
+91.177
+92
+.179
+1.179
+92.179
+93
+.181
+1.181
+93.181
+94
+.183
+1.183
+94.183
+95
+.185
+1.185
+95.185
+96
+.187
+1.187
+96.187
+97
+.189
+1.189
+97.189
+98
+.191
+1.191
+98.191
+99
+.193
+1.193
+99.193
+100
+.195
+1.195
+100.195
+101
+.197
+1.197
+101.197
+102
+.199
+1.199
+102.199
+103
+.201
+1.201
+103.201
+104
+.203
+1.203
+104.203
+105
+.205
+1.205
+105.205
+106
+.207
+1.207
+106.207
+107
+.208
+1.208
+107.208
+108
+.210
+1.210
+108.210
+109
+.212
+1.212
+109.212
+110
+.214
+1.214
+110.214
+111
+.216
+1.216
+111.216
+112
+.218
+1.218
+112.218
+113
+.220
+1.220
+113.220
+114
+.222
+1.222
+114.222
+115
+.224
+1.224
+115.224
+116
+.226
+1.226
+116.226
+117
+.228
+1.228
+117.228
+118
+.230
+1.230
+118.230
+119
+.232
+1.232
+119.232
+120
+.234
+1.234
+120.234
+121
+.236
+1.236
+121.236
+122
+.238
+1.238
+122.238
+123
+.240
+1.240
+123.240
+124
+.242
+1.242
+124.242
+125
+.244
+1.244
+125.244
+126
+.246
+1.246
+126.246
+127
+.248
+1.248
+127.248
+128
+.250
+1.250
+128.250
+129
+.251
+1.251
+129.251
+130
+.253
+1.253
+130.253
+131
+.255
+1.255
+131.255
+132
+.257
+1.257
+132.257
+133
+.259
+1.259
+133.259
+134
+.261
+1.261
+134.261
+135
+.263
+1.263
+135.263
+136
+.265
+1.265
+136.265
+137
+.267
+1.267
+137.267
+138
+.269
+1.269
+138.269
+139
+.271
+1.271
+139.271
+140
+.273
+1.273
+140.273
+141
+.275
+1.275
+141.275
+142
+.277
+1.277
+142.277
+143
+.279
+1.279
+143.279
+144
+.281
+1.281
+144.281
+145
+.283
+1.283
+145.283
+146
+.285
+1.285
+146.285
+147
+.287
+1.287
+147.287
+148
+.289
+1.289
+148.289
+149
+.291
+1.291
+149.291
+150
+.292
+1.292
+150.292
+151
+.294
+1.294
+151.294
+152
+.296
+1.296
+152.296
+153
+.298
+1.298
+153.298
+154
+.300
+1.300
+154.300
+155
+.302
+1.302
+155.302
+156
+.304
+1.304
+156.304
+157
+.306
+1.306
+157.306
+158
+.308
+1.308
+158.308
+159
+.310
+1.310
+159.310
+160
+.312
+1.312
+160.312
+161
+.314
+1.314
+161.314
+162
+.316
+1.316
+162.316
+163
+.318
+1.318
+163.318
+164
+.320
+1.320
+164.320
+165
+.322
+1.322
+165.322
+166
+.324
+1.324
+166.324
+167
+.326
+1.326
+167.326
+168
+.328
+1.328
+168.328
+169
+.330
+1.330
+169.330
+170
+.332
+1.332
+170.332
+171
+.333
+1.333
+171.333
+172
+.335
+1.335
+172.335
+173
+.337
+1.337
+173.337
+174
+.339
+1.339
+174.339
+175
+.341
+1.341
+175.341
+176
+.343
+1.343
+176.343
+177
+.345
+1.345
+177.345
+178
+.347
+1.347
+178.347
+179
+.349
+1.349
+179.349
+180
+.351
+1.351
+180.351
+181
+.353
+1.353
+181.353
+182
+.355
+1.355
+182.355
+183
+.357
+1.357
+183.357
+184
+.359
+1.359
+184.359
+185
+.361
+1.361
+185.361
+186
+.363
+1.363
+186.363
+187
+.365
+1.365
+187.365
+188
+.367
+1.367
+188.367
+189
+.369
+1.369
+189.369
+190
+.371
+1.371
+190.371
+191
+.373
+1.373
+191.373
+192
+.375
+1.375
+192.375
+193
+.376
+1.376
+193.376
+194
+.378
+1.378
+194.378
+195
+.380
+1.380
+195.380
+196
+.382
+1.382
+196.382
+197
+.384
+1.384
+197.384
+198
+.386
+1.386
+198.386
+199
+.388
+1.388
+199.388
+200
+.390
+1.390
+200.390
+201
+.392
+1.392
+201.392
+202
+.394
+1.394
+202.394
+203
+.396
+1.396
+203.396
+204
+.398
+1.398
+204.398
+205
+.400
+1.400
+205.400
+206
+.402
+1.402
+206.402
+207
+.404
+1.404
+207.404
+208
+.406
+1.406
+208.406
+209
+.408
+1.408
+209.408
+210
+.410
+1.410
+210.410
+211
+.412
+1.412
+211.412
+212
+.414
+1.414
+212.414
+213
+.416
+1.416
+213.416
+214
+.417
+1.417
+214.417
+215
+.419
+1.419
+215.419
+216
+.421
+1.421
+216.421
+217
+.423
+1.423
+217.423
+218
+.425
+1.425
+218.425
+219
+.427
+1.427
+219.427
+220
+.429
+1.429
+220.429
+221
+.431
+1.431
+221.431
+222
+.433
+1.433
+222.433
+223
+.435
+1.435
+223.435
+224
+.437
+1.437
+224.437
+225
+.439
+1.439
+225.439
+226
+.441
+1.441
+226.441
+227
+.443
+1.443
+227.443
+228
+.445
+1.445
+228.445
+229
+.447
+1.447
+229.447
+230
+.449
+1.449
+230.449
+231
+.451
+1.451
+231.451
+232
+.453
+1.453
+232.453
+233
+.455
+1.455
+233.455
+234
+.457
+1.457
+234.457
+235
+.458
+1.458
+235.458
+236
+.460
+1.460
+236.460
+237
+.462
+1.462
+237.462
+238
+.464
+1.464
+238.464
+239
+.466
+1.466
+239.466
+240
+.468
+1.468
+240.468
+241
+.470
+1.470
+241.470
+242
+.472
+1.472
+242.472
+243
+.474
+1.474
+243.474
+244
+.476
+1.476
+244.476
+245
+.478
+1.478
+245.478
+246
+.480
+1.480
+246.480
+247
+.482
+1.482
+247.482
+248
+.484
+1.484
+248.484
+249
+.486
+1.486
+249.486
+250
+.488
+1.488
+250.488
+251
+.490
+1.490
+251.490
+252
+.492
+1.492
+252.492
+253
+.494
+1.494
+253.494
+254
+.496
+1.496
+254.496
+255
+.498
+1.498
+255.498
+256
+.500
+1.500
+256.500
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.3
+1.3
+3.3
+4
+.4
+1.4
+4.4
+5
+.5
+1.5
+5.5
+6
+.6
+1.6
+6.6
+7
+.7
+1.7
+7.7
+8
+.8
+1.8
+8.8
+9
+.11
+1.11
+9.11
+10
+.12
+1.12
+10.12
+11
+.13
+1.13
+11.13
+12
+.14
+1.14
+12.14
+13
+.16
+1.16
+13.16
+14
+.17
+1.17
+14.17
+15
+.18
+1.18
+15.18
+16
+.19
+1.19
+16.19
+17
+.20
+1.20
+17.20
+18
+.22
+1.22
+18.22
+19
+.23
+1.23
+19.23
+20
+.24
+1.24
+20.24
+21
+.25
+1.25
+21.25
+22
+.27
+1.27
+22.27
+23
+.28
+1.28
+23.28
+24
+.29
+1.29
+24.29
+25
+.30
+1.30
+25.30
+26
+.32
+1.32
+26.32
+27
+.33
+1.33
+27.33
+28
+.34
+1.34
+28.34
+29
+.35
+1.35
+29.35
+30
+.37
+1.37
+30.37
+31
+.38
+1.38
+31.38
+32
+.39
+1.39
+32.39
+33
+.40
+1.40
+33.40
+34
+.41
+1.41
+34.41
+35
+.43
+1.43
+35.43
+36
+.44
+1.44
+36.44
+37
+.45
+1.45
+37.45
+38
+.46
+1.46
+38.46
+39
+.48
+1.48
+39.48
+40
+.49
+1.49
+40.49
+41
+.50
+1.50
+41.50
+42
+.51
+1.51
+42.51
+43
+.53
+1.53
+43.53
+44
+.54
+1.54
+44.54
+45
+.55
+1.55
+45.55
+46
+.56
+1.56
+46.56
+47
+.58
+1.58
+47.58
+48
+.59
+1.59
+48.59
+49
+.60
+1.60
+49.60
+50
+.61
+1.61
+50.61
+51
+.62
+1.62
+51.62
+52
+.64
+1.64
+52.64
+53
+.65
+1.65
+53.65
+54
+.66
+1.66
+54.66
+55
+.67
+1.67
+55.67
+56
+.69
+1.69
+56.69
+57
+.70
+1.70
+57.70
+58
+.71
+1.71
+58.71
+59
+.72
+1.72
+59.72
+60
+.74
+1.74
+60.74
+61
+.75
+1.75
+61.75
+62
+.76
+1.76
+62.76
+63
+.77
+1.77
+63.77
+64
+.79
+1.79
+64.79
+65
+.80
+1.80
+65.80
+66
+.81
+1.81
+66.81
+67
+.82
+1.82
+67.82
+68
+.83
+1.83
+68.83
+69
+.85
+1.85
+69.85
+70
+.86
+1.86
+70.86
+71
+.87
+1.87
+71.87
+72
+.88
+1.88
+72.88
+73
+.90
+1.90
+73.90
+74
+.91
+1.91
+74.91
+75
+.92
+1.92
+75.92
+76
+.93
+1.93
+76.93
+77
+.95
+1.95
+77.95
+78
+.96
+1.96
+78.96
+79
+.97
+1.97
+79.97
+80
+.98
+1.98
+80.98
+81
+.111
+1.111
+81.111
+82
+.112
+1.112
+82.112
+83
+.113
+1.113
+83.113
+84
+.115
+1.115
+84.115
+85
+.116
+1.116
+85.116
+86
+.117
+1.117
+86.117
+87
+.119
+1.119
+87.119
+88
+.120
+1.120
+88.120
+89
+.122
+1.122
+89.122
+90
+.123
+1.123
+90.123
+91
+.124
+1.124
+91.124
+92
+.126
+1.126
+92.126
+93
+.127
+1.127
+93.127
+94
+.128
+1.128
+94.128
+95
+.130
+1.130
+95.130
+96
+.131
+1.131
+96.131
+97
+.133
+1.133
+97.133
+98
+.134
+1.134
+98.134
+99
+.135
+1.135
+99.135
+100
+.137
+1.137
+100.137
+101
+.138
+1.138
+101.138
+102
+.139
+1.139
+102.139
+103
+.141
+1.141
+103.141
+104
+.142
+1.142
+104.142
+105
+.144
+1.144
+105.144
+106
+.145
+1.145
+106.145
+107
+.146
+1.146
+107.146
+108
+.148
+1.148
+108.148
+109
+.149
+1.149
+109.149
+110
+.150
+1.150
+110.150
+111
+.152
+1.152
+111.152
+112
+.153
+1.153
+112.153
+113
+.155
+1.155
+113.155
+114
+.156
+1.156
+114.156
+115
+.157
+1.157
+115.157
+116
+.159
+1.159
+116.159
+117
+.160
+1.160
+117.160
+118
+.161
+1.161
+118.161
+119
+.163
+1.163
+119.163
+120
+.164
+1.164
+120.164
+121
+.165
+1.165
+121.165
+122
+.167
+1.167
+122.167
+123
+.168
+1.168
+123.168
+124
+.170
+1.170
+124.170
+125
+.171
+1.171
+125.171
+126
+.172
+1.172
+126.172
+127
+.174
+1.174
+127.174
+128
+.175
+1.175
+128.175
+129
+.176
+1.176
+129.176
+130
+.178
+1.178
+130.178
+131
+.179
+1.179
+131.179
+132
+.181
+1.181
+132.181
+133
+.182
+1.182
+133.182
+134
+.183
+1.183
+134.183
+135
+.185
+1.185
+135.185
+136
+.186
+1.186
+136.186
+137
+.187
+1.187
+137.187
+138
+.189
+1.189
+138.189
+139
+.190
+1.190
+139.190
+140
+.192
+1.192
+140.192
+141
+.193
+1.193
+141.193
+142
+.194
+1.194
+142.194
+143
+.196
+1.196
+143.196
+144
+.197
+1.197
+144.197
+145
+.198
+1.198
+145.198
+146
+.200
+1.200
+146.200
+147
+.201
+1.201
+147.201
+148
+.203
+1.203
+148.203
+149
+.204
+1.204
+149.204
+150
+.205
+1.205
+150.205
+151
+.207
+1.207
+151.207
+152
+.208
+1.208
+152.208
+153
+.209
+1.209
+153.209
+154
+.211
+1.211
+154.211
+155
+.212
+1.212
+155.212
+156
+.213
+1.213
+156.213
+157
+.215
+1.215
+157.215
+158
+.216
+1.216
+158.216
+159
+.218
+1.218
+159.218
+160
+.219
+1.219
+160.219
+161
+.220
+1.220
+161.220
+162
+.222
+1.222
+162.222
+163
+.223
+1.223
+163.223
+164
+.224
+1.224
+164.224
+165
+.226
+1.226
+165.226
+166
+.227
+1.227
+166.227
+167
+.229
+1.229
+167.229
+168
+.230
+1.230
+168.230
+169
+.231
+1.231
+169.231
+170
+.233
+1.233
+170.233
+171
+.234
+1.234
+171.234
+172
+.235
+1.235
+172.235
+173
+.237
+1.237
+173.237
+174
+.238
+1.238
+174.238
+175
+.240
+1.240
+175.240
+176
+.241
+1.241
+176.241
+177
+.242
+1.242
+177.242
+178
+.244
+1.244
+178.244
+179
+.245
+1.245
+179.245
+180
+.246
+1.246
+180.246
+181
+.248
+1.248
+181.248
+182
+.249
+1.249
+182.249
+183
+.251
+1.251
+183.251
+184
+.252
+1.252
+184.252
+185
+.253
+1.253
+185.253
+186
+.255
+1.255
+186.255
+187
+.256
+1.256
+187.256
+188
+.257
+1.257
+188.257
+189
+.259
+1.259
+189.259
+190
+.260
+1.260
+190.260
+191
+.262
+1.262
+191.262
+192
+.263
+1.263
+192.263
+193
+.264
+1.264
+193.264
+194
+.266
+1.266
+194.266
+195
+.267
+1.267
+195.267
+196
+.268
+1.268
+196.268
+197
+.270
+1.270
+197.270
+198
+.271
+1.271
+198.271
+199
+.272
+1.272
+199.272
+200
+.274
+1.274
+200.274
+201
+.275
+1.275
+201.275
+202
+.277
+1.277
+202.277
+203
+.278
+1.278
+203.278
+204
+.279
+1.279
+204.279
+205
+.281
+1.281
+205.281
+206
+.282
+1.282
+206.282
+207
+.283
+1.283
+207.283
+208
+.285
+1.285
+208.285
+209
+.286
+1.286
+209.286
+210
+.288
+1.288
+210.288
+211
+.289
+1.289
+211.289
+212
+.290
+1.290
+212.290
+213
+.292
+1.292
+213.292
+214
+.293
+1.293
+214.293
+215
+.294
+1.294
+215.294
+216
+.296
+1.296
+216.296
+217
+.297
+1.297
+217.297
+218
+.299
+1.299
+218.299
+219
+.300
+1.300
+219.300
+220
+.301
+1.301
+220.301
+221
+.303
+1.303
+221.303
+222
+.304
+1.304
+222.304
+223
+.305
+1.305
+223.305
+224
+.307
+1.307
+224.307
+225
+.308
+1.308
+225.308
+226
+.310
+1.310
+226.310
+227
+.311
+1.311
+227.311
+228
+.312
+1.312
+228.312
+229
+.314
+1.314
+229.314
+230
+.315
+1.315
+230.315
+231
+.316
+1.316
+231.316
+232
+.318
+1.318
+232.318
+233
+.319
+1.319
+233.319
+234
+.320
+1.320
+234.320
+235
+.322
+1.322
+235.322
+236
+.323
+1.323
+236.323
+237
+.325
+1.325
+237.325
+238
+.326
+1.326
+238.326
+239
+.327
+1.327
+239.327
+240
+.329
+1.329
+240.329
+241
+.330
+1.330
+241.330
+242
+.331
+1.331
+242.331
+243
+.333
+1.333
+243.333
+244
+.334
+1.334
+244.334
+245
+.336
+1.336
+245.336
+246
+.337
+1.337
+246.337
+247
+.338
+1.338
+247.338
+248
+.340
+1.340
+248.340
+249
+.341
+1.341
+249.341
+250
+.342
+1.342
+250.342
+251
+.344
+1.344
+251.344
+252
+.345
+1.345
+252.345
+253
+.347
+1.347
+253.347
+254
+.348
+1.348
+254.348
+255
+.349
+1.349
+255.349
+256
+.351
+1.351
+256.351
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.2
+1.2
+3.2
+4
+.3
+1.3
+4.3
+5
+.4
+1.4
+5.4
+6
+.5
+1.5
+6.5
+7
+.6
+1.6
+7.6
+8
+.7
+1.7
+8.7
+9
+.8
+1.8
+9.8
+10
+.9
+1.9
+10.9
+11
+.09
+1.09
+11.09
+12
+.09
+1.09
+12.09
+13
+.10
+1.10
+13.10
+14
+.11
+1.11
+14.11
+15
+.12
+1.12
+15.12
+16
+.13
+1.13
+16.13
+17
+.14
+1.14
+17.14
+18
+.14
+1.14
+18.14
+19
+.15
+1.15
+19.15
+20
+.16
+1.16
+20.16
+21
+.17
+1.17
+21.17
+22
+.18
+1.18
+22.18
+23
+.19
+1.19
+23.19
+24
+.19
+1.19
+24.19
+25
+.20
+1.20
+25.20
+26
+.21
+1.21
+26.21
+27
+.22
+1.22
+27.22
+28
+.23
+1.23
+28.23
+29
+.23
+1.23
+29.23
+30
+.24
+1.24
+30.24
+31
+.25
+1.25
+31.25
+32
+.26
+1.26
+32.26
+33
+.27
+1.27
+33.27
+34
+.28
+1.28
+34.28
+35
+.28
+1.28
+35.28
+36
+.29
+1.29
+36.29
+37
+.30
+1.30
+37.30
+38
+.31
+1.31
+38.31
+39
+.32
+1.32
+39.32
+40
+.33
+1.33
+40.33
+41
+.33
+1.33
+41.33
+42
+.34
+1.34
+42.34
+43
+.35
+1.35
+43.35
+44
+.36
+1.36
+44.36
+45
+.37
+1.37
+45.37
+46
+.38
+1.38
+46.38
+47
+.38
+1.38
+47.38
+48
+.39
+1.39
+48.39
+49
+.40
+1.40
+49.40
+50
+.41
+1.41
+50.41
+51
+.42
+1.42
+51.42
+52
+.42
+1.42
+52.42
+53
+.43
+1.43
+53.43
+54
+.44
+1.44
+54.44
+55
+.45
+1.45
+55.45
+56
+.46
+1.46
+56.46
+57
+.47
+1.47
+57.47
+58
+.47
+1.47
+58.47
+59
+.48
+1.48
+59.48
+60
+.49
+1.49
+60.49
+61
+.50
+1.50
+61.50
+62
+.51
+1.51
+62.51
+63
+.52
+1.52
+63.52
+64
+.52
+1.52
+64.52
+65
+.53
+1.53
+65.53
+66
+.54
+1.54
+66.54
+67
+.55
+1.55
+67.55
+68
+.56
+1.56
+68.56
+69
+.57
+1.57
+69.57
+70
+.57
+1.57
+70.57
+71
+.58
+1.58
+71.58
+72
+.59
+1.59
+72.59
+73
+.60
+1.60
+73.60
+74
+.61
+1.61
+74.61
+75
+.61
+1.61
+75.61
+76
+.62
+1.62
+76.62
+77
+.63
+1.63
+77.63
+78
+.64
+1.64
+78.64
+79
+.65
+1.65
+79.65
+80
+.66
+1.66
+80.66
+81
+.66
+1.66
+81.66
+82
+.67
+1.67
+82.67
+83
+.68
+1.68
+83.68
+84
+.69
+1.69
+84.69
+85
+.70
+1.70
+85.70
+86
+.71
+1.71
+86.71
+87
+.71
+1.71
+87.71
+88
+.72
+1.72
+88.72
+89
+.73
+1.73
+89.73
+90
+.74
+1.74
+90.74
+91
+.75
+1.75
+91.75
+92
+.76
+1.76
+92.76
+93
+.76
+1.76
+93.76
+94
+.77
+1.77
+94.77
+95
+.78
+1.78
+95.78
+96
+.79
+1.79
+96.79
+97
+.80
+1.80
+97.80
+98
+.80
+1.80
+98.80
+99
+.81
+1.81
+99.81
+100
+.82
+1.82
+100.82
+101
+.83
+1.83
+101.83
+102
+.84
+1.84
+102.84
+103
+.85
+1.85
+103.85
+104
+.85
+1.85
+104.85
+105
+.86
+1.86
+105.86
+106
+.87
+1.87
+106.87
+107
+.88
+1.88
+107.88
+108
+.89
+1.89
+108.89
+109
+.90
+1.90
+109.90
+110
+.90
+1.90
+110.90
+111
+.91
+1.91
+111.91
+112
+.92
+1.92
+112.92
+113
+.93
+1.93
+113.93
+114
+.94
+1.94
+114.94
+115
+.95
+1.95
+115.95
+116
+.95
+1.95
+116.95
+117
+.96
+1.96
+117.96
+118
+.97
+1.97
+118.97
+119
+.98
+1.98
+119.98
+120
+.99
+1.99
+120.99
+121
+.090
+1.090
+121.090
+122
+.091
+1.091
+122.091
+123
+.092
+1.092
+123.092
+124
+.093
+1.093
+124.093
+125
+.093
+1.093
+125.093
+126
+.094
+1.094
+126.094
+127
+.095
+1.095
+127.095
+128
+.096
+1.096
+128.096
+129
+.096
+1.096
+129.096
+130
+.097
+1.097
+130.097
+131
+.098
+1.098
+131.098
+132
+.099
+1.099
+132.099
+133
+.099
+1.099
+133.099
+134
+.100
+1.100
+134.100
+135
+.101
+1.101
+135.101
+136
+.102
+1.102
+136.102
+137
+.102
+1.102
+137.102
+138
+.103
+1.103
+138.103
+139
+.104
+1.104
+139.104
+140
+.105
+1.105
+140.105
+141
+.105
+1.105
+141.105
+142
+.106
+1.106
+142.106
+143
+.107
+1.107
+143.107
+144
+.108
+1.108
+144.108
+145
+.108
+1.108
+145.108
+146
+.109
+1.109
+146.109
+147
+.110
+1.110
+147.110
+148
+.111
+1.111
+148.111
+149
+.111
+1.111
+149.111
+150
+.112
+1.112
+150.112
+151
+.113
+1.113
+151.113
+152
+.114
+1.114
+152.114
+153
+.114
+1.114
+153.114
+154
+.115
+1.115
+154.115
+155
+.116
+1.116
+155.116
+156
+.117
+1.117
+156.117
+157
+.117
+1.117
+157.117
+158
+.118
+1.118
+158.118
+159
+.119
+1.119
+159.119
+160
+.120
+1.120
+160.120
+161
+.120
+1.120
+161.120
+162
+.121
+1.121
+162.121
+163
+.122
+1.122
+163.122
+164
+.123
+1.123
+164.123
+165
+.123
+1.123
+165.123
+166
+.124
+1.124
+166.124
+167
+.125
+1.125
+167.125
+168
+.126
+1.126
+168.126
+169
+.126
+1.126
+169.126
+170
+.127
+1.127
+170.127
+171
+.128
+1.128
+171.128
+172
+.129
+1.129
+172.129
+173
+.129
+1.129
+173.129
+174
+.130
+1.130
+174.130
+175
+.131
+1.131
+175.131
+176
+.132
+1.132
+176.132
+177
+.132
+1.132
+177.132
+178
+.133
+1.133
+178.133
+179
+.134
+1.134
+179.134
+180
+.135
+1.135
+180.135
+181
+.135
+1.135
+181.135
+182
+.136
+1.136
+182.136
+183
+.137
+1.137
+183.137
+184
+.138
+1.138
+184.138
+185
+.138
+1.138
+185.138
+186
+.139
+1.139
+186.139
+187
+.140
+1.140
+187.140
+188
+.141
+1.141
+188.141
+189
+.141
+1.141
+189.141
+190
+.142
+1.142
+190.142
+191
+.143
+1.143
+191.143
+192
+.144
+1.144
+192.144
+193
+.145
+1.145
+193.145
+194
+.145
+1.145
+194.145
+195
+.146
+1.146
+195.146
+196
+.147
+1.147
+196.147
+197
+.148
+1.148
+197.148
+198
+.148
+1.148
+198.148
+199
+.149
+1.149
+199.149
+200
+.150
+1.150
+200.150
+201
+.151
+1.151
+201.151
+202
+.151
+1.151
+202.151
+203
+.152
+1.152
+203.152
+204
+.153
+1.153
+204.153
+205
+.154
+1.154
+205.154
+206
+.154
+1.154
+206.154
+207
+.155
+1.155
+207.155
+208
+.156
+1.156
+208.156
+209
+.157
+1.157
+209.157
+210
+.157
+1.157
+210.157
+211
+.158
+1.158
+211.158
+212
+.159
+1.159
+212.159
+213
+.160
+1.160
+213.160
+214
+.160
+1.160
+214.160
+215
+.161
+1.161
+215.161
+216
+.162
+1.162
+216.162
+217
+.163
+1.163
+217.163
+218
+.163
+1.163
+218.163
+219
+.164
+1.164
+219.164
+220
+.165
+1.165
+220.165
+221
+.166
+1.166
+221.166
+222
+.166
+1.166
+222.166
+223
+.167
+1.167
+223.167
+224
+.168
+1.168
+224.168
+225
+.169
+1.169
+225.169
+226
+.169
+1.169
+226.169
+227
+.170
+1.170
+227.170
+228
+.171
+1.171
+228.171
+229
+.172
+1.172
+229.172
+230
+.172
+1.172
+230.172
+231
+.173
+1.173
+231.173
+232
+.174
+1.174
+232.174
+233
+.175
+1.175
+233.175
+234
+.175
+1.175
+234.175
+235
+.176
+1.176
+235.176
+236
+.177
+1.177
+236.177
+237
+.178
+1.178
+237.178
+238
+.178
+1.178
+238.178
+239
+.179
+1.179
+239.179
+240
+.180
+1.180
+240.180
+241
+.181
+1.181
+241.181
+242
+.181
+1.181
+242.181
+243
+.182
+1.182
+243.182
+244
+.183
+1.183
+244.183
+245
+.184
+1.184
+245.184
+246
+.184
+1.184
+246.184
+247
+.185
+1.185
+247.185
+248
+.186
+1.186
+248.186
+249
+.187
+1.187
+249.187
+250
+.187
+1.187
+250.187
+251
+.188
+1.188
+251.188
+252
+.189
+1.189
+252.189
+253
+.190
+1.190
+253.190
+254
+.190
+1.190
+254.190
+255
+.191
+1.191
+255.191
+256
+.192
+1.192
+256.192
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.2
+1.2
+3.2
+4
+.3
+1.3
+4.3
+5
+.4
+1.4
+5.4
+6
+.5
+1.5
+6.5
+7
+.5
+1.5
+7.5
+8
+.6
+1.6
+8.6
+9
+.7
+1.7
+9.7
+10
+.8
+1.8
+10.8
+11
+.9
+1.9
+11.9
+12
+.08
+1.08
+12.08
+13
+.09
+1.09
+13.09
+14
+.09
+1.09
+14.09
+15
+.10
+1.10
+15.10
+16
+.11
+1.11
+16.11
+17
+.11
+1.11
+17.11
+18
+.12
+1.12
+18.12
+19
+.13
+1.13
+19.13
+20
+.13
+1.13
+20.13
+21
+.14
+1.14
+21.14
+22
+.15
+1.15
+22.15
+23
+.15
+1.15
+23.15
+24
+.16
+1.16
+24.16
+25
+.17
+1.17
+25.17
+26
+.18
+1.18
+26.18
+27
+.18
+1.18
+27.18
+28
+.19
+1.19
+28.19
+29
+.20
+1.20
+29.20
+30
+.20
+1.20
+30.20
+31
+.21
+1.21
+31.21
+32
+.22
+1.22
+32.22
+33
+.22
+1.22
+33.22
+34
+.23
+1.23
+34.23
+35
+.24
+1.24
+35.24
+36
+.25
+1.25
+36.25
+37
+.25
+1.25
+37.25
+38
+.26
+1.26
+38.26
+39
+.27
+1.27
+39.27
+40
+.27
+1.27
+40.27
+41
+.28
+1.28
+41.28
+42
+.29
+1.29
+42.29
+43
+.29
+1.29
+43.29
+44
+.30
+1.30
+44.30
+45
+.31
+1.31
+45.31
+46
+.31
+1.31
+46.31
+47
+.32
+1.32
+47.32
+48
+.33
+1.33
+48.33
+49
+.34
+1.34
+49.34
+50
+.34
+1.34
+50.34
+51
+.35
+1.35
+51.35
+52
+.36
+1.36
+52.36
+53
+.36
+1.36
+53.36
+54
+.37
+1.37
+54.37
+55
+.38
+1.38
+55.38
+56
+.38
+1.38
+56.38
+57
+.39
+1.39
+57.39
+58
+.40
+1.40
+58.40
+59
+.40
+1.40
+59.40
+60
+.41
+1.41
+60.41
+61
+.42
+1.42
+61.42
+62
+.43
+1.43
+62.43
+63
+.43
+1.43
+63.43
+64
+.44
+1.44
+64.44
+65
+.45
+1.45
+65.45
+66
+.45
+1.45
+66.45
+67
+.46
+1.46
+67.46
+68
+.47
+1.47
+68.47
+69
+.47
+1.47
+69.47
+70
+.48
+1.48
+70.48
+71
+.49
+1.49
+71.49
+72
+.50
+1.50
+72.50
+73
+.50
+1.50
+73.50
+74
+.51
+1.51
+74.51
+75
+.52
+1.52
+75.52
+76
+.52
+1.52
+76.52
+77
+.53
+1.53
+77.53
+78
+.54
+1.54
+78.54
+79
+.54
+1.54
+79.54
+80
+.55
+1.55
+80.55
+81
+.56
+1.56
+81.56
+82
+.56
+1.56
+82.56
+83
+.57
+1.57
+83.57
+84
+.58
+1.58
+84.58
+85
+.59
+1.59
+85.59
+86
+.59
+1.59
+86.59
+87
+.60
+1.60
+87.60
+88
+.61
+1.61
+88.61
+89
+.61
+1.61
+89.61
+90
+.62
+1.62
+90.62
+91
+.63
+1.63
+91.63
+92
+.63
+1.63
+92.63
+93
+.64
+1.64
+93.64
+94
+.65
+1.65
+94.65
+95
+.65
+1.65
+95.65
+96
+.66
+1.66
+96.66
+97
+.67
+1.67
+97.67
+98
+.68
+1.68
+98.68
+99
+.68
+1.68
+99.68
+100
+.69
+1.69
+100.69
+101
+.70
+1.70
+101.70
+102
+.70
+1.70
+102.70
+103
+.71
+1.71
+103.71
+104
+.72
+1.72
+104.72
+105
+.72
+1.72
+105.72
+106
+.73
+1.73
+106.73
+107
+.74
+1.74
+107.74
+108
+.75
+1.75
+108.75
+109
+.75
+1.75
+109.75
+110
+.76
+1.76
+110.76
+111
+.77
+1.77
+111.77
+112
+.77
+1.77
+112.77
+113
+.78
+1.78
+113.78
+114
+.79
+1.79
+114.79
+115
+.79
+1.79
+115.79
+116
+.80
+1.80
+116.80
+117
+.81
+1.81
+117.81
+118
+.81
+1.81
+118.81
+119
+.82
+1.82
+119.82
+120
+.83
+1.83
+120.83
+121
+.84
+1.84
+121.84
+122
+.84
+1.84
+122.84
+123
+.85
+1.85
+123.85
+124
+.86
+1.86
+124.86
+125
+.86
+1.86
+125.86
+126
+.87
+1.87
+126.87
+127
+.88
+1.88
+127.88
+128
+.88
+1.88
+128.88
+129
+.89
+1.89
+129.89
+130
+.90
+1.90
+130.90
+131
+.90
+1.90
+131.90
+132
+.91
+1.91
+132.91
+133
+.92
+1.92
+133.92
+134
+.93
+1.93
+134.93
+135
+.93
+1.93
+135.93
+136
+.94
+1.94
+136.94
+137
+.95
+1.95
+137.95
+138
+.95
+1.95
+138.95
+139
+.96
+1.96
+139.96
+140
+.97
+1.97
+140.97
+141
+.97
+1.97
+141.97
+142
+.98
+1.98
+142.98
+143
+.99
+1.99
+143.99
+144
+.083
+1.083
+144.083
+145
+.083
+1.083
+145.083
+146
+.084
+1.084
+146.084
+147
+.085
+1.085
+147.085
+148
+.085
+1.085
+148.085
+149
+.086
+1.086
+149.086
+150
+.086
+1.086
+150.086
+151
+.087
+1.087
+151.087
+152
+.087
+1.087
+152.087
+153
+.088
+1.088
+153.088
+154
+.089
+1.089
+154.089
+155
+.089
+1.089
+155.089
+156
+.090
+1.090
+156.090
+157
+.090
+1.090
+157.090
+158
+.091
+1.091
+158.091
+159
+.092
+1.092
+159.092
+160
+.092
+1.092
+160.092
+161
+.093
+1.093
+161.093
+162
+.093
+1.093
+162.093
+163
+.094
+1.094
+163.094
+164
+.094
+1.094
+164.094
+165
+.095
+1.095
+165.095
+166
+.096
+1.096
+166.096
+167
+.096
+1.096
+167.096
+168
+.097
+1.097
+168.097
+169
+.097
+1.097
+169.097
+170
+.098
+1.098
+170.098
+171
+.098
+1.098
+171.098
+172
+.099
+1.099
+172.099
+173
+.100
+1.100
+173.100
+174
+.100
+1.100
+174.100
+175
+.101
+1.101
+175.101
+176
+.101
+1.101
+176.101
+177
+.102
+1.102
+177.102
+178
+.103
+1.103
+178.103
+179
+.103
+1.103
+179.103
+180
+.104
+1.104
+180.104
+181
+.104
+1.104
+181.104
+182
+.105
+1.105
+182.105
+183
+.105
+1.105
+183.105
+184
+.106
+1.106
+184.106
+185
+.107
+1.107
+185.107
+186
+.107
+1.107
+186.107
+187
+.108
+1.108
+187.108
+188
+.108
+1.108
+188.108
+189
+.109
+1.109
+189.109
+190
+.109
+1.109
+190.109
+191
+.110
+1.110
+191.110
+192
+.111
+1.111
+192.111
+193
+.111
+1.111
+193.111
+194
+.112
+1.112
+194.112
+195
+.112
+1.112
+195.112
+196
+.113
+1.113
+196.113
+197
+.114
+1.114
+197.114
+198
+.114
+1.114
+198.114
+199
+.115
+1.115
+199.115
+200
+.115
+1.115
+200.115
+201
+.116
+1.116
+201.116
+202
+.116
+1.116
+202.116
+203
+.117
+1.117
+203.117
+204
+.118
+1.118
+204.118
+205
+.118
+1.118
+205.118
+206
+.119
+1.119
+206.119
+207
+.119
+1.119
+207.119
+208
+.120
+1.120
+208.120
+209
+.120
+1.120
+209.120
+210
+.121
+1.121
+210.121
+211
+.122
+1.122
+211.122
+212
+.122
+1.122
+212.122
+213
+.123
+1.123
+213.123
+214
+.123
+1.123
+214.123
+215
+.124
+1.124
+215.124
+216
+.125
+1.125
+216.125
+217
+.125
+1.125
+217.125
+218
+.126
+1.126
+218.126
+219
+.126
+1.126
+219.126
+220
+.127
+1.127
+220.127
+221
+.127
+1.127
+221.127
+222
+.128
+1.128
+222.128
+223
+.129
+1.129
+223.129
+224
+.129
+1.129
+224.129
+225
+.130
+1.130
+225.130
+226
+.130
+1.130
+226.130
+227
+.131
+1.131
+227.131
+228
+.131
+1.131
+228.131
+229
+.132
+1.132
+229.132
+230
+.133
+1.133
+230.133
+231
+.133
+1.133
+231.133
+232
+.134
+1.134
+232.134
+233
+.134
+1.134
+233.134
+234
+.135
+1.135
+234.135
+235
+.135
+1.135
+235.135
+236
+.136
+1.136
+236.136
+237
+.137
+1.137
+237.137
+238
+.137
+1.137
+238.137
+239
+.138
+1.138
+239.138
+240
+.138
+1.138
+240.138
+241
+.139
+1.139
+241.139
+242
+.140
+1.140
+242.140
+243
+.140
+1.140
+243.140
+244
+.141
+1.141
+244.141
+245
+.141
+1.141
+245.141
+246
+.142
+1.142
+246.142
+247
+.142
+1.142
+247.142
+248
+.143
+1.143
+248.143
+249
+.144
+1.144
+249.144
+250
+.144
+1.144
+250.144
+251
+.145
+1.145
+251.145
+252
+.145
+1.145
+252.145
+253
+.146
+1.146
+253.146
+254
+.146
+1.146
+254.146
+255
+.147
+1.147
+255.147
+256
+.148
+1.148
+256.148
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.2
+1.2
+3.2
+4
+.3
+1.3
+4.3
+5
+.3
+1.3
+5.3
+6
+.4
+1.4
+6.4
+7
+.5
+1.5
+7.5
+8
+.6
+1.6
+8.6
+9
+.6
+1.6
+9.6
+10
+.7
+1.7
+10.7
+11
+.8
+1.8
+11.8
+12
+.9
+1.9
+12.9
+13
+.07
+1.07
+13.07
+14
+.08
+1.08
+14.08
+15
+.08
+1.08
+15.08
+16
+.09
+1.09
+16.09
+17
+.10
+1.10
+17.10
+18
+.10
+1.10
+18.10
+19
+.11
+1.11
+19.11
+20
+.11
+1.11
+20.11
+21
+.12
+1.12
+21.12
+22
+.13
+1.13
+22.13
+23
+.13
+1.13
+23.13
+24
+.14
+1.14
+24.14
+25
+.14
+1.14
+25.14
+26
+.15
+1.15
+26.15
+27
+.15
+1.15
+27.15
+28
+.16
+1.16
+28.16
+29
+.17
+1.17
+29.17
+30
+.17
+1.17
+30.17
+31
+.18
+1.18
+31.18
+32
+.18
+1.18
+32.18
+33
+.19
+1.19
+33.19
+34
+.20
+1.20
+34.20
+35
+.20
+1.20
+35.20
+36
+.21
+1.21
+36.21
+37
+.21
+1.21
+37.21
+38
+.22
+1.22
+38.22
+39
+.23
+1.23
+39.23
+40
+.23
+1.23
+40.23
+41
+.24
+1.24
+41.24
+42
+.24
+1.24
+42.24
+43
+.25
+1.25
+43.25
+44
+.26
+1.26
+44.26
+45
+.26
+1.26
+45.26
+46
+.27
+1.27
+46.27
+47
+.27
+1.27
+47.27
+48
+.28
+1.28
+48.28
+49
+.28
+1.28
+49.28
+50
+.29
+1.29
+50.29
+51
+.30
+1.30
+51.30
+52
+.30
+1.30
+52.30
+53
+.31
+1.31
+53.31
+54
+.31
+1.31
+54.31
+55
+.32
+1.32
+55.32
+56
+.33
+1.33
+56.33
+57
+.33
+1.33
+57.33
+58
+.34
+1.34
+58.34
+59
+.34
+1.34
+59.34
+60
+.35
+1.35
+60.35
+61
+.36
+1.36
+61.36
+62
+.36
+1.36
+62.36
+63
+.37
+1.37
+63.37
+64
+.37
+1.37
+64.37
+65
+.38
+1.38
+65.38
+66
+.39
+1.39
+66.39
+67
+.39
+1.39
+67.39
+68
+.40
+1.40
+68.40
+69
+.40
+1.40
+69.40
+70
+.41
+1.41
+70.41
+71
+.42
+1.42
+71.42
+72
+.42
+1.42
+72.42
+73
+.43
+1.43
+73.43
+74
+.43
+1.43
+74.43
+75
+.44
+1.44
+75.44
+76
+.44
+1.44
+76.44
+77
+.45
+1.45
+77.45
+78
+.46
+1.46
+78.46
+79
+.46
+1.46
+79.46
+80
+.47
+1.47
+80.47
+81
+.47
+1.47
+81.47
+82
+.48
+1.48
+82.48
+83
+.49
+1.49
+83.49
+84
+.49
+1.49
+84.49
+85
+.50
+1.50
+85.50
+86
+.50
+1.50
+86.50
+87
+.51
+1.51
+87.51
+88
+.52
+1.52
+88.52
+89
+.52
+1.52
+89.52
+90
+.53
+1.53
+90.53
+91
+.53
+1.53
+91.53
+92
+.54
+1.54
+92.54
+93
+.55
+1.55
+93.55
+94
+.55
+1.55
+94.55
+95
+.56
+1.56
+95.56
+96
+.56
+1.56
+96.56
+97
+.57
+1.57
+97.57
+98
+.57
+1.57
+98.57
+99
+.58
+1.58
+99.58
+100
+.59
+1.59
+100.59
+101
+.59
+1.59
+101.59
+102
+.60
+1.60
+102.60
+103
+.60
+1.60
+103.60
+104
+.61
+1.61
+104.61
+105
+.62
+1.62
+105.62
+106
+.62
+1.62
+106.62
+107
+.63
+1.63
+107.63
+108
+.63
+1.63
+108.63
+109
+.64
+1.64
+109.64
+110
+.65
+1.65
+110.65
+111
+.65
+1.65
+111.65
+112
+.66
+1.66
+112.66
+113
+.66
+1.66
+113.66
+114
+.67
+1.67
+114.67
+115
+.68
+1.68
+115.68
+116
+.68
+1.68
+116.68
+117
+.69
+1.69
+117.69
+118
+.69
+1.69
+118.69
+119
+.70
+1.70
+119.70
+120
+.71
+1.71
+120.71
+121
+.71
+1.71
+121.71
+122
+.72
+1.72
+122.72
+123
+.72
+1.72
+123.72
+124
+.73
+1.73
+124.73
+125
+.73
+1.73
+125.73
+126
+.74
+1.74
+126.74
+127
+.75
+1.75
+127.75
+128
+.75
+1.75
+128.75
+129
+.76
+1.76
+129.76
+130
+.76
+1.76
+130.76
+131
+.77
+1.77
+131.77
+132
+.78
+1.78
+132.78
+133
+.78
+1.78
+133.78
+134
+.79
+1.79
+134.79
+135
+.79
+1.79
+135.79
+136
+.80
+1.80
+136.80
+137
+.81
+1.81
+137.81
+138
+.81
+1.81
+138.81
+139
+.82
+1.82
+139.82
+140
+.82
+1.82
+140.82
+141
+.83
+1.83
+141.83
+142
+.84
+1.84
+142.84
+143
+.84
+1.84
+143.84
+144
+.85
+1.85
+144.85
+145
+.85
+1.85
+145.85
+146
+.86
+1.86
+146.86
+147
+.86
+1.86
+147.86
+148
+.87
+1.87
+148.87
+149
+.88
+1.88
+149.88
+150
+.88
+1.88
+150.88
+151
+.89
+1.89
+151.89
+152
+.89
+1.89
+152.89
+153
+.90
+1.90
+153.90
+154
+.91
+1.91
+154.91
+155
+.91
+1.91
+155.91
+156
+.92
+1.92
+156.92
+157
+.92
+1.92
+157.92
+158
+.93
+1.93
+158.93
+159
+.94
+1.94
+159.94
+160
+.94
+1.94
+160.94
+161
+.95
+1.95
+161.95
+162
+.95
+1.95
+162.95
+163
+.96
+1.96
+163.96
+164
+.97
+1.97
+164.97
+165
+.97
+1.97
+165.97
+166
+.98
+1.98
+166.98
+167
+.98
+1.98
+167.98
+168
+.99
+1.99
+168.99
+169
+.076
+1.076
+169.076
+170
+.077
+1.077
+170.077
+171
+.077
+1.077
+171.077
+172
+.078
+1.078
+172.078
+173
+.078
+1.078
+173.078
+174
+.079
+1.079
+174.079
+175
+.079
+1.079
+175.079
+176
+.080
+1.080
+176.080
+177
+.080
+1.080
+177.080
+178
+.081
+1.081
+178.081
+179
+.081
+1.081
+179.081
+180
+.081
+1.081
+180.081
+181
+.082
+1.082
+181.082
+182
+.082
+1.082
+182.082
+183
+.083
+1.083
+183.083
+184
+.083
+1.083
+184.083
+185
+.084
+1.084
+185.084
+186
+.084
+1.084
+186.084
+187
+.085
+1.085
+187.085
+188
+.085
+1.085
+188.085
+189
+.086
+1.086
+189.086
+190
+.086
+1.086
+190.086
+191
+.086
+1.086
+191.086
+192
+.087
+1.087
+192.087
+193
+.087
+1.087
+193.087
+194
+.088
+1.088
+194.088
+195
+.088
+1.088
+195.088
+196
+.089
+1.089
+196.089
+197
+.089
+1.089
+197.089
+198
+.090
+1.090
+198.090
+199
+.090
+1.090
+199.090
+200
+.091
+1.091
+200.091
+201
+.091
+1.091
+201.091
+202
+.091
+1.091
+202.091
+203
+.092
+1.092
+203.092
+204
+.092
+1.092
+204.092
+205
+.093
+1.093
+205.093
+206
+.093
+1.093
+206.093
+207
+.094
+1.094
+207.094
+208
+.094
+1.094
+208.094
+209
+.095
+1.095
+209.095
+210
+.095
+1.095
+210.095
+211
+.096
+1.096
+211.096
+212
+.096
+1.096
+212.096
+213
+.096
+1.096
+213.096
+214
+.097
+1.097
+214.097
+215
+.097
+1.097
+215.097
+216
+.098
+1.098
+216.098
+217
+.098
+1.098
+217.098
+218
+.099
+1.099
+218.099
+219
+.099
+1.099
+219.099
+220
+.100
+1.100
+220.100
+221
+.100
+1.100
+221.100
+222
+.101
+1.101
+222.101
+223
+.101
+1.101
+223.101
+224
+.101
+1.101
+224.101
+225
+.102
+1.102
+225.102
+226
+.102
+1.102
+226.102
+227
+.103
+1.103
+227.103
+228
+.103
+1.103
+228.103
+229
+.104
+1.104
+229.104
+230
+.104
+1.104
+230.104
+231
+.105
+1.105
+231.105
+232
+.105
+1.105
+232.105
+233
+.106
+1.106
+233.106
+234
+.106
+1.106
+234.106
+235
+.106
+1.106
+235.106
+236
+.107
+1.107
+236.107
+237
+.107
+1.107
+237.107
+238
+.108
+1.108
+238.108
+239
+.108
+1.108
+239.108
+240
+.109
+1.109
+240.109
+241
+.109
+1.109
+241.109
+242
+.110
+1.110
+242.110
+243
+.110
+1.110
+243.110
+244
+.111
+1.111
+244.111
+245
+.111
+1.111
+245.111
+246
+.111
+1.111
+246.111
+247
+.112
+1.112
+247.112
+248
+.112
+1.112
+248.112
+249
+.113
+1.113
+249.113
+250
+.113
+1.113
+250.113
+251
+.114
+1.114
+251.114
+252
+.114
+1.114
+252.114
+253
+.115
+1.115
+253.115
+254
+.115
+1.115
+254.115
+255
+.116
+1.116
+255.116
+256
+.116
+1.116
+256.116
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.2
+1.2
+3.2
+4
+.2
+1.2
+4.2
+5
+.3
+1.3
+5.3
+6
+.4
+1.4
+6.4
+7
+.5
+1.5
+7.5
+8
+.5
+1.5
+8.5
+9
+.6
+1.6
+9.6
+10
+.7
+1.7
+10.7
+11
+.7
+1.7
+11.7
+12
+.8
+1.8
+12.8
+13
+.9
+1.9
+13.9
+14
+.07
+1.07
+14.07
+15
+.07
+1.07
+15.07
+16
+.08
+1.08
+16.08
+17
+.08
+1.08
+17.08
+18
+.09
+1.09
+18.09
+19
+.09
+1.09
+19.09
+20
+.10
+1.10
+20.10
+21
+.10
+1.10
+21.10
+22
+.11
+1.11
+22.11
+23
+.11
+1.11
+23.11
+24
+.12
+1.12
+24.12
+25
+.12
+1.12
+25.12
+26
+.13
+1.13
+26.13
+27
+.13
+1.13
+27.13
+28
+.14
+1.14
+28.14
+29
+.14
+1.14
+29.14
+30
+.15
+1.15
+30.15
+31
+.15
+1.15
+31.15
+32
+.16
+1.16
+32.16
+33
+.16
+1.16
+33.16
+34
+.17
+1.17
+34.17
+35
+.17
+1.17
+35.17
+36
+.18
+1.18
+36.18
+37
+.18
+1.18
+37.18
+38
+.19
+1.19
+38.19
+39
+.19
+1.19
+39.19
+40
+.20
+1.20
+40.20
+41
+.20
+1.20
+41.20
+42
+.21
+1.21
+42.21
+43
+.21
+1.21
+43.21
+44
+.22
+1.22
+44.22
+45
+.22
+1.22
+45.22
+46
+.23
+1.23
+46.23
+47
+.23
+1.23
+47.23
+48
+.24
+1.24
+48.24
+49
+.25
+1.25
+49.25
+50
+.25
+1.25
+50.25
+51
+.26
+1.26
+51.26
+52
+.26
+1.26
+52.26
+53
+.27
+1.27
+53.27
+54
+.27
+1.27
+54.27
+55
+.28
+1.28
+55.28
+56
+.28
+1.28
+56.28
+57
+.29
+1.29
+57.29
+58
+.29
+1.29
+58.29
+59
+.30
+1.30
+59.30
+60
+.30
+1.30
+60.30
+61
+.31
+1.31
+61.31
+62
+.31
+1.31
+62.31
+63
+.32
+1.32
+63.32
+64
+.32
+1.32
+64.32
+65
+.33
+1.33
+65.33
+66
+.33
+1.33
+66.33
+67
+.34
+1.34
+67.34
+68
+.34
+1.34
+68.34
+69
+.35
+1.35
+69.35
+70
+.35
+1.35
+70.35
+71
+.36
+1.36
+71.36
+72
+.36
+1.36
+72.36
+73
+.37
+1.37
+73.37
+74
+.37
+1.37
+74.37
+75
+.38
+1.38
+75.38
+76
+.38
+1.38
+76.38
+77
+.39
+1.39
+77.39
+78
+.39
+1.39
+78.39
+79
+.40
+1.40
+79.40
+80
+.40
+1.40
+80.40
+81
+.41
+1.41
+81.41
+82
+.41
+1.41
+82.41
+83
+.42
+1.42
+83.42
+84
+.42
+1.42
+84.42
+85
+.43
+1.43
+85.43
+86
+.43
+1.43
+86.43
+87
+.44
+1.44
+87.44
+88
+.44
+1.44
+88.44
+89
+.45
+1.45
+89.45
+90
+.45
+1.45
+90.45
+91
+.46
+1.46
+91.46
+92
+.46
+1.46
+92.46
+93
+.47
+1.47
+93.47
+94
+.47
+1.47
+94.47
+95
+.48
+1.48
+95.48
+96
+.48
+1.48
+96.48
+97
+.49
+1.49
+97.49
+98
+.50
+1.50
+98.50
+99
+.50
+1.50
+99.50
+100
+.51
+1.51
+100.51
+101
+.51
+1.51
+101.51
+102
+.52
+1.52
+102.52
+103
+.52
+1.52
+103.52
+104
+.53
+1.53
+104.53
+105
+.53
+1.53
+105.53
+106
+.54
+1.54
+106.54
+107
+.54
+1.54
+107.54
+108
+.55
+1.55
+108.55
+109
+.55
+1.55
+109.55
+110
+.56
+1.56
+110.56
+111
+.56
+1.56
+111.56
+112
+.57
+1.57
+112.57
+113
+.57
+1.57
+113.57
+114
+.58
+1.58
+114.58
+115
+.58
+1.58
+115.58
+116
+.59
+1.59
+116.59
+117
+.59
+1.59
+117.59
+118
+.60
+1.60
+118.60
+119
+.60
+1.60
+119.60
+120
+.61
+1.61
+120.61
+121
+.61
+1.61
+121.61
+122
+.62
+1.62
+122.62
+123
+.62
+1.62
+123.62
+124
+.63
+1.63
+124.63
+125
+.63
+1.63
+125.63
+126
+.64
+1.64
+126.64
+127
+.64
+1.64
+127.64
+128
+.65
+1.65
+128.65
+129
+.65
+1.65
+129.65
+130
+.66
+1.66
+130.66
+131
+.66
+1.66
+131.66
+132
+.67
+1.67
+132.67
+133
+.67
+1.67
+133.67
+134
+.68
+1.68
+134.68
+135
+.68
+1.68
+135.68
+136
+.69
+1.69
+136.69
+137
+.69
+1.69
+137.69
+138
+.70
+1.70
+138.70
+139
+.70
+1.70
+139.70
+140
+.71
+1.71
+140.71
+141
+.71
+1.71
+141.71
+142
+.72
+1.72
+142.72
+143
+.72
+1.72
+143.72
+144
+.73
+1.73
+144.73
+145
+.73
+1.73
+145.73
+146
+.74
+1.74
+146.74
+147
+.75
+1.75
+147.75
+148
+.75
+1.75
+148.75
+149
+.76
+1.76
+149.76
+150
+.76
+1.76
+150.76
+151
+.77
+1.77
+151.77
+152
+.77
+1.77
+152.77
+153
+.78
+1.78
+153.78
+154
+.78
+1.78
+154.78
+155
+.79
+1.79
+155.79
+156
+.79
+1.79
+156.79
+157
+.80
+1.80
+157.80
+158
+.80
+1.80
+158.80
+159
+.81
+1.81
+159.81
+160
+.81
+1.81
+160.81
+161
+.82
+1.82
+161.82
+162
+.82
+1.82
+162.82
+163
+.83
+1.83
+163.83
+164
+.83
+1.83
+164.83
+165
+.84
+1.84
+165.84
+166
+.84
+1.84
+166.84
+167
+.85
+1.85
+167.85
+168
+.85
+1.85
+168.85
+169
+.86
+1.86
+169.86
+170
+.86
+1.86
+170.86
+171
+.87
+1.87
+171.87
+172
+.87
+1.87
+172.87
+173
+.88
+1.88
+173.88
+174
+.88
+1.88
+174.88
+175
+.89
+1.89
+175.89
+176
+.89
+1.89
+176.89
+177
+.90
+1.90
+177.90
+178
+.90
+1.90
+178.90
+179
+.91
+1.91
+179.91
+180
+.91
+1.91
+180.91
+181
+.92
+1.92
+181.92
+182
+.92
+1.92
+182.92
+183
+.93
+1.93
+183.93
+184
+.93
+1.93
+184.93
+185
+.94
+1.94
+185.94
+186
+.94
+1.94
+186.94
+187
+.95
+1.95
+187.95
+188
+.95
+1.95
+188.95
+189
+.96
+1.96
+189.96
+190
+.96
+1.96
+190.96
+191
+.97
+1.97
+191.97
+192
+.97
+1.97
+192.97
+193
+.98
+1.98
+193.98
+194
+.98
+1.98
+194.98
+195
+.99
+1.99
+195.99
+196
+.071
+1.071
+196.071
+197
+.071
+1.071
+197.071
+198
+.072
+1.072
+198.072
+199
+.072
+1.072
+199.072
+200
+.072
+1.072
+200.072
+201
+.073
+1.073
+201.073
+202
+.073
+1.073
+202.073
+203
+.073
+1.073
+203.073
+204
+.074
+1.074
+204.074
+205
+.074
+1.074
+205.074
+206
+.075
+1.075
+206.075
+207
+.075
+1.075
+207.075
+208
+.075
+1.075
+208.075
+209
+.076
+1.076
+209.076
+210
+.076
+1.076
+210.076
+211
+.076
+1.076
+211.076
+212
+.077
+1.077
+212.077
+213
+.077
+1.077
+213.077
+214
+.077
+1.077
+214.077
+215
+.078
+1.078
+215.078
+216
+.078
+1.078
+216.078
+217
+.079
+1.079
+217.079
+218
+.079
+1.079
+218.079
+219
+.079
+1.079
+219.079
+220
+.080
+1.080
+220.080
+221
+.080
+1.080
+221.080
+222
+.080
+1.080
+222.080
+223
+.081
+1.081
+223.081
+224
+.081
+1.081
+224.081
+225
+.081
+1.081
+225.081
+226
+.082
+1.082
+226.082
+227
+.082
+1.082
+227.082
+228
+.083
+1.083
+228.083
+229
+.083
+1.083
+229.083
+230
+.083
+1.083
+230.083
+231
+.084
+1.084
+231.084
+232
+.084
+1.084
+232.084
+233
+.084
+1.084
+233.084
+234
+.085
+1.085
+234.085
+235
+.085
+1.085
+235.085
+236
+.086
+1.086
+236.086
+237
+.086
+1.086
+237.086
+238
+.086
+1.086
+238.086
+239
+.087
+1.087
+239.087
+240
+.087
+1.087
+240.087
+241
+.087
+1.087
+241.087
+242
+.088
+1.088
+242.088
+243
+.088
+1.088
+243.088
+244
+.088
+1.088
+244.088
+245
+.089
+1.089
+245.089
+246
+.089
+1.089
+246.089
+247
+.090
+1.090
+247.090
+248
+.090
+1.090
+248.090
+249
+.090
+1.090
+249.090
+250
+.091
+1.091
+250.091
+251
+.091
+1.091
+251.091
+252
+.091
+1.091
+252.091
+253
+.092
+1.092
+253.092
+254
+.092
+1.092
+254.092
+255
+.092
+1.092
+255.092
+256
+.093
+1.093
+256.093
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.2
+1.2
+3.2
+4
+.2
+1.2
+4.2
+5
+.3
+1.3
+5.3
+6
+.4
+1.4
+6.4
+7
+.4
+1.4
+7.4
+8
+.5
+1.5
+8.5
+9
+.6
+1.6
+9.6
+10
+.6
+1.6
+10.6
+11
+.7
+1.7
+11.7
+12
+.8
+1.8
+12.8
+13
+.8
+1.8
+13.8
+14
+.9
+1.9
+14.9
+15
+.06
+1.06
+15.06
+16
+.07
+1.07
+16.07
+17
+.07
+1.07
+17.07
+18
+.08
+1.08
+18.08
+19
+.08
+1.08
+19.08
+20
+.08
+1.08
+20.08
+21
+.09
+1.09
+21.09
+22
+.09
+1.09
+22.09
+23
+.10
+1.10
+23.10
+24
+.10
+1.10
+24.10
+25
+.11
+1.11
+25.11
+26
+.11
+1.11
+26.11
+27
+.12
+1.12
+27.12
+28
+.12
+1.12
+28.12
+29
+.12
+1.12
+29.12
+30
+.13
+1.13
+30.13
+31
+.13
+1.13
+31.13
+32
+.14
+1.14
+32.14
+33
+.14
+1.14
+33.14
+34
+.15
+1.15
+34.15
+35
+.15
+1.15
+35.15
+36
+.16
+1.16
+36.16
+37
+.16
+1.16
+37.16
+38
+.16
+1.16
+38.16
+39
+.17
+1.17
+39.17
+40
+.17
+1.17
+40.17
+41
+.18
+1.18
+41.18
+42
+.18
+1.18
+42.18
+43
+.19
+1.19
+43.19
+44
+.19
+1.19
+44.19
+45
+.20
+1.20
+45.20
+46
+.20
+1.20
+46.20
+47
+.20
+1.20
+47.20
+48
+.21
+1.21
+48.21
+49
+.21
+1.21
+49.21
+50
+.22
+1.22
+50.22
+51
+.22
+1.22
+51.22
+52
+.23
+1.23
+52.23
+53
+.23
+1.23
+53.23
+54
+.24
+1.24
+54.24
+55
+.24
+1.24
+55.24
+56
+.24
+1.24
+56.24
+57
+.25
+1.25
+57.25
+58
+.25
+1.25
+58.25
+59
+.26
+1.26
+59.26
+60
+.26
+1.26
+60.26
+61
+.27
+1.27
+61.27
+62
+.27
+1.27
+62.27
+63
+.28
+1.28
+63.28
+64
+.28
+1.28
+64.28
+65
+.28
+1.28
+65.28
+66
+.29
+1.29
+66.29
+67
+.29
+1.29
+67.29
+68
+.30
+1.30
+68.30
+69
+.30
+1.30
+69.30
+70
+.31
+1.31
+70.31
+71
+.31
+1.31
+71.31
+72
+.32
+1.32
+72.32
+73
+.32
+1.32
+73.32
+74
+.32
+1.32
+74.32
+75
+.33
+1.33
+75.33
+76
+.33
+1.33
+76.33
+77
+.34
+1.34
+77.34
+78
+.34
+1.34
+78.34
+79
+.35
+1.35
+79.35
+80
+.35
+1.35
+80.35
+81
+.36
+1.36
+81.36
+82
+.36
+1.36
+82.36
+83
+.36
+1.36
+83.36
+84
+.37
+1.37
+84.37
+85
+.37
+1.37
+85.37
+86
+.38
+1.38
+86.38
+87
+.38
+1.38
+87.38
+88
+.39
+1.39
+88.39
+89
+.39
+1.39
+89.39
+90
+.40
+1.40
+90.40
+91
+.40
+1.40
+91.40
+92
+.40
+1.40
+92.40
+93
+.41
+1.41
+93.41
+94
+.41
+1.41
+94.41
+95
+.42
+1.42
+95.42
+96
+.42
+1.42
+96.42
+97
+.43
+1.43
+97.43
+98
+.43
+1.43
+98.43
+99
+.44
+1.44
+99.44
+100
+.44
+1.44
+100.44
+101
+.44
+1.44
+101.44
+102
+.45
+1.45
+102.45
+103
+.45
+1.45
+103.45
+104
+.46
+1.46
+104.46
+105
+.46
+1.46
+105.46
+106
+.47
+1.47
+106.47
+107
+.47
+1.47
+107.47
+108
+.48
+1.48
+108.48
+109
+.48
+1.48
+109.48
+110
+.48
+1.48
+110.48
+111
+.49
+1.49
+111.49
+112
+.49
+1.49
+112.49
+113
+.50
+1.50
+113.50
+114
+.50
+1.50
+114.50
+115
+.51
+1.51
+115.51
+116
+.51
+1.51
+116.51
+117
+.52
+1.52
+117.52
+118
+.52
+1.52
+118.52
+119
+.52
+1.52
+119.52
+120
+.53
+1.53
+120.53
+121
+.53
+1.53
+121.53
+122
+.54
+1.54
+122.54
+123
+.54
+1.54
+123.54
+124
+.55
+1.55
+124.55
+125
+.55
+1.55
+125.55
+126
+.56
+1.56
+126.56
+127
+.56
+1.56
+127.56
+128
+.56
+1.56
+128.56
+129
+.57
+1.57
+129.57
+130
+.57
+1.57
+130.57
+131
+.58
+1.58
+131.58
+132
+.58
+1.58
+132.58
+133
+.59
+1.59
+133.59
+134
+.59
+1.59
+134.59
+135
+.60
+1.60
+135.60
+136
+.60
+1.60
+136.60
+137
+.60
+1.60
+137.60
+138
+.61
+1.61
+138.61
+139
+.61
+1.61
+139.61
+140
+.62
+1.62
+140.62
+141
+.62
+1.62
+141.62
+142
+.63
+1.63
+142.63
+143
+.63
+1.63
+143.63
+144
+.64
+1.64
+144.64
+145
+.64
+1.64
+145.64
+146
+.64
+1.64
+146.64
+147
+.65
+1.65
+147.65
+148
+.65
+1.65
+148.65
+149
+.66
+1.66
+149.66
+150
+.66
+1.66
+150.66
+151
+.67
+1.67
+151.67
+152
+.67
+1.67
+152.67
+153
+.68
+1.68
+153.68
+154
+.68
+1.68
+154.68
+155
+.68
+1.68
+155.68
+156
+.69
+1.69
+156.69
+157
+.69
+1.69
+157.69
+158
+.70
+1.70
+158.70
+159
+.70
+1.70
+159.70
+160
+.71
+1.71
+160.71
+161
+.71
+1.71
+161.71
+162
+.72
+1.72
+162.72
+163
+.72
+1.72
+163.72
+164
+.72
+1.72
+164.72
+165
+.73
+1.73
+165.73
+166
+.73
+1.73
+166.73
+167
+.74
+1.74
+167.74
+168
+.74
+1.74
+168.74
+169
+.75
+1.75
+169.75
+170
+.75
+1.75
+170.75
+171
+.76
+1.76
+171.76
+172
+.76
+1.76
+172.76
+173
+.76
+1.76
+173.76
+174
+.77
+1.77
+174.77
+175
+.77
+1.77
+175.77
+176
+.78
+1.78
+176.78
+177
+.78
+1.78
+177.78
+178
+.79
+1.79
+178.79
+179
+.79
+1.79
+179.79
+180
+.80
+1.80
+180.80
+181
+.80
+1.80
+181.80
+182
+.80
+1.80
+182.80
+183
+.81
+1.81
+183.81
+184
+.81
+1.81
+184.81
+185
+.82
+1.82
+185.82
+186
+.82
+1.82
+186.82
+187
+.83
+1.83
+187.83
+188
+.83
+1.83
+188.83
+189
+.84
+1.84
+189.84
+190
+.84
+1.84
+190.84
+191
+.84
+1.84
+191.84
+192
+.85
+1.85
+192.85
+193
+.85
+1.85
+193.85
+194
+.86
+1.86
+194.86
+195
+.86
+1.86
+195.86
+196
+.87
+1.87
+196.87
+197
+.87
+1.87
+197.87
+198
+.88
+1.88
+198.88
+199
+.88
+1.88
+199.88
+200
+.88
+1.88
+200.88
+201
+.89
+1.89
+201.89
+202
+.89
+1.89
+202.89
+203
+.90
+1.90
+203.90
+204
+.90
+1.90
+204.90
+205
+.91
+1.91
+205.91
+206
+.91
+1.91
+206.91
+207
+.92
+1.92
+207.92
+208
+.92
+1.92
+208.92
+209
+.92
+1.92
+209.92
+210
+.93
+1.93
+210.93
+211
+.93
+1.93
+211.93
+212
+.94
+1.94
+212.94
+213
+.94
+1.94
+213.94
+214
+.95
+1.95
+214.95
+215
+.95
+1.95
+215.95
+216
+.96
+1.96
+216.96
+217
+.96
+1.96
+217.96
+218
+.96
+1.96
+218.96
+219
+.97
+1.97
+219.97
+220
+.97
+1.97
+220.97
+221
+.98
+1.98
+221.98
+222
+.98
+1.98
+222.98
+223
+.99
+1.99
+223.99
+224
+.99
+1.99
+224.99
+225
+.066
+1.066
+225.066
+226
+.066
+1.066
+226.066
+227
+.067
+1.067
+227.067
+228
+.067
+1.067
+228.067
+229
+.067
+1.067
+229.067
+230
+.068
+1.068
+230.068
+231
+.068
+1.068
+231.068
+232
+.068
+1.068
+232.068
+233
+.069
+1.069
+233.069
+234
+.069
+1.069
+234.069
+235
+.069
+1.069
+235.069
+236
+.069
+1.069
+236.069
+237
+.070
+1.070
+237.070
+238
+.070
+1.070
+238.070
+239
+.070
+1.070
+239.070
+240
+.071
+1.071
+240.071
+241
+.071
+1.071
+241.071
+242
+.071
+1.071
+242.071
+243
+.072
+1.072
+243.072
+244
+.072
+1.072
+244.072
+245
+.072
+1.072
+245.072
+246
+.072
+1.072
+246.072
+247
+.073
+1.073
+247.073
+248
+.073
+1.073
+248.073
+249
+.073
+1.073
+249.073
+250
+.074
+1.074
+250.074
+251
+.074
+1.074
+251.074
+252
+.074
+1.074
+252.074
+253
+.074
+1.074
+253.074
+254
+.075
+1.075
+254.075
+255
+.075
+1.075
+255.075
+256
+.075
+1.075
+256.075
+0
+0
+1.0
+0
+1
+0
+1.0
+1.0
+2
+.1
+1.1
+2.1
+3
+.1
+1.1
+3.1
+4
+.2
+1.2
+4.2
+5
+.3
+1.3
+5.3
+6
+.3
+1.3
+6.3
+7
+.4
+1.4
+7.4
+8
+.5
+1.5
+8.5
+9
+.5
+1.5
+9.5
+10
+.6
+1.6
+10.6
+11
+.6
+1.6
+11.6
+12
+.7
+1.7
+12.7
+13
+.8
+1.8
+13.8
+14
+.8
+1.8
+14.8
+15
+.9
+1.9
+15.9
+16
+.06
+1.06
+16.06
+17
+.06
+1.06
+17.06
+18
+.07
+1.07
+18.07
+19
+.07
+1.07
+19.07
+20
+.07
+1.07
+20.07
+21
+.08
+1.08
+21.08
+22
+.08
+1.08
+22.08
+23
+.08
+1.08
+23.08
+24
+.09
+1.09
+24.09
+25
+.09
+1.09
+25.09
+26
+.10
+1.10
+26.10
+27
+.10
+1.10
+27.10
+28
+.10
+1.10
+28.10
+29
+.11
+1.11
+29.11
+30
+.11
+1.11
+30.11
+31
+.12
+1.12
+31.12
+32
+.12
+1.12
+32.12
+33
+.12
+1.12
+33.12
+34
+.13
+1.13
+34.13
+35
+.13
+1.13
+35.13
+36
+.14
+1.14
+36.14
+37
+.14
+1.14
+37.14
+38
+.14
+1.14
+38.14
+39
+.15
+1.15
+39.15
+40
+.15
+1.15
+40.15
+41
+.16
+1.16
+41.16
+42
+.16
+1.16
+42.16
+43
+.16
+1.16
+43.16
+44
+.17
+1.17
+44.17
+45
+.17
+1.17
+45.17
+46
+.17
+1.17
+46.17
+47
+.18
+1.18
+47.18
+48
+.18
+1.18
+48.18
+49
+.19
+1.19
+49.19
+50
+.19
+1.19
+50.19
+51
+.19
+1.19
+51.19
+52
+.20
+1.20
+52.20
+53
+.20
+1.20
+53.20
+54
+.21
+1.21
+54.21
+55
+.21
+1.21
+55.21
+56
+.21
+1.21
+56.21
+57
+.22
+1.22
+57.22
+58
+.22
+1.22
+58.22
+59
+.23
+1.23
+59.23
+60
+.23
+1.23
+60.23
+61
+.23
+1.23
+61.23
+62
+.24
+1.24
+62.24
+63
+.24
+1.24
+63.24
+64
+.25
+1.25
+64.25
+65
+.25
+1.25
+65.25
+66
+.25
+1.25
+66.25
+67
+.26
+1.26
+67.26
+68
+.26
+1.26
+68.26
+69
+.26
+1.26
+69.26
+70
+.27
+1.27
+70.27
+71
+.27
+1.27
+71.27
+72
+.28
+1.28
+72.28
+73
+.28
+1.28
+73.28
+74
+.28
+1.28
+74.28
+75
+.29
+1.29
+75.29
+76
+.29
+1.29
+76.29
+77
+.30
+1.30
+77.30
+78
+.30
+1.30
+78.30
+79
+.30
+1.30
+79.30
+80
+.31
+1.31
+80.31
+81
+.31
+1.31
+81.31
+82
+.32
+1.32
+82.32
+83
+.32
+1.32
+83.32
+84
+.32
+1.32
+84.32
+85
+.33
+1.33
+85.33
+86
+.33
+1.33
+86.33
+87
+.33
+1.33
+87.33
+88
+.34
+1.34
+88.34
+89
+.34
+1.34
+89.34
+90
+.35
+1.35
+90.35
+91
+.35
+1.35
+91.35
+92
+.35
+1.35
+92.35
+93
+.36
+1.36
+93.36
+94
+.36
+1.36
+94.36
+95
+.37
+1.37
+95.37
+96
+.37
+1.37
+96.37
+97
+.37
+1.37
+97.37
+98
+.38
+1.38
+98.38
+99
+.38
+1.38
+99.38
+100
+.39
+1.39
+100.39
+101
+.39
+1.39
+101.39
+102
+.39
+1.39
+102.39
+103
+.40
+1.40
+103.40
+104
+.40
+1.40
+104.40
+105
+.41
+1.41
+105.41
+106
+.41
+1.41
+106.41
+107
+.41
+1.41
+107.41
+108
+.42
+1.42
+108.42
+109
+.42
+1.42
+109.42
+110
+.42
+1.42
+110.42
+111
+.43
+1.43
+111.43
+112
+.43
+1.43
+112.43
+113
+.44
+1.44
+113.44
+114
+.44
+1.44
+114.44
+115
+.44
+1.44
+115.44
+116
+.45
+1.45
+116.45
+117
+.45
+1.45
+117.45
+118
+.46
+1.46
+118.46
+119
+.46
+1.46
+119.46
+120
+.46
+1.46
+120.46
+121
+.47
+1.47
+121.47
+122
+.47
+1.47
+122.47
+123
+.48
+1.48
+123.48
+124
+.48
+1.48
+124.48
+125
+.48
+1.48
+125.48
+126
+.49
+1.49
+126.49
+127
+.49
+1.49
+127.49
+128
+.50
+1.50
+128.50
+129
+.50
+1.50
+129.50
+130
+.50
+1.50
+130.50
+131
+.51
+1.51
+131.51
+132
+.51
+1.51
+132.51
+133
+.51
+1.51
+133.51
+134
+.52
+1.52
+134.52
+135
+.52
+1.52
+135.52
+136
+.53
+1.53
+136.53
+137
+.53
+1.53
+137.53
+138
+.53
+1.53
+138.53
+139
+.54
+1.54
+139.54
+140
+.54
+1.54
+140.54
+141
+.55
+1.55
+141.55
+142
+.55
+1.55
+142.55
+143
+.55
+1.55
+143.55
+144
+.56
+1.56
+144.56
+145
+.56
+1.56
+145.56
+146
+.57
+1.57
+146.57
+147
+.57
+1.57
+147.57
+148
+.57
+1.57
+148.57
+149
+.58
+1.58
+149.58
+150
+.58
+1.58
+150.58
+151
+.58
+1.58
+151.58
+152
+.59
+1.59
+152.59
+153
+.59
+1.59
+153.59
+154
+.60
+1.60
+154.60
+155
+.60
+1.60
+155.60
+156
+.60
+1.60
+156.60
+157
+.61
+1.61
+157.61
+158
+.61
+1.61
+158.61
+159
+.62
+1.62
+159.62
+160
+.62
+1.62
+160.62
+161
+.62
+1.62
+161.62
+162
+.63
+1.63
+162.63
+163
+.63
+1.63
+163.63
+164
+.64
+1.64
+164.64
+165
+.64
+1.64
+165.64
+166
+.64
+1.64
+166.64
+167
+.65
+1.65
+167.65
+168
+.65
+1.65
+168.65
+169
+.66
+1.66
+169.66
+170
+.66
+1.66
+170.66
+171
+.66
+1.66
+171.66
+172
+.67
+1.67
+172.67
+173
+.67
+1.67
+173.67
+174
+.67
+1.67
+174.67
+175
+.68
+1.68
+175.68
+176
+.68
+1.68
+176.68
+177
+.69
+1.69
+177.69
+178
+.69
+1.69
+178.69
+179
+.69
+1.69
+179.69
+180
+.70
+1.70
+180.70
+181
+.70
+1.70
+181.70
+182
+.71
+1.71
+182.71
+183
+.71
+1.71
+183.71
+184
+.71
+1.71
+184.71
+185
+.72
+1.72
+185.72
+186
+.72
+1.72
+186.72
+187
+.73
+1.73
+187.73
+188
+.73
+1.73
+188.73
+189
+.73
+1.73
+189.73
+190
+.74
+1.74
+190.74
+191
+.74
+1.74
+191.74
+192
+.75
+1.75
+192.75
+193
+.75
+1.75
+193.75
+194
+.75
+1.75
+194.75
+195
+.76
+1.76
+195.76
+196
+.76
+1.76
+196.76
+197
+.76
+1.76
+197.76
+198
+.77
+1.77
+198.77
+199
+.77
+1.77
+199.77
+200
+.78
+1.78
+200.78
+201
+.78
+1.78
+201.78
+202
+.78
+1.78
+202.78
+203
+.79
+1.79
+203.79
+204
+.79
+1.79
+204.79
+205
+.80
+1.80
+205.80
+206
+.80
+1.80
+206.80
+207
+.80
+1.80
+207.80
+208
+.81
+1.81
+208.81
+209
+.81
+1.81
+209.81
+210
+.82
+1.82
+210.82
+211
+.82
+1.82
+211.82
+212
+.82
+1.82
+212.82
+213
+.83
+1.83
+213.83
+214
+.83
+1.83
+214.83
+215
+.83
+1.83
+215.83
+216
+.84
+1.84
+216.84
+217
+.84
+1.84
+217.84
+218
+.85
+1.85
+218.85
+219
+.85
+1.85
+219.85
+220
+.85
+1.85
+220.85
+221
+.86
+1.86
+221.86
+222
+.86
+1.86
+222.86
+223
+.87
+1.87
+223.87
+224
+.87
+1.87
+224.87
+225
+.87
+1.87
+225.87
+226
+.88
+1.88
+226.88
+227
+.88
+1.88
+227.88
+228
+.89
+1.89
+228.89
+229
+.89
+1.89
+229.89
+230
+.89
+1.89
+230.89
+231
+.90
+1.90
+231.90
+232
+.90
+1.90
+232.90
+233
+.91
+1.91
+233.91
+234
+.91
+1.91
+234.91
+235
+.91
+1.91
+235.91
+236
+.92
+1.92
+236.92
+237
+.92
+1.92
+237.92
+238
+.92
+1.92
+238.92
+239
+.93
+1.93
+239.93
+240
+.93
+1.93
+240.93
+241
+.94
+1.94
+241.94
+242
+.94
+1.94
+242.94
+243
+.94
+1.94
+243.94
+244
+.95
+1.95
+244.95
+245
+.95
+1.95
+245.95
+246
+.96
+1.96
+246.96
+247
+.96
+1.96
+247.96
+248
+.96
+1.96
+248.96
+249
+.97
+1.97
+249.97
+250
+.97
+1.97
+250.97
+251
+.98
+1.98
+251.98
+252
+.98
+1.98
+252.98
+253
+.98
+1.98
+253.98
+254
+.99
+1.99
+254.99
+255
+.99
+1.99
+255.99
+256
+.062
+1.062
+256.062
diff --git a/tests/files/bc/pi.txt b/tests/files/bc/pi.txt
index 4ae0fa64..b98419f1 100644
--- a/tests/files/bc/pi.txt
+++ b/tests/files/bc/pi.txt
@@ -2,6 +2,3 @@ for (i = 0; i <= 100; ++i) {
scale = i
4 * a(1)
}
-
-scale = 1000
-4 * a(1)
diff --git a/tests/files/bc/pi_results.txt b/tests/files/bc/pi_results.txt
new file mode 100644
index 00000000..128d6c0c
--- /dev/null
+++ b/tests/files/bc/pi_results.txt
@@ -0,0 +1,135 @@
+0
+2.8
+3.12
+3.140
+3.1412
+3.14156
+3.141592
+3.1415924
+3.14159264
+3.141592652
+3.1415926532
+3.14159265356
+3.141592653588
+3.1415926535896
+3.14159265358976
+3.141592653589792
+3.1415926535897932
+3.14159265358979320
+3.141592653589793236
+3.1415926535897932384
+3.14159265358979323844
+3.141592653589793238460
+3.1415926535897932384624
+3.14159265358979323846264
+3.141592653589793238462640
+3.1415926535897932384626432
+3.14159265358979323846264336
+3.141592653589793238462643380
+3.1415926535897932384626433832
+3.14159265358979323846264338324
+3.141592653589793238462643383276
+3.1415926535897932384626433832792
+3.14159265358979323846264338327948
+3.141592653589793238462643383279500
+3.1415926535897932384626433832795028
+3.14159265358979323846264338327950288
+3.141592653589793238462643383279502884
+3.1415926535897932384626433832795028840
+3.14159265358979323846264338327950288416
+3.141592653589793238462643383279502884196
+3.1415926535897932384626433832795028841968
+3.14159265358979323846264338327950288419716
+3.141592653589793238462643383279502884197168
+3.1415926535897932384626433832795028841971692
+3.14159265358979323846264338327950288419716936
+3.141592653589793238462643383279502884197169396
+3.1415926535897932384626433832795028841971693992
+3.14159265358979323846264338327950288419716939936
+3.141592653589793238462643383279502884197169399372
+3.1415926535897932384626433832795028841971693993748
+3.14159265358979323846264338327950288419716939937508
+3.141592653589793238462643383279502884197169399375104
+3.1415926535897932384626433832795028841971693993751056
+3.14159265358979323846264338327950288419716939937510580
+3.141592653589793238462643383279502884197169399375105820
+3.1415926535897932384626433832795028841971693993751058208
+3.14159265358979323846264338327950288419716939937510582096
+3.141592653589793238462643383279502884197169399375105820972
+3.1415926535897932384626433832795028841971693993751058209748
+3.14159265358979323846264338327950288419716939937510582097492
+3.141592653589793238462643383279502884197169399375105820974944
+3.1415926535897932384626433832795028841971693993751058209749444
+3.14159265358979323846264338327950288419716939937510582097494456
+3.141592653589793238462643383279502884197169399375105820974944592
+3.1415926535897932384626433832795028841971693993751058209749445920
+3.14159265358979323846264338327950288419716939937510582097494459228
+3.141592653589793238462643383279502884197169399375105820974944592304
+3.141592653589793238462643383279502884197169399375105820974944592307\
+6
+3.141592653589793238462643383279502884197169399375105820974944592307\
+80
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816404
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164060
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406284
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062860
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862088
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620896
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208996
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089984
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899860
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899862800
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628032
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280348
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899862803480
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628034824
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280348252
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899862803482532
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628034825340
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280348253420
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899862803482534208
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628034825342116
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280348253421168
+3.141592653589793238462643383279502884197169399375105820974944592307\
+81640628620899862803482534211704
+3.141592653589793238462643383279502884197169399375105820974944592307\
+816406286208998628034825342117064
+3.141592653589793238462643383279502884197169399375105820974944592307\
+8164062862089986280348253421170676
diff --git a/tests/files/bc/power.txt b/tests/files/bc/power.txt
index 3222e9d7..0a61671c 100644
--- a/tests/files/bc/power.txt
+++ b/tests/files/bc/power.txt
@@ -11,7 +11,7 @@
0.23523785962738592635777 ^ 1
328956734869213746.89782398457234 ^ 1
8937 ^ 98
-0.124876812394 ^ 2396
+0.124876812394 ^ 96
93762.2836 ^ 13
1 ^ -1
2 ^ -1
@@ -20,23 +20,26 @@
38579623756.897937568235 ^ -1
1 ^ -32467
2 ^ -53
-23897 ^ -213
+23897 ^ -3
-1 ^ 1
-1 ^ 2
-2 ^ 1
-2 ^ 2
--237 ^ 294
--3746 ^ 28
+-237 ^ 29
+-3746 ^ 8
-0.3548 ^ 35
--4267.234 ^ 2837
--326.3246 ^ 2378
+-4267.234 ^ 7
+-326.3246 ^ 8
-1 ^ -1
-1 ^ -2
-2 ^ -1
-2 ^ -2
--237 ^ -293
+-237 ^ -93
-784 ^ -23
--0.2357689 ^ -8723
--0.23424398 ^ -781
--178.234786 ^ -879
--1274.346 ^ -768
+-86 ^ -7
+-0.23424398 ^ -81
+-178.234786 ^ -79
+-1274.346 ^ -8
+0 ^ -251
+-0.2959371298 ^ 27
+
diff --git a/tests/files/bc/power_results.txt b/tests/files/bc/power_results.txt
index 28f9ad73..6c4f4ec6 100644
--- a/tests/files/bc/power_results.txt
+++ b/tests/files/bc/power_results.txt
@@ -26,360 +26,27 @@
.00000000002592041867
1.00000000000000000000
.00000000000000011102
-0
+.00000000000007327736
-1
1
-2
4
-14997322375665265051328725757939209353051902095893907150382724666290\
-49749481660976421019742616298227588464420182758442163654172400528243\
-00885441207762486233574213374503090372518590691583139696652847404883\
-08573912261119588874308960204159666762789603037188471170006223907416\
-60492840269152716750700089148882139254399347568222390231015487895905\
-73727080561379177721440905866857248917982113340543176658480139248897\
-54802503253413282808814063861470711399810899724515727713334909764746\
-27910290211411231279325882505708287941671508154740003122373284699097\
-78346501539634198926772266511968381368929692275950529960923432771985\
-12597189390708050983487158873301681237787429436264801751664042999180\
-3448659818912436089
-11478830555358864333472551120140548480416206583184496764727387456058\
-792742209537931243951391229607936
+-7373981340203217564025207502362461927230480148287479751287576522804\
+77
+38774140915674516674808545536
-.00000000000000017759
--5315000202937163259492745003279421369106067669145129859648420636529\
-90445623045796466912212328506740453231539873473645734499753872948065\
-49633577959910694192145181126036108234067752197600736121017297080808\
-17616863795402188466673465041737963185044596535417380459631266160640\
-14583650452617054961289909930913477463730596242904393535447326927217\
-89173834172615425952449908691097034304917795485671070317830033446935\
-38310140064407341431340535164186443832804681667156458972977303614472\
-33265448905074750219542877570352782981931513698676869313385161238014\
-33972388487066619195467353034148880813325180423582595649900987746182\
-41895615903666063666862790223026863393142524825702604904791179988750\
-45809820128887237302302157495251041558294866524648134606244499204091\
-49083321829864412304204374908788049385821238476680431773652392070264\
-59357384450300571070886634991808217727920058131365837495515494533981\
-36075073475798690610073101157985973126714728174798097385600505077064\
-64307865500312391435488397915044572948634144019685716400039399263051\
-47069168529330946438107251496721589630778010562251104749454115537505\
-09733953415921981476370056761128775090287101279301783155189276038704\
-41895108419474778802941709888668845300019024827549284756327304572867\
-96869370102131426204516615827055555481884884048493606181911952577877\
-05397677851197539883332750824024563555696883835248240415293162263750\
-05514521919787836514087683462282073201968011400045654810616450219205\
-73232304423399284026556121979893723420267398521035723282740403251520\
-70294763262021087574735376398655633958565910985905690707543972327381\
-79651823478575002271270347555847440100290072055641291249615250133821\
-23680505794038719878415117091425492978380126284031828475714412518947\
-51403219894454213518071933476255317428650882367543271627040950041490\
-91372087962670790674328089839025158796625170118099611830170979543268\
-46838632558303335286513165259961630072343847303015053999848541735021\
-39379960402818223313798877113839753031848265476145371954184400351975\
-19977868370176657443035408745111796788080163762225487710398592741290\
-98787560930947073645198429428485551148558897458881325360238752512610\
-98690991255078245972980209265660013809958812534609566576738101048147\
-34329168149020134400358076493774220564483240987538866711281966656859\
-18228754994689923361234391823268535969284464590048851347740342490135\
-80582121673049738942667229825249768347409932358345160950361775166418\
-82751455678372618713022132536591723169934677105756691317738344397268\
-90573948285753449856526392182699265739146286909855515863327591370172\
-96513402830426867299550070873218083912846316696859579237689097606617\
-51412181799181999491584413579614146497226592868301697388159623700483\
-00659079928861331453476112481313601846831595328497558270598024459232\
-74912696765475545648721620753770739038715242528380011572795805287890\
-01939075629577724714913609448633168350641667779462272317624977977687\
-89411614882740247487664271240314348194082962843296263500386625878796\
-16008267844410696232952338235393887568658739373008887867945112312649\
-37512501534803268323910539533256177216274619007193744007547951718027\
-44891444064662982576153272050128040514240063258499485242019550507676\
-49205138815607756069725427984311319511383142516469030500318130266868\
-09562452698690462723828096105664810553482713948643515707658305658393\
-72023560005542444849685206743523113508500669188917639514697867955895\
-12373464625905759443093770382990555315516365416332558133979562433906\
-64399570722334065625238452042436862494620574134988589848680778801045\
-80364738912102881123102375480846598525717754089210605941752731049392\
-56508983631805570091285332387678472351633908797365562850039083300108\
-47232419881746103565282587619297019434166937029533469166882663817564\
-29976915091973096170480140645736257668317363421806536290197863436706\
-26329935979085366547105772889986581827630974873885363455721321518675\
-74550918001246595763248153435251121743997710894306721046034483557443\
-41864814444085298842519861926734021561007690300579493326968172112502\
-95349794378935063903999801566960185173164130751935856368624282418902\
-49903427392381027457836738642462080633422197014627613031666173271030\
-24009983647554746216502223968131796915055226880729894075452499140925\
-19177060502090392977689000070401037945555335784892959624056769694880\
-70127948818327506368318902831799150505770877874320893074064721292530\
-76004340604038727565364771854369404877106769882488933769119954174458\
-63427198989142502713770105419055459625123528877838096228199336886214\
-21837202020595779957506625129762358884285607071464800971415209072458\
-75682887352693221792690653281585020879608438468426360254454386930843\
-54976719034954514257351084680941537598410460432624632742664122097832\
-55471067840289495535313044781584274249832292545673979710554622543455\
-30516485658045903022569236826984516014156085335693691217261175850028\
-11509249909703901135898031685959221507256600883997280093471285352593\
-74651564252383941896194282297958682783629524012219104563242048510868\
-49404888188055550910540455332990660903744972091115431351121998533490\
-10628770561915126917221852108705651086200022632698873237836290310011\
-50397167016292123727570196128842632496685647047378603671979173369902\
-38344528655539740311539345421161242532069895829237353049373101325730\
-58493431814287223494709459895137424641564383576690784600424038087145\
-68158626235336913952048107753521197980942527673210440048833533401989\
-77194468283364506459394258867172301466872892027180482209222506949673\
-75540211531086133182859182501150200938696263997726250563093539326927\
-72416498048175683546939420898769717737493711540907129536293416724813\
-97334892336321395426368347878890663066224459524345472570152264395565\
-82460457205896704725983507812401218371956212982033047108572121728288\
-68439360992844654681941401782292533682559747777726117649955921552419\
-55376528393134227258758852448268802426432183531325943771999071974220\
-84507900584510094182786537515367929613158392549027805302398374451653\
-29783084211098081095916445508682076609084201827750535494005579802641\
-02110253224910370222254741046671205720360236688797968947854015063183\
-74781883451633687835151401181076347221311394223209721077894188865562\
-17163237549065972085718513359358745797320834007267934729637068457958\
-78217344964677096738194254363183885544424572157628941346479343797930\
-63230768723171941706715546034642365335802368178916578666998370822061\
-72862620144866941168433360449388831342015135002439921450475536956234\
-85718095823776355549608105131404093038257448195903825875318154784464\
-57935967137213602336432368420092393199865275518568170524736528628808\
-93046789512886643769514221911060706901882607274461392115657530222519\
-60506897541913211652548871872655185050770561256446930362103759873477\
-20814169286537387159054802380892512900817347470322088751411585458882\
-41036364127218851060253574463952502666758564753936431041853733829336\
-81956327037910407368879304536602331340358193253227646166149675880981\
-90185334787495657054886233085573272038907945218357219923287605428049\
-35666687006406359493768055467531146025838548653407558188013071660477\
-24887464015842344700561688728471808389891252725983936114487839466957\
-40043539434901358379294391964732252971766132528295626269595832591134\
-56027086653085411942665786654648139554565734237361808707377581887789\
-66923318292898929469635931606196495932835130228371557394460176225814\
-11294729746332614993610933221574816059609941245722612553947822056329\
-45166526051215867786737290871927622630571958311944341999538582128241\
-88101449037438663818287018817893377018470050800767265593919107803658\
-99179719652514229604754127018714522533683024867676021795442147409531\
-82665068198462837070231146555812259357357244425469897484784424722789\
-98092162511423506856070449076457969548678211615932082662896053695730\
-59596107990542324416612202410744156365868863162658463321070228706136\
-03710190425407794885324375605255084573684494837484778909503277766179\
-03805931454654223652089029461399110825127848153069688576228655184611\
-79768137149996093510064025168479068628086773645884984425319145539556\
-76075842624219168086936568629614756427244958470902064700287889315121\
-42821595391061266909080096092842976758284557671645207398033087646044\
-17795953284430870706941395475756240133534497464444148185165836807395\
-71914117065975311130980817438007210936836173788977246078579157885631\
-72554614326985076533529062730320433321718255208710180221207959776564\
-44807136643850248843075432242048108865528202646121118339881280138404\
-82631669965543003783709309604010072045746432183362756236508231558635\
-61612161495534067211577721563585202440442091745682170086700119976895\
-75305033539518807762552637355861809986052721463214055606925010502791\
-07576812492087807771863865045627658966172004291057058152115216759979\
-22319079703493506449231900704401329270559051817722834844916790378159\
-11859709258213481757435116529558560545817146375060752889351017308411\
-95572062296153349066166356419465693735841939197159220983287655122200\
-09840635157449290677165408337833131188667931637453023949628963892756\
-63193160301363072401750285289993232161836627416139186835622928460896\
-48149321238238359576069768524810647473234302169351941202863446100303\
-53232244538087380921705800082227661328078185734538075621775853483863\
-46009590875234025712706120859992692401627589733758997890952517701102\
-02016569612428376053082696146484227576336230217783445219505920601019\
-33095515519409035408457025188297805207228192604390482809071392611771\
-33574590494165516290378201746154276638463914544405829940734889440058\
-50872804307391483948705360196306393676853047662331937698157275120923\
-48711155405917301727814008897384220075085940864758781426442918315337\
-44390460389070271397096746357700721225995274575108538008722000506426\
-47404684409899926300364430394284048326877036744378234790013121512243\
-33164520619956221756712877328384924842769057299918312486776801292033\
-39413452695345490240752153799893116785749303845400056553954464555994\
-39334000822859108507894822667482270295636516694380611524569121800656\
-78897195293770217125145562613393065181685018248294372660081402258855\
-48853815860093731077664651690349598684633625439324574755046646013201\
-06398457066352039259763533826806131024950715685749198907167018006511\
-02464285979192745974664572565800070933275878035489902288536459657148\
-10685133636383678846628804163294690525771415724388606805062681265155\
-37392172544282115243622208997041455133123289393606286284500392860748\
-62119813421171900660703096743899221542487565865013924144916275687604\
-64479606566082627831225860827957.17168783602794452821
-28791115786912240198245990478525647696448607532847787454795539441976\
-53008508268300461139912183674125065861791306990382838955098345250249\
-22502669615923663783199016557590859598868092987910291249798821013403\
-47170755689306294929681899092787860167594484443520025764276997309005\
-71232591347006382641934629802477111942681146373278874858958991309971\
-42218657973486847296406258064331676882178534298665203090265502510842\
-61357125721516691133409251768860513967679408456139499213904923923576\
-37499277430205645222804747709288259277839665497374416103934921664053\
-88731269133493437149540799596101039891946001868119671990803717566748\
-68467317062896591145978297935654103133461783237181415461118621447827\
-16566513542336675866067109631200815886090268983547210391679827916177\
-66749211382337550790076502678641642759218859737882068043983365758093\
-88115252413477398218126191256394635905372596424544841499726539685941\
-78846216282131573581580140976129717830765415534880473794126349434060\
-97681722453558939398648461893368494055862371927814819807297911399492\
-95580520229158808988334006735101124776362181960799247867627735191693\
-73903485711688121338008278287587497284624296263925302024072761974353\
-61966862903296298157098997084877146402382401378955497440970708541715\
-71060260791739883205083920081207497221052029803497230694536402248293\
-84189292235575350657775157901460538210293883451036457246928408437463\
-57025709490435640319319731216408410871212349724010449894980914894111\
-45126169053678363169035062112633812855552434451031074552786171143660\
-17791316677936527412873416758988896839052262917297431626073985184825\
-68730935720280511977117820747425896122905967666049570524572855538268\
-71933166116690914412078365573528353249200818122694099666956346567349\
-56010083783703566732405340529840912472403938999295934861826136988528\
-52894398797143227990144946007954597506649176236568417409173396261740\
-09944204836056027440284138866913080493697596579842739525086068210108\
-30917026182518589497356978161501183235810718665383370604175757091568\
-10504733159455864451885520846599280592234061718671428498049587028363\
-09597188469848024202986163560176441060995115838886952815416199737130\
-85184131031637903681209647592228571844358102702795272489240540680335\
-22995408987458398979652061771760715657085982221294267557650384941211\
-16571782590299783628409645657075923536327475626565993147833196817893\
-84890960043718955708485355506889614382188765539323874543288395613135\
-48259205614690288575840557276052824284532091372945666583648761976586\
-54283058035504963407488664771183492661235835415687745843736315114774\
-43686975428521437310363210532146903026713880922536383314487398789950\
-21702186636914955380336514259253343897789306312138193893174316891009\
-25090195344105820648333601730709055646550997346188323397099605767390\
-34894823825457067510931521240790321078124435027433519041465778273927\
-23319532476569131737943328836549868951187283843748101565050501127139\
-39788055683460535125272798566822769537496548960358061381835527396784\
-44159701828925988029710177774963814786204991523055795795848219525653\
-78564959121442581906399531806160230589018845426048851169697986777287\
-74075545396657630131400229956599605344545338728285946750023266326131\
-18395556301061966915885165125087447008943040958729761732405732133453\
-05659206180031669466579706301575290530027196513949455331037954675305\
-91429773751487919865699329769483827518561578140696380487766857058838\
-31309495041955167145108840698853798192292390926661492994257145343218\
-75197591439357956390053018804271252634995353886475156597147490672190\
-84005441103601046351701967370002688361030978781507248572868925129931\
-45212430472187369787725343203192539974915241551259671056853308250443\
-11579521168679966954003584316378530310813735804407853338924589172695\
-49587287454029232631399437877164701878506916307005029866776607783174\
-00990236971979307623094886527377840855865891785310660470287570263965\
-61154240289857785082315249341545762749489375521484585792993526397150\
-25291795278405033005502446233161932054427925917356980644302691002421\
-05338681858378618032104503307510725895517575751909671470465133180844\
-45243480750024854699238912226469242734228059627483302616513195012834\
-43802954961131534089020537879306473924379457087764802237333653274089\
-09872997910414155414383580061821406683789130399702013589496974143998\
-44210014079488461309789159536423690801631777295441838031615666359452\
-91792585173201915395374115631184500874352677152997721623175685942803\
-12895271487864578322544981918732876539884531639075213978691991567128\
-92573298522996863101920878033796664977571688329072100951103604405455\
-04594983831740226312202494100656829982197377383796775671017926797756\
-33549687557826719410938591588030077844865002785718028430426129760210\
-36066302087600569325663160491853875481246546462291564965235321897400\
-09821990048706319068186530740803926837337644235256457047575804469608\
-57918916920499725776957856681677440330511211984210012143987263574481\
-71709887053711071662845885541874087944270034896684123101730242288672\
-65579256713582552909399156304710870435571862371857243373965327959283\
-24373963625438574863307319451700340730565660031867078113256711758690\
-18796202639316990441856414190865637384044006457067135125967606919472\
-95170121458841562486321464164304264236784363298699561094832596396303\
-92360868258336925172544977314262275517987378331545670817629321398756\
-15182133973429985062471316188494603822719972823331439920331498101624\
-22111613425281021340447127502486056789900343682995162436423970012504\
-90978225961351399347128920481166268040828775885589315967277308416623\
-10747904592254184017050343694378092682731532047514967157960793406652\
-36139056722846794201187751078359641314204515940335354669085175926977\
-07798383659826703423446297688966624848039546300824464419495212357576\
-30053757647015611767992745708562501425118059217142265688975505274910\
-97787536006751801909703819658921934635314177988896852619491725638370\
-71808330540021305608094054601852463148765060366588983799418357589432\
-50483622298669607953178468063724713066810575740314939366769021165167\
-07815391414524210692762963631699377023760137647543023883110883.71538\
-917119055084587
+-25764707167314625311472240.23895709280819039654
+128587429491381039942.88651883210401536158
-1.00000000000000000000
1.00000000000000000000
-.50000000000000000000
.25000000000000000000
0
0
--6311170951758340301695281786963968566677422268510931490731625646715\
-38125720985932037093927317044573426510551289791217448529282843416440\
-05520241029621417251047599699565382090122980340754774043142594913023\
-41451303393302883218750389898179604908116730833849497339744904526958\
-92448895393345637572643345481921080373277750542706722066894818520149\
-55418007617650491691821446193721233611264616251750844770017173787564\
-04232060714472103058158955208768415961630196604514972898509827500777\
-27629930054547832303627233403424962009295500700592022031464695225081\
-69492417968838445910538898321612151030444695696921499051881571008127\
-66125471882262561112705701582131968122295251908747948325161616700850\
-85967720641482842278602425546630702337458673286944405688069366413844\
-74467291289141708874382307277925684201714645138026540159746689295598\
-49229569543693814809740194976378989712946860327540588853786160311862\
-26553843014447253417608142170534232089237645726271317586792866436463\
-57906771436600573193316692947877521038683967731837711063242972271670\
-96055668939700794111101379234021535739329350922700763647464255738367\
-45664949133751858862157294162807244687731159626486653201155582499714\
-79484408164370429277582140594961024021235193104960984535030512698140\
-29991642773255454178297132207171199052829597210364476553497942817268\
-62690611849309055824536998344110574782877812780572822768074693914603\
-93441675889749948913356381877977663664670923405154024034819183077630\
-07222467129739709730595197712146877807485841798099359485655082017504\
-57266468940919731337521917893149437593088571899978481009627569104752\
-83788737229048754086398051323802242295499011906844043041969326497378\
-66830847485298392258392207609286448536144199906732162033971327749980\
-72409681682525277718455729872598195785847026351837425524957713502283\
-35808405846301401511404101208274836584641837898337018415760457721775\
-34793070383077489542736177701902455308320830139111584515391609551696\
-93786802204354185248901167656622471020051493389173955741467861607741\
-06154885234719288084392388173679574839263106373769157250023377763195\
-33722849246313238409188148501441642227744274888764386850047852926601\
-66259132899777197674037156711065912041415912906771682871632890618266\
-52534846581370718069768101784480970852297316593250497344665499975249\
-28847715738269148419095709788743634068235772638161673973508170592990\
-08150460394328942539838852965761260991598586792881336905193093363807\
-68065001971035985210175312847093321437455851062753166316674526831405\
-22643924906227066856960275731105243745519239095725263849049284368192\
-69981817924601931034908526477849233791352299993888953628294142682398\
-32015215644146196271258557701759614063395810649987412865008620060711\
-96106494559320848767208198924865288907648098617871697423778043460357\
-69278505913120523758525932088676939064487208006723185721403213528197\
-47356185573586878001575522729281782905160737709112298608240868302736\
-14912060528477110966342331323542913308637670012031732420815525850428\
-29985502836060351264856351721233689681302128443493923953325682146378\
-90500497094869973228157090077323643982214655247057954479537461140251\
-22391223645059066176683097828439526347990270348890072988824089134075\
-53045635915091127616051632821157251240715937718601438621807151809470\
-70020273648673726614138773619623873071209988854639064449056946951244\
-08154683439806851412045718493101194516264182543687642102731940333675\
-02204434515648501183682202170295476412677952210259771498961159478693\
-39533360510234199050863187055497001898319590310626558410825947546499\
-25866422095282655331612522936168323192019066427954358596287913432824\
-23986416514347998122918766123490242000799600412705715403792955802428\
-68680411940581906418239192566545624215426795832902852897359879579206\
-29806298084768133342364905840962242909627360003836496432663468404056\
-75003716322755561456947876758325012806130640785145137044014345149729\
-64472421537485940360688927943947253997322254484456390238538599823516\
-53783313664554244804188239596232973290117637825103346417364845445537\
-63874844173295342500665949524580816903010072450214234574076441210052\
-76312238941224960108202455846209231258733492737852892758457199956062\
-64745301484120814116015376716640043059840936868045425494746747743167\
-47635509486725886548517712648186478000538173675010335580427072223374\
-22683297174260468174666990490676363371877116991078914450165283451094\
-38053584777926914783233278650205938696956998820904630096199992054805\
-15352923265061131541221436151100238443368250876934012537521701653429\
-83749419904181832047886489040835511827487858712692455203809244256381\
-95363676537203584858079014204774516763297210884678721481745464679151\
-34153801765303831091048471166149310881939079992670658056687054966453\
-64078260772450818012184785716598737407583554314901714361312982863209\
-08568827536105214917228565402326151858487667522128825392025654986079\
-94364340694436809828167006177389014092285574489110459783543308691830\
-81359774673499877856622602227027179803067114877976882524477854727554\
-43145812466491583566468289389559643610433010688516435918531866978568\
-98694778365921976545970326296067215777099795140100793885931248501330\
-88092521136829832995633382275605096697602165804297877578997817111968\
-18131992614391087249610046250364652601740222742376049435751285932886\
-51855281108498217714451092451205316423498083202395699293550040438603\
-96607653833910364834434269652078271541907585050569750193777851038475\
-94658423552329776425242871169305484855793189639257265149554708344704\
-30807466779976397658781768927423667079487402547120198173689660436452\
-23216183977421942478485697014756283.15080425429190208981
--1945134149489344891879057554905782841936258356736314337975569799825\
-94091939572752348215929683891336730843553721422164737465108229034947\
-87333189564755763444242676978610321731298729194092653999616928308494\
-26419468484566422775668903315088810746121307679948574976162519479931\
-18935243698160094347216562490000767121041786977792546155155934655909\
-14123833869470494708767968978717730012864171105540029928688274136791\
-98175053824022144065005509214813689232148489884560100200475909009813\
-340098100705258138.98542904577525702068
+-.00000000000002874159
+-1139873046177080922024790150196533457011720664136966.15649615964858\
+379359
+0
0
0
+-.00000000000000527697
diff --git a/tests/files/bc/print.bc b/tests/files/bc/print.bc
deleted file mode 100755
index e8423c21..00000000
--- a/tests/files/bc/print.bc
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /usr/bin/bc -q
-
-for (b = 2; b <= 16; ++b) {
-
- if (b == 10) continue
-
- s = b * b
-
- print "obase = ", b, "\n"
-
- for (i = 0; i <= s; ++i) {
- i
- print "0.", i, "\n"
- print "1.", i, "\n"
- print i, ".", i, "\n"
- }
-
- 2189432174861923048671023498128347619023487610234689172304.192748960128745108927461089237469018723460
-}
-
-halt
diff --git a/tests/files/bc/print.txt b/tests/files/bc/print.txt
new file mode 100644
index 00000000..5662b638
--- /dev/null
+++ b/tests/files/bc/print.txt
@@ -0,0 +1,6841 @@
+obase = 2
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 3
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 4
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 5
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 6
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 7
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 8
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 9
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 11
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 12
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 13
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 14
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+195
+0.195
+1.195
+195.195
+196
+0.196
+1.196
+196.196
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 15
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+195
+0.195
+1.195
+195.195
+196
+0.196
+1.196
+196.196
+197
+0.197
+1.197
+197.197
+198
+0.198
+1.198
+198.198
+199
+0.199
+1.199
+199.199
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+208
+0.208
+1.208
+208.208
+209
+0.209
+1.209
+209.209
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+217
+0.217
+1.217
+217.217
+218
+0.218
+1.218
+218.218
+219
+0.219
+1.219
+219.219
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 16
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+195
+0.195
+1.195
+195.195
+196
+0.196
+1.196
+196.196
+197
+0.197
+1.197
+197.197
+198
+0.198
+1.198
+198.198
+199
+0.199
+1.199
+199.199
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+208
+0.208
+1.208
+208.208
+209
+0.209
+1.209
+209.209
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+217
+0.217
+1.217
+217.217
+218
+0.218
+1.218
+218.218
+219
+0.219
+1.219
+219.219
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+226
+0.226
+1.226
+226.226
+227
+0.227
+1.227
+227.227
+228
+0.228
+1.228
+228.228
+229
+0.229
+1.229
+229.229
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+236
+0.236
+1.236
+236.236
+237
+0.237
+1.237
+237.237
+238
+0.238
+1.238
+238.238
+239
+0.239
+1.239
+239.239
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+246
+0.246
+1.246
+246.246
+247
+0.247
+1.247
+247.247
+248
+0.248
+1.248
+248.248
+249
+0.249
+1.249
+249.249
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+256
+0.256
+1.256
+256.256
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
+obase = 17
+0
+0.0
+1.0
+0.0
+1
+0.1
+1.1
+1.1
+2
+0.2
+1.2
+2.2
+3
+0.3
+1.3
+3.3
+4
+0.4
+1.4
+4.4
+5
+0.5
+1.5
+5.5
+6
+0.6
+1.6
+6.6
+7
+0.7
+1.7
+7.7
+8
+0.8
+1.8
+8.8
+9
+0.9
+1.9
+9.9
+10
+0.10
+1.10
+10.10
+11
+0.11
+1.11
+11.11
+12
+0.12
+1.12
+12.12
+13
+0.13
+1.13
+13.13
+14
+0.14
+1.14
+14.14
+15
+0.15
+1.15
+15.15
+16
+0.16
+1.16
+16.16
+17
+0.17
+1.17
+17.17
+18
+0.18
+1.18
+18.18
+19
+0.19
+1.19
+19.19
+20
+0.20
+1.20
+20.20
+21
+0.21
+1.21
+21.21
+22
+0.22
+1.22
+22.22
+23
+0.23
+1.23
+23.23
+24
+0.24
+1.24
+24.24
+25
+0.25
+1.25
+25.25
+26
+0.26
+1.26
+26.26
+27
+0.27
+1.27
+27.27
+28
+0.28
+1.28
+28.28
+29
+0.29
+1.29
+29.29
+30
+0.30
+1.30
+30.30
+31
+0.31
+1.31
+31.31
+32
+0.32
+1.32
+32.32
+33
+0.33
+1.33
+33.33
+34
+0.34
+1.34
+34.34
+35
+0.35
+1.35
+35.35
+36
+0.36
+1.36
+36.36
+37
+0.37
+1.37
+37.37
+38
+0.38
+1.38
+38.38
+39
+0.39
+1.39
+39.39
+40
+0.40
+1.40
+40.40
+41
+0.41
+1.41
+41.41
+42
+0.42
+1.42
+42.42
+43
+0.43
+1.43
+43.43
+44
+0.44
+1.44
+44.44
+45
+0.45
+1.45
+45.45
+46
+0.46
+1.46
+46.46
+47
+0.47
+1.47
+47.47
+48
+0.48
+1.48
+48.48
+49
+0.49
+1.49
+49.49
+50
+0.50
+1.50
+50.50
+51
+0.51
+1.51
+51.51
+52
+0.52
+1.52
+52.52
+53
+0.53
+1.53
+53.53
+54
+0.54
+1.54
+54.54
+55
+0.55
+1.55
+55.55
+56
+0.56
+1.56
+56.56
+57
+0.57
+1.57
+57.57
+58
+0.58
+1.58
+58.58
+59
+0.59
+1.59
+59.59
+60
+0.60
+1.60
+60.60
+61
+0.61
+1.61
+61.61
+62
+0.62
+1.62
+62.62
+63
+0.63
+1.63
+63.63
+64
+0.64
+1.64
+64.64
+65
+0.65
+1.65
+65.65
+66
+0.66
+1.66
+66.66
+67
+0.67
+1.67
+67.67
+68
+0.68
+1.68
+68.68
+69
+0.69
+1.69
+69.69
+70
+0.70
+1.70
+70.70
+71
+0.71
+1.71
+71.71
+72
+0.72
+1.72
+72.72
+73
+0.73
+1.73
+73.73
+74
+0.74
+1.74
+74.74
+75
+0.75
+1.75
+75.75
+76
+0.76
+1.76
+76.76
+77
+0.77
+1.77
+77.77
+78
+0.78
+1.78
+78.78
+79
+0.79
+1.79
+79.79
+80
+0.80
+1.80
+80.80
+81
+0.81
+1.81
+81.81
+82
+0.82
+1.82
+82.82
+83
+0.83
+1.83
+83.83
+84
+0.84
+1.84
+84.84
+85
+0.85
+1.85
+85.85
+86
+0.86
+1.86
+86.86
+87
+0.87
+1.87
+87.87
+88
+0.88
+1.88
+88.88
+89
+0.89
+1.89
+89.89
+90
+0.90
+1.90
+90.90
+91
+0.91
+1.91
+91.91
+92
+0.92
+1.92
+92.92
+93
+0.93
+1.93
+93.93
+94
+0.94
+1.94
+94.94
+95
+0.95
+1.95
+95.95
+96
+0.96
+1.96
+96.96
+97
+0.97
+1.97
+97.97
+98
+0.98
+1.98
+98.98
+99
+0.99
+1.99
+99.99
+100
+0.100
+1.100
+100.100
+101
+0.101
+1.101
+101.101
+102
+0.102
+1.102
+102.102
+103
+0.103
+1.103
+103.103
+104
+0.104
+1.104
+104.104
+105
+0.105
+1.105
+105.105
+106
+0.106
+1.106
+106.106
+107
+0.107
+1.107
+107.107
+108
+0.108
+1.108
+108.108
+109
+0.109
+1.109
+109.109
+110
+0.110
+1.110
+110.110
+111
+0.111
+1.111
+111.111
+112
+0.112
+1.112
+112.112
+113
+0.113
+1.113
+113.113
+114
+0.114
+1.114
+114.114
+115
+0.115
+1.115
+115.115
+116
+0.116
+1.116
+116.116
+117
+0.117
+1.117
+117.117
+118
+0.118
+1.118
+118.118
+119
+0.119
+1.119
+119.119
+120
+0.120
+1.120
+120.120
+121
+0.121
+1.121
+121.121
+122
+0.122
+1.122
+122.122
+123
+0.123
+1.123
+123.123
+124
+0.124
+1.124
+124.124
+125
+0.125
+1.125
+125.125
+126
+0.126
+1.126
+126.126
+127
+0.127
+1.127
+127.127
+128
+0.128
+1.128
+128.128
+129
+0.129
+1.129
+129.129
+130
+0.130
+1.130
+130.130
+131
+0.131
+1.131
+131.131
+132
+0.132
+1.132
+132.132
+133
+0.133
+1.133
+133.133
+134
+0.134
+1.134
+134.134
+135
+0.135
+1.135
+135.135
+136
+0.136
+1.136
+136.136
+137
+0.137
+1.137
+137.137
+138
+0.138
+1.138
+138.138
+139
+0.139
+1.139
+139.139
+140
+0.140
+1.140
+140.140
+141
+0.141
+1.141
+141.141
+142
+0.142
+1.142
+142.142
+143
+0.143
+1.143
+143.143
+144
+0.144
+1.144
+144.144
+145
+0.145
+1.145
+145.145
+146
+0.146
+1.146
+146.146
+147
+0.147
+1.147
+147.147
+148
+0.148
+1.148
+148.148
+149
+0.149
+1.149
+149.149
+150
+0.150
+1.150
+150.150
+151
+0.151
+1.151
+151.151
+152
+0.152
+1.152
+152.152
+153
+0.153
+1.153
+153.153
+154
+0.154
+1.154
+154.154
+155
+0.155
+1.155
+155.155
+156
+0.156
+1.156
+156.156
+157
+0.157
+1.157
+157.157
+158
+0.158
+1.158
+158.158
+159
+0.159
+1.159
+159.159
+160
+0.160
+1.160
+160.160
+161
+0.161
+1.161
+161.161
+162
+0.162
+1.162
+162.162
+163
+0.163
+1.163
+163.163
+164
+0.164
+1.164
+164.164
+165
+0.165
+1.165
+165.165
+166
+0.166
+1.166
+166.166
+167
+0.167
+1.167
+167.167
+168
+0.168
+1.168
+168.168
+169
+0.169
+1.169
+169.169
+170
+0.170
+1.170
+170.170
+171
+0.171
+1.171
+171.171
+172
+0.172
+1.172
+172.172
+173
+0.173
+1.173
+173.173
+174
+0.174
+1.174
+174.174
+175
+0.175
+1.175
+175.175
+176
+0.176
+1.176
+176.176
+177
+0.177
+1.177
+177.177
+178
+0.178
+1.178
+178.178
+179
+0.179
+1.179
+179.179
+180
+0.180
+1.180
+180.180
+181
+0.181
+1.181
+181.181
+182
+0.182
+1.182
+182.182
+183
+0.183
+1.183
+183.183
+184
+0.184
+1.184
+184.184
+185
+0.185
+1.185
+185.185
+186
+0.186
+1.186
+186.186
+187
+0.187
+1.187
+187.187
+188
+0.188
+1.188
+188.188
+189
+0.189
+1.189
+189.189
+190
+0.190
+1.190
+190.190
+191
+0.191
+1.191
+191.191
+192
+0.192
+1.192
+192.192
+193
+0.193
+1.193
+193.193
+194
+0.194
+1.194
+194.194
+195
+0.195
+1.195
+195.195
+196
+0.196
+1.196
+196.196
+197
+0.197
+1.197
+197.197
+198
+0.198
+1.198
+198.198
+199
+0.199
+1.199
+199.199
+200
+0.200
+1.200
+200.200
+201
+0.201
+1.201
+201.201
+202
+0.202
+1.202
+202.202
+203
+0.203
+1.203
+203.203
+204
+0.204
+1.204
+204.204
+205
+0.205
+1.205
+205.205
+206
+0.206
+1.206
+206.206
+207
+0.207
+1.207
+207.207
+208
+0.208
+1.208
+208.208
+209
+0.209
+1.209
+209.209
+210
+0.210
+1.210
+210.210
+211
+0.211
+1.211
+211.211
+212
+0.212
+1.212
+212.212
+213
+0.213
+1.213
+213.213
+214
+0.214
+1.214
+214.214
+215
+0.215
+1.215
+215.215
+216
+0.216
+1.216
+216.216
+217
+0.217
+1.217
+217.217
+218
+0.218
+1.218
+218.218
+219
+0.219
+1.219
+219.219
+220
+0.220
+1.220
+220.220
+221
+0.221
+1.221
+221.221
+222
+0.222
+1.222
+222.222
+223
+0.223
+1.223
+223.223
+224
+0.224
+1.224
+224.224
+225
+0.225
+1.225
+225.225
+226
+0.226
+1.226
+226.226
+227
+0.227
+1.227
+227.227
+228
+0.228
+1.228
+228.228
+229
+0.229
+1.229
+229.229
+230
+0.230
+1.230
+230.230
+231
+0.231
+1.231
+231.231
+232
+0.232
+1.232
+232.232
+233
+0.233
+1.233
+233.233
+234
+0.234
+1.234
+234.234
+235
+0.235
+1.235
+235.235
+236
+0.236
+1.236
+236.236
+237
+0.237
+1.237
+237.237
+238
+0.238
+1.238
+238.238
+239
+0.239
+1.239
+239.239
+240
+0.240
+1.240
+240.240
+241
+0.241
+1.241
+241.241
+242
+0.242
+1.242
+242.242
+243
+0.243
+1.243
+243.243
+244
+0.244
+1.244
+244.244
+245
+0.245
+1.245
+245.245
+246
+0.246
+1.246
+246.246
+247
+0.247
+1.247
+247.247
+248
+0.248
+1.248
+248.248
+249
+0.249
+1.249
+249.249
+250
+0.250
+1.250
+250.250
+251
+0.251
+1.251
+251.251
+252
+0.252
+1.252
+252.252
+253
+0.253
+1.253
+253.253
+254
+0.254
+1.254
+254.254
+255
+0.255
+1.255
+255.255
+256
+0.256
+1.256
+256.256
+257
+0.257
+1.257
+257.257
+258
+0.258
+1.258
+258.258
+259
+0.259
+1.259
+259.259
+260
+0.260
+1.260
+260.260
+261
+0.261
+1.261
+261.261
+262
+0.262
+1.262
+262.262
+263
+0.263
+1.263
+263.263
+264
+0.264
+1.264
+264.264
+265
+0.265
+1.265
+265.265
+266
+0.266
+1.266
+266.266
+267
+0.267
+1.267
+267.267
+268
+0.268
+1.268
+268.268
+269
+0.269
+1.269
+269.269
+270
+0.270
+1.270
+270.270
+271
+0.271
+1.271
+271.271
+272
+0.272
+1.272
+272.272
+273
+0.273
+1.273
+273.273
+274
+0.274
+1.274
+274.274
+275
+0.275
+1.275
+275.275
+276
+0.276
+1.276
+276.276
+277
+0.277
+1.277
+277.277
+278
+0.278
+1.278
+278.278
+279
+0.279
+1.279
+279.279
+280
+0.280
+1.280
+280.280
+281
+0.281
+1.281
+281.281
+282
+0.282
+1.282
+282.282
+283
+0.283
+1.283
+283.283
+284
+0.284
+1.284
+284.284
+285
+0.285
+1.285
+285.285
+286
+0.286
+1.286
+286.286
+287
+0.287
+1.287
+287.287
+288
+0.288
+1.288
+288.288
+289
+0.289
+1.289
+289.289
+2189432174861923048671023498128347619023487610234689172304.192748960\
+128745108927461089237469018723460
diff --git a/tests/files/bc/print_results.txt b/tests/files/bc/print_results.txt
new file mode 100644
index 00000000..972fe89a
--- /dev/null
+++ b/tests/files/bc/print_results.txt
@@ -0,0 +1,6835 @@
+0
+0
+1.0000
+0
+1
+.0001
+1.0001
+1.0001
+10
+.0011
+1.0011
+10.0011
+11
+.0100
+1.0100
+11.0100
+100
+.0110
+1.0110
+100.0110
+10110010100101010111101000011010101011100101011011011011001001111110\
+10000001111100010100010111010000101010100101110101111101000001001100\
+0110011001000011001010111011101010110100011001101010000.001100010101\
+01111111111011110000000101110100100110110001000000110010110101010011\
+010101101010100101011001000001011001000000100000110011011110
+0
+0
+1.000
+0
+1
+.002
+1.002
+1.002
+2
+.012
+1.012
+2.012
+10
+.022
+1.022
+10.022
+11
+.101
+1.101
+11.101
+12
+.111
+1.111
+12.111
+20
+.121
+1.121
+20.121
+21
+.200
+1.200
+21.200
+22
+.210
+1.210
+22.210
+100
+.220
+1.220
+100.220
+10122200120211001201121200010211020111100111210111011012010212020120\
+10120202221112122121211010001111120220120221102111100.01201211121220\
+02201011101001212002002121000110011221200220110011001100210112102200\
+2210200
+0
+0
+1.00
+0
+1
+.01
+1.01
+1.01
+2
+.03
+1.03
+2.03
+3
+.10
+1.10
+3.10
+10
+.12
+1.12
+10.12
+11
+.20
+1.20
+11.20
+12
+.21
+1.21
+12.21
+13
+.23
+1.23
+13.23
+20
+.30
+1.30
+20.30
+21
+.32
+1.32
+21.32
+22
+.0121
+1.0121
+22.0121
+23
+.0130
+1.0130
+23.0130
+30
+.0132
+1.0132
+30.0132
+31
+.0201
+1.0201
+31.0201
+32
+.0203
+1.0203
+32.0203
+33
+.0212
+1.0212
+33.0212
+100
+.0220
+1.0220
+100.0220
+11211022233100311113022312312103331000332022023220111102322332200212\
+0303020121113131112203031100.030111133332330001131021230100030231110\
+3111222211121001121000200303132
+0
+0
+1.00
+0
+1
+.02
+1.02
+1.02
+2
+.10
+1.10
+2.10
+3
+.12
+1.12
+3.12
+4
+.20
+1.20
+4.20
+10
+.22
+1.22
+10.22
+11
+.30
+1.30
+11.30
+12
+.32
+1.32
+12.32
+13
+.40
+1.40
+13.40
+14
+.42
+1.42
+14.42
+20
+.022
+1.022
+20.022
+21
+.023
+1.023
+21.023
+22
+.030
+1.030
+22.030
+23
+.031
+1.031
+23.031
+24
+.032
+1.032
+24.032
+30
+.033
+1.033
+30.033
+31
+.040
+1.040
+31.040
+32
+.041
+1.041
+32.041
+33
+.042
+1.042
+33.042
+34
+.043
+1.043
+34.043
+40
+.100
+1.100
+40.100
+41
+.101
+1.101
+41.101
+42
+.102
+1.102
+42.102
+43
+.103
+1.103
+43.103
+44
+.110
+1.110
+44.110
+100
+.111
+1.111
+100.111
+10121324201024420321244301001102242434304400230130213234232340021022\
+041120412003204.0440213224012441100431130104042314413233411030143044\
+120031143
+0
+0
+1.00
+0
+1
+.03
+1.03
+1.03
+2
+.11
+1.11
+2.11
+3
+.14
+1.14
+3.14
+4
+.22
+1.22
+4.22
+5
+.30
+1.30
+5.30
+10
+.33
+1.33
+10.33
+11
+.41
+1.41
+11.41
+12
+.44
+1.44
+12.44
+13
+.52
+1.52
+13.52
+14
+.033
+1.033
+14.033
+15
+.035
+1.035
+15.035
+20
+.041
+1.041
+20.041
+21
+.044
+1.044
+21.044
+22
+.050
+1.050
+22.050
+23
+.052
+1.052
+23.052
+24
+.054
+1.054
+24.054
+25
+.100
+1.100
+25.100
+30
+.102
+1.102
+30.102
+31
+.105
+1.105
+31.105
+32
+.111
+1.111
+32.111
+33
+.113
+1.113
+33.113
+34
+.115
+1.115
+34.115
+35
+.121
+1.121
+35.121
+40
+.123
+1.123
+40.123
+41
+.130
+1.130
+41.130
+42
+.132
+1.132
+42.132
+43
+.134
+1.134
+43.134
+44
+.140
+1.140
+44.140
+45
+.142
+1.142
+45.142
+50
+.144
+1.144
+50.144
+51
+.150
+1.150
+51.150
+52
+.153
+1.153
+52.153
+53
+.155
+1.155
+53.155
+54
+.201
+1.201
+54.201
+55
+.203
+1.203
+55.203
+100
+.205
+1.205
+100.205
+32325123504124055134134454104553332155551120101335023320334452322024\
+344400.105344521231405101332503433044113532015215451252503255
+0
+0
+1.00
+0
+1
+.04
+1.04
+1.04
+2
+.12
+1.12
+2.12
+3
+.20
+1.20
+3.20
+4
+.25
+1.25
+4.25
+5
+.33
+1.33
+5.33
+6
+.41
+1.41
+6.41
+10
+.46
+1.46
+10.46
+11
+.54
+1.54
+11.54
+12
+.62
+1.62
+12.62
+13
+.046
+1.046
+13.046
+14
+.052
+1.052
+14.052
+15
+.056
+1.056
+15.056
+16
+.062
+1.062
+16.062
+20
+.066
+1.066
+20.066
+21
+.102
+1.102
+21.102
+22
+.105
+1.105
+22.105
+23
+.112
+1.112
+23.112
+24
+.115
+1.115
+24.115
+25
+.122
+1.122
+25.122
+26
+.125
+1.125
+26.125
+30
+.132
+1.132
+30.132
+31
+.135
+1.135
+31.135
+32
+.141
+1.141
+32.141
+33
+.145
+1.145
+33.145
+34
+.151
+1.151
+34.151
+35
+.155
+1.155
+35.155
+36
+.161
+1.161
+36.161
+40
+.165
+1.165
+40.165
+41
+.201
+1.201
+41.201
+42
+.204
+1.204
+42.204
+43
+.211
+1.211
+43.211
+44
+.214
+1.214
+44.214
+45
+.221
+1.221
+45.221
+46
+.224
+1.224
+46.224
+50
+.231
+1.231
+50.231
+51
+.234
+1.234
+51.234
+52
+.240
+1.240
+52.240
+53
+.244
+1.244
+53.244
+54
+.250
+1.250
+54.250
+55
+.254
+1.254
+55.254
+56
+.260
+1.260
+56.260
+60
+.264
+1.264
+60.264
+61
+.300
+1.300
+61.300
+62
+.303
+1.303
+62.303
+63
+.310
+1.310
+63.310
+64
+.313
+1.313
+64.313
+65
+.320
+1.320
+65.320
+66
+.323
+1.323
+66.323
+100
+.330
+1.330
+100.330
+51426532252561200415336212163303443406022321462331460564153512532101\
+.12305350253355652433456316140406112642615245056225
+0
+0
+1.00
+0
+1
+.06
+1.06
+1.06
+2
+.14
+1.14
+2.14
+3
+.23
+1.23
+3.23
+4
+.31
+1.31
+4.31
+5
+.40
+1.40
+5.40
+6
+.46
+1.46
+6.46
+7
+.54
+1.54
+7.54
+10
+.63
+1.63
+10.63
+11
+.71
+1.71
+11.71
+12
+.063
+1.063
+12.063
+13
+.070
+1.070
+13.070
+14
+.075
+1.075
+14.075
+15
+.102
+1.102
+15.102
+16
+.107
+1.107
+16.107
+17
+.114
+1.114
+17.114
+20
+.121
+1.121
+20.121
+21
+.127
+1.127
+21.127
+22
+.134
+1.134
+22.134
+23
+.141
+1.141
+23.141
+24
+.146
+1.146
+24.146
+25
+.153
+1.153
+25.153
+26
+.160
+1.160
+26.160
+27
+.165
+1.165
+27.165
+30
+.172
+1.172
+30.172
+31
+.200
+1.200
+31.200
+32
+.205
+1.205
+32.205
+33
+.212
+1.212
+33.212
+34
+.217
+1.217
+34.217
+35
+.224
+1.224
+35.224
+36
+.231
+1.231
+36.231
+37
+.236
+1.236
+37.236
+40
+.243
+1.243
+40.243
+41
+.250
+1.250
+41.250
+42
+.256
+1.256
+42.256
+43
+.263
+1.263
+43.263
+44
+.270
+1.270
+44.270
+45
+.275
+1.275
+45.275
+46
+.302
+1.302
+46.302
+47
+.307
+1.307
+47.307
+50
+.314
+1.314
+50.314
+51
+.321
+1.321
+51.321
+52
+.327
+1.327
+52.327
+53
+.334
+1.334
+53.334
+54
+.341
+1.341
+54.341
+55
+.346
+1.346
+55.346
+56
+.353
+1.353
+56.353
+57
+.360
+1.360
+57.360
+60
+.365
+1.365
+60.365
+61
+.372
+1.372
+61.372
+62
+.400
+1.400
+62.400
+63
+.405
+1.405
+63.405
+64
+.412
+1.412
+64.412
+65
+.417
+1.417
+65.417
+66
+.424
+1.424
+66.424
+67
+.431
+1.431
+67.431
+70
+.436
+1.436
+70.436
+71
+.443
+1.443
+71.443
+72
+.450
+1.450
+72.450
+73
+.456
+1.456
+73.456
+74
+.463
+1.463
+74.463
+75
+.470
+1.470
+75.470
+76
+.475
+1.475
+76.475
+77
+.502
+1.502
+77.502
+100
+.507
+1.507
+100.507
+2624527503253453333117640370505641251353720230631031273526431520.142\
+53776740135115420145524653251262026201014675
+0
+0
+1.00
+0
+1
+.08
+1.08
+1.08
+2
+.17
+1.17
+2.17
+3
+.26
+1.26
+3.26
+4
+.35
+1.35
+4.35
+5
+.44
+1.44
+5.44
+6
+.53
+1.53
+6.53
+7
+.62
+1.62
+7.62
+8
+.71
+1.71
+8.71
+10
+.80
+1.80
+10.80
+11
+.080
+1.080
+11.080
+12
+.088
+1.088
+12.088
+13
+.106
+1.106
+13.106
+14
+.114
+1.114
+14.114
+15
+.123
+1.123
+15.123
+16
+.131
+1.131
+16.131
+17
+.138
+1.138
+17.138
+18
+.146
+1.146
+18.146
+20
+.155
+1.155
+20.155
+21
+.163
+1.163
+21.163
+22
+.171
+1.171
+22.171
+23
+.180
+1.180
+23.180
+24
+.187
+1.187
+24.187
+25
+.205
+1.205
+25.205
+26
+.213
+1.213
+26.213
+27
+.222
+1.222
+27.222
+28
+.230
+1.230
+28.230
+30
+.237
+1.237
+30.237
+31
+.246
+1.246
+31.246
+32
+.254
+1.254
+32.254
+33
+.262
+1.262
+33.262
+34
+.270
+1.270
+34.270
+35
+.278
+1.278
+35.278
+36
+.286
+1.286
+36.286
+37
+.304
+1.304
+37.304
+38
+.313
+1.313
+38.313
+40
+.321
+1.321
+40.321
+41
+.328
+1.328
+41.328
+42
+.337
+1.337
+42.337
+43
+.345
+1.345
+43.345
+44
+.353
+1.353
+44.353
+45
+.361
+1.361
+45.361
+46
+.370
+1.370
+46.370
+47
+.377
+1.377
+47.377
+48
+.385
+1.385
+48.385
+50
+.404
+1.404
+50.404
+51
+.412
+1.412
+51.412
+52
+.420
+1.420
+52.420
+53
+.427
+1.427
+53.427
+54
+.436
+1.436
+54.436
+55
+.444
+1.444
+55.444
+56
+.452
+1.452
+56.452
+57
+.461
+1.461
+57.461
+58
+.468
+1.468
+58.468
+60
+.476
+1.476
+60.476
+61
+.484
+1.484
+61.484
+62
+.503
+1.503
+62.503
+63
+.511
+1.511
+63.511
+64
+.518
+1.518
+64.518
+65
+.527
+1.527
+65.527
+66
+.535
+1.535
+66.535
+67
+.543
+1.543
+67.543
+68
+.551
+1.551
+68.551
+70
+.560
+1.560
+70.560
+71
+.567
+1.567
+71.567
+72
+.575
+1.575
+72.575
+73
+.584
+1.584
+73.584
+74
+.602
+1.602
+74.602
+75
+.610
+1.610
+75.610
+76
+.618
+1.618
+76.618
+77
+.626
+1.626
+77.626
+78
+.634
+1.634
+78.634
+80
+.642
+1.642
+80.642
+81
+.651
+1.651
+81.651
+82
+.658
+1.658
+82.658
+83
+.666
+1.666
+83.666
+84
+.675
+1.675
+84.675
+85
+.683
+1.683
+85.683
+86
+.701
+1.701
+86.701
+87
+.708
+1.708
+87.708
+88
+.717
+1.717
+88.717
+100
+.725
+1.725
+100.725
+1186167316476037364404534341637665116687478554101446816842440.165455\
+626343317620770131576264040407153808360
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.3
+1.3
+3.3
+4
+.4
+1.4
+4.4
+5
+.5
+1.5
+5.5
+6
+.6
+1.6
+6.6
+7
+.7
+1.7
+7.7
+8
+.8
+1.8
+8.8
+9
+.9
+1.9
+9.9
+A
+.11
+1.11
+A.11
+10
+.12
+1.12
+10.12
+11
+.13
+1.13
+11.13
+12
+.14
+1.14
+12.14
+13
+.15
+1.15
+13.15
+14
+.17
+1.17
+14.17
+15
+.18
+1.18
+15.18
+16
+.19
+1.19
+16.19
+17
+.1A
+1.1A
+17.1A
+18
+.20
+1.20
+18.20
+19
+.22
+1.22
+19.22
+1A
+.23
+1.23
+1A.23
+20
+.24
+1.24
+20.24
+21
+.25
+1.25
+21.25
+22
+.27
+1.27
+22.27
+23
+.28
+1.28
+23.28
+24
+.29
+1.29
+24.29
+25
+.2A
+1.2A
+25.2A
+26
+.30
+1.30
+26.30
+27
+.32
+1.32
+27.32
+28
+.33
+1.33
+28.33
+29
+.34
+1.34
+29.34
+2A
+.35
+1.35
+2A.35
+30
+.36
+1.36
+30.36
+31
+.38
+1.38
+31.38
+32
+.39
+1.39
+32.39
+33
+.3A
+1.3A
+33.3A
+34
+.40
+1.40
+34.40
+35
+.41
+1.41
+35.41
+36
+.43
+1.43
+36.43
+37
+.44
+1.44
+37.44
+38
+.45
+1.45
+38.45
+39
+.46
+1.46
+39.46
+3A
+.48
+1.48
+3A.48
+40
+.49
+1.49
+40.49
+41
+.4A
+1.4A
+41.4A
+42
+.50
+1.50
+42.50
+43
+.51
+1.51
+43.51
+44
+.53
+1.53
+44.53
+45
+.54
+1.54
+45.54
+46
+.55
+1.55
+46.55
+47
+.56
+1.56
+47.56
+48
+.57
+1.57
+48.57
+49
+.59
+1.59
+49.59
+4A
+.5A
+1.5A
+4A.5A
+50
+.60
+1.60
+50.60
+51
+.61
+1.61
+51.61
+52
+.62
+1.62
+52.62
+53
+.64
+1.64
+53.64
+54
+.65
+1.65
+54.65
+55
+.66
+1.66
+55.66
+56
+.67
+1.67
+56.67
+57
+.69
+1.69
+57.69
+58
+.6A
+1.6A
+58.6A
+59
+.70
+1.70
+59.70
+5A
+.71
+1.71
+5A.71
+60
+.72
+1.72
+60.72
+61
+.74
+1.74
+61.74
+62
+.75
+1.75
+62.75
+63
+.76
+1.76
+63.76
+64
+.77
+1.77
+64.77
+65
+.78
+1.78
+65.78
+66
+.7A
+1.7A
+66.7A
+67
+.80
+1.80
+67.80
+68
+.81
+1.81
+68.81
+69
+.82
+1.82
+69.82
+6A
+.83
+1.83
+6A.83
+70
+.85
+1.85
+70.85
+71
+.86
+1.86
+71.86
+72
+.87
+1.87
+72.87
+73
+.88
+1.88
+73.88
+74
+.8A
+1.8A
+74.8A
+75
+.90
+1.90
+75.90
+76
+.91
+1.91
+76.91
+77
+.92
+1.92
+77.92
+78
+.93
+1.93
+78.93
+79
+.95
+1.95
+79.95
+7A
+.96
+1.96
+7A.96
+80
+.97
+1.97
+80.97
+81
+.98
+1.98
+81.98
+82
+.99
+1.99
+82.99
+83
+.A0
+1.A0
+83.A0
+84
+.A1
+1.A1
+84.A1
+85
+.A2
+1.A2
+85.A2
+86
+.A3
+1.A3
+86.A3
+87
+.A4
+1.A4
+87.A4
+88
+.A6
+1.A6
+88.A6
+89
+.A7
+1.A7
+89.A7
+8A
+.A8
+1.A8
+8A.A8
+90
+.A9
+1.A9
+90.A9
+91
+.111
+1.111
+91.111
+92
+.112
+1.112
+92.112
+93
+.113
+1.113
+93.113
+94
+.115
+1.115
+94.115
+95
+.116
+1.116
+95.116
+96
+.117
+1.117
+96.117
+97
+.119
+1.119
+97.119
+98
+.11A
+1.11A
+98.11A
+99
+.120
+1.120
+99.120
+9A
+.122
+1.122
+9A.122
+A0
+.123
+1.123
+A0.123
+A1
+.124
+1.124
+A1.124
+A2
+.126
+1.126
+A2.126
+A3
+.127
+1.127
+A3.127
+A4
+.128
+1.128
+A4.128
+A5
+.12A
+1.12A
+A5.12A
+A6
+.130
+1.130
+A6.130
+A7
+.131
+1.131
+A7.131
+A8
+.133
+1.133
+A8.133
+A9
+.134
+1.134
+A9.134
+AA
+.135
+1.135
+AA.135
+100
+.137
+1.137
+100.137
+1181429A23194525611865619430228661458A403A8A675AA8A03443.2136045A452\
+95778992169625874892620A707245
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.3
+1.3
+3.3
+4
+.4
+1.4
+4.4
+5
+.6
+1.6
+5.6
+6
+.7
+1.7
+6.7
+7
+.8
+1.8
+7.8
+8
+.9
+1.9
+8.9
+9
+.A
+1.A
+9.A
+A
+.12
+1.12
+A.12
+B
+.13
+1.13
+B.13
+10
+.15
+1.15
+10.15
+11
+.16
+1.16
+11.16
+12
+.18
+1.18
+12.18
+13
+.19
+1.19
+13.19
+14
+.1B
+1.1B
+14.1B
+15
+.20
+1.20
+15.20
+16
+.21
+1.21
+16.21
+17
+.23
+1.23
+17.23
+18
+.24
+1.24
+18.24
+19
+.26
+1.26
+19.26
+1A
+.27
+1.27
+1A.27
+1B
+.29
+1.29
+1B.29
+20
+.2A
+1.2A
+20.2A
+21
+.30
+1.30
+21.30
+22
+.31
+1.31
+22.31
+23
+.32
+1.32
+23.32
+24
+.34
+1.34
+24.34
+25
+.35
+1.35
+25.35
+26
+.37
+1.37
+26.37
+27
+.38
+1.38
+27.38
+28
+.3A
+1.3A
+28.3A
+29
+.3B
+1.3B
+29.3B
+2A
+.40
+1.40
+2A.40
+2B
+.42
+1.42
+2B.42
+30
+.43
+1.43
+30.43
+31
+.45
+1.45
+31.45
+32
+.46
+1.46
+32.46
+33
+.48
+1.48
+33.48
+34
+.49
+1.49
+34.49
+35
+.4B
+1.4B
+35.4B
+36
+.50
+1.50
+36.50
+37
+.51
+1.51
+37.51
+38
+.53
+1.53
+38.53
+39
+.54
+1.54
+39.54
+3A
+.56
+1.56
+3A.56
+3B
+.57
+1.57
+3B.57
+40
+.59
+1.59
+40.59
+41
+.5A
+1.5A
+41.5A
+42
+.60
+1.60
+42.60
+43
+.61
+1.61
+43.61
+44
+.62
+1.62
+44.62
+45
+.64
+1.64
+45.64
+46
+.65
+1.65
+46.65
+47
+.67
+1.67
+47.67
+48
+.68
+1.68
+48.68
+49
+.6A
+1.6A
+49.6A
+4A
+.6B
+1.6B
+4A.6B
+4B
+.70
+1.70
+4B.70
+50
+.72
+1.72
+50.72
+51
+.73
+1.73
+51.73
+52
+.75
+1.75
+52.75
+53
+.76
+1.76
+53.76
+54
+.78
+1.78
+54.78
+55
+.79
+1.79
+55.79
+56
+.7B
+1.7B
+56.7B
+57
+.80
+1.80
+57.80
+58
+.81
+1.81
+58.81
+59
+.83
+1.83
+59.83
+5A
+.84
+1.84
+5A.84
+5B
+.86
+1.86
+5B.86
+60
+.87
+1.87
+60.87
+61
+.89
+1.89
+61.89
+62
+.8A
+1.8A
+62.8A
+63
+.90
+1.90
+63.90
+64
+.91
+1.91
+64.91
+65
+.92
+1.92
+65.92
+66
+.94
+1.94
+66.94
+67
+.95
+1.95
+67.95
+68
+.97
+1.97
+68.97
+69
+.98
+1.98
+69.98
+6A
+.9A
+1.9A
+6A.9A
+6B
+.9B
+1.9B
+6B.9B
+70
+.A0
+1.A0
+70.A0
+71
+.A2
+1.A2
+71.A2
+72
+.A3
+1.A3
+72.A3
+73
+.A5
+1.A5
+73.A5
+74
+.A6
+1.A6
+74.A6
+75
+.A8
+1.A8
+75.A8
+76
+.A9
+1.A9
+76.A9
+77
+.AB
+1.AB
+77.AB
+78
+.B0
+1.B0
+78.B0
+79
+.B1
+1.B1
+79.B1
+7A
+.B3
+1.B3
+7A.B3
+7B
+.B4
+1.B4
+7B.B4
+80
+.B6
+1.B6
+80.B6
+81
+.B7
+1.B7
+81.B7
+82
+.B9
+1.B9
+82.B9
+83
+.BA
+1.BA
+83.BA
+84
+.124
+1.124
+84.124
+85
+.126
+1.126
+85.126
+86
+.128
+1.128
+86.128
+87
+.129
+1.129
+87.129
+88
+.12B
+1.12B
+88.12B
+89
+.131
+1.131
+89.131
+8A
+.133
+1.133
+8A.133
+8B
+.134
+1.134
+8B.134
+90
+.136
+1.136
+90.136
+91
+.138
+1.138
+91.138
+92
+.13A
+1.13A
+92.13A
+93
+.13B
+1.13B
+93.13B
+94
+.141
+1.141
+94.141
+95
+.143
+1.143
+95.143
+96
+.144
+1.144
+96.144
+97
+.146
+1.146
+97.146
+98
+.148
+1.148
+98.148
+99
+.14A
+1.14A
+99.14A
+9A
+.14B
+1.14B
+9A.14B
+9B
+.151
+1.151
+9B.151
+A0
+.153
+1.153
+A0.153
+A1
+.155
+1.155
+A1.155
+A2
+.156
+1.156
+A2.156
+A3
+.158
+1.158
+A3.158
+A4
+.15A
+1.15A
+A4.15A
+A5
+.160
+1.160
+A5.160
+A6
+.161
+1.161
+A6.161
+A7
+.163
+1.163
+A7.163
+A8
+.165
+1.165
+A8.165
+A9
+.166
+1.166
+A9.166
+AA
+.168
+1.168
+AA.168
+AB
+.16A
+1.16A
+AB.16A
+B0
+.170
+1.170
+B0.170
+B1
+.171
+1.171
+B1.171
+B2
+.173
+1.173
+B2.173
+B3
+.175
+1.175
+B3.175
+B4
+.177
+1.177
+B4.177
+B5
+.178
+1.178
+B5.178
+B6
+.17A
+1.17A
+B6.17A
+B7
+.180
+1.180
+B7.180
+B8
+.181
+1.181
+B8.181
+B9
+.183
+1.183
+B9.183
+BA
+.185
+1.185
+BA.185
+BB
+.187
+1.187
+BB.187
+100
+.188
+1.188
+100.188
+1485A2ABB33331A9A52265654653B96A10277355024948A4015100.2390A13894109\
+47649128335B8868551928406A
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.3
+1.3
+3.3
+4
+.5
+1.5
+4.5
+5
+.6
+1.6
+5.6
+6
+.7
+1.7
+6.7
+7
+.9
+1.9
+7.9
+8
+.A
+1.A
+8.A
+9
+.B
+1.B
+9.B
+A
+.13
+1.13
+A.13
+B
+.15
+1.15
+B.15
+C
+.17
+1.17
+C.17
+10
+.18
+1.18
+10.18
+11
+.1A
+1.1A
+11.1A
+12
+.1C
+1.1C
+12.1C
+13
+.21
+1.21
+13.21
+14
+.22
+1.22
+14.22
+15
+.24
+1.24
+15.24
+16
+.26
+1.26
+16.26
+17
+.27
+1.27
+17.27
+18
+.29
+1.29
+18.29
+19
+.2B
+1.2B
+19.2B
+1A
+.2C
+1.2C
+1A.2C
+1B
+.31
+1.31
+1B.31
+1C
+.33
+1.33
+1C.33
+20
+.34
+1.34
+20.34
+21
+.36
+1.36
+21.36
+22
+.38
+1.38
+22.38
+23
+.3A
+1.3A
+23.3A
+24
+.3B
+1.3B
+24.3B
+25
+.40
+1.40
+25.40
+26
+.42
+1.42
+26.42
+27
+.43
+1.43
+27.43
+28
+.45
+1.45
+28.45
+29
+.47
+1.47
+29.47
+2A
+.48
+1.48
+2A.48
+2B
+.4A
+1.4A
+2B.4A
+2C
+.4C
+1.4C
+2C.4C
+30
+.50
+1.50
+30.50
+31
+.52
+1.52
+31.52
+32
+.54
+1.54
+32.54
+33
+.55
+1.55
+33.55
+34
+.57
+1.57
+34.57
+35
+.59
+1.59
+35.59
+36
+.5B
+1.5B
+36.5B
+37
+.5C
+1.5C
+37.5C
+38
+.61
+1.61
+38.61
+39
+.63
+1.63
+39.63
+3A
+.64
+1.64
+3A.64
+3B
+.66
+1.66
+3B.66
+3C
+.68
+1.68
+3C.68
+40
+.69
+1.69
+40.69
+41
+.6B
+1.6B
+41.6B
+42
+.70
+1.70
+42.70
+43
+.71
+1.71
+43.71
+44
+.73
+1.73
+44.73
+45
+.75
+1.75
+45.75
+46
+.77
+1.77
+46.77
+47
+.78
+1.78
+47.78
+48
+.7A
+1.7A
+48.7A
+49
+.7C
+1.7C
+49.7C
+4A
+.80
+1.80
+4A.80
+4B
+.82
+1.82
+4B.82
+4C
+.84
+1.84
+4C.84
+50
+.85
+1.85
+50.85
+51
+.87
+1.87
+51.87
+52
+.89
+1.89
+52.89
+53
+.8A
+1.8A
+53.8A
+54
+.8C
+1.8C
+54.8C
+55
+.91
+1.91
+55.91
+56
+.92
+1.92
+56.92
+57
+.94
+1.94
+57.94
+58
+.96
+1.96
+58.96
+59
+.98
+1.98
+59.98
+5A
+.99
+1.99
+5A.99
+5B
+.9B
+1.9B
+5B.9B
+5C
+.A0
+1.A0
+5C.A0
+60
+.A1
+1.A1
+60.A1
+61
+.A3
+1.A3
+61.A3
+62
+.A5
+1.A5
+62.A5
+63
+.A6
+1.A6
+63.A6
+64
+.A8
+1.A8
+64.A8
+65
+.AA
+1.AA
+65.AA
+66
+.AB
+1.AB
+66.AB
+67
+.B0
+1.B0
+67.B0
+68
+.B2
+1.B2
+68.B2
+69
+.B4
+1.B4
+69.B4
+6A
+.B5
+1.B5
+6A.B5
+6B
+.B7
+1.B7
+6B.B7
+6C
+.B9
+1.B9
+6C.B9
+70
+.BA
+1.BA
+70.BA
+71
+.BC
+1.BC
+71.BC
+72
+.C1
+1.C1
+72.C1
+73
+.C2
+1.C2
+73.C2
+74
+.C4
+1.C4
+74.C4
+75
+.C6
+1.C6
+75.C6
+76
+.C7
+1.C7
+76.C7
+77
+.C9
+1.C9
+77.C9
+78
+.CB
+1.CB
+78.CB
+79
+.13B
+1.13B
+79.13B
+7A
+.140
+1.140
+7A.140
+7B
+.143
+1.143
+7B.143
+7C
+.145
+1.145
+7C.145
+80
+.147
+1.147
+80.147
+81
+.149
+1.149
+81.149
+82
+.14B
+1.14B
+82.14B
+83
+.151
+1.151
+83.151
+84
+.153
+1.153
+84.153
+85
+.155
+1.155
+85.155
+86
+.157
+1.157
+86.157
+87
+.159
+1.159
+87.159
+88
+.15C
+1.15C
+88.15C
+89
+.161
+1.161
+89.161
+8A
+.163
+1.163
+8A.163
+8B
+.165
+1.165
+8B.165
+8C
+.167
+1.167
+8C.167
+90
+.16A
+1.16A
+90.16A
+91
+.16C
+1.16C
+91.16C
+92
+.171
+1.171
+92.171
+93
+.173
+1.173
+93.173
+94
+.175
+1.175
+94.175
+95
+.178
+1.178
+95.178
+96
+.17A
+1.17A
+96.17A
+97
+.17C
+1.17C
+97.17C
+98
+.181
+1.181
+98.181
+99
+.183
+1.183
+99.183
+9A
+.186
+1.186
+9A.186
+9B
+.188
+1.188
+9B.188
+9C
+.18A
+1.18A
+9C.18A
+A0
+.18C
+1.18C
+A0.18C
+A1
+.191
+1.191
+A1.191
+A2
+.194
+1.194
+A2.194
+A3
+.196
+1.196
+A3.196
+A4
+.198
+1.198
+A4.198
+A5
+.19A
+1.19A
+A5.19A
+A6
+.19C
+1.19C
+A6.19C
+A7
+.1A1
+1.1A1
+A7.1A1
+A8
+.1A4
+1.1A4
+A8.1A4
+A9
+.1A6
+1.1A6
+A9.1A6
+AA
+.1A8
+1.1A8
+AA.1A8
+AB
+.1AA
+1.1AA
+AB.1AA
+AC
+.1AC
+1.1AC
+AC.1AC
+B0
+.1B2
+1.1B2
+B0.1B2
+B1
+.1B4
+1.1B4
+B1.1B4
+B2
+.1B6
+1.1B6
+B2.1B6
+B3
+.1B8
+1.1B8
+B3.1B8
+B4
+.1BA
+1.1BA
+B4.1BA
+B5
+.1C0
+1.1C0
+B5.1C0
+B6
+.1C2
+1.1C2
+B6.1C2
+B7
+.1C4
+1.1C4
+B7.1C4
+B8
+.1C6
+1.1C6
+B8.1C6
+B9
+.1C8
+1.1C8
+B9.1C8
+BA
+.1CB
+1.1CB
+BA.1CB
+BB
+.200
+1.200
+BB.200
+BC
+.202
+1.202
+BC.202
+C0
+.204
+1.204
+C0.204
+C1
+.206
+1.206
+C1.206
+C2
+.209
+1.209
+C2.209
+C3
+.20B
+1.20B
+C3.20B
+C4
+.210
+1.210
+C4.210
+C5
+.212
+1.212
+C5.212
+C6
+.214
+1.214
+C6.214
+C7
+.217
+1.217
+C7.217
+C8
+.219
+1.219
+C8.219
+C9
+.21B
+1.21B
+C9.21B
+CA
+.220
+1.220
+CA.220
+CB
+.222
+1.222
+CB.222
+CC
+.225
+1.225
+CC.225
+100
+.227
+1.227
+100.227
+34C8097C522019AB8CCA960C6B9BCB7784942BAC91C1C8532045.267614552AA727A\
+18A58C5972834B671374270
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.2
+1.2
+2.2
+3
+.4
+1.4
+3.4
+4
+.5
+1.5
+4.5
+5
+.7
+1.7
+5.7
+6
+.8
+1.8
+6.8
+7
+.9
+1.9
+7.9
+8
+.B
+1.B
+8.B
+9
+.C
+1.C
+9.C
+A
+.15
+1.15
+A.15
+B
+.17
+1.17
+B.17
+C
+.19
+1.19
+C.19
+D
+.1B
+1.1B
+D.1B
+10
+.1D
+1.1D
+10.1D
+11
+.21
+1.21
+11.21
+12
+.23
+1.23
+12.23
+13
+.25
+1.25
+13.25
+14
+.27
+1.27
+14.27
+15
+.29
+1.29
+15.29
+16
+.2B
+1.2B
+16.2B
+17
+.2D
+1.2D
+17.2D
+18
+.31
+1.31
+18.31
+19
+.33
+1.33
+19.33
+1A
+.35
+1.35
+1A.35
+1B
+.37
+1.37
+1B.37
+1C
+.38
+1.38
+1C.38
+1D
+.3A
+1.3A
+1D.3A
+20
+.3C
+1.3C
+20.3C
+21
+.40
+1.40
+21.40
+22
+.42
+1.42
+22.42
+23
+.44
+1.44
+23.44
+24
+.46
+1.46
+24.46
+25
+.48
+1.48
+25.48
+26
+.4A
+1.4A
+26.4A
+27
+.4C
+1.4C
+27.4C
+28
+.50
+1.50
+28.50
+29
+.52
+1.52
+29.52
+2A
+.54
+1.54
+2A.54
+2B
+.56
+1.56
+2B.56
+2C
+.58
+1.58
+2C.58
+2D
+.5A
+1.5A
+2D.5A
+30
+.5C
+1.5C
+30.5C
+31
+.60
+1.60
+31.60
+32
+.62
+1.62
+32.62
+33
+.64
+1.64
+33.64
+34
+.66
+1.66
+34.66
+35
+.68
+1.68
+35.68
+36
+.6A
+1.6A
+36.6A
+37
+.6C
+1.6C
+37.6C
+38
+.70
+1.70
+38.70
+39
+.71
+1.71
+39.71
+3A
+.73
+1.73
+3A.73
+3B
+.75
+1.75
+3B.75
+3C
+.77
+1.77
+3C.77
+3D
+.79
+1.79
+3D.79
+40
+.7B
+1.7B
+40.7B
+41
+.7D
+1.7D
+41.7D
+42
+.81
+1.81
+42.81
+43
+.83
+1.83
+43.83
+44
+.85
+1.85
+44.85
+45
+.87
+1.87
+45.87
+46
+.89
+1.89
+46.89
+47
+.8B
+1.8B
+47.8B
+48
+.8D
+1.8D
+48.8D
+49
+.91
+1.91
+49.91
+4A
+.93
+1.93
+4A.93
+4B
+.95
+1.95
+4B.95
+4C
+.97
+1.97
+4C.97
+4D
+.99
+1.99
+4D.99
+50
+.9B
+1.9B
+50.9B
+51
+.9D
+1.9D
+51.9D
+52
+.A1
+1.A1
+52.A1
+53
+.A3
+1.A3
+53.A3
+54
+.A5
+1.A5
+54.A5
+55
+.A7
+1.A7
+55.A7
+56
+.A8
+1.A8
+56.A8
+57
+.AA
+1.AA
+57.AA
+58
+.AC
+1.AC
+58.AC
+59
+.B0
+1.B0
+59.B0
+5A
+.B2
+1.B2
+5A.B2
+5B
+.B4
+1.B4
+5B.B4
+5C
+.B6
+1.B6
+5C.B6
+5D
+.B8
+1.B8
+5D.B8
+60
+.BA
+1.BA
+60.BA
+61
+.BC
+1.BC
+61.BC
+62
+.C0
+1.C0
+62.C0
+63
+.C2
+1.C2
+63.C2
+64
+.C4
+1.C4
+64.C4
+65
+.C6
+1.C6
+65.C6
+66
+.C8
+1.C8
+66.C8
+67
+.CA
+1.CA
+67.CA
+68
+.CC
+1.CC
+68.CC
+69
+.D0
+1.D0
+69.D0
+6A
+.D2
+1.D2
+6A.D2
+6B
+.D4
+1.D4
+6B.D4
+6C
+.D6
+1.D6
+6C.D6
+6D
+.D8
+1.D8
+6D.D8
+70
+.DA
+1.DA
+70.DA
+71
+.DC
+1.DC
+71.DC
+72
+.158
+1.158
+72.158
+73
+.15B
+1.15B
+73.15B
+74
+.15D
+1.15D
+74.15D
+75
+.162
+1.162
+75.162
+76
+.165
+1.165
+76.165
+77
+.168
+1.168
+77.168
+78
+.16A
+1.16A
+78.16A
+79
+.16D
+1.16D
+79.16D
+7A
+.172
+1.172
+7A.172
+7B
+.175
+1.175
+7B.175
+7C
+.177
+1.177
+7C.177
+7D
+.17A
+1.17A
+7D.17A
+80
+.17D
+1.17D
+80.17D
+81
+.182
+1.182
+81.182
+82
+.184
+1.184
+82.184
+83
+.187
+1.187
+83.187
+84
+.18A
+1.18A
+84.18A
+85
+.18D
+1.18D
+85.18D
+86
+.191
+1.191
+86.191
+87
+.194
+1.194
+87.194
+88
+.197
+1.197
+88.197
+89
+.19A
+1.19A
+89.19A
+8A
+.19C
+1.19C
+8A.19C
+8B
+.1A1
+1.1A1
+8B.1A1
+8C
+.1A4
+1.1A4
+8C.1A4
+8D
+.1A7
+1.1A7
+8D.1A7
+90
+.1A9
+1.1A9
+90.1A9
+91
+.1AC
+1.1AC
+91.1AC
+92
+.1B1
+1.1B1
+92.1B1
+93
+.1B3
+1.1B3
+93.1B3
+94
+.1B6
+1.1B6
+94.1B6
+95
+.1B9
+1.1B9
+95.1B9
+96
+.1BC
+1.1BC
+96.1BC
+97
+.1C0
+1.1C0
+97.1C0
+98
+.1C3
+1.1C3
+98.1C3
+99
+.1C6
+1.1C6
+99.1C6
+9A
+.1C9
+1.1C9
+9A.1C9
+9B
+.1CB
+1.1CB
+9B.1CB
+9C
+.1D0
+1.1D0
+9C.1D0
+9D
+.1D3
+1.1D3
+9D.1D3
+A0
+.1D6
+1.1D6
+A0.1D6
+A1
+.1D8
+1.1D8
+A1.1D8
+A2
+.1DB
+1.1DB
+A2.1DB
+A3
+.200
+1.200
+A3.200
+A4
+.203
+1.203
+A4.203
+A5
+.205
+1.205
+A5.205
+A6
+.208
+1.208
+A6.208
+A7
+.20B
+1.20B
+A7.20B
+A8
+.210
+1.210
+A8.210
+A9
+.212
+1.212
+A9.212
+AA
+.215
+1.215
+AA.215
+AB
+.218
+1.218
+AB.218
+AC
+.21B
+1.21B
+AC.21B
+AD
+.21D
+1.21D
+AD.21D
+B0
+.222
+1.222
+B0.222
+B1
+.225
+1.225
+B1.225
+B2
+.228
+1.228
+B2.228
+B3
+.22A
+1.22A
+B3.22A
+B4
+.22D
+1.22D
+B4.22D
+B5
+.232
+1.232
+B5.232
+B6
+.235
+1.235
+B6.235
+B7
+.237
+1.237
+B7.237
+B8
+.23A
+1.23A
+B8.23A
+B9
+.23D
+1.23D
+B9.23D
+BA
+.242
+1.242
+BA.242
+BB
+.244
+1.244
+BB.244
+BC
+.247
+1.247
+BC.247
+BD
+.24A
+1.24A
+BD.24A
+C0
+.24C
+1.24C
+C0.24C
+C1
+.251
+1.251
+C1.251
+C2
+.254
+1.254
+C2.254
+C3
+.257
+1.257
+C3.257
+C4
+.259
+1.259
+C4.259
+C5
+.25C
+1.25C
+C5.25C
+C6
+.261
+1.261
+C6.261
+C7
+.264
+1.264
+C7.264
+C8
+.266
+1.266
+C8.266
+C9
+.269
+1.269
+C9.269
+CA
+.26C
+1.26C
+CA.26C
+CB
+.271
+1.271
+CB.271
+CC
+.273
+1.273
+CC.273
+CD
+.276
+1.276
+CD.276
+D0
+.279
+1.279
+D0.279
+D1
+.27C
+1.27C
+D1.27C
+D2
+.280
+1.280
+D2.280
+D3
+.283
+1.283
+D3.283
+D4
+.286
+1.286
+D4.286
+D5
+.289
+1.289
+D5.289
+D6
+.28B
+1.28B
+D6.28B
+D7
+.290
+1.290
+D7.290
+D8
+.293
+1.293
+D8.293
+D9
+.296
+1.296
+D9.296
+DA
+.298
+1.298
+DA.298
+DB
+.29B
+1.29B
+DB.29B
+DC
+.2A0
+1.2A0
+DC.2A0
+DD
+.2A3
+1.2A3
+DD.2A3
+100
+.2A5
+1.2A5
+100.2A5
+111CD901B2B5D62A85539D688B5643D4B60923A32D3299503A8.29AC9033CB046D76\
+60CA48980933788D6D130
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.3
+1.3
+2.3
+3
+.4
+1.4
+3.4
+4
+.6
+1.6
+4.6
+5
+.7
+1.7
+5.7
+6
+.9
+1.9
+6.9
+7
+.A
+1.A
+7.A
+8
+.C
+1.C
+8.C
+9
+.D
+1.D
+9.D
+A
+.17
+1.17
+A.17
+B
+.19
+1.19
+B.19
+C
+.1C
+1.1C
+C.1C
+D
+.1E
+1.1E
+D.1E
+E
+.21
+1.21
+E.21
+10
+.23
+1.23
+10.23
+11
+.26
+1.26
+11.26
+12
+.28
+1.28
+12.28
+13
+.2A
+1.2A
+13.2A
+14
+.2C
+1.2C
+14.2C
+15
+.30
+1.30
+15.30
+16
+.32
+1.32
+16.32
+17
+.34
+1.34
+17.34
+18
+.36
+1.36
+18.36
+19
+.39
+1.39
+19.39
+1A
+.3B
+1.3B
+1A.3B
+1B
+.3D
+1.3D
+1B.3D
+1C
+.40
+1.40
+1C.40
+1D
+.43
+1.43
+1D.43
+1E
+.45
+1.45
+1E.45
+20
+.47
+1.47
+20.47
+21
+.49
+1.49
+21.49
+22
+.4C
+1.4C
+22.4C
+23
+.4E
+1.4E
+23.4E
+24
+.51
+1.51
+24.51
+25
+.53
+1.53
+25.53
+26
+.56
+1.56
+26.56
+27
+.58
+1.58
+27.58
+28
+.5A
+1.5A
+28.5A
+29
+.5C
+1.5C
+29.5C
+2A
+.60
+1.60
+2A.60
+2B
+.62
+1.62
+2B.62
+2C
+.64
+1.64
+2C.64
+2D
+.66
+1.66
+2D.66
+2E
+.69
+1.69
+2E.69
+30
+.6B
+1.6B
+30.6B
+31
+.6D
+1.6D
+31.6D
+32
+.70
+1.70
+32.70
+33
+.73
+1.73
+33.73
+34
+.75
+1.75
+34.75
+35
+.77
+1.77
+35.77
+36
+.79
+1.79
+36.79
+37
+.7C
+1.7C
+37.7C
+38
+.7E
+1.7E
+38.7E
+39
+.81
+1.81
+39.81
+3A
+.83
+1.83
+3A.83
+3B
+.86
+1.86
+3B.86
+3C
+.88
+1.88
+3C.88
+3D
+.8A
+1.8A
+3D.8A
+3E
+.8C
+1.8C
+3E.8C
+40
+.90
+1.90
+40.90
+41
+.92
+1.92
+41.92
+42
+.94
+1.94
+42.94
+43
+.96
+1.96
+43.96
+44
+.99
+1.99
+44.99
+45
+.9B
+1.9B
+45.9B
+46
+.9D
+1.9D
+46.9D
+47
+.A0
+1.A0
+47.A0
+48
+.A3
+1.A3
+48.A3
+49
+.A5
+1.A5
+49.A5
+4A
+.A7
+1.A7
+4A.A7
+4B
+.A9
+1.A9
+4B.A9
+4C
+.AC
+1.AC
+4C.AC
+4D
+.AE
+1.AE
+4D.AE
+4E
+.B1
+1.B1
+4E.B1
+50
+.B3
+1.B3
+50.B3
+51
+.B6
+1.B6
+51.B6
+52
+.B8
+1.B8
+52.B8
+53
+.BA
+1.BA
+53.BA
+54
+.BC
+1.BC
+54.BC
+55
+.C0
+1.C0
+55.C0
+56
+.C2
+1.C2
+56.C2
+57
+.C4
+1.C4
+57.C4
+58
+.C6
+1.C6
+58.C6
+59
+.C9
+1.C9
+59.C9
+5A
+.CB
+1.CB
+5A.CB
+5B
+.CD
+1.CD
+5B.CD
+5C
+.D0
+1.D0
+5C.D0
+5D
+.D3
+1.D3
+5D.D3
+5E
+.D5
+1.D5
+5E.D5
+60
+.D7
+1.D7
+60.D7
+61
+.D9
+1.D9
+61.D9
+62
+.DC
+1.DC
+62.DC
+63
+.DE
+1.DE
+63.DE
+64
+.E1
+1.E1
+64.E1
+65
+.E3
+1.E3
+65.E3
+66
+.E6
+1.E6
+66.E6
+67
+.E8
+1.E8
+67.E8
+68
+.EA
+1.EA
+68.EA
+69
+.EC
+1.EC
+69.EC
+6A
+.177
+1.177
+6A.177
+6B
+.17A
+1.17A
+6B.17A
+6C
+.17E
+1.17E
+6C.17E
+6D
+.182
+1.182
+6D.182
+6E
+.186
+1.186
+6E.186
+70
+.189
+1.189
+70.189
+71
+.18C
+1.18C
+71.18C
+72
+.191
+1.191
+72.191
+73
+.194
+1.194
+73.194
+74
+.197
+1.197
+74.197
+75
+.19B
+1.19B
+75.19B
+76
+.19E
+1.19E
+76.19E
+77
+.1A3
+1.1A3
+77.1A3
+78
+.1A6
+1.1A6
+78.1A6
+79
+.1A9
+1.1A9
+79.1A9
+7A
+.1AD
+1.1AD
+7A.1AD
+7B
+.1B1
+1.1B1
+7B.1B1
+7C
+.1B4
+1.1B4
+7C.1B4
+7D
+.1B8
+1.1B8
+7D.1B8
+7E
+.1BB
+1.1BB
+7E.1BB
+80
+.1C0
+1.1C0
+80.1C0
+81
+.1C3
+1.1C3
+81.1C3
+82
+.1C6
+1.1C6
+82.1C6
+83
+.1CA
+1.1CA
+83.1CA
+84
+.1CD
+1.1CD
+84.1CD
+85
+.1D1
+1.1D1
+85.1D1
+86
+.1D5
+1.1D5
+86.1D5
+87
+.1D8
+1.1D8
+87.1D8
+88
+.1DC
+1.1DC
+88.1DC
+89
+.1E0
+1.1E0
+89.1E0
+8A
+.1E3
+1.1E3
+8A.1E3
+8B
+.1E7
+1.1E7
+8B.1E7
+8C
+.1EA
+1.1EA
+8C.1EA
+8D
+.1ED
+1.1ED
+8D.1ED
+8E
+.202
+1.202
+8E.202
+90
+.205
+1.205
+90.205
+91
+.209
+1.209
+91.209
+92
+.20C
+1.20C
+92.20C
+93
+.210
+1.210
+93.210
+94
+.214
+1.214
+94.214
+95
+.217
+1.217
+95.217
+96
+.21A
+1.21A
+96.21A
+97
+.21E
+1.21E
+97.21E
+98
+.222
+1.222
+98.222
+99
+.226
+1.226
+99.226
+9A
+.229
+1.229
+9A.229
+9B
+.22C
+1.22C
+9B.22C
+9C
+.231
+1.231
+9C.231
+9D
+.234
+1.234
+9D.234
+9E
+.237
+1.237
+9E.237
+A0
+.23B
+1.23B
+A0.23B
+A1
+.23E
+1.23E
+A1.23E
+A2
+.243
+1.243
+A2.243
+A3
+.246
+1.246
+A3.246
+A4
+.249
+1.249
+A4.249
+A5
+.24D
+1.24D
+A5.24D
+A6
+.251
+1.251
+A6.251
+A7
+.254
+1.254
+A7.254
+A8
+.258
+1.258
+A8.258
+A9
+.25B
+1.25B
+A9.25B
+AA
+.260
+1.260
+AA.260
+AB
+.263
+1.263
+AB.263
+AC
+.266
+1.266
+AC.266
+AD
+.26A
+1.26A
+AD.26A
+AE
+.26D
+1.26D
+AE.26D
+B0
+.271
+1.271
+B0.271
+B1
+.275
+1.275
+B1.275
+B2
+.278
+1.278
+B2.278
+B3
+.27C
+1.27C
+B3.27C
+B4
+.280
+1.280
+B4.280
+B5
+.283
+1.283
+B5.283
+B6
+.287
+1.287
+B6.287
+B7
+.28A
+1.28A
+B7.28A
+B8
+.28D
+1.28D
+B8.28D
+B9
+.292
+1.292
+B9.292
+BA
+.295
+1.295
+BA.295
+BB
+.299
+1.299
+BB.299
+BC
+.29C
+1.29C
+BC.29C
+BD
+.2A0
+1.2A0
+BD.2A0
+BE
+.2A4
+1.2A4
+BE.2A4
+C0
+.2A7
+1.2A7
+C0.2A7
+C1
+.2AA
+1.2AA
+C1.2AA
+C2
+.2AE
+1.2AE
+C2.2AE
+C3
+.2B2
+1.2B2
+C3.2B2
+C4
+.2B6
+1.2B6
+C4.2B6
+C5
+.2B9
+1.2B9
+C5.2B9
+C6
+.2BC
+1.2BC
+C6.2BC
+C7
+.2C1
+1.2C1
+C7.2C1
+C8
+.2C4
+1.2C4
+C8.2C4
+C9
+.2C7
+1.2C7
+C9.2C7
+CA
+.2CB
+1.2CB
+CA.2CB
+CB
+.2CE
+1.2CE
+CB.2CE
+CC
+.2D3
+1.2D3
+CC.2D3
+CD
+.2D6
+1.2D6
+CD.2D6
+CE
+.2D9
+1.2D9
+CE.2D9
+D0
+.2DD
+1.2DD
+D0.2DD
+D1
+.2E1
+1.2E1
+D1.2E1
+D2
+.2E4
+1.2E4
+D2.2E4
+D3
+.2E8
+1.2E8
+D3.2E8
+D4
+.2EB
+1.2EB
+D4.2EB
+D5
+.300
+1.300
+D5.300
+D6
+.303
+1.303
+D6.303
+D7
+.306
+1.306
+D7.306
+D8
+.30A
+1.30A
+D8.30A
+D9
+.30D
+1.30D
+D9.30D
+DA
+.311
+1.311
+DA.311
+DB
+.315
+1.315
+DB.315
+DC
+.318
+1.318
+DC.318
+DD
+.31C
+1.31C
+DD.31C
+DE
+.320
+1.320
+DE.320
+E0
+.323
+1.323
+E0.323
+E1
+.327
+1.327
+E1.327
+E2
+.32A
+1.32A
+E2.32A
+E3
+.32D
+1.32D
+E3.32D
+E4
+.332
+1.332
+E4.332
+E5
+.335
+1.335
+E5.335
+E6
+.339
+1.339
+E6.339
+E7
+.33C
+1.33C
+E7.33C
+E8
+.340
+1.340
+E8.340
+E9
+.344
+1.344
+E9.344
+EA
+.347
+1.347
+EA.347
+EB
+.34A
+1.34A
+EB.34A
+EC
+.34E
+1.34E
+EC.34E
+ED
+.352
+1.352
+ED.352
+EE
+.356
+1.356
+EE.356
+100
+.359
+1.359
+100.359
+7AD50709B1437EAE70D36ADC3A3A5B2927ECB8194CC0C0A39.2D57DB1CD5C0B800BE\
+AE5074141A82CE6995
+0
+0
+1.0
+0
+1
+.1
+1.1
+1.1
+2
+.3
+1.3
+2.3
+3
+.4
+1.4
+3.4
+4
+.6
+1.6
+4.6
+5
+.8
+1.8
+5.8
+6
+.9
+1.9
+6.9
+7
+.B
+1.B
+7.B
+8
+.C
+1.C
+8.C
+9
+.E
+1.E
+9.E
+A
+.19
+1.19
+A.19
+B
+.1C
+1.1C
+B.1C
+C
+.1E
+1.1E
+C.1E
+D
+.21
+1.21
+D.21
+E
+.23
+1.23
+E.23
+F
+.26
+1.26
+F.26
+10
+.28
+1.28
+10.28
+11
+.2B
+1.2B
+11.2B
+12
+.2E
+1.2E
+12.2E
+13
+.30
+1.30
+13.30
+14
+.33
+1.33
+14.33
+15
+.35
+1.35
+15.35
+16
+.38
+1.38
+16.38
+17
+.3A
+1.3A
+17.3A
+18
+.3D
+1.3D
+18.3D
+19
+.40
+1.40
+19.40
+1A
+.42
+1.42
+1A.42
+1B
+.45
+1.45
+1B.45
+1C
+.47
+1.47
+1C.47
+1D
+.4A
+1.4A
+1D.4A
+1E
+.4C
+1.4C
+1E.4C
+1F
+.4F
+1.4F
+1F.4F
+20
+.51
+1.51
+20.51
+21
+.54
+1.54
+21.54
+22
+.57
+1.57
+22.57
+23
+.59
+1.59
+23.59
+24
+.5C
+1.5C
+24.5C
+25
+.5E
+1.5E
+25.5E
+26
+.61
+1.61
+26.61
+27
+.63
+1.63
+27.63
+28
+.66
+1.66
+28.66
+29
+.68
+1.68
+29.68
+2A
+.6B
+1.6B
+2A.6B
+2B
+.6E
+1.6E
+2B.6E
+2C
+.70
+1.70
+2C.70
+2D
+.73
+1.73
+2D.73
+2E
+.75
+1.75
+2E.75
+2F
+.78
+1.78
+2F.78
+30
+.7A
+1.7A
+30.7A
+31
+.7D
+1.7D
+31.7D
+32
+.80
+1.80
+32.80
+33
+.82
+1.82
+33.82
+34
+.85
+1.85
+34.85
+35
+.87
+1.87
+35.87
+36
+.8A
+1.8A
+36.8A
+37
+.8C
+1.8C
+37.8C
+38
+.8F
+1.8F
+38.8F
+39
+.91
+1.91
+39.91
+3A
+.94
+1.94
+3A.94
+3B
+.97
+1.97
+3B.97
+3C
+.99
+1.99
+3C.99
+3D
+.9C
+1.9C
+3D.9C
+3E
+.9E
+1.9E
+3E.9E
+3F
+.A1
+1.A1
+3F.A1
+40
+.A3
+1.A3
+40.A3
+41
+.A6
+1.A6
+41.A6
+42
+.A8
+1.A8
+42.A8
+43
+.AB
+1.AB
+43.AB
+44
+.AE
+1.AE
+44.AE
+45
+.B0
+1.B0
+45.B0
+46
+.B3
+1.B3
+46.B3
+47
+.B5
+1.B5
+47.B5
+48
+.B8
+1.B8
+48.B8
+49
+.BA
+1.BA
+49.BA
+4A
+.BD
+1.BD
+4A.BD
+4B
+.C0
+1.C0
+4B.C0
+4C
+.C2
+1.C2
+4C.C2
+4D
+.C5
+1.C5
+4D.C5
+4E
+.C7
+1.C7
+4E.C7
+4F
+.CA
+1.CA
+4F.CA
+50
+.CC
+1.CC
+50.CC
+51
+.CF
+1.CF
+51.CF
+52
+.D1
+1.D1
+52.D1
+53
+.D4
+1.D4
+53.D4
+54
+.D7
+1.D7
+54.D7
+55
+.D9
+1.D9
+55.D9
+56
+.DC
+1.DC
+56.DC
+57
+.DE
+1.DE
+57.DE
+58
+.E1
+1.E1
+58.E1
+59
+.E3
+1.E3
+59.E3
+5A
+.E6
+1.E6
+5A.E6
+5B
+.E8
+1.E8
+5B.E8
+5C
+.EB
+1.EB
+5C.EB
+5D
+.EE
+1.EE
+5D.EE
+5E
+.F0
+1.F0
+5E.F0
+5F
+.F3
+1.F3
+5F.F3
+60
+.F5
+1.F5
+60.F5
+61
+.F8
+1.F8
+61.F8
+62
+.FA
+1.FA
+62.FA
+63
+.FD
+1.FD
+63.FD
+64
+.199
+1.199
+64.199
+65
+.19D
+1.19D
+65.19D
+66
+.1A1
+1.1A1
+66.1A1
+67
+.1A5
+1.1A5
+67.1A5
+68
+.1A9
+1.1A9
+68.1A9
+69
+.1AE
+1.1AE
+69.1AE
+6A
+.1B2
+1.1B2
+6A.1B2
+6B
+.1B6
+1.1B6
+6B.1B6
+6C
+.1BA
+1.1BA
+6C.1BA
+6D
+.1BE
+1.1BE
+6D.1BE
+6E
+.1C2
+1.1C2
+6E.1C2
+6F
+.1C6
+1.1C6
+6F.1C6
+70
+.1CA
+1.1CA
+70.1CA
+71
+.1CE
+1.1CE
+71.1CE
+72
+.1D2
+1.1D2
+72.1D2
+73
+.1D7
+1.1D7
+73.1D7
+74
+.1DB
+1.1DB
+74.1DB
+75
+.1DF
+1.1DF
+75.1DF
+76
+.1E3
+1.1E3
+76.1E3
+77
+.1E7
+1.1E7
+77.1E7
+78
+.1EB
+1.1EB
+78.1EB
+79
+.1EF
+1.1EF
+79.1EF
+7A
+.1F3
+1.1F3
+7A.1F3
+7B
+.1F7
+1.1F7
+7B.1F7
+7C
+.1FB
+1.1FB
+7C.1FB
+7D
+.200
+1.200
+7D.200
+7E
+.204
+1.204
+7E.204
+7F
+.208
+1.208
+7F.208
+80
+.20C
+1.20C
+80.20C
+81
+.210
+1.210
+81.210
+82
+.214
+1.214
+82.214
+83
+.218
+1.218
+83.218
+84
+.21C
+1.21C
+84.21C
+85
+.220
+1.220
+85.220
+86
+.224
+1.224
+86.224
+87
+.228
+1.228
+87.228
+88
+.22D
+1.22D
+88.22D
+89
+.231
+1.231
+89.231
+8A
+.235
+1.235
+8A.235
+8B
+.239
+1.239
+8B.239
+8C
+.23D
+1.23D
+8C.23D
+8D
+.241
+1.241
+8D.241
+8E
+.245
+1.245
+8E.245
+8F
+.249
+1.249
+8F.249
+90
+.24D
+1.24D
+90.24D
+91
+.251
+1.251
+91.251
+92
+.256
+1.256
+92.256
+93
+.25A
+1.25A
+93.25A
+94
+.25E
+1.25E
+94.25E
+95
+.262
+1.262
+95.262
+96
+.266
+1.266
+96.266
+97
+.26A
+1.26A
+97.26A
+98
+.26E
+1.26E
+98.26E
+99
+.272
+1.272
+99.272
+9A
+.276
+1.276
+9A.276
+9B
+.27A
+1.27A
+9B.27A
+9C
+.27E
+1.27E
+9C.27E
+9D
+.283
+1.283
+9D.283
+9E
+.287
+1.287
+9E.287
+9F
+.28B
+1.28B
+9F.28B
+A0
+.28F
+1.28F
+A0.28F
+A1
+.293
+1.293
+A1.293
+A2
+.297
+1.297
+A2.297
+A3
+.29B
+1.29B
+A3.29B
+A4
+.29F
+1.29F
+A4.29F
+A5
+.2A3
+1.2A3
+A5.2A3
+A6
+.2A7
+1.2A7
+A6.2A7
+A7
+.2AC
+1.2AC
+A7.2AC
+A8
+.2B0
+1.2B0
+A8.2B0
+A9
+.2B4
+1.2B4
+A9.2B4
+AA
+.2B8
+1.2B8
+AA.2B8
+AB
+.2BC
+1.2BC
+AB.2BC
+AC
+.2C0
+1.2C0
+AC.2C0
+AD
+.2C4
+1.2C4
+AD.2C4
+AE
+.2C8
+1.2C8
+AE.2C8
+AF
+.2CC
+1.2CC
+AF.2CC
+B0
+.2D0
+1.2D0
+B0.2D0
+B1
+.2D4
+1.2D4
+B1.2D4
+B2
+.2D9
+1.2D9
+B2.2D9
+B3
+.2DD
+1.2DD
+B3.2DD
+B4
+.2E1
+1.2E1
+B4.2E1
+B5
+.2E5
+1.2E5
+B5.2E5
+B6
+.2E9
+1.2E9
+B6.2E9
+B7
+.2ED
+1.2ED
+B7.2ED
+B8
+.2F1
+1.2F1
+B8.2F1
+B9
+.2F5
+1.2F5
+B9.2F5
+BA
+.2F9
+1.2F9
+BA.2F9
+BB
+.2FD
+1.2FD
+BB.2FD
+BC
+.302
+1.302
+BC.302
+BD
+.306
+1.306
+BD.306
+BE
+.30A
+1.30A
+BE.30A
+BF
+.30E
+1.30E
+BF.30E
+C0
+.312
+1.312
+C0.312
+C1
+.316
+1.316
+C1.316
+C2
+.31A
+1.31A
+C2.31A
+C3
+.31E
+1.31E
+C3.31E
+C4
+.322
+1.322
+C4.322
+C5
+.326
+1.326
+C5.326
+C6
+.32B
+1.32B
+C6.32B
+C7
+.32F
+1.32F
+C7.32F
+C8
+.333
+1.333
+C8.333
+C9
+.337
+1.337
+C9.337
+CA
+.33B
+1.33B
+CA.33B
+CB
+.33F
+1.33F
+CB.33F
+CC
+.343
+1.343
+CC.343
+CD
+.347
+1.347
+CD.347
+CE
+.34B
+1.34B
+CE.34B
+CF
+.34F
+1.34F
+CF.34F
+D0
+.353
+1.353
+D0.353
+D1
+.358
+1.358
+D1.358
+D2
+.35C
+1.35C
+D2.35C
+D3
+.360
+1.360
+D3.360
+D4
+.364
+1.364
+D4.364
+D5
+.368
+1.368
+D5.368
+D6
+.36C
+1.36C
+D6.36C
+D7
+.370
+1.370
+D7.370
+D8
+.374
+1.374
+D8.374
+D9
+.378
+1.378
+D9.378
+DA
+.37C
+1.37C
+DA.37C
+DB
+.381
+1.381
+DB.381
+DC
+.385
+1.385
+DC.385
+DD
+.389
+1.389
+DD.389
+DE
+.38D
+1.38D
+DE.38D
+DF
+.391
+1.391
+DF.391
+E0
+.395
+1.395
+E0.395
+E1
+.399
+1.399
+E1.399
+E2
+.39D
+1.39D
+E2.39D
+E3
+.3A1
+1.3A1
+E3.3A1
+E4
+.3A5
+1.3A5
+E4.3A5
+E5
+.3A9
+1.3A9
+E5.3A9
+E6
+.3AE
+1.3AE
+E6.3AE
+E7
+.3B2
+1.3B2
+E7.3B2
+E8
+.3B6
+1.3B6
+E8.3B6
+E9
+.3BA
+1.3BA
+E9.3BA
+EA
+.3BE
+1.3BE
+EA.3BE
+EB
+.3C2
+1.3C2
+EB.3C2
+EC
+.3C6
+1.3C6
+EC.3C6
+ED
+.3CA
+1.3CA
+ED.3CA
+EE
+.3CE
+1.3CE
+EE.3CE
+EF
+.3D2
+1.3D2
+EF.3D2
+F0
+.3D7
+1.3D7
+F0.3D7
+F1
+.3DB
+1.3DB
+F1.3DB
+F2
+.3DF
+1.3DF
+F2.3DF
+F3
+.3E3
+1.3E3
+F3.3E3
+F4
+.3E7
+1.3E7
+F4.3E7
+F5
+.3EB
+1.3EB
+F5.3EB
+F6
+.3EF
+1.3EF
+F6.3EF
+F7
+.3F3
+1.3F3
+F7.3F3
+F8
+.3F7
+1.3F7
+F8.3F7
+F9
+.3FB
+1.3FB
+F9.3FB
+FA
+.400
+1.400
+FA.400
+FB
+.404
+1.404
+FB.404
+FC
+.408
+1.408
+FC.408
+FD
+.40C
+1.40C
+FD.40C
+FE
+.410
+1.410
+FE.410
+FF
+.414
+1.414
+FF.414
+100
+.418
+1.418
+100.418
+594ABD0D572B6D93F40F8A2E8552EBE826332195DD5A3350.3157FEF01749B1032D5\
+356A959059020CDE
+0
+0
+ 01.00
+0
+ 01
+.01
+ 01.01
+ 01.01
+ 02
+.03
+ 01.03
+ 02.03
+ 03
+.05
+ 01.05
+ 03.05
+ 04
+.06
+ 01.06
+ 04.06
+ 05
+.08
+ 01.08
+ 05.08
+ 06
+.10
+ 01.10
+ 06.10
+ 07
+.11
+ 01.11
+ 07.11
+ 08
+.13
+ 01.13
+ 08.13
+ 09
+.15
+ 01.15
+ 09.15
+ 10
+.01 11
+ 01.01 11
+ 10.01 11
+ 11
+.01 14
+ 01.01 14
+ 11.01 14
+ 12
+.02 00
+ 01.02 00
+ 12.02 00
+ 13
+.02 03
+ 01.02 03
+ 13.02 03
+ 14
+.02 06
+ 01.02 06
+ 14.02 06
+ 15
+.02 09
+ 01.02 09
+ 15.02 09
+ 16
+.02 12
+ 01.02 12
+ 16.02 12
+ 01 00
+.02 15
+ 01.02 15
+ 01 00.02 15
+ 01 01
+.03 01
+ 01.03 01
+ 01 01.03 01
+ 01 02
+.03 03
+ 01.03 03
+ 01 02.03 03
+ 01 03
+.03 06
+ 01.03 06
+ 01 03.03 06
+ 01 04
+.03 09
+ 01.03 09
+ 01 04.03 09
+ 01 05
+.03 12
+ 01.03 12
+ 01 05.03 12
+ 01 06
+.03 15
+ 01.03 15
+ 01 06.03 15
+ 01 07
+.04 01
+ 01.04 01
+ 01 07.04 01
+ 01 08
+.04 04
+ 01.04 04
+ 01 08.04 04
+ 01 09
+.04 07
+ 01.04 07
+ 01 09.04 07
+ 01 10
+.04 10
+ 01.04 10
+ 01 10.04 10
+ 01 11
+.04 12
+ 01.04 12
+ 01 11.04 12
+ 01 12
+.04 15
+ 01.04 15
+ 01 12.04 15
+ 01 13
+.05 01
+ 01.05 01
+ 01 13.05 01
+ 01 14
+.05 04
+ 01.05 04
+ 01 14.05 04
+ 01 15
+.05 07
+ 01.05 07
+ 01 15.05 07
+ 01 16
+.05 10
+ 01.05 10
+ 01 16.05 10
+ 02 00
+.05 13
+ 01.05 13
+ 02 00.05 13
+ 02 01
+.05 16
+ 01.05 16
+ 02 01.05 16
+ 02 02
+.06 02
+ 01.06 02
+ 02 02.06 02
+ 02 03
+.06 04
+ 01.06 04
+ 02 03.06 04
+ 02 04
+.06 07
+ 01.06 07
+ 02 04.06 07
+ 02 05
+.06 10
+ 01.06 10
+ 02 05.06 10
+ 02 06
+.06 13
+ 01.06 13
+ 02 06.06 13
+ 02 07
+.06 16
+ 01.06 16
+ 02 07.06 16
+ 02 08
+.07 02
+ 01.07 02
+ 02 08.07 02
+ 02 09
+.07 05
+ 01.07 05
+ 02 09.07 05
+ 02 10
+.07 08
+ 01.07 08
+ 02 10.07 08
+ 02 11
+.07 11
+ 01.07 11
+ 02 11.07 11
+ 02 12
+.07 13
+ 01.07 13
+ 02 12.07 13
+ 02 13
+.07 16
+ 01.07 16
+ 02 13.07 16
+ 02 14
+.08 02
+ 01.08 02
+ 02 14.08 02
+ 02 15
+.08 05
+ 01.08 05
+ 02 15.08 05
+ 02 16
+.08 08
+ 01.08 08
+ 02 16.08 08
+ 03 00
+.08 11
+ 01.08 11
+ 03 00.08 11
+ 03 01
+.08 14
+ 01.08 14
+ 03 01.08 14
+ 03 02
+.09 00
+ 01.09 00
+ 03 02.09 00
+ 03 03
+.09 03
+ 01.09 03
+ 03 03.09 03
+ 03 04
+.09 05
+ 01.09 05
+ 03 04.09 05
+ 03 05
+.09 08
+ 01.09 08
+ 03 05.09 08
+ 03 06
+.09 11
+ 01.09 11
+ 03 06.09 11
+ 03 07
+.09 14
+ 01.09 14
+ 03 07.09 14
+ 03 08
+.10 00
+ 01.10 00
+ 03 08.10 00
+ 03 09
+.10 03
+ 01.10 03
+ 03 09.10 03
+ 03 10
+.10 06
+ 01.10 06
+ 03 10.10 06
+ 03 11
+.10 09
+ 01.10 09
+ 03 11.10 09
+ 03 12
+.10 12
+ 01.10 12
+ 03 12.10 12
+ 03 13
+.10 14
+ 01.10 14
+ 03 13.10 14
+ 03 14
+.11 00
+ 01.11 00
+ 03 14.11 00
+ 03 15
+.11 03
+ 01.11 03
+ 03 15.11 03
+ 03 16
+.11 06
+ 01.11 06
+ 03 16.11 06
+ 04 00
+.11 09
+ 01.11 09
+ 04 00.11 09
+ 04 01
+.11 12
+ 01.11 12
+ 04 01.11 12
+ 04 02
+.11 15
+ 01.11 15
+ 04 02.11 15
+ 04 03
+.12 01
+ 01.12 01
+ 04 03.12 01
+ 04 04
+.12 04
+ 01.12 04
+ 04 04.12 04
+ 04 05
+.12 06
+ 01.12 06
+ 04 05.12 06
+ 04 06
+.12 09
+ 01.12 09
+ 04 06.12 09
+ 04 07
+.12 12
+ 01.12 12
+ 04 07.12 12
+ 04 08
+.12 15
+ 01.12 15
+ 04 08.12 15
+ 04 09
+.13 01
+ 01.13 01
+ 04 09.13 01
+ 04 10
+.13 04
+ 01.13 04
+ 04 10.13 04
+ 04 11
+.13 07
+ 01.13 07
+ 04 11.13 07
+ 04 12
+.13 10
+ 01.13 10
+ 04 12.13 10
+ 04 13
+.13 13
+ 01.13 13
+ 04 13.13 13
+ 04 14
+.13 15
+ 01.13 15
+ 04 14.13 15
+ 04 15
+.14 01
+ 01.14 01
+ 04 15.14 01
+ 04 16
+.14 04
+ 01.14 04
+ 04 16.14 04
+ 05 00
+.14 07
+ 01.14 07
+ 05 00.14 07
+ 05 01
+.14 10
+ 01.14 10
+ 05 01.14 10
+ 05 02
+.14 13
+ 01.14 13
+ 05 02.14 13
+ 05 03
+.14 16
+ 01.14 16
+ 05 03.14 16
+ 05 04
+.15 02
+ 01.15 02
+ 05 04.15 02
+ 05 05
+.15 05
+ 01.15 05
+ 05 05.15 05
+ 05 06
+.15 07
+ 01.15 07
+ 05 06.15 07
+ 05 07
+.15 10
+ 01.15 10
+ 05 07.15 10
+ 05 08
+.15 13
+ 01.15 13
+ 05 08.15 13
+ 05 09
+.15 16
+ 01.15 16
+ 05 09.15 16
+ 05 10
+.16 02
+ 01.16 02
+ 05 10.16 02
+ 05 11
+.16 05
+ 01.16 05
+ 05 11.16 05
+ 05 12
+.16 08
+ 01.16 08
+ 05 12.16 08
+ 05 13
+.16 11
+ 01.16 11
+ 05 13.16 11
+ 05 14
+.16 14
+ 01.16 14
+ 05 14.16 14
+ 05 15
+.01 11 15
+ 01.01 11 15
+ 05 15.01 11 15
+ 05 16
+.01 12 03
+ 01.01 12 03
+ 05 16.01 12 03
+ 06 00
+.01 12 08
+ 01.01 12 08
+ 06 00.01 12 08
+ 06 01
+.01 12 13
+ 01.01 12 13
+ 06 01.01 12 13
+ 06 02
+.01 13 00
+ 01.01 13 00
+ 06 02.01 13 00
+ 06 03
+.01 13 05
+ 01.01 13 05
+ 06 03.01 13 05
+ 06 04
+.01 13 10
+ 01.01 13 10
+ 06 04.01 13 10
+ 06 05
+.01 13 15
+ 01.01 13 15
+ 06 05.01 13 15
+ 06 06
+.01 14 03
+ 01.01 14 03
+ 06 06.01 14 03
+ 06 07
+.01 14 08
+ 01.01 14 08
+ 06 07.01 14 08
+ 06 08
+.01 14 13
+ 01.01 14 13
+ 06 08.01 14 13
+ 06 09
+.01 15 01
+ 01.01 15 01
+ 06 09.01 15 01
+ 06 10
+.01 15 06
+ 01.01 15 06
+ 06 10.01 15 06
+ 06 11
+.01 15 11
+ 01.01 15 11
+ 06 11.01 15 11
+ 06 12
+.01 15 16
+ 01.01 15 16
+ 06 12.01 15 16
+ 06 13
+.01 16 03
+ 01.01 16 03
+ 06 13.01 16 03
+ 06 14
+.01 16 08
+ 01.01 16 08
+ 06 14.01 16 08
+ 06 15
+.01 16 13
+ 01.01 16 13
+ 06 15.01 16 13
+ 06 16
+.02 00 01
+ 01.02 00 01
+ 06 16.02 00 01
+ 07 00
+.02 00 06
+ 01.02 00 06
+ 07 00.02 00 06
+ 07 01
+.02 00 11
+ 01.02 00 11
+ 07 01.02 00 11
+ 07 02
+.02 00 16
+ 01.02 00 16
+ 07 02.02 00 16
+ 07 03
+.02 01 04
+ 01.02 01 04
+ 07 03.02 01 04
+ 07 04
+.02 01 09
+ 01.02 01 09
+ 07 04.02 01 09
+ 07 05
+.02 01 14
+ 01.02 01 14
+ 07 05.02 01 14
+ 07 06
+.02 02 02
+ 01.02 02 02
+ 07 06.02 02 02
+ 07 07
+.02 02 07
+ 01.02 02 07
+ 07 07.02 02 07
+ 07 08
+.02 02 11
+ 01.02 02 11
+ 07 08.02 02 11
+ 07 09
+.02 02 16
+ 01.02 02 16
+ 07 09.02 02 16
+ 07 10
+.02 03 04
+ 01.02 03 04
+ 07 10.02 03 04
+ 07 11
+.02 03 09
+ 01.02 03 09
+ 07 11.02 03 09
+ 07 12
+.02 03 14
+ 01.02 03 14
+ 07 12.02 03 14
+ 07 13
+.02 04 02
+ 01.02 04 02
+ 07 13.02 04 02
+ 07 14
+.02 04 07
+ 01.02 04 07
+ 07 14.02 04 07
+ 07 15
+.02 04 12
+ 01.02 04 12
+ 07 15.02 04 12
+ 07 16
+.02 05 00
+ 01.02 05 00
+ 07 16.02 05 00
+ 08 00
+.02 05 05
+ 01.02 05 05
+ 08 00.02 05 05
+ 08 01
+.02 05 10
+ 01.02 05 10
+ 08 01.02 05 10
+ 08 02
+.02 05 14
+ 01.02 05 14
+ 08 02.02 05 14
+ 08 03
+.02 06 02
+ 01.02 06 02
+ 08 03.02 06 02
+ 08 04
+.02 06 07
+ 01.02 06 07
+ 08 04.02 06 07
+ 08 05
+.02 06 12
+ 01.02 06 12
+ 08 05.02 06 12
+ 08 06
+.02 07 00
+ 01.02 07 00
+ 08 06.02 07 00
+ 08 07
+.02 07 05
+ 01.02 07 05
+ 08 07.02 07 05
+ 08 08
+.02 07 10
+ 01.02 07 10
+ 08 08.02 07 10
+ 08 09
+.02 07 15
+ 01.02 07 15
+ 08 09.02 07 15
+ 08 10
+.02 08 03
+ 01.02 08 03
+ 08 10.02 08 03
+ 08 11
+.02 08 08
+ 01.02 08 08
+ 08 11.02 08 08
+ 08 12
+.02 08 13
+ 01.02 08 13
+ 08 12.02 08 13
+ 08 13
+.02 09 01
+ 01.02 09 01
+ 08 13.02 09 01
+ 08 14
+.02 09 05
+ 01.02 09 05
+ 08 14.02 09 05
+ 08 15
+.02 09 10
+ 01.02 09 10
+ 08 15.02 09 10
+ 08 16
+.02 09 15
+ 01.02 09 15
+ 08 16.02 09 15
+ 09 00
+.02 10 03
+ 01.02 10 03
+ 09 00.02 10 03
+ 09 01
+.02 10 08
+ 01.02 10 08
+ 09 01.02 10 08
+ 09 02
+.02 10 13
+ 01.02 10 13
+ 09 02.02 10 13
+ 09 03
+.02 11 01
+ 01.02 11 01
+ 09 03.02 11 01
+ 09 04
+.02 11 06
+ 01.02 11 06
+ 09 04.02 11 06
+ 09 05
+.02 11 11
+ 01.02 11 11
+ 09 05.02 11 11
+ 09 06
+.02 11 16
+ 01.02 11 16
+ 09 06.02 11 16
+ 09 07
+.02 12 04
+ 01.02 12 04
+ 09 07.02 12 04
+ 09 08
+.02 12 08
+ 01.02 12 08
+ 09 08.02 12 08
+ 09 09
+.02 12 13
+ 01.02 12 13
+ 09 09.02 12 13
+ 09 10
+.02 13 01
+ 01.02 13 01
+ 09 10.02 13 01
+ 09 11
+.02 13 06
+ 01.02 13 06
+ 09 11.02 13 06
+ 09 12
+.02 13 11
+ 01.02 13 11
+ 09 12.02 13 11
+ 09 13
+.02 13 16
+ 01.02 13 16
+ 09 13.02 13 16
+ 09 14
+.02 14 04
+ 01.02 14 04
+ 09 14.02 14 04
+ 09 15
+.02 14 09
+ 01.02 14 09
+ 09 15.02 14 09
+ 09 16
+.02 14 14
+ 01.02 14 14
+ 09 16.02 14 14
+ 10 00
+.02 15 02
+ 01.02 15 02
+ 10 00.02 15 02
+ 10 01
+.02 15 07
+ 01.02 15 07
+ 10 01.02 15 07
+ 10 02
+.02 15 12
+ 01.02 15 12
+ 10 02.02 15 12
+ 10 03
+.02 15 16
+ 01.02 15 16
+ 10 03.02 15 16
+ 10 04
+.02 16 04
+ 01.02 16 04
+ 10 04.02 16 04
+ 10 05
+.02 16 09
+ 01.02 16 09
+ 10 05.02 16 09
+ 10 06
+.02 16 14
+ 01.02 16 14
+ 10 06.02 16 14
+ 10 07
+.03 00 02
+ 01.03 00 02
+ 10 07.03 00 02
+ 10 08
+.03 00 07
+ 01.03 00 07
+ 10 08.03 00 07
+ 10 09
+.03 00 12
+ 01.03 00 12
+ 10 09.03 00 12
+ 10 10
+.03 01 00
+ 01.03 01 00
+ 10 10.03 01 00
+ 10 11
+.03 01 05
+ 01.03 01 05
+ 10 11.03 01 05
+ 10 12
+.03 01 10
+ 01.03 01 10
+ 10 12.03 01 10
+ 10 13
+.03 01 15
+ 01.03 01 15
+ 10 13.03 01 15
+ 10 14
+.03 02 02
+ 01.03 02 02
+ 10 14.03 02 02
+ 10 15
+.03 02 07
+ 01.03 02 07
+ 10 15.03 02 07
+ 10 16
+.03 02 12
+ 01.03 02 12
+ 10 16.03 02 12
+ 11 00
+.03 03 00
+ 01.03 03 00
+ 11 00.03 03 00
+ 11 01
+.03 03 05
+ 01.03 03 05
+ 11 01.03 03 05
+ 11 02
+.03 03 10
+ 01.03 03 10
+ 11 02.03 03 10
+ 11 03
+.03 03 15
+ 01.03 03 15
+ 11 03.03 03 15
+ 11 04
+.03 04 03
+ 01.03 04 03
+ 11 04.03 04 03
+ 11 05
+.03 04 08
+ 01.03 04 08
+ 11 05.03 04 08
+ 11 06
+.03 04 13
+ 01.03 04 13
+ 11 06.03 04 13
+ 11 07
+.03 05 01
+ 01.03 05 01
+ 11 07.03 05 01
+ 11 08
+.03 05 06
+ 01.03 05 06
+ 11 08.03 05 06
+ 11 09
+.03 05 10
+ 01.03 05 10
+ 11 09.03 05 10
+ 11 10
+.03 05 15
+ 01.03 05 15
+ 11 10.03 05 15
+ 11 11
+.03 06 03
+ 01.03 06 03
+ 11 11.03 06 03
+ 11 12
+.03 06 08
+ 01.03 06 08
+ 11 12.03 06 08
+ 11 13
+.03 06 13
+ 01.03 06 13
+ 11 13.03 06 13
+ 11 14
+.03 07 01
+ 01.03 07 01
+ 11 14.03 07 01
+ 11 15
+.03 07 06
+ 01.03 07 06
+ 11 15.03 07 06
+ 11 16
+.03 07 11
+ 01.03 07 11
+ 11 16.03 07 11
+ 12 00
+.03 07 16
+ 01.03 07 16
+ 12 00.03 07 16
+ 12 01
+.03 08 04
+ 01.03 08 04
+ 12 01.03 08 04
+ 12 02
+.03 08 09
+ 01.03 08 09
+ 12 02.03 08 09
+ 12 03
+.03 08 13
+ 01.03 08 13
+ 12 03.03 08 13
+ 12 04
+.03 09 01
+ 01.03 09 01
+ 12 04.03 09 01
+ 12 05
+.03 09 06
+ 01.03 09 06
+ 12 05.03 09 06
+ 12 06
+.03 09 11
+ 01.03 09 11
+ 12 06.03 09 11
+ 12 07
+.03 09 16
+ 01.03 09 16
+ 12 07.03 09 16
+ 12 08
+.03 10 04
+ 01.03 10 04
+ 12 08.03 10 04
+ 12 09
+.03 10 09
+ 01.03 10 09
+ 12 09.03 10 09
+ 12 10
+.03 10 14
+ 01.03 10 14
+ 12 10.03 10 14
+ 12 11
+.03 11 02
+ 01.03 11 02
+ 12 11.03 11 02
+ 12 12
+.03 11 07
+ 01.03 11 07
+ 12 12.03 11 07
+ 12 13
+.03 11 12
+ 01.03 11 12
+ 12 13.03 11 12
+ 12 14
+.03 12 00
+ 01.03 12 00
+ 12 14.03 12 00
+ 12 15
+.03 12 04
+ 01.03 12 04
+ 12 15.03 12 04
+ 12 16
+.03 12 09
+ 01.03 12 09
+ 12 16.03 12 09
+ 13 00
+.03 12 14
+ 01.03 12 14
+ 13 00.03 12 14
+ 13 01
+.03 13 02
+ 01.03 13 02
+ 13 01.03 13 02
+ 13 02
+.03 13 07
+ 01.03 13 07
+ 13 02.03 13 07
+ 13 03
+.03 13 12
+ 01.03 13 12
+ 13 03.03 13 12
+ 13 04
+.03 14 00
+ 01.03 14 00
+ 13 04.03 14 00
+ 13 05
+.03 14 05
+ 01.03 14 05
+ 13 05.03 14 05
+ 13 06
+.03 14 10
+ 01.03 14 10
+ 13 06.03 14 10
+ 13 07
+.03 14 15
+ 01.03 14 15
+ 13 07.03 14 15
+ 13 08
+.03 15 03
+ 01.03 15 03
+ 13 08.03 15 03
+ 13 09
+.03 15 07
+ 01.03 15 07
+ 13 09.03 15 07
+ 13 10
+.03 15 12
+ 01.03 15 12
+ 13 10.03 15 12
+ 13 11
+.03 16 00
+ 01.03 16 00
+ 13 11.03 16 00
+ 13 12
+.03 16 05
+ 01.03 16 05
+ 13 12.03 16 05
+ 13 13
+.03 16 10
+ 01.03 16 10
+ 13 13.03 16 10
+ 13 14
+.03 16 15
+ 01.03 16 15
+ 13 14.03 16 15
+ 13 15
+.04 00 03
+ 01.04 00 03
+ 13 15.04 00 03
+ 13 16
+.04 00 08
+ 01.04 00 08
+ 13 16.04 00 08
+ 14 00
+.04 00 13
+ 01.04 00 13
+ 14 00.04 00 13
+ 14 01
+.04 01 01
+ 01.04 01 01
+ 14 01.04 01 01
+ 14 02
+.04 01 06
+ 01.04 01 06
+ 14 02.04 01 06
+ 14 03
+.04 01 11
+ 01.04 01 11
+ 14 03.04 01 11
+ 14 04
+.04 01 15
+ 01.04 01 15
+ 14 04.04 01 15
+ 14 05
+.04 02 03
+ 01.04 02 03
+ 14 05.04 02 03
+ 14 06
+.04 02 08
+ 01.04 02 08
+ 14 06.04 02 08
+ 14 07
+.04 02 13
+ 01.04 02 13
+ 14 07.04 02 13
+ 14 08
+.04 03 01
+ 01.04 03 01
+ 14 08.04 03 01
+ 14 09
+.04 03 06
+ 01.04 03 06
+ 14 09.04 03 06
+ 14 10
+.04 03 11
+ 01.04 03 11
+ 14 10.04 03 11
+ 14 11
+.04 03 16
+ 01.04 03 16
+ 14 11.04 03 16
+ 14 12
+.04 04 04
+ 01.04 04 04
+ 14 12.04 04 04
+ 14 13
+.04 04 09
+ 01.04 04 09
+ 14 13.04 04 09
+ 14 14
+.04 04 14
+ 01.04 04 14
+ 14 14.04 04 14
+ 14 15
+.04 05 01
+ 01.04 05 01
+ 14 15.04 05 01
+ 14 16
+.04 05 06
+ 01.04 05 06
+ 14 16.04 05 06
+ 15 00
+.04 05 11
+ 01.04 05 11
+ 15 00.04 05 11
+ 15 01
+.04 05 16
+ 01.04 05 16
+ 15 01.04 05 16
+ 15 02
+.04 06 04
+ 01.04 06 04
+ 15 02.04 06 04
+ 15 03
+.04 06 09
+ 01.04 06 09
+ 15 03.04 06 09
+ 15 04
+.04 06 14
+ 01.04 06 14
+ 15 04.04 06 14
+ 15 05
+.04 07 02
+ 01.04 07 02
+ 15 05.04 07 02
+ 15 06
+.04 07 07
+ 01.04 07 07
+ 15 06.04 07 07
+ 15 07
+.04 07 12
+ 01.04 07 12
+ 15 07.04 07 12
+ 15 08
+.04 08 00
+ 01.04 08 00
+ 15 08.04 08 00
+ 15 09
+.04 08 05
+ 01.04 08 05
+ 15 09.04 08 05
+ 15 10
+.04 08 09
+ 01.04 08 09
+ 15 10.04 08 09
+ 15 11
+.04 08 14
+ 01.04 08 14
+ 15 11.04 08 14
+ 15 12
+.04 09 02
+ 01.04 09 02
+ 15 12.04 09 02
+ 15 13
+.04 09 07
+ 01.04 09 07
+ 15 13.04 09 07
+ 15 14
+.04 09 12
+ 01.04 09 12
+ 15 14.04 09 12
+ 15 15
+.04 10 00
+ 01.04 10 00
+ 15 15.04 10 00
+ 15 16
+.04 10 05
+ 01.04 10 05
+ 15 16.04 10 05
+ 16 00
+.04 10 10
+ 01.04 10 10
+ 16 00.04 10 10
+ 16 01
+.04 10 15
+ 01.04 10 15
+ 16 01.04 10 15
+ 16 02
+.04 11 03
+ 01.04 11 03
+ 16 02.04 11 03
+ 16 03
+.04 11 08
+ 01.04 11 08
+ 16 03.04 11 08
+ 16 04
+.04 11 12
+ 01.04 11 12
+ 16 04.04 11 12
+ 16 05
+.04 12 00
+ 01.04 12 00
+ 16 05.04 12 00
+ 16 06
+.04 12 05
+ 01.04 12 05
+ 16 06.04 12 05
+ 16 07
+.04 12 10
+ 01.04 12 10
+ 16 07.04 12 10
+ 16 08
+.04 12 15
+ 01.04 12 15
+ 16 08.04 12 15
+ 16 09
+.04 13 03
+ 01.04 13 03
+ 16 09.04 13 03
+ 16 10
+.04 13 08
+ 01.04 13 08
+ 16 10.04 13 08
+ 16 11
+.04 13 13
+ 01.04 13 13
+ 16 11.04 13 13
+ 16 12
+.04 14 01
+ 01.04 14 01
+ 16 12.04 14 01
+ 16 13
+.04 14 06
+ 01.04 14 06
+ 16 13.04 14 06
+ 16 14
+.04 14 11
+ 01.04 14 11
+ 16 14.04 14 11
+ 16 15
+.04 14 16
+ 01.04 14 16
+ 16 15.04 14 16
+ 16 16
+.04 15 03
+ 01.04 15 03
+ 16 16.04 15 03
+ 01 00 00
+.04 15 08
+ 01.04 15 08
+ 01 00 00.04 15 08
+ 05 08 06 00 02 02 07 02 03 11 07 15 16 00 01 11 09 00 14 07 00 02 0\
+3 02 15 04 02 05 05 10 12 03 08 09 16 09 01 14 08 10 09 11 16 02 16 \
+13 05.03 04 11 16 09 16 05 08 14 11 07 07 08 01 15 07 12 10 09 02 07\
+ 03 12 12 14 12 05 06 04 12 12 08 11 09 01
diff --git a/tests/files/bc/screen.bc b/tests/files/bc/screen.bc
deleted file mode 100644
index 916b4f6a..00000000
--- a/tests/files/bc/screen.bc
+++ /dev/null
@@ -1,19 +0,0 @@
-define a(i, j) {
- scale = 0
- if(i % 2 == 0) return i;
- if(j - i >= 0.5) return i + 1;
- return i - 1;
-}
-
-define x(w, h, n) {
- scale = 20
- f = w / n
- scale = 0
- i = h / f
- scale = 1
- j = h / f
- return a(i, j);
-}
-
-x(720, 576, 600)
-
diff --git a/tests/files/bc/sine.txt b/tests/files/bc/sine.txt
new file mode 100644
index 00000000..d3a547bc
--- /dev/null
+++ b/tests/files/bc/sine.txt
@@ -0,0 +1,207 @@
+scale = 25
+p = 4 * a(1)
+scale = 20
+s(0)
+s(0.5)
+s(1)
+s(2)
+s(3)
+s(-0.5)
+s(-1)
+s(-2)
+s(-3)
+s(p / 7)
+s(-p / 7)
+s(p / 4)
+s(-p / 4)
+s(p / 3)
+s(-p / 3)
+s(p / 2)
+s(-p / 2)
+s(3 * p / 4)
+s(3 * -p / 4)
+s(p)
+s(-p)
+s(3 * p / 2)
+s(3 * -p / 2)
+s(7 * p / 4)
+s(7 * -p / 4)
+s(13 * p / 4)
+s(13 * -p / 4)
+s(2 * p)
+s(2 * -p)
+s(131231)
+s(-131231)
+s(69.1967507777)
+s(10828)
+s(-16248506.847013148)
+s(2050281000)
+s(8224939)
+s(11334231.1154662464)
+s(-4109411249.2986954846)
+s(-2395915402.13984)
+s(-2795874313)
+s(-2262647256)
+s(3323158182.1239222084)
+s(99901384)
+s(-4202726050.2780080957)
+s(2870000621.3228830588)
+s(-4230239450.981045150)
+s(-1517506941.2678857223)
+s(4004582176)
+s(-4193724543.1108508063)
+s(-3432511261)
+s(1804484812)
+s(3229084127)
+s(-3565317246.583937244)
+s(3503281621)
+s(-3469146313.1766891244)
+s(-2257308049.307721068)
+s(-3978441809)
+s(3431564304.3752537)
+s(1249644440.2464914559)
+s(2395558891.1188487974)
+s(-2607820706.4079280116)
+s(1208310007)
+s(-3758597557.863203175)
+s(1186920672)
+s(-3988103872)
+s(-4280635328.4194857577)
+s(1051748072)
+s(-1884006279)
+s(-1046568719.2698663389)
+s(2482991410)
+s(-2106101268.1154045959)
+s(3530359346.77217900)
+s(-3373362543)
+s(2601598062)
+s(2987020862)
+s(-12033356.2057140648)
+s(-3721760707)
+s(2842387705.4145759704)
+s(3515832681.1808393297)
+s(-3658522034.16149)
+s(3963658030.2860423992)
+s(2977802215.597946655)
+s(-4271392570.4091498761)
+s(2378692585)
+s(-3545193743.629374782)
+s(-1762458738)
+s(-1174277828.4264040126)
+s(-1724994857)
+s(2802750230.1783499408)
+s(-3068133550)
+s(3324811474.621822235)
+s(2873024984)
+s(-3509056632.3888206298)
+s(1772903162.647192879)
+s(2836543102)
+s(4117858580.186)
+s(2988632386.4063754522)
+s(-4256784971.1770067447)
+s(2280820447)
+s(-2865200306)
+s(-3329592486)
+s(519126268)
+s(-2452430452)
+s(-2693220186.62104082)
+s(-3796811992.14485798)
+s(3619792326)
+s(2697791049.3038381550)
+s(3751267834.2808166557)
+s(-3761719074)
+s(-3824087631)
+s(2119301150)
+s(1398148974)
+s(-3386564819.1351816969)
+s(-3171483098)
+s(3688944941.3273318162)
+s(3060521119)
+s(-3527110404)
+s(3699631193)
+s(3872838898)
+s(3880350192)
+s(-4109411249.2986954846)
+s(-2395915402.13984)
+s(-2795874313)
+s(-2262647256)
+s(3323158182.1239222084)
+s(99901384)
+s(-4202726050.2780080957)
+s(2870000621.3228830588)
+s(-4230239450.981045150)
+s(-1517506941.2678857223)
+s(4004582176)
+s(-4193724543.1108508063)
+s(-3432511261)
+s(1804484812)
+s(3229084127)
+s(-3565317246.583937244)
+s(3503281621)
+s(-3469146313.1766891244)
+s(-2257308049.307721068)
+s(-3978441809)
+s(3431564304.3752537)
+s(1249644440.2464914559)
+s(2395558891.1188487974)
+s(-2607820706.4079280116)
+s(1208310007)
+s(-3758597557.863203175)
+s(1186920672)
+s(-3988103872)
+s(-4280635328.4194857577)
+s(1051748072)
+s(-1884006279)
+s(-1046568719.2698663389)
+s(2482991410)
+s(-2106101268.1154045959)
+s(3530359346.77217900)
+s(-3373362543)
+s(2601598062)
+s(2576349783.2446436039)
+s(2987020862)
+s(-12033356.2057140648)
+s(-3721760707)
+s(2842387705.4145759704)
+s(3515832681.1808393297)
+s(-3658522034.16149)
+s(3963658030.2860423992)
+s(2977802215.597946655)
+s(-4271392570.4091498761)
+s(2378692585)
+s(-3545193743.629374782)
+s(-1762458738)
+s(-1174277828.4264040126)
+s(-1724994857)
+s(2802750230.1783499408)
+s(-3068133550)
+s(3324811474.621822235)
+s(2873024984)
+s(-3509056632.3888206298)
+s(1772903162.647192879)
+s(2836543102)
+s(4117858580.186)
+s(2988632386.4063754522)
+s(-4256784971.1770067447)
+s(2280820447)
+s(-2865200306)
+s(-3329592486)
+s(519126268)
+s(-2452430452)
+s(-2693220186.62104082)
+s(-3796811992.14485798)
+s(3619792326)
+s(2697791049.3038381550)
+s(3751267834.2808166557)
+s(-3761719074)
+s(-3824087631)
+s(2119301150)
+s(1398148974)
+s(-3386564819.1351816969)
+s(-3171483098)
+s(3688944941.3273318162)
+s(3060521119)
+s(-3527110404)
+s(3699631193)
+s(3872838898)
+s(3880350192)
diff --git a/tests/files/bc/sine_results.txt b/tests/files/bc/sine_results.txt
new file mode 100644
index 00000000..7a4a1ab0
--- /dev/null
+++ b/tests/files/bc/sine_results.txt
@@ -0,0 +1,204 @@
+0
+.47942553860420300027
+.84147098480789650665
+.90929742682568169539
+.14112000805986722210
+-.47942553860420300027
+-.84147098480789650665
+-.90929742682568169539
+-.14112000805986722210
+.43388373911755812047
+-.43388373911755812047
+.70710678118654752439
+-.70710678118654752439
+.86602540378443864676
+-.86602540378443864676
+1.00000000000000000000
+-1.00000000000000000000
+.70710678118654752440
+-.70710678118654752440
+0
+0
+-1.00000000000000000000
+1.00000000000000000000
+-.70710678118654752440
+.70710678118654752440
+-.70710678118654752439
+.70710678118654752439
+0
+0
+.38173640790989719211
+-.38173640790989719211
+.08162149793819434415
+.87714140586973771462
+-.91157035998052051623
+-.69638975047120679880
+-.94806056135672896231
+-.54548669379730874215
+.14605234154783145589
+-.12183062787430962391
+-.89832305526331682409
+-.99513029384033555290
+.76528428398894958149
+.51077956237618482050
+-.75908868040685122962
+-.37015497140201575652
+-.51432535569032144654
+.68890201397514289831
+.88200006249578882510
+-.01188893762444044480
+-.55298206739629427055
+-.39165958853437135625
+.17732674488831117445
+-.09648816960119759281
+.15728984163381104344
+-.31554983227150461370
+-.72225704678824601977
+.96170480789326775287
+-.47636475887571231114
+-.98999375714278585763
+-.06715264746977580303
+-.69464867397161089634
+.58037673122614640119
+-.44244898040675115062
+.04242496278231069061
+.96417934585711006987
+-.54513053517818430563
+-.28604677908958958915
+-.68003854521180919710
+.26597321569379963920
+-.34591048991595943570
+-.17084074152217894535
+-.42880744669595980174
+.36518031021580667844
+-.03514839609475800827
+.93891962312087620513
+-.69421849362562852947
+.15169857474887222961
+-.00226070393499995347
+.96209233301706432156
+-.79937182245558378826
+.99966966326862290520
+.85234799672007656117
+-.20824280061137520443
+-.00761257856348159450
+.10708922858398661064
+-.80233147080821341443
+.26521358383069223461
+-.95173930946495828679
+.66210405748455769256
+.30054820568403786217
+.21640593048970779808
+-.87596287572245980692
+.74627849623707962934
+-.25747200288605259984
+-.14700538617135227740
+-.06294254604551440990
+.67948313824962059899
+.83714389089726798409
+.33805040346429707760
+.80273418514828673749
+.72262501870089953244
+-.77469383027517310713
+-.15575896025754423345
+.22191568853026376075
+.25137052589938954082
+-.80534308288073574163
+-.44963537508211028805
+-.92368907556208259630
+-.80963411623457804531
+-.96822928101198069490
+-.46604999828123759716
+.63275578793565409192
+-.40563425346575205109
+.13095444406203282638
+.96217617474547242151
+-.16256793375739137005
+.71791623784197898982
+-.10713685791219679248
+.50758780541979250307
+-.09795373670371402656
+.14605234154783145589
+-.12183062787430962391
+-.89832305526331682409
+-.99513029384033555290
+.76528428398894958149
+.51077956237618482050
+-.75908868040685122962
+-.37015497140201575652
+-.51432535569032144654
+.68890201397514289831
+.88200006249578882510
+-.01188893762444044480
+-.55298206739629427055
+-.39165958853437135625
+.17732674488831117445
+-.09648816960119759281
+.15728984163381104344
+-.31554983227150461370
+-.72225704678824601977
+.96170480789326775287
+-.47636475887571231114
+-.98999375714278585763
+-.06715264746977580303
+-.69464867397161089634
+.58037673122614640119
+-.44244898040675115062
+.04242496278231069061
+.96417934585711006987
+-.54513053517818430563
+-.28604677908958958915
+-.68003854521180919710
+.26597321569379963920
+-.34591048991595943570
+-.17084074152217894535
+-.42880744669595980174
+.36518031021580667844
+-.03514839609475800827
+.75884554410943292265
+.93891962312087620513
+-.69421849362562852947
+.15169857474887222961
+-.00226070393499995347
+.96209233301706432156
+-.79937182245558378826
+.99966966326862290520
+.85234799672007656117
+-.20824280061137520443
+-.00761257856348159450
+.10708922858398661064
+-.80233147080821341443
+.26521358383069223461
+-.95173930946495828679
+.66210405748455769256
+.30054820568403786217
+.21640593048970779808
+-.87596287572245980692
+.74627849623707962934
+-.25747200288605259984
+-.14700538617135227740
+-.06294254604551440990
+.67948313824962059899
+.83714389089726798409
+.33805040346429707760
+.80273418514828673749
+.72262501870089953244
+-.77469383027517310713
+-.15575896025754423345
+.22191568853026376075
+.25137052589938954082
+-.80534308288073574163
+-.44963537508211028805
+-.92368907556208259630
+-.80963411623457804531
+-.96822928101198069490
+-.46604999828123759716
+.63275578793565409192
+-.40563425346575205109
+.13095444406203282638
+.96217617474547242151
+-.16256793375739137005
+.71791623784197898982
+-.10713685791219679248
+.50758780541979250307
+-.09795373670371402656
diff --git a/tests/files/bc/sqrt.txt b/tests/files/bc/sqrt.txt
index d1b451a9..07cdee66 100644
--- a/tests/files/bc/sqrt.txt
+++ b/tests/files/bc/sqrt.txt
@@ -11,3 +11,4 @@ sqrt(9287356207356)
sqrt(0.189274385967238956872354)
sqrt(12389467137496823.134567829387456283946)
sqrt(.0000000000000000000000000000123)
+sqrt(1)
diff --git a/tests/files/bc/sqrt_results.txt b/tests/files/bc/sqrt_results.txt
index ef818087..5ded8c29 100644
--- a/tests/files/bc/sqrt_results.txt
+++ b/tests/files/bc/sqrt_results.txt
@@ -10,3 +10,4 @@
.435056761776252544285578
111307983.260397019622398608908
.0000000000000035071355833500363
+1.00000000000000000000
diff --git a/tests/files/bc/subtract.txt b/tests/files/bc/subtract.txt
index 4fdebea8..dbc46be5 100644
--- a/tests/files/bc/subtract.txt
+++ b/tests/files/bc/subtract.txt
@@ -28,3 +28,5 @@
-4674596708467.34754789403674343567 - -48672394852354698.237548629345
979519669 - 3018100865
929002449 - 3280677283
+0 - -525898
+3- - -3
diff --git a/tests/files/bc/subtract_results.txt b/tests/files/bc/subtract_results.txt
index 71488d50..6850b5bc 100644
--- a/tests/files/bc/subtract_results.txt
+++ b/tests/files/bc/subtract_results.txt
@@ -32,3 +32,5 @@
48667720255646230.89000073530825656433
-2038581196
-2351674834
+525898
+0
diff --git a/tests/files/bc/basic.txt b/tests/files/bc/vars.txt
index f3d957a2..91e3572c 100644
--- a/tests/files/bc/basic.txt
+++ b/tests/files/bc/vars.txt
@@ -3,5 +3,5 @@ scale=100;759634576394.3946587934658364895 / 9834759834895386.36459364958346
34895734986539489834759837489573498573.398475984759837485734987598345 + 9823749832749872384234872934.28347982374987239847982374
a=123123123.987239874; b=123123123.239479823748; a+b
20347023.23498723984 - 28934723874.234720384
-scale=100;a=739534985.895347284957;b=238746782364.2374623784; c = a / b; c+0
-
+scale=100;a=739534985.895347284957;b=238746782364.2374623784; c = a / b; c
+s7298367203972395108367910823465293084561329084561390845613409516734503870691837451 + 785621394067928346918023476190834672198467134908618723249671349062187346898241093486139046139084613490817356023871869102746182749061872609129847
diff --git a/tests/files/bc/basic_results.txt b/tests/files/bc/vars_results.txt
index 1e0d92f1..6597d843 100644
--- a/tests/files/bc/basic_results.txt
+++ b/tests/files/bc/vars_results.txt
@@ -7,3 +7,6 @@
-28914376850.99973314416
.0030975704827179453786044330548590249517387192084765414205077089498\
482709063381782183114683451531598
+78562139406792834691802347619083467219846713490861872324967134906218\
+73468982410934861390461390846134908173560238718691027461827490618726\
+09129847
diff --git a/toys/pending/bc.c b/toys/pending/bc.c
index 0130d80a..f2a8d1ec 100644
--- a/toys/pending/bc.c
+++ b/toys/pending/bc.c
@@ -37,6 +37,7 @@ config BC
GLOBALS(
long tty;
+ long ttyin;
unsigned long sig;
unsigned long sigc;
@@ -48,143 +49,142 @@ typedef enum BcStatus {
BC_STATUS_SUCCESS,
- BC_STATUS_MALLOC_FAIL,
+ BC_STATUS_ALLOC_ERR,
BC_STATUS_IO_ERR,
- BC_STATUS_BINARY_FILE,
+ BC_STATUS_BIN_FILE,
+ BC_STATUS_PATH_IS_DIR,
- BC_STATUS_LEX_BAD_CHARACTER,
+ BC_STATUS_LEX_BAD_CHAR,
BC_STATUS_LEX_NO_STRING_END,
BC_STATUS_LEX_NO_COMMENT_END,
BC_STATUS_LEX_EOF,
BC_STATUS_PARSE_BAD_TOKEN,
- BC_STATUS_PARSE_BAD_EXPR,
+ BC_STATUS_PARSE_BAD_EXP,
+ BC_STATUS_PARSE_EMPTY_EXP,
BC_STATUS_PARSE_BAD_PRINT,
BC_STATUS_PARSE_BAD_FUNC,
BC_STATUS_PARSE_BAD_ASSIGN,
BC_STATUS_PARSE_NO_AUTO,
BC_STATUS_PARSE_DUPLICATE_LOCAL,
+ BC_STATUS_PARSE_NO_BLOCK_END,
BC_STATUS_MATH_NEGATIVE,
BC_STATUS_MATH_NON_INTEGER,
BC_STATUS_MATH_OVERFLOW,
BC_STATUS_MATH_DIVIDE_BY_ZERO,
- BC_STATUS_MATH_NEG_SQRT,
BC_STATUS_MATH_BAD_STRING,
BC_STATUS_EXEC_FILE_ERR,
BC_STATUS_EXEC_MISMATCHED_PARAMS,
BC_STATUS_EXEC_UNDEFINED_FUNC,
BC_STATUS_EXEC_FILE_NOT_EXECUTABLE,
- BC_STATUS_EXEC_SIGACTION_FAIL,
- BC_STATUS_EXEC_BAD_SCALE,
- BC_STATUS_EXEC_BAD_IBASE,
- BC_STATUS_EXEC_BAD_OBASE,
+ BC_STATUS_EXEC_NUM_LEN,
+ BC_STATUS_EXEC_NAME_LEN,
BC_STATUS_EXEC_STRING_LEN,
BC_STATUS_EXEC_ARRAY_LEN,
+ BC_STATUS_EXEC_BAD_IBASE,
+ BC_STATUS_EXEC_BAD_SCALE,
BC_STATUS_EXEC_BAD_READ_EXPR,
- BC_STATUS_EXEC_NESTED_READ,
+ BC_STATUS_EXEC_REC_READ,
BC_STATUS_EXEC_BAD_TYPE,
+ BC_STATUS_EXEC_BAD_OBASE,
BC_STATUS_EXEC_SIGNAL,
-
- BC_STATUS_POSIX_NAME_LEN,
- BC_STATUS_POSIX_SCRIPT_COMMENT,
- BC_STATUS_POSIX_BAD_KEYWORD,
- BC_STATUS_POSIX_DOT_LAST,
- BC_STATUS_POSIX_RETURN_PARENS,
- BC_STATUS_POSIX_BOOL_OPS,
- BC_STATUS_POSIX_REL_OUTSIDE,
- BC_STATUS_POSIX_MULTIPLE_REL,
- BC_STATUS_POSIX_NO_FOR_INIT,
- BC_STATUS_POSIX_NO_FOR_COND,
- BC_STATUS_POSIX_NO_FOR_UPDATE,
- BC_STATUS_POSIX_HEADER_BRACE,
+ BC_STATUS_EXEC_STACK,
BC_STATUS_VEC_OUT_OF_BOUNDS,
BC_STATUS_VEC_ITEM_EXISTS,
+ BC_STATUS_POSIX_NAME_LEN,
+ BC_STATUS_POSIX_COMMENT,
+ BC_STATUS_POSIX_BAD_KW,
+ BC_STATUS_POSIX_DOT,
+ BC_STATUS_POSIX_RET,
+ BC_STATUS_POSIX_BOOL,
+ BC_STATUS_POSIX_REL_POS,
+ BC_STATUS_POSIX_MULTIREL,
+ BC_STATUS_POSIX_FOR1,
+ BC_STATUS_POSIX_FOR2,
+ BC_STATUS_POSIX_FOR3,
+ BC_STATUS_POSIX_BRACE,
+
BC_STATUS_QUIT,
BC_STATUS_LIMITS,
} BcStatus;
-#define BC_ERR_IDX_BC (0)
+#define BC_ERR_IDX_VM (0)
#define BC_ERR_IDX_LEX (1)
#define BC_ERR_IDX_PARSE (2)
#define BC_ERR_IDX_MATH (3)
#define BC_ERR_IDX_EXEC (4)
-#define BC_ERR_IDX_POSIX (5)
+#define BC_ERR_IDX_VEC (5)
+#define BC_ERR_IDX_POSIX (6)
-#define BC_VEC_INITIAL_CAP (32)
+#define BC_VEC_START_CAP (1<<5)
-typedef void (*BcVecFreeFunc)(void*);
-typedef int (*BcVecCmpFunc)(void*, void*);
+typedef void (*BcVecFree)(void*);
+typedef int (*BcVecCmp)(const void*, const void*);
typedef struct BcVec {
-
- uint8_t *array;
+ char *v;
size_t len;
size_t cap;
size_t size;
-
- BcVecFreeFunc dtor;
-
+ BcVecFree dtor;
} BcVec;
-typedef struct BcVecO {
-
- BcVec vec;
- BcVecCmpFunc cmp;
+#define bc_vec_pop(v) (bc_vec_npop((v), 1))
+#define bc_vec_top(v) (bc_vec_item_rev((v), 0))
-} BcVecO;
+#define bc_map_init(v) (bc_vec_init((v), sizeof(BcId), bc_id_free))
-#define bc_veco_item(v, idx) (bc_vec_item(&(v)->vec, (idx)))
-#define bc_veco_free(v) (bc_vec_free(&(v)->vec))
+#define BC_READ_BIN_CHAR(c) ((((c) < ' ' && !isspace((c))) || (c) > '~'))
-typedef signed char BcDigit;
+typedef signed char BcDig;
typedef struct BcNum {
-
- BcDigit *num;
+ BcDig *restrict num;
size_t rdx;
size_t len;
size_t cap;
int neg;
-
} BcNum;
-#define BC_NUM_MIN_BASE (2)
-#define BC_NUM_MAX_INPUT_BASE (16)
+#define BC_NUM_MIN_BASE ((unsigned long) 2)
+#define BC_NUM_MAX_IBASE ((unsigned long) 16)
#define BC_NUM_DEF_SIZE (16)
-
#define BC_NUM_PRINT_WIDTH (69)
-#define BC_NUM_ONE(n) ((n)->len == 1 && (n)->rdx == 0 && (n)->num[0] == 1)
+#define BC_NUM_KARATSUBA_LEN (32)
-typedef BcStatus (*BcNumUnaryFunc)(BcNum*, BcNum*, size_t);
-typedef BcStatus (*BcNumBinaryFunc)(BcNum*, BcNum*, BcNum*, size_t);
-typedef BcStatus (*BcNumDigitFunc)(size_t, size_t, int, size_t*, size_t);
-
-BcStatus bc_num_init(BcNum *n, size_t request);
-BcStatus bc_num_expand(BcNum *n, size_t request);
-BcStatus bc_num_copy(BcNum *d, BcNum *s);
+#define BC_NUM_NEG(n, neg) ((((ssize_t) (n)) ^ -((ssize_t) (neg))) + (neg))
+#define BC_NUM_ONE(n) ((n)->len == 1 && (n)->rdx == 0 && (n)->num[0] == 1)
+#define BC_NUM_INT(n) ((n)->len - (n)->rdx)
+#define BC_NUM_AREQ(a, b) \
+ (maxof((a)->rdx, (b)->rdx) + maxof(BC_NUM_INT(a), BC_NUM_INT(b)) + 1)
+#define BC_NUM_MREQ(a, b, scale) \
+ (BC_NUM_INT(a) + BC_NUM_INT(b) + maxof((scale), (a)->rdx + (b)->rdx) + 1)
+
+typedef BcStatus (*BcNumBinaryOp)(BcNum*, BcNum*, BcNum*, size_t);
+typedef void (*BcNumDigitOp)(size_t, size_t, int, size_t*, size_t);
+
+void bc_num_init(BcNum *n, size_t req);
+void bc_num_expand(BcNum *n, size_t req);
+void bc_num_copy(BcNum *d, BcNum *s);
void bc_num_free(void *num);
BcStatus bc_num_ulong(BcNum *n, unsigned long *result);
BcStatus bc_num_ulong2num(BcNum *n, unsigned long val);
-BcStatus bc_num_add(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-BcStatus bc_num_sub(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-BcStatus bc_num_mul(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-BcStatus bc_num_div(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-BcStatus bc_num_mod(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-BcStatus bc_num_pow(BcNum *a, BcNum *b, BcNum *result, size_t scale);
-
-ssize_t bc_num_cmp(BcNum *a, BcNum *b);
-
-void bc_num_zero(BcNum *n);
-void bc_num_one(BcNum *n);
-void bc_num_ten(BcNum *n);
+BcStatus bc_num_add(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_sub(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_mul(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_div(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_mod(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_pow(BcNum *a, BcNum *b, BcNum *c, size_t scale);
+BcStatus bc_num_sqrt(BcNum *a, BcNum *b, size_t scale);
+BcStatus bc_num_divmod(BcNum *a, BcNum *b, BcNum *c, BcNum *d, size_t scale);
typedef enum BcInst {
@@ -221,113 +221,104 @@ typedef enum BcInst {
BC_INST_ASSIGN_MINUS,
BC_INST_ASSIGN,
- BC_INST_PUSH_NUM,
- BC_INST_PUSH_VAR,
- BC_INST_PUSH_ARRAY_ELEM,
-
- BC_INST_CALL,
+ BC_INST_NUM,
+ BC_INST_VAR,
+ BC_INST_ARRAY_ELEM,
+ BC_INST_ARRAY,
BC_INST_SCALE_FUNC,
- BC_INST_PUSH_IBASE,
- BC_INST_PUSH_SCALE,
- BC_INST_PUSH_LAST,
+ BC_INST_IBASE,
+ BC_INST_SCALE,
+ BC_INST_LAST,
BC_INST_LENGTH,
BC_INST_READ,
- BC_INST_PUSH_OBASE,
+ BC_INST_OBASE,
BC_INST_SQRT,
BC_INST_PRINT,
- BC_INST_PRINT_EXPR,
+ BC_INST_PRINT_POP,
BC_INST_STR,
BC_INST_PRINT_STR,
BC_INST_JUMP,
BC_INST_JUMP_ZERO,
- BC_INST_POP,
+ BC_INST_CALL,
- BC_INST_RETURN,
- BC_INST_RETURN_ZERO,
+ BC_INST_RET,
+ BC_INST_RET0,
BC_INST_HALT,
-} BcInst;
+ BC_INST_POP,
+ BC_INST_POP_EXEC,
-typedef struct BcEntry {
+} BcInst;
+typedef struct BcId {
char *name;
size_t idx;
-
-} BcEntry;
-
-typedef struct BcAuto {
-
- char *name;
- int var;
-
-} BcAuto;
+} BcId;
typedef struct BcFunc {
-
BcVec code;
BcVec labels;
size_t nparams;
BcVec autos;
-
} BcFunc;
typedef enum BcResultType {
BC_RESULT_TEMP,
- BC_RESULT_CONSTANT,
-
- BC_RESULT_ARRAY_AUTO,
- BC_RESULT_VAR_AUTO,
-
BC_RESULT_VAR,
+ BC_RESULT_ARRAY_ELEM,
BC_RESULT_ARRAY,
+ BC_RESULT_STR,
+
+ BC_RESULT_IBASE,
BC_RESULT_SCALE,
BC_RESULT_LAST,
- BC_RESULT_IBASE,
- BC_RESULT_OBASE,
+ // These are between to calculate ibase, obase, and last from instructions.
+ BC_RESULT_CONSTANT,
BC_RESULT_ONE,
-} BcResultType;
-
-typedef struct BcResult {
-
- BcResultType type;
-
- union {
+ BC_RESULT_OBASE,
- BcNum num;
- BcVec array;
- BcEntry id;
+} BcResultType;
- } data;
+typedef union BcResultData {
+ BcNum n;
+ BcVec v;
+ BcId id;
+} BcResultData;
+typedef struct BcResult {
+ BcResultType t;
+ BcResultData d;
} BcResult;
typedef struct BcInstPtr {
-
size_t func;
size_t idx;
size_t len;
-
} BcInstPtr;
-void bc_auto_free(void *auto1);
+void bc_array_expand(BcVec *a, size_t len);
+int bc_id_cmp(const void *e1, const void *e2);
+
+// BC_LEX_NEG is not used in lexing; it is only for parsing.
+typedef enum BcLexType {
-// BC_LEX_OP_NEGATE is not used in lexing; it is only for parsing.
-typedef enum BcLexToken {
+ BC_LEX_EOF,
+ BC_LEX_INVALID,
BC_LEX_OP_INC,
BC_LEX_OP_DEC,
- BC_LEX_OP_NEG,
+ BC_LEX_NEG,
BC_LEX_OP_POWER,
BC_LEX_OP_MULTIPLY,
@@ -336,12 +327,12 @@ typedef enum BcLexToken {
BC_LEX_OP_PLUS,
BC_LEX_OP_MINUS,
- BC_LEX_OP_REL_EQUAL,
- BC_LEX_OP_REL_LESS_EQ,
- BC_LEX_OP_REL_GREATER_EQ,
- BC_LEX_OP_REL_NOT_EQ,
- BC_LEX_OP_REL_LESS,
- BC_LEX_OP_REL_GREATER,
+ BC_LEX_OP_REL_EQ,
+ BC_LEX_OP_REL_LE,
+ BC_LEX_OP_REL_GE,
+ BC_LEX_OP_REL_NE,
+ BC_LEX_OP_REL_LT,
+ BC_LEX_OP_REL_GT,
BC_LEX_OP_BOOL_NOT,
BC_LEX_OP_BOOL_OR,
@@ -355,22 +346,21 @@ typedef enum BcLexToken {
BC_LEX_OP_ASSIGN_MINUS,
BC_LEX_OP_ASSIGN,
- BC_LEX_NEWLINE,
-
+ BC_LEX_NLINE,
BC_LEX_WHITESPACE,
- BC_LEX_LEFT_PAREN,
- BC_LEX_RIGHT_PAREN,
+ BC_LEX_LPAREN,
+ BC_LEX_RPAREN,
- BC_LEX_LEFT_BRACKET,
+ BC_LEX_LBRACKET,
BC_LEX_COMMA,
- BC_LEX_RIGHT_BRACKET,
+ BC_LEX_RBRACKET,
- BC_LEX_LEFT_BRACE,
- BC_LEX_SEMICOLON,
- BC_LEX_RIGHT_BRACE,
+ BC_LEX_LBRACE,
+ BC_LEX_SCOLON,
+ BC_LEX_RBRACE,
- BC_LEX_STRING,
+ BC_LEX_STR,
BC_LEX_NAME,
BC_LEX_NUMBER,
@@ -395,162 +385,100 @@ typedef enum BcLexToken {
BC_LEX_KEY_SQRT,
BC_LEX_KEY_WHILE,
- BC_LEX_EOF,
- BC_LEX_INVALID,
-
-} BcLexToken;
+} BcLexType;
typedef struct BcLex {
- const char *buffer;
- size_t idx;
+ const char *buf;
+ size_t i;
size_t line;
- int newline;
- const char *file;
+ const char *f;
size_t len;
+ int newline;
struct {
- BcLexToken type;
- char *string;
- } token;
+ BcLexType t;
+ BcLexType last;
+ BcVec v;
+ } t;
} BcLex;
-typedef struct BcLexKeyword {
-
- const char name[9];
- const char len;
- const int posix;
-
-} BcLexKeyword;
-
-#define BC_LEX_KW_ENTRY(a, b, c) { .name = a, .len = (b), .posix = (c) }
-
-#define BC_PROGRAM_BUF_SIZE (1024)
-
-typedef struct BcProgram {
-
- BcVec ip_stack;
-
- size_t line_len;
+#define BC_PARSE_STREND ((char) UCHAR_MAX)
- size_t scale;
+#define bc_parse_push(p, i) (bc_vec_pushByte(&(p)->func->code, (char) (i)))
+#define bc_parse_updateFunc(p, f) \
+ ((p)->func = bc_vec_item(&(p)->prog->fns, ((p)->fidx = (f))))
- BcNum ibase;
- size_t ibase_t;
- BcNum obase;
- size_t obase_t;
+#define BC_PARSE_REL (1<<0)
+#define BC_PARSE_PRINT (1<<1)
+#define BC_PARSE_NOCALL (1<<2)
+#define BC_PARSE_NOREAD (1<<3)
+#define BC_PARSE_ARRAY (1<<4)
- BcVec results;
- BcVec stack;
-
- BcVec funcs;
- BcVecO func_map;
-
- BcVec vars;
- BcVecO var_map;
-
- BcVec arrays;
- BcVecO array_map;
-
- BcVec strings;
- BcVec constants;
-
- const char *file;
-
- BcNum last;
+#define BC_PARSE_TOP_FLAG_PTR(parse) ((uint8_t*) bc_vec_top(&(parse)->flags))
+#define BC_PARSE_TOP_FLAG(parse) (*(BC_PARSE_TOP_FLAG_PTR(parse)))
- BcNum zero;
- BcNum one;
-
- size_t nchars;
-
-} BcProgram;
-
-#define BC_PROGRAM_MAIN (0)
-#define BC_PROGRAM_READ (1)
-
-#define BC_PROGRAM_SEARCH_VAR (1<<0)
-#define BC_PROGRAM_SEARCH_ARRAY (1<<1)
-
-typedef unsigned long (*BcProgramBuiltInFunc)(BcNum*);
-typedef void (*BcNumInitFunc)(BcNum*);
-
-BcStatus bc_program_addFunc(BcProgram *p, char *name, size_t *idx);
-BcStatus bc_program_reset(BcProgram *p, BcStatus status);
-
-BcStatus bc_program_exec(BcProgram *p);
-
-#define BC_PARSE_TOP_FLAG_PTR(parse) ((uint8_t*) bc_vec_top(&(parse)->flags))
-
-#define BC_PARSE_TOP_FLAG(parse) (*(BC_PARSE_TOP_FLAG_PTR(parse)))
-
-#define BC_PARSE_FLAG_FUNC_INNER (0x01)
-
-#define BC_PARSE_FUNC_INNER(parse) \
+#define BC_PARSE_FLAG_FUNC_INNER (1<<0)
+#define BC_PARSE_FUNC_INNER(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_FUNC_INNER)
-#define BC_PARSE_FLAG_FUNC (0x02)
-
-#define BC_PARSE_FUNC(parse) \
+#define BC_PARSE_FLAG_FUNC (1<<1)
+#define BC_PARSE_FUNC(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_FUNC)
-#define BC_PARSE_FLAG_BODY (0x04)
-
-#define BC_PARSE_BODY(parse) \
+#define BC_PARSE_FLAG_BODY (1<<2)
+#define BC_PARSE_BODY(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_BODY)
-#define BC_PARSE_FLAG_LOOP (0x08)
-
-#define BC_PARSE_LOOP(parse) \
+#define BC_PARSE_FLAG_LOOP (1<<3)
+#define BC_PARSE_LOOP(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_LOOP)
-#define BC_PARSE_FLAG_LOOP_INNER (0x10)
-
+#define BC_PARSE_FLAG_LOOP_INNER (1<<4)
#define BC_PARSE_LOOP_INNER(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_LOOP_INNER)
-#define BC_PARSE_FLAG_IF (0x20)
-
-#define BC_PARSE_IF(parse) \
+#define BC_PARSE_FLAG_IF (1<<5)
+#define BC_PARSE_IF(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_IF)
-#define BC_PARSE_FLAG_ELSE (0x40)
-
-#define BC_PARSE_ELSE(parse) \
+#define BC_PARSE_FLAG_ELSE (1<<6)
+#define BC_PARSE_ELSE(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_ELSE)
-#define BC_PARSE_FLAG_IF_END (0x80)
-
-#define BC_PARSE_IF_END(parse) \
+#define BC_PARSE_FLAG_IF_END (1<<7)
+#define BC_PARSE_IF_END(parse) \
(BC_PARSE_TOP_FLAG(parse) & BC_PARSE_FLAG_IF_END)
-#define BC_PARSE_CAN_EXEC(parse) \
+#define BC_PARSE_CAN_EXEC(parse) \
(!(BC_PARSE_TOP_FLAG(parse) & (BC_PARSE_FLAG_FUNC_INNER | \
BC_PARSE_FLAG_FUNC | \
- BC_PARSE_FLAG_BODY | \
+ BC_PARSE_FLAG_BODY | \
BC_PARSE_FLAG_LOOP | \
BC_PARSE_FLAG_LOOP_INNER | \
BC_PARSE_FLAG_IF | \
BC_PARSE_FLAG_ELSE | \
BC_PARSE_FLAG_IF_END)))
-// We can calculate the conversion between tokens and exprs
-// by subtracting the position of the first operator in the
-// lex enum and adding the position of the first in the expr
-// enum. Note: This only works for binary operators.
-#define BC_PARSE_TOKEN_TO_INST(type) ((type) - BC_LEX_OP_NEG + BC_INST_NEG)
-
typedef struct BcOp {
-
- uint8_t prec;
+ char prec;
int left;
-
} BcOp;
+typedef struct BcParseNext {
+ uint32_t len;
+ BcLexType tokens[4];
+} BcParseNext;
+
+#define BC_PARSE_NEXT_TOKENS(...) .tokens = { __VA_ARGS__ }
+#define BC_PARSE_NEXT(a, ...) { .len = (a), BC_PARSE_NEXT_TOKENS(__VA_ARGS__) }
+
+struct BcProgram;
+
typedef struct BcParse {
- BcLex lex;
+ BcLex l;
BcVec flags;
@@ -559,82 +487,164 @@ typedef struct BcParse {
BcVec ops;
- BcProgram *prog;
- size_t func;
-
- size_t num_braces;
+ struct BcProgram *prog;
+ BcFunc *func;
+ size_t fidx;
+ size_t nbraces;
int auto_part;
} BcParse;
-#define BC_PARSE_EXPR_POSIX_REL (1<<0)
-#define BC_PARSE_EXPR_PRINT (1<<1)
-#define BC_PARSE_EXPR_NOCALL (1<<2)
-#define BC_PARSE_EXPR_NOREAD (1<<3)
+typedef struct BcLexKeyword {
+ const char name[9];
+ const char len;
+ const int posix;
+} BcLexKeyword;
+
+#define BC_LEX_KW_ENTRY(a, b, c) { .name = a, .len = (b), .posix = (c) }
-BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags);
+BcStatus bc_lex_token(BcLex *l);
-#define maxof_BASE (999)
-#define maxof_DIM (INT_MAX)
-#define maxof_SCALE (LONG_MAX)
-#define maxof_STRING (INT_MAX)
+#define BC_PARSE_TOP_OP(p) (*((BcLexType*) bc_vec_top(&(p)->ops)))
+#define BC_PARSE_LEAF(p, rparen) \
+ (((p) >= BC_INST_NUM && (p) <= BC_INST_SQRT) || (rparen) || \
+ (p) == BC_INST_INC_POST || (p) == BC_INST_DEC_POST)
-#define BC_BUF_SIZE (1024)
+// We can calculate the conversion between tokens and exprs by subtracting the
+// position of the first operator in the lex enum and adding the position of the
+// first in the expr enum. Note: This only works for binary operators.
+#define BC_PARSE_TOKEN_INST(t) ((char) ((t) - BC_LEX_NEG + BC_INST_NEG))
-typedef struct Bc {
+BcStatus bc_parse_parse(BcParse *p);
+BcStatus bc_parse_expr(BcParse *p, uint8_t flags, BcParseNext next);
- BcParse parse;
+typedef struct BcProgram {
+
+ size_t len;
+ size_t scale;
+
+ BcNum ib;
+ size_t ib_t;
+ BcNum ob;
+ size_t ob_t;
+
+ BcNum hexb;
+
+ BcVec results;
+ BcVec stack;
+
+ BcVec fns;
+ BcVec fn_map;
+
+ BcVec vars;
+ BcVec var_map;
+
+ BcVec arrs;
+ BcVec arr_map;
+
+ BcVec strs;
+ BcVec consts;
+
+ const char *file;
+
+ BcNum last;
+ BcNum zero;
+ BcNum one;
+
+ size_t nchars;
+
+} BcProgram;
+
+#define BC_PROG_STACK(s, n) ((s)->len >= ((size_t) n))
+
+#define BC_PROG_MAIN (0)
+#define BC_PROG_READ (1)
+
+#define BC_PROG_STR(n) (!(n)->num && !(n)->cap)
+#define BC_PROG_NUM(r, n) \
+ ((r)->t != BC_RESULT_ARRAY && (r)->t != BC_RESULT_STR && !BC_PROG_STR(n))
+
+typedef unsigned long (*BcProgramBuiltIn)(BcNum*);
+
+void bc_program_addFunc(BcProgram *p, char *name, size_t *idx);
+BcStatus bc_program_reset(BcProgram *p, BcStatus s);
+BcStatus bc_program_exec(BcProgram *p);
+
+#define BC_MAX_OBASE ((unsigned long) 999)
+#define BC_MAX_DIM ((unsigned long) INT_MAX)
+#define BC_MAX_SCALE ((unsigned long) UINT_MAX)
+#define BC_MAX_STRING ((unsigned long) UINT_MAX - 1)
+#define BC_MAX_NAME BC_MAX_STRING
+#define BC_MAX_NUM BC_MAX_STRING
+#define BC_MAX_EXP ((unsigned long) LONG_MAX)
+#define BC_MAX_VARS ((unsigned long) SIZE_MAX - 1)
+
+typedef struct BcVm {
+
+ BcParse prs;
BcProgram prog;
-} Bc;
+} BcVm;
+
+BcStatus bc_vm_posixError(BcStatus s, const char *file,
+ size_t line, const char *msg);
-BcStatus bc_error(BcStatus st);
-BcStatus bc_error_file(BcStatus st, const char *file, size_t line);
+void bc_vm_exit(BcStatus s);
+void bc_vm_printf(FILE *restrict f, const char *fmt, ...);
+void bc_vm_puts(const char *str, FILE *restrict f);
+void bc_vm_putchar(int c);
+void bc_vm_fflush(FILE *restrict f);
-BcStatus bc_posix_error(BcStatus s, const char *file,
- size_t line, const char *msg);
+// clang-format off
-BcStatus bc_io_fread(const char *path, char **buf);
+const char bc_sig_msg[] = "\ninterrupt (type \"quit\" to exit)\n";
-const char *bc_header =
- "bc 1.0\n"
- "bc copyright (c) 2018 Gavin D. Howard and contributors\n"
+const char bc_copyright[] =
+ "Copyright (c) 2018 Gavin D. Howard and contributors\n"
"Report bugs at: https://github.com/gavinhoward/bc\n\n"
- "This is free software with ABSOLUTELY NO WARRANTY.\n\n";
+ "This is free software with ABSOLUTELY NO WARRANTY.\n";
-const char bc_err_fmt[] = "\n%s error: %s\n\n";
+const char bc_err_fmt[] = "\n%s error: %s\n";
+const char bc_warn_fmt[] = "\n%s warning: %s\n";
+const char bc_err_line[] = ":%zu\n\n";
const char *bc_errs[] = {
- "bc",
+ "VM",
"Lex",
"Parse",
"Math",
"Runtime",
+ "Vector",
"POSIX",
};
-const uint8_t bc_err_indices[] = {
- BC_ERR_IDX_BC, BC_ERR_IDX_BC, BC_ERR_IDX_BC, BC_ERR_IDX_BC,
+const uint8_t bc_err_ids[] = {
+ BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM,
BC_ERR_IDX_LEX, BC_ERR_IDX_LEX, BC_ERR_IDX_LEX, BC_ERR_IDX_LEX,
BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE,
- BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE,
+ BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE,
BC_ERR_IDX_MATH, BC_ERR_IDX_MATH, BC_ERR_IDX_MATH, BC_ERR_IDX_MATH,
- BC_ERR_IDX_MATH, BC_ERR_IDX_MATH,
+ BC_ERR_IDX_MATH,
+ BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC,
+ BC_ERR_IDX_VEC, BC_ERR_IDX_VEC,
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
+ BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM,
};
-const char *bc_err_descs[] = {
+const char *bc_err_msgs[] = {
+
NULL,
"memory allocation error",
"I/O error",
- "file is not text",
+ "file is not text:",
+ "path is a directory:",
"bad character",
"string end could not be found",
@@ -643,33 +653,40 @@ const char *bc_err_descs[] = {
"bad token",
"bad expression",
+ "empty expression",
"bad print statement",
"bad function definition",
- "bad assignment: left must be scale, ibase, "
+ "bad assignment: left side must be scale, ibase, "
"obase, last, var, or array element",
"no auto variable found",
"function parameter or auto var has the same name as another",
+ "block end could not be found",
"negative number",
"non integer number",
"overflow",
"divide by zero",
- "negative square root",
"bad number string",
- "could not open file",
+ "could not open file:",
"mismatched parameters",
"undefined function",
- "file is not executable",
- "could not install signal handler",
- "bad scale; must be [0, BC_SCALE_MAX]",
- "bad ibase; must be [2, 16]",
- "bad obase; must be [2, BC_BASE_MAX]",
+ "file is not executable:",
+ "number too long: must be [1, BC_NUM_MAX]",
+ "name too long: must be [1, BC_NAME_MAX]",
"string too long: must be [1, BC_STRING_MAX]",
"array too long; must be [1, BC_DIM_MAX]",
+ "bad ibase; must be [2, 16]",
+ "bad scale; must be [0, BC_SCALE_MAX]",
"bad read() expression",
"read() call inside of a read() call",
"variable is wrong type",
+ "bad obase; must be [2, BC_BASE_MAX]",
+ "signal caught and not handled",
+ "stack has too few elements",
+
+ "index is out of bounds",
+ "item already exists",
"POSIX only allows one character names; the following is bad:",
"POSIX does not allow '#' script comments",
@@ -683,14 +700,13 @@ const char *bc_err_descs[] = {
"POSIX does not allow an empty condition expression in a for loop",
"POSIX does not allow an empty update expression in a for loop",
"POSIX requires the left brace be on the same line as the function header",
-};
-const char bc_sig_msg[34] = "\ninterrupt (type \"quit\" to exit)\n";
+};
-const char bc_lang_func_main[7] = "(main)";
-const char bc_lang_func_read[7] = "(read)";
+const char bc_func_main[] = "(main)";
+const char bc_func_read[] = "(read)";
-const BcLexKeyword bc_lex_keywords[20] = {
+const BcLexKeyword bc_lex_kws[20] = {
BC_LEX_KW_ENTRY("auto", 4, 1),
BC_LEX_KW_ENTRY("break", 5, 1),
BC_LEX_KW_ENTRY("continue", 8, 0),
@@ -713,16 +729,15 @@ const BcLexKeyword bc_lex_keywords[20] = {
BC_LEX_KW_ENTRY("while", 5, 1),
};
-const char bc_num_hex_digits[] = "0123456789ABCDEF";
-
// This is an array that corresponds to token types. An entry is
// 1 if the token is valid in an expression, 0 otherwise.
-const int bc_parse_token_exprs[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,
- 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
- 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0,
+const int bc_parse_exprs[] = {
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1,
+ 1, 0,
};
// This is an array of data for operators that correspond to token types.
@@ -733,56 +748,72 @@ const BcOp bc_parse_ops[] = {
{ 3, 1 }, { 3, 1 }, { 3, 1 },
{ 4, 1 }, { 4, 1 },
{ 6, 1 }, { 6, 1 }, { 6, 1 }, { 6, 1 }, { 6, 1 }, { 6, 1 },
- { 7, 0 },
- { 8, 1 }, { 8, 1 },
- { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 },
+ { 1, 0 },
+ { 7, 1 }, { 7, 1 },
+ { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 }, { 5, 0 },
+ { 5, 0 }, { 5, 0 },
};
-const char bc_program_byte_fmt[] = "%02x";
+// These identify what tokens can come after expressions in certain cases.
+const BcParseNext bc_parse_next_expr =
+ BC_PARSE_NEXT(4, BC_LEX_NLINE, BC_LEX_SCOLON, BC_LEX_RBRACE, BC_LEX_EOF);
+const BcParseNext bc_parse_next_param =
+ BC_PARSE_NEXT(2, BC_LEX_RPAREN, BC_LEX_COMMA);
+const BcParseNext bc_parse_next_print =
+ BC_PARSE_NEXT(4, BC_LEX_COMMA, BC_LEX_NLINE, BC_LEX_SCOLON, BC_LEX_EOF);
+const BcParseNext bc_parse_next_rel = BC_PARSE_NEXT(1, BC_LEX_RPAREN);
+const BcParseNext bc_parse_next_elem = BC_PARSE_NEXT(1, BC_LEX_RBRACKET);
+const BcParseNext bc_parse_next_for = BC_PARSE_NEXT(1, BC_LEX_SCOLON);
+const BcParseNext bc_parse_next_read =
+ BC_PARSE_NEXT(2, BC_LEX_NLINE, BC_LEX_EOF);
+
+const char bc_num_hex_digits[] = "0123456789ABCDEF";
-const BcNumBinaryFunc bc_program_math_ops[] = {
+const BcNumBinaryOp bc_program_ops[] = {
bc_num_pow, bc_num_mul, bc_num_div, bc_num_mod, bc_num_add, bc_num_sub,
};
const char bc_program_stdin_name[] = "<stdin>";
-const char bc_program_ready_prompt[] = "ready for more input\n";
-const char *bc_lib_name = "lib.bc";
+const char bc_program_ready_msg[] = "ready for more input\n";
+
+// clang-format on
+const char *bc_lib_name = "gen/lib.bc";
const char bc_lib[] = {
115,99,97,108,101,61,50,48,10,100,101,102,105,110,101,32,101,40,120,41,123,
10,9,97,117,116,111,32,98,44,115,44,110,44,114,44,100,44,105,44,112,44,102,
44,118,10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,61,65,10,9,105,102,
40,120,60,48,41,123,10,9,9,110,61,49,10,9,9,120,61,45,120,10,9,125,10,9,115,
- 61,115,99,97,108,101,10,9,114,61,115,43,55,43,48,46,52,53,42,120,10,9,115,99,
+ 61,115,99,97,108,101,10,9,114,61,54,43,115,43,48,46,52,52,42,120,10,9,115,99,
97,108,101,61,115,99,97,108,101,40,120,41,43,49,10,9,119,104,105,108,101,40,
120,62,49,41,123,10,9,9,100,43,61,49,10,9,9,120,47,61,50,10,9,9,115,99,97,108,
101,43,61,49,10,9,125,10,9,115,99,97,108,101,61,114,10,9,114,61,120,43,49,10,
9,112,61,120,10,9,102,61,118,61,49,10,9,102,111,114,40,105,61,50,59,118,33,
- 61,48,59,43,43,105,41,123,10,9,9,112,42,61,120,59,10,9,9,102,42,61,105,10,9,
- 9,118,61,112,47,102,10,9,9,114,43,61,118,10,9,125,10,9,119,104,105,108,101,
- 40,40,102,45,45,41,33,61,48,41,114,42,61,114,10,9,115,99,97,108,101,61,115,
- 10,9,105,98,97,115,101,61,98,10,9,105,102,40,109,33,61,48,41,114,101,116,117,
- 114,110,40,49,47,114,41,10,9,114,101,116,117,114,110,40,114,47,49,41,10,125,
- 10,100,101,102,105,110,101,32,108,40,120,41,123,10,9,97,117,116,111,32,98,44,
- 115,44,114,44,112,44,97,44,113,44,105,44,118,10,9,98,61,105,98,97,115,101,10,
- 9,105,98,97,115,101,61,65,10,9,105,102,40,120,60,61,48,41,123,10,9,9,114,61,
- 40,49,45,49,48,94,115,99,97,108,101,41,47,49,10,9,9,105,98,97,115,101,61,98,
- 10,9,9,114,101,116,117,114,110,40,114,41,10,9,125,10,9,115,61,115,99,97,108,
- 101,10,9,115,99,97,108,101,43,61,55,10,9,112,61,50,10,9,119,104,105,108,101,
- 40,120,62,61,50,41,123,10,9,9,112,42,61,50,10,9,9,120,61,115,113,114,116,40,
- 120,41,10,9,125,10,9,119,104,105,108,101,40,120,60,61,48,46,53,41,123,10,9,
- 9,112,42,61,50,10,9,9,120,61,115,113,114,116,40,120,41,10,9,125,10,9,114,61,
- 97,61,40,120,45,49,41,47,40,120,43,49,41,10,9,113,61,97,42,97,10,9,118,61,49,
- 10,9,102,111,114,40,105,61,51,59,118,33,61,48,59,105,43,61,50,41,123,10,9,9,
- 110,42,61,109,10,9,9,118,61,110,47,105,10,9,9,114,43,61,118,10,9,125,10,9,114,
- 42,61,112,10,9,115,99,97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,114,
- 101,116,117,114,110,40,114,47,49,41,10,125,10,100,101,102,105,110,101,32,115,
- 40,120,41,123,10,9,97,117,116,111,32,98,44,115,44,114,44,110,44,97,44,113,44,
- 105,10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,61,65,10,9,115,61,115,
- 99,97,108,101,10,9,115,99,97,108,101,61,49,46,51,42,115,43,50,10,9,97,61,97,
- 40,49,41,10,9,105,102,40,120,60,48,41,123,10,9,9,110,61,49,10,9,9,120,61,45,
- 120,10,9,125,10,9,115,99,97,108,101,61,48,10,9,113,61,40,120,47,97,43,50,41,
- 47,52,10,9,120,45,61,52,42,113,42,97,10,9,105,102,40,113,37,50,33,61,48,41,
+ 61,48,59,43,43,105,41,123,10,9,9,112,42,61,120,10,9,9,102,42,61,105,10,9,9,
+ 118,61,112,47,102,10,9,9,114,43,61,118,10,9,125,10,9,119,104,105,108,101,40,
+ 40,100,45,45,41,33,61,48,41,114,42,61,114,10,9,115,99,97,108,101,61,115,10,
+ 9,105,98,97,115,101,61,98,10,9,105,102,40,110,33,61,48,41,114,101,116,117,114,
+ 110,40,49,47,114,41,10,9,114,101,116,117,114,110,40,114,47,49,41,10,125,10,
+ 100,101,102,105,110,101,32,108,40,120,41,123,10,9,97,117,116,111,32,98,44,115,
+ 44,114,44,112,44,97,44,113,44,105,44,118,10,9,98,61,105,98,97,115,101,10,9,
+ 105,98,97,115,101,61,65,10,9,105,102,40,120,60,61,48,41,123,10,9,9,114,61,40,
+ 49,45,49,48,94,115,99,97,108,101,41,47,49,10,9,9,105,98,97,115,101,61,98,10,
+ 9,9,114,101,116,117,114,110,40,114,41,10,9,125,10,9,115,61,115,99,97,108,101,
+ 10,9,115,99,97,108,101,43,61,54,10,9,112,61,50,10,9,119,104,105,108,101,40,
+ 120,62,61,50,41,123,10,9,9,112,42,61,50,10,9,9,120,61,115,113,114,116,40,120,
+ 41,10,9,125,10,9,119,104,105,108,101,40,120,60,61,48,46,53,41,123,10,9,9,112,
+ 42,61,50,10,9,9,120,61,115,113,114,116,40,120,41,10,9,125,10,9,114,61,97,61,
+ 40,120,45,49,41,47,40,120,43,49,41,10,9,113,61,97,42,97,10,9,118,61,49,10,9,
+ 102,111,114,40,105,61,51,59,118,33,61,48,59,105,43,61,50,41,123,10,9,9,97,42,
+ 61,113,10,9,9,118,61,97,47,105,10,9,9,114,43,61,118,10,9,125,10,9,114,42,61,
+ 112,10,9,115,99,97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,114,101,
+ 116,117,114,110,40,114,47,49,41,10,125,10,100,101,102,105,110,101,32,115,40,
+ 120,41,123,10,9,97,117,116,111,32,98,44,115,44,114,44,110,44,97,44,113,44,105,
+ 10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,61,65,10,9,115,61,115,99,
+ 97,108,101,10,9,115,99,97,108,101,61,49,46,49,42,115,43,50,10,9,97,61,97,40,
+ 49,41,10,9,105,102,40,120,60,48,41,123,10,9,9,110,61,49,10,9,9,120,61,45,120,
+ 10,9,125,10,9,115,99,97,108,101,61,48,10,9,113,61,40,120,47,97,43,50,41,47,
+ 52,10,9,120,61,120,45,52,42,113,42,97,10,9,105,102,40,113,37,50,33,61,48,41,
120,61,45,120,10,9,115,99,97,108,101,61,115,43,50,10,9,114,61,97,61,120,10,
9,113,61,45,120,42,120,10,9,102,111,114,40,105,61,51,59,97,33,61,48,59,105,
43,61,50,41,123,10,9,9,97,42,61,113,47,40,105,42,40,105,45,49,41,41,10,9,9,
@@ -791,293 +822,257 @@ const char bc_lib[] = {
49,41,10,9,114,101,116,117,114,110,40,114,47,49,41,10,125,10,100,101,102,105,
110,101,32,99,40,120,41,123,10,9,97,117,116,111,32,98,44,115,10,9,98,61,105,
98,97,115,101,10,9,105,98,97,115,101,61,65,10,9,115,61,115,99,97,108,101,10,
- 9,115,99,97,108,101,43,61,49,10,9,120,61,115,40,50,42,97,40,49,41,43,120,41,
- 10,9,115,99,97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,114,101,116,
- 117,114,110,40,120,47,49,41,10,125,10,100,101,102,105,110,101,32,97,40,120,
- 41,123,10,9,97,117,116,111,32,98,44,115,44,114,44,110,44,97,44,109,44,116,44,
- 102,44,105,44,117,10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,61,65,
- 10,9,110,61,49,10,9,105,102,40,120,60,48,41,123,10,9,9,110,61,45,49,10,9,9,
- 120,61,45,120,10,9,125,10,9,105,102,40,120,61,61,49,41,123,10,9,9,105,102,40,
- 115,99,97,108,101,60,61,54,52,41,123,10,9,9,9,114,101,116,117,114,110,40,46,
+ 9,115,99,97,108,101,42,61,49,46,50,10,9,120,61,115,40,50,42,97,40,49,41,43,
+ 120,41,10,9,115,99,97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,114,
+ 101,116,117,114,110,40,120,47,49,41,10,125,10,100,101,102,105,110,101,32,97,
+ 40,120,41,123,10,9,97,117,116,111,32,98,44,115,44,114,44,110,44,97,44,109,44,
+ 116,44,102,44,105,44,117,10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,
+ 61,65,10,9,110,61,49,10,9,105,102,40,120,60,48,41,123,10,9,9,110,61,45,49,10,
+ 9,9,120,61,45,120,10,9,125,10,9,105,102,40,120,61,61,49,41,123,10,9,9,105,102,
+ 40,115,99,97,108,101,60,54,53,41,123,10,9,9,9,114,101,116,117,114,110,40,46,
55,56,53,51,57,56,49,54,51,51,57,55,52,52,56,51,48,57,54,49,53,54,54,48,56,
52,53,56,49,57,56,55,53,55,50,49,48,52,57,50,57,50,51,52,57,56,52,51,55,55,
54,52,53,53,50,52,51,55,51,54,49,52,56,48,47,110,41,10,9,9,125,10,9,125,10,
- 9,105,102,40,120,61,61,46,50,54,55,41,123,10,9,9,105,102,40,115,99,97,108,101,
- 60,61,54,52,41,123,10,9,9,9,114,101,116,117,114,110,40,46,50,54,48,57,49,51,
- 53,54,57,50,51,50,57,52,48,53,55,57,53,57,54,55,56,53,50,54,55,55,55,55,57,
- 56,54,53,54,51,57,55,55,52,55,52,48,50,51,57,56,56,50,52,52,53,56,50,50,51,
- 50,57,56,56,50,57,49,55,47,110,41,10,9,9,125,10,9,125,10,9,115,61,115,99,97,
- 108,101,10,9,105,102,40,120,62,46,50,54,55,41,123,10,9,9,115,99,97,108,101,
- 43,61,53,10,9,9,97,61,97,40,46,50,54,55,41,10,9,125,10,9,115,99,97,108,101,
- 61,115,43,51,10,9,119,104,105,108,101,40,120,62,46,50,54,55,41,123,10,9,9,109,
- 43,61,49,10,9,9,120,61,40,120,45,46,50,54,55,41,47,40,49,43,46,50,54,55,42,
- 120,41,10,9,125,10,9,114,61,117,61,120,10,9,102,61,45,120,42,120,10,9,116,61,
- 49,10,9,102,111,114,40,105,61,51,59,116,33,61,48,59,105,43,61,50,41,123,10,
- 9,9,117,42,61,102,10,9,9,116,61,117,47,105,10,9,9,114,43,61,116,10,9,125,10,
- 9,115,99,97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,114,101,116,117,
- 114,110,40,40,109,42,97,43,114,41,47,110,41,10,125,10,100,101,102,105,110,101,
- 32,106,40,110,44,120,41,123,10,9,97,117,116,111,32,98,44,115,44,111,44,97,44,
- 105,44,118,44,102,10,9,98,61,105,98,97,115,101,10,9,105,98,97,115,101,61,65,
- 10,9,115,61,115,99,97,108,101,10,9,115,99,97,108,101,61,48,10,9,110,47,61,49,
- 10,9,105,102,40,110,60,48,41,123,10,9,9,110,61,45,110,10,9,9,105,102,40,110,
- 37,50,61,61,49,41,111,61,49,10,9,125,10,9,97,61,49,10,9,102,111,114,40,105,
- 61,50,59,105,60,61,110,59,43,43,105,41,102,42,61,105,10,9,115,99,97,108,101,
- 61,49,46,53,42,115,10,9,97,61,40,120,94,110,41,47,40,50,94,110,42,97,41,10,
- 9,114,61,118,61,49,10,9,102,61,45,120,42,120,47,52,10,9,115,99,97,108,101,43,
- 61,108,101,110,103,116,104,40,97,41,45,115,99,97,108,101,40,97,41,10,9,102,
- 111,114,40,105,61,49,59,118,33,61,48,59,43,43,105,41,123,10,9,9,118,61,118,
- 42,115,47,105,47,40,110,43,105,41,10,9,9,114,43,61,118,10,9,125,10,9,115,99,
- 97,108,101,61,115,10,9,105,98,97,115,101,61,98,10,9,105,102,40,111,33,61,48,
- 41,114,101,116,117,114,110,40,45,97,42,114,47,49,41,10,9,114,101,116,117,114,
- 110,40,97,42,114,47,49,41,10,125,10,0
+ 9,105,102,40,120,61,61,46,50,41,123,10,9,9,105,102,40,115,99,97,108,101,60,
+ 54,53,41,123,10,9,9,9,114,101,116,117,114,110,40,46,49,57,55,51,57,53,53,53,
+ 57,56,52,57,56,56,48,55,53,56,51,55,48,48,52,57,55,54,53,49,57,52,55,57,48,
+ 50,57,51,52,52,55,53,56,53,49,48,51,55,56,55,56,53,50,49,48,49,53,49,55,54,
+ 56,56,57,52,48,50,47,110,41,10,9,9,125,10,9,125,10,9,115,61,115,99,97,108,101,
+ 10,9,105,102,40,120,62,46,50,41,123,10,9,9,115,99,97,108,101,43,61,53,10,9,
+ 9,97,61,97,40,46,50,41,10,9,125,10,9,115,99,97,108,101,61,115,43,51,10,9,119,
+ 104,105,108,101,40,120,62,46,50,41,123,10,9,9,109,43,61,49,10,9,9,120,61,40,
+ 120,45,46,50,41,47,40,49,43,46,50,42,120,41,10,9,125,10,9,114,61,117,61,120,
+ 10,9,102,61,45,120,42,120,10,9,116,61,49,10,9,102,111,114,40,105,61,51,59,116,
+ 33,61,48,59,105,43,61,50,41,123,10,9,9,117,42,61,102,10,9,9,116,61,117,47,105,
+ 10,9,9,114,43,61,116,10,9,125,10,9,115,99,97,108,101,61,115,10,9,105,98,97,
+ 115,101,61,98,10,9,114,101,116,117,114,110,40,40,109,42,97,43,114,41,47,110,
+ 41,10,125,10,100,101,102,105,110,101,32,106,40,110,44,120,41,123,10,9,97,117,
+ 116,111,32,98,44,115,44,111,44,97,44,105,44,118,44,102,10,9,98,61,105,98,97,
+ 115,101,10,9,105,98,97,115,101,61,65,10,9,115,61,115,99,97,108,101,10,9,115,
+ 99,97,108,101,61,48,10,9,110,47,61,49,10,9,105,102,40,110,60,48,41,123,10,9,
+ 9,110,61,45,110,10,9,9,105,102,40,110,37,50,61,61,49,41,111,61,49,10,9,125,
+ 10,9,97,61,49,10,9,102,111,114,40,105,61,50,59,105,60,61,110,59,43,43,105,41,
+ 97,42,61,105,10,9,115,99,97,108,101,61,49,46,53,42,115,10,9,97,61,40,120,94,
+ 110,41,47,50,94,110,47,97,10,9,114,61,118,61,49,10,9,102,61,45,120,42,120,47,
+ 52,10,9,115,99,97,108,101,61,115,99,97,108,101,43,108,101,110,103,116,104,40,
+ 97,41,45,115,99,97,108,101,40,97,41,10,9,102,111,114,40,105,61,49,59,118,33,
+ 61,48,59,43,43,105,41,123,10,9,9,118,61,118,42,102,47,105,47,40,110,43,105,
+ 41,10,9,9,114,43,61,118,10,9,125,10,9,115,99,97,108,101,61,115,10,9,105,98,
+ 97,115,101,61,98,10,9,105,102,40,111,33,61,48,41,97,61,45,97,10,9,114,101,116,
+ 117,114,110,40,97,42,114,47,49,41,10,125,10,0
};
-BcStatus bc_vec_double(BcVec *vec) {
-
- uint8_t *ptr = realloc(vec->array, vec->size * (vec->cap * 2));
- if (!ptr) return BC_STATUS_MALLOC_FAIL;
-
- vec->array = ptr;
- vec->cap *= 2;
-
- return BC_STATUS_SUCCESS;
+void bc_vec_grow(BcVec *v, size_t n) {
+ size_t cap = v->cap * 2;
+ while (cap < v->len + n) cap *= 2;
+ v->v = xrealloc(v->v, v->size * cap);
+ v->cap = cap;
}
-BcStatus bc_vec_init(BcVec *vec, size_t esize, BcVecFreeFunc dtor) {
-
- vec->size = esize;
- vec->cap = BC_VEC_INITIAL_CAP;
- vec->len = 0;
- vec->dtor = dtor;
-
- vec->array = malloc(esize * BC_VEC_INITIAL_CAP);
- if (!vec->array) return BC_STATUS_MALLOC_FAIL;
-
- return BC_STATUS_SUCCESS;
+void bc_vec_init(BcVec *v, size_t esize, BcVecFree dtor) {
+ v->size = esize;
+ v->cap = BC_VEC_START_CAP;
+ v->len = 0;
+ v->dtor = dtor;
+ v->v = xmalloc(esize * BC_VEC_START_CAP);
}
-BcStatus bc_vec_expand(BcVec *vec, size_t request) {
-
- uint8_t *ptr;
-
- if (vec->cap >= request) return BC_STATUS_SUCCESS;
-
- ptr = realloc(vec->array, vec->size * request);
- if (!ptr) return BC_STATUS_MALLOC_FAIL;
-
- vec->array = ptr;
- vec->cap = request;
-
- return BC_STATUS_SUCCESS;
+void bc_vec_expand(BcVec *v, size_t req) {
+ if (v->cap < req) {
+ v->v = xrealloc(v->v, v->size * req);
+ v->cap = req;
+ }
}
-BcStatus bc_vec_push(BcVec *vec, void *data) {
-
- BcStatus status;
- size_t size;
-
- if (vec->len == vec->cap && (status = bc_vec_double(vec))) return status;
+void bc_vec_npop(BcVec *v, size_t n) {
+ if (!v->dtor) v->len -= n;
+ else {
+ size_t len = v->len - n;
+ while (v->len > len) v->dtor(v->v + (v->size * --v->len));
+ }
+}
- size = vec->size;
- memmove(vec->array + (size * vec->len++), data, size);
+void bc_vec_push(BcVec *v, const void *data) {
+ if (v->len + 1 > v->cap) bc_vec_grow(v, 1);
+ memmove(v->v + (v->size * v->len), data, v->size);
+ v->len += 1;
+}
- return BC_STATUS_SUCCESS;
+void bc_vec_pushByte(BcVec *v, char data) {
+ bc_vec_push(v, &data);
}
-BcStatus bc_vec_pushByte(BcVec *vec, uint8_t data) {
+void bc_vec_pushAt(BcVec *v, const void *data, size_t idx) {
- BcStatus status;
+ if (idx == v->len) bc_vec_push(v, data);
+ else {
- if (vec->len == vec->cap && (status = bc_vec_double(vec))) return status;
+ char *ptr;
- vec->array[vec->len++] = data;
+ if (v->len == v->cap) bc_vec_grow(v, 1);
- return BC_STATUS_SUCCESS;
+ ptr = v->v + v->size * idx;
+
+ memmove(ptr + v->size, ptr, v->size * (v->len++ - idx));
+ memmove(ptr, data, v->size);
+ }
}
-BcStatus bc_vec_pushAt(BcVec *vec, void *data, size_t idx) {
+void bc_vec_string(BcVec *v, size_t len, const char *str) {
- BcStatus status;
- uint8_t *ptr;
+ bc_vec_npop(v, v->len);
+ bc_vec_expand(v, len + 1);
+ memcpy(v->v, str, len);
+ v->len = len;
- if (idx == vec->len) return bc_vec_push(vec, data);
- if (vec->len == vec->cap && (status = bc_vec_double(vec))) return status;
+ bc_vec_pushByte(v, '\0');
+}
- ptr = vec->array + vec->size * idx;
+void bc_vec_concat(BcVec *v, const char *str) {
- memmove(ptr + vec->size, ptr, vec->size * (vec->len++ - idx));
- memmove(ptr, data, vec->size);
+ size_t len;
- return BC_STATUS_SUCCESS;
-}
+ if (v->len == 0) bc_vec_pushByte(v, '\0');
-void* bc_vec_top(const BcVec *vec) {
- return vec->array + vec->size * (vec->len - 1);
-}
+ len = v->len + strlen(str);
-void* bc_vec_item(const BcVec *vec, size_t idx) {
- return vec->array + vec->size * idx;
-}
+ if (v->cap < len) bc_vec_grow(v, len - v->len);
+ strcat(v->v, str);
-void* bc_vec_item_rev(const BcVec *vec, size_t idx) {
- return vec->array + vec->size * (vec->len - idx - 1);
+ v->len = len;
}
-void bc_vec_pop(BcVec *vec) {
- vec->len -= 1;
- if (vec->dtor) vec->dtor(vec->array + (vec->size * vec->len));
+void* bc_vec_item(const BcVec *v, size_t idx) {
+ return v->v + v->size * idx;
}
-void bc_vec_npop(BcVec *vec, size_t n) {
- if (!vec->dtor) vec->len -= n;
- else {
- size_t len = vec->len - n;
- while (vec->len > len) bc_vec_pop(vec);
- }
+void* bc_vec_item_rev(const BcVec *v, size_t idx) {
+ return v->v + v->size * (v->len - idx - 1);
}
void bc_vec_free(void *vec) {
-
- size_t i;
- BcVec *s = (BcVec*) vec;
-
- if (!s) return;
-
- if (s->dtor) {
- for (i = 0; i < s->len; ++i) s->dtor(s->array + (i * s->size));
- }
-
- free(s->array);
- memset(s, 0, sizeof(BcVec));
+ BcVec *v = (BcVec*) vec;
+ bc_vec_npop(v, v->len);
+ free(v->v);
}
-size_t bc_veco_find(const BcVecO* vec, void *data) {
-
- size_t low, high;
+size_t bc_map_find(const BcVec *v, const void *ptr) {
- low = 0;
- high = vec->vec.len;
+ size_t low = 0, high = v->len;
while (low < high) {
size_t mid = (low + high) / 2;
- uint8_t *ptr = bc_vec_item(&vec->vec, mid);
- int result = vec->cmp(data, ptr);
-
- if (!result) return mid;
+ BcId *id = bc_vec_item(v, mid);
+ int result = bc_id_cmp(ptr, id);
- if (result < 0) high = mid;
+ if (result == 0) return mid;
+ else if (result < 0) high = mid;
else low = mid + 1;
}
return low;
}
-BcStatus bc_veco_init(BcVecO* vec, size_t esize,
- BcVecFreeFunc dtor, BcVecCmpFunc cmp)
-{
- vec->cmp = cmp;
- return bc_vec_init(&vec->vec, esize, dtor);
-}
+BcStatus bc_map_insert(BcVec *v, const void *ptr, size_t *i) {
-BcStatus bc_veco_insert(BcVecO* vec, void *data, size_t *idx) {
+ BcStatus s = BC_STATUS_SUCCESS;
- BcStatus status;
+ *i = bc_map_find(v, ptr);
- *idx = bc_veco_find(vec, data);
+ if (*i == v->len) bc_vec_push(v, ptr);
+ else if (!bc_id_cmp(ptr, bc_vec_item(v, *i))) s = BC_STATUS_VEC_ITEM_EXISTS;
+ else bc_vec_pushAt(v, ptr, *i);
- if (*idx > vec->vec.len) return BC_STATUS_VEC_OUT_OF_BOUNDS;
- if (*idx != vec->vec.len && !vec->cmp(data, bc_vec_item(&vec->vec, *idx)))
- return BC_STATUS_VEC_ITEM_EXISTS;
-
- if (*idx >= vec->vec.len) {
- *idx = vec->vec.len;
- status = bc_vec_push(&vec->vec, data);
- }
- else status = bc_vec_pushAt(&vec->vec, data, *idx);
-
- return status;
+ return s;
}
-size_t bc_veco_index(const BcVecO* v, void *data) {
- size_t i;
- i = bc_veco_find(v, data);
- if (i >= v->vec.len || v->cmp(data, bc_vec_item(&v->vec, i))) return -1;
- return i;
+size_t bc_map_index(const BcVec* v, const void *ptr) {
+ size_t i = bc_map_find(v, ptr);
+ if (i >= v->len) return ((size_t) -1);
+ return bc_id_cmp(ptr, bc_vec_item(v, i)) ? ((size_t) -1) : i;
}
-BcStatus bc_io_getline(char **buf, size_t *n) {
-
- char *temp;
- int c;
- size_t size, i;
+BcStatus bc_read_line(BcVec *vec, const char* prompt) {
- if (TT.tty && fputs(">>> ", stdout) == EOF) return BC_STATUS_IO_ERR;
+ int i;
+ signed char c = 0;
- for (i = 0, c = 0; c != '\n'; ++i) {
-
- if (i == *n) {
+ if (TT.ttyin && !(toys.optflags & FLAG_s)) {
+ bc_vm_puts(prompt, stderr);
+ bc_vm_fflush(stderr);
+ }
- size = *n * 2;
+ bc_vec_npop(vec, vec->len);
- if (size > (1 << 20) || !(temp = realloc(*buf, size + 1)))
- return BC_STATUS_MALLOC_FAIL;
+ while (c != '\n') {
- *buf = temp;
- *n = size;
- }
+ i = fgetc(stdin);
- if ((c = fgetc(stdin)) == EOF) {
+ if (i == EOF) {
if (errno == EINTR) {
TT.sigc = TT.sig;
TT.signe = 0;
- --i;
- fprintf(stderr, "%s", bc_program_ready_prompt);
- fflush(stderr);
-
- if (TT.tty && fputs(">>> ", stdout) == EOF) return BC_STATUS_IO_ERR;
+ if (TT.ttyin) {
+ bc_vm_puts(bc_program_ready_msg, stderr);
+ if (!(toys.optflags & FLAG_s)) bc_vm_puts(prompt, stderr);
+ bc_vm_fflush(stderr);
+ }
continue;
}
- else return BC_STATUS_IO_ERR;
+
+ return BC_STATUS_IO_ERR;
}
- else if (!c || (iscntrl(c) && !isspace(c)) || c > SCHAR_MAX)
- return BC_STATUS_BINARY_FILE;
- (*buf)[i] = c;
+ c = (signed char) i;
+ if (i > UCHAR_MAX || BC_READ_BIN_CHAR(c)) return BC_STATUS_BIN_FILE;
+ bc_vec_push(vec, &c);
}
- (*buf)[i] = '\0';
+ bc_vec_pushByte(vec, '\0');
return BC_STATUS_SUCCESS;
}
-BcStatus bc_io_fread(const char *path, char **buf) {
+BcStatus bc_read_file(const char *path, char **buf) {
- BcStatus st;
+ BcStatus s = BC_STATUS_IO_ERR;
FILE *f;
size_t size, read;
+ long res;
+ struct stat pstat;
- if (!(f = fopen(path, "r"))) return BC_STATUS_EXEC_FILE_ERR;
-
- fseek(f, 0, SEEK_END);
- size = ftell(f);
- fseek(f, 0, SEEK_SET);
+ f = fopen(path, "r");
+ if (!f) bc_vm_exit(BC_STATUS_EXEC_FILE_ERR);
+ if (fstat(fileno(f), &pstat) == -1) goto malloc_err;
- if (!(*buf = malloc(size + 1))) {
- st = BC_STATUS_MALLOC_FAIL;
+ if (S_ISDIR(pstat.st_mode)) {
+ s = BC_STATUS_PATH_IS_DIR;
goto malloc_err;
}
- if ((read = fread(*buf, 1, size, f)) != size) {
- st = BC_STATUS_IO_ERR;
- goto read_err;
- }
+ if (fseek(f, 0, SEEK_END) == -1) goto malloc_err;
+ res = ftell(f);
+ if (res < 0) goto malloc_err;
+ if (fseek(f, 0, SEEK_SET) == -1) goto malloc_err;
+
+ size = (size_t) res;
+ *buf = xmalloc(size + 1);
+
+ read = fread(*buf, 1, size, f);
+ if (read != size) goto read_err;
(*buf)[size] = '\0';
+ s = BC_STATUS_BIN_FILE;
+
+ for (read = 0; read < size; ++read) {
+ if (BC_READ_BIN_CHAR((*buf)[read])) goto read_err;
+ }
+
fclose(f);
return BC_STATUS_SUCCESS;
@@ -1086,55 +1081,72 @@ read_err:
free(*buf);
malloc_err:
fclose(f);
- return st;
+ return s;
}
-BcStatus bc_num_subArrays(BcDigit *n1, BcDigit *n2, size_t len) {
+void bc_num_setToZero(BcNum *n, size_t scale) {
+ n->len = 0;
+ n->neg = 0;
+ n->rdx = scale;
+}
+
+void bc_num_zero(BcNum *n) {
+ bc_num_setToZero(n, 0);
+}
+
+void bc_num_one(BcNum *n) {
+ bc_num_setToZero(n, 0);
+ n->len = 1;
+ n->num[0] = 1;
+}
+
+void bc_num_ten(BcNum *n) {
+ bc_num_setToZero(n, 0);
+ n->len = 2;
+ n->num[0] = 0;
+ n->num[1] = 1;
+}
+
+BcStatus bc_num_subArrays(BcDig *restrict a, BcDig *restrict b,size_t len) {
size_t i, j;
for (i = 0; !TT.signe && i < len; ++i) {
- for (n1[i] -= n2[i], j = 0; !TT.signe && n1[i + j] < 0;) {
- n1[i + j++] += 10;
- n1[i + j] -= 1;
+ for (a[i] -= b[i], j = 0; !TT.signe && a[i + j] < 0;) {
+ a[i + j++] += 10;
+ a[i + j] -= 1;
}
}
return TT.signe ? BC_STATUS_EXEC_SIGNAL : BC_STATUS_SUCCESS;
}
-ssize_t bc_num_compare(BcDigit *n1, BcDigit *n2, size_t len) {
+ssize_t bc_num_compare(BcDig *restrict a, BcDig *restrict b, size_t len) {
size_t i;
- BcDigit c;
- for (c = 0, i = len - 1; !TT.signe && !(c = n1[i] - n2[i]) && i < len; --i);
- return (c < 0 ? -1 : 1) * (ssize_t) (i + 1);
+ int c = 0;
+ for (i = len - 1; !TT.signe && i < len && !(c = a[i] - b[i]); --i);
+ return BC_NUM_NEG(i + 1, c < 0);
}
ssize_t bc_num_cmp(BcNum *a, BcNum *b) {
size_t i, min, a_int, b_int, diff;
- BcDigit *max_num, *min_num;
- int a_max;
- int cmp, neg;
-
- if (!a) return !b ? 0 : !b->neg * -2 + 1;
- else if (!b) return a->neg * -2 + 1;
-
- neg = 1;
+ BcDig *max_num, *min_num;
+ int a_max, neg = 0;
+ ssize_t cmp;
+ if (a == b) return 0;
+ if (a->len == 0) return BC_NUM_NEG(!!b->len, !b->neg);
+ if (b->len == 0) return BC_NUM_NEG(1, a->neg);
if (a->neg) {
- if (b->neg) neg = -1;
+ if (b->neg) neg = 1;
else return -1;
}
else if (b->neg) return 1;
- if (!a->len) return (!b->neg * -2 + 1) * !!b->len;
- else if (!b->len) return a->neg * -2 + 1;
-
- a_int = a->len - a->rdx;
- b_int = b->len - b->rdx;
+ a_int = BC_NUM_INT(a);
+ b_int = BC_NUM_INT(b);
a_int -= b_int;
+ a_max = (a->rdx > b->rdx);
- if (a_int) return a_int;
-
- a_max = a->rdx > b->rdx;
+ if (a_int) return (ssize_t) a_int;
if (a_max) {
min = b->rdx;
@@ -1150,10 +1162,10 @@ ssize_t bc_num_cmp(BcNum *a, BcNum *b) {
}
cmp = bc_num_compare(max_num, min_num, b_int + min);
- if (cmp) return cmp * (!a_max * -2 + 1) * neg;
+ if (cmp) return BC_NUM_NEG(cmp, (!a_max) != neg);
for (max_num -= diff, i = diff - 1; !TT.signe && i < diff; --i) {
- if (max_num[i]) return neg * (!a_max * -2 + 1);
+ if (max_num[i]) return BC_NUM_NEG(1, (!a_max) != neg);
}
return 0;
@@ -1161,67 +1173,116 @@ ssize_t bc_num_cmp(BcNum *a, BcNum *b) {
void bc_num_truncate(BcNum *n, size_t places) {
- BcDigit *ptr;
+ if (places == 0) return;
- if (!places) return;
-
- ptr = n->num + places;
- n->len -= places;
n->rdx -= places;
- memmove(n->num, ptr, n->len * sizeof(BcDigit));
- memset(n->num + n->len, 0, sizeof(BcDigit) * (n->cap - n->len));
+ if (n->len) {
+ n->len -= places;
+ memmove(n->num, n->num + places, n->len * sizeof(BcDig));
+ }
+}
+
+void bc_num_extend(BcNum *n, size_t places) {
+
+ size_t len = n->len + places;
+
+ if (places) {
+
+ if (n->cap < len) bc_num_expand(n, len);
+
+ memmove(n->num + places, n->num, sizeof(BcDig) * n->len);
+ memset(n->num, 0, sizeof(BcDig) * places);
+
+ n->len += places;
+ n->rdx += places;
+ }
}
-BcStatus bc_num_extend(BcNum *n, size_t places) {
+void bc_num_clean(BcNum *n) {
+ while (n->len > 0 && n->num[n->len - 1] == 0) --n->len;
+ if (n->len == 0) n->neg = 0;
+ else if (n->len < n->rdx) n->len = n->rdx;
+}
- BcStatus status;
- BcDigit *ptr;
- size_t len;
+void bc_num_retireMul(BcNum *n, size_t scale, int neg1, int neg2) {
+
+ if (n->rdx < scale) bc_num_extend(n, scale - n->rdx);
+ else bc_num_truncate(n, n->rdx - scale);
+
+ bc_num_clean(n);
+ if (n->len) n->neg = !neg1 != !neg2;
+}
+
+void bc_num_split(BcNum *restrict n, size_t idx, BcNum *restrict a,
+ BcNum *restrict b)
+{
+ if (idx < n->len) {
+
+ b->len = n->len - idx;
+ a->len = idx;
+ a->rdx = b->rdx = 0;
+
+ memcpy(b->num, n->num + idx, b->len * sizeof(BcDig));
+ memcpy(a->num, n->num, idx * sizeof(BcDig));
+ }
+ else {
+ bc_num_zero(b);
+ bc_num_copy(a, n);
+ }
+
+ bc_num_clean(a);
+ bc_num_clean(b);
+}
- if (!places) return BC_STATUS_SUCCESS;
+BcStatus bc_num_shift(BcNum *n, size_t places) {
- len = n->len + places;
- if (n->cap < len && (status = bc_num_expand(n, len))) return status;
+ if (places == 0 || n->len == 0) return BC_STATUS_SUCCESS;
+ if (places + n->len > BC_MAX_NUM) return BC_STATUS_EXEC_NUM_LEN;
- ptr = n->num + places;
- memmove(ptr, n->num, sizeof(BcDigit) * n->len);
- memset(n->num, 0, sizeof(BcDigit) * places);
+ if (n->rdx >= places) n->rdx -= places;
+ else {
+ bc_num_extend(n, places - n->rdx);
+ n->rdx = 0;
+ }
- n->len += places;
- n->rdx += places;
+ bc_num_clean(n);
return BC_STATUS_SUCCESS;
}
BcStatus bc_num_inv(BcNum *a, BcNum *b, size_t scale) {
- BcStatus status;
BcNum one;
+ BcDig num[2];
- if ((status = bc_num_init(&one, BC_NUM_DEF_SIZE))) return status;
-
+ one.cap = 2;
+ one.num = num;
bc_num_one(&one);
- status = bc_num_div(&one, a, b, scale);
- bc_num_free(&one);
- return status;
+ return bc_num_div(&one, a, b, scale);
}
-BcStatus bc_num_alg_a(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+BcStatus bc_num_a(BcNum *a, BcNum *b, BcNum *restrict c, size_t sub) {
- BcDigit *ptr, *ptr_a, *ptr_b, *ptr_c;
+ BcDig *ptr, *ptr_a, *ptr_b, *ptr_c;
size_t i, max, min_rdx, min_int, diff, a_int, b_int;
- BcDigit carry;
+ int carry, in;
- (void) scale;
+ // Because this function doesn't need to use scale (per the bc spec),
+ // I am hijacking it to say whether it's doing an add or a subtract.
- if (!a->len) return bc_num_copy(c, b);
- else if (!b->len) return bc_num_copy(c, a);
+ if (a->len == 0) {
+ bc_num_copy(c, b);
+ if (sub && c->len) c->neg = !c->neg;
+ return BC_STATUS_SUCCESS;
+ }
+ else if (b->len == 0) {
+ bc_num_copy(c, a);
+ return BC_STATUS_SUCCESS;
+ }
c->neg = a->neg;
- memset(c->num, 0, c->cap * sizeof(BcDigit));
-
c->rdx = maxof(a->rdx, b->rdx);
min_rdx = minof(a->rdx, b->rdx);
c->len = 0;
@@ -1242,8 +1303,8 @@ BcStatus bc_num_alg_a(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
for (ptr_c = c->num, i = 0; i < diff; ++i, ++c->len) ptr_c[i] = ptr[i];
ptr_c += diff;
- a_int = a->len - a->rdx;
- b_int = b->len - b->rdx;
+ a_int = BC_NUM_INT(a);
+ b_int = BC_NUM_INT(b);
if (a_int > b_int) {
min_int = b_int;
@@ -1257,42 +1318,42 @@ BcStatus bc_num_alg_a(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
}
for (carry = 0, i = 0; !TT.signe && i < min_rdx + min_int; ++i, ++c->len) {
- ptr_c[i] = ptr_a[i] + ptr_b[i] + carry;
- carry = ptr_c[i] / 10;
- ptr_c[i] %= 10;
+ in = ((int) ptr_a[i]) + ((int) ptr_b[i]) + carry;
+ carry = in / 10;
+ ptr_c[i] = (BcDig) (in % 10);
}
for (; !TT.signe && i < max + min_rdx; ++i, ++c->len) {
- ptr_c[i] += ptr[i] + carry;
- carry = ptr_c[i] / 10;
- ptr_c[i] %= 10;
+ in = ((int) ptr[i]) + carry;
+ carry = in / 10;
+ ptr_c[i] = (BcDig) (in % 10);
}
- if (TT.signe) return BC_STATUS_EXEC_SIGNAL;
-
- if (carry) c->num[c->len++] = carry;
+ if (carry) c->num[c->len++] = (BcDig) carry;
- return BC_STATUS_SUCCESS;
+ return TT.signe ? BC_STATUS_EXEC_SIGNAL : BC_STATUS_SUCCESS;
}
-BcStatus bc_num_alg_s(BcNum *a, BcNum *b, BcNum *c, size_t sub) {
+BcStatus bc_num_s(BcNum *a, BcNum *b, BcNum *restrict c, size_t sub) {
- BcStatus status;
- int cmp;
+ BcStatus s;
+ ssize_t cmp;
BcNum *minuend, *subtrahend;
size_t start;
int aneg, bneg, neg;
// Because this function doesn't need to use scale (per the bc spec),
- // I am hijacking it to tell this function whether it is doing an add
- // or a subtract.
+ // I am hijacking it to say whether it's doing an add or a subtract.
- if (!a->len) {
- status = bc_num_copy(c, b);
- c->neg = !b->neg;
- return status;
+ if (a->len == 0) {
+ bc_num_copy(c, b);
+ if (sub && c->len) c->neg = !c->neg;
+ return BC_STATUS_SUCCESS;
+ }
+ else if (b->len == 0) {
+ bc_num_copy(c, a);
+ return BC_STATUS_SUCCESS;
}
- else if (!b->len) return bc_num_copy(c, a);
aneg = a->neg;
bneg = b->neg;
@@ -1303,213 +1364,293 @@ BcStatus bc_num_alg_s(BcNum *a, BcNum *b, BcNum *c, size_t sub) {
a->neg = aneg;
b->neg = bneg;
- if (!cmp) {
- bc_num_zero(c);
+ if (cmp == 0) {
+ bc_num_setToZero(c, maxof(a->rdx, b->rdx));
return BC_STATUS_SUCCESS;
}
else if (cmp > 0) {
- neg = sub && a->neg;
+ neg = a->neg;
minuend = a;
subtrahend = b;
}
else {
- neg = sub && !b->neg;
+ neg = b->neg;
+ if (sub) neg = !neg;
minuend = b;
subtrahend = a;
}
- if ((status = bc_num_copy(c, minuend))) return status;
+ bc_num_copy(c, minuend);
c->neg = neg;
if (c->rdx < subtrahend->rdx) {
- if ((status = bc_num_extend(c, subtrahend->rdx - c->rdx))) return status;
+ bc_num_extend(c, subtrahend->rdx - c->rdx);
start = 0;
}
else start = c->rdx - subtrahend->rdx;
- status = bc_num_subArrays(c->num + start, subtrahend->num, subtrahend->len);
+ s = bc_num_subArrays(c->num + start, subtrahend->num, subtrahend->len);
- while (c->len > c->rdx && !c->num[c->len - 1]) --c->len;
+ bc_num_clean(c);
- return status;
+ return s;
}
-BcStatus bc_num_alg_m(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+BcStatus bc_num_k(BcNum *restrict a, BcNum *restrict b, BcNum *restrict c) {
- BcStatus status;
- BcDigit carry;
- size_t i, j, len;
+ BcStatus s;
+ int carry;
+ size_t i, j, len, max = maxof(a->len, b->len), max2 = (max + 1) / 2;
+ BcNum l1, h1, l2, h2, m2, m1, z0, z1, z2, temp;
+ int aone = BC_NUM_ONE(a);
- if (!a->len || !b->len) {
+ if (TT.signe) return BC_STATUS_EXEC_SIGNAL;
+ if (a->len == 0 || b->len == 0) {
bc_num_zero(c);
return BC_STATUS_SUCCESS;
}
- else if (BC_NUM_ONE(a)) {
- status = bc_num_copy(c, b);
- if (a->neg) c->neg = !c->neg;
- return status;
- }
- else if (BC_NUM_ONE(b)) {
- status = bc_num_copy(c, a);
- if (b->neg) c->neg = !c->neg;
- return status;
+ else if (aone || BC_NUM_ONE(b)) {
+ bc_num_copy(c, aone ? b : a);
+ return BC_STATUS_SUCCESS;
}
- scale = maxof(scale, a->rdx);
- scale = maxof(scale, b->rdx);
- c->rdx = a->rdx + b->rdx;
-
- memset(c->num, 0, sizeof(BcDigit) * c->cap);
- c->len = carry = len = 0;
+ if (a->len + b->len < BC_NUM_KARATSUBA_LEN ||
+ a->len < BC_NUM_KARATSUBA_LEN || b->len < BC_NUM_KARATSUBA_LEN)
+ {
+ bc_num_expand(c, a->len + b->len + 1);
- for (i = 0; !TT.signe && i < b->len; ++i) {
+ memset(c->num, 0, sizeof(BcDig) * c->cap);
+ c->len = carry = len = 0;
- for (j = 0; !TT.signe && j < a->len; ++j) {
- c->num[i + j] += a->num[j] * b->num[i] + carry;
- carry = c->num[i + j] / 10;
- c->num[i + j] %= 10;
- }
+ for (i = 0; !TT.signe && i < b->len; ++i) {
- if (TT.signe) return BC_STATUS_EXEC_SIGNAL;
+ for (j = 0; !TT.signe && j < a->len; ++j) {
+ int in = (int) c->num[i + j];
+ in += ((int) a->num[j]) * ((int) b->num[i]) + carry;
+ carry = in / 10;
+ c->num[i + j] = (BcDig) (in % 10);
+ }
- if (carry) {
- c->num[i + j] += carry;
+ c->num[i + j] += (BcDig) carry;
+ len = maxof(len, i + j + !!carry);
carry = 0;
- len = maxof(len, i + j + 1);
}
- else len = maxof(len, i + j);
- }
- if (TT.signe) return BC_STATUS_EXEC_SIGNAL;
+ c->len = len;
+
+ return TT.signe ? BC_STATUS_EXEC_SIGNAL : BC_STATUS_SUCCESS;
+ }
+
+ bc_num_init(&l1, max);
+ bc_num_init(&h1, max);
+ bc_num_init(&l2, max);
+ bc_num_init(&h2, max);
+ bc_num_init(&m1, max);
+ bc_num_init(&m2, max);
+ bc_num_init(&z0, max);
+ bc_num_init(&z1, max);
+ bc_num_init(&z2, max);
+ bc_num_init(&temp, max + max);
+
+ bc_num_split(a, max2, &l1, &h1);
+ bc_num_split(b, max2, &l2, &h2);
+
+ s = bc_num_add(&h1, &l1, &m1, 0);
+ if (s) goto err;
+ s = bc_num_add(&h2, &l2, &m2, 0);
+ if (s) goto err;
+
+ s = bc_num_k(&h1, &h2, &z0);
+ if (s) goto err;
+ s = bc_num_k(&m1, &m2, &z1);
+ if (s) goto err;
+ s = bc_num_k(&l1, &l2, &z2);
+ if (s) goto err;
+
+ s = bc_num_sub(&z1, &z0, &temp, 0);
+ if (s) goto err;
+ s = bc_num_sub(&temp, &z2, &z1, 0);
+ if (s) goto err;
+
+ s = bc_num_shift(&z0, max2 * 2);
+ if (s) goto err;
+ s = bc_num_shift(&z1, max2);
+ if (s) goto err;
+ s = bc_num_add(&z0, &z1, &temp, 0);
+ if (s) goto err;
+ s = bc_num_add(&temp, &z2, c, 0);
- c->len = maxof(len, c->rdx);
- c->neg = !a->neg != !b->neg;
+err:
+ bc_num_free(&temp);
+ bc_num_free(&z2);
+ bc_num_free(&z1);
+ bc_num_free(&z0);
+ bc_num_free(&m2);
+ bc_num_free(&m1);
+ bc_num_free(&h2);
+ bc_num_free(&l2);
+ bc_num_free(&h1);
+ bc_num_free(&l1);
+ return s;
+}
- if (scale < c->rdx) bc_num_truncate(c, c->rdx - scale);
- while (c->len > c->rdx && !c->num[c->len - 1]) --c->len;
+BcStatus bc_num_m(BcNum *a, BcNum *b, BcNum *restrict c, size_t scale) {
- return BC_STATUS_SUCCESS;
-}
+ BcStatus s;
+ BcNum cpa, cpb;
+ size_t maxrdx = maxof(a->rdx, b->rdx);
-BcStatus bc_num_alg_d(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ scale = maxof(scale, a->rdx);
+ scale = maxof(scale, b->rdx);
+ scale = minof(a->rdx + b->rdx, scale);
+ maxrdx = maxof(maxrdx, scale);
- BcStatus status;
- BcDigit *ptr, *bptr, q;
- size_t len, end, i;
- BcNum copy;
- int zero;
+ bc_num_init(&cpa, a->len);
+ bc_num_init(&cpb, b->len);
- if (!b->len) return BC_STATUS_MATH_DIVIDE_BY_ZERO;
- else if (!a->len) {
- bc_num_zero(c);
- return BC_STATUS_SUCCESS;
- }
- else if (BC_NUM_ONE(b)) {
+ bc_num_copy(&cpa, a);
+ bc_num_copy(&cpb, b);
+ cpa.neg = cpb.neg = 0;
- if ((status = bc_num_copy(c, a))) return status;
- if (b->neg) c->neg = !c->neg;
+ s = bc_num_shift(&cpa, maxrdx);
+ if (s) goto err;
+ s = bc_num_shift(&cpb, maxrdx);
+ if (s) goto err;
+ s = bc_num_k(&cpa, &cpb, c);
+ if (s) goto err;
- if (c->rdx < scale) status = bc_num_extend(c, scale - c->rdx);
- else bc_num_truncate(c, c->rdx - scale);
+ maxrdx += scale;
+ bc_num_expand(c, c->len + maxrdx);
- return status;
+ if (c->len < maxrdx) {
+ memset(c->num + c->len, 0, (c->cap - c->len) * sizeof(BcDig));
+ c->len += maxrdx;
}
- if ((status = bc_num_init(&copy, a->len + b->rdx + scale + 1))) return status;
- if ((status = bc_num_copy(&copy, a))) goto err;
+ c->rdx = maxrdx;
+ bc_num_retireMul(c, scale, a->neg, b->neg);
+
+err:
+ bc_num_free(&cpb);
+ bc_num_free(&cpa);
+ return s;
+}
+
+BcStatus bc_num_d(BcNum *a, BcNum *b, BcNum *restrict c, size_t scale) {
+
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcDig *n, *p, q;
+ size_t len, end, i;
+ BcNum cp;
+ int zero = 1;
- if ((len = b->len) > copy.len) {
- if ((status = bc_num_expand(&copy, len + 2))) goto err;
- if ((status = bc_num_extend(&copy, len - copy.len))) goto err;
+ if (b->len == 0) return BC_STATUS_MATH_DIVIDE_BY_ZERO;
+ else if (a->len == 0) {
+ bc_num_setToZero(c, scale);
+ return BC_STATUS_SUCCESS;
+ }
+ else if (BC_NUM_ONE(b)) {
+ bc_num_copy(c, a);
+ bc_num_retireMul(c, scale, a->neg, b->neg);
+ return BC_STATUS_SUCCESS;
}
- if (b->rdx > copy.rdx && (status = bc_num_extend(&copy, b->rdx - copy.rdx)))
- goto err;
+ bc_num_init(&cp, BC_NUM_MREQ(a, b, scale));
+ bc_num_copy(&cp, a);
+ len = b->len;
- copy.rdx -= b->rdx;
+ if (len > cp.len) {
+ bc_num_expand(&cp, len + 2);
+ bc_num_extend(&cp, len - cp.len);
+ }
- if (scale > copy.rdx && (status = bc_num_extend(&copy, scale - copy.rdx)))
- goto err;
+ if (b->rdx > cp.rdx) bc_num_extend(&cp, b->rdx - cp.rdx);
+ cp.rdx -= b->rdx;
+ if (scale > cp.rdx) bc_num_extend(&cp, scale - cp.rdx);
if (b->rdx == b->len) {
- int zero;
- for (zero = 1, i = 0; zero && i < len; ++i) zero = !b->num[len - i - 1];
- if (i == len) return BC_STATUS_MATH_DIVIDE_BY_ZERO;
+ for (i = 0; zero && i < len; ++i) zero = !b->num[len - i - 1];
len -= i - 1;
}
- if (copy.cap == copy.len && (status = bc_num_expand(&copy, copy.len + 1)))
- goto err;
+ if (cp.cap == cp.len) bc_num_expand(&cp, cp.len + 1);
// We want an extra zero in front to make things simpler.
- copy.num[copy.len++] = 0;
- end = copy.len - len;
+ cp.num[cp.len++] = 0;
+ end = cp.len - len;
- if ((status = bc_num_expand(c, copy.len))) goto err;
+ bc_num_expand(c, cp.len);
bc_num_zero(c);
- c->rdx = copy.rdx;
- c->len = copy.len;
- bptr = b->num;
-
- for (i = end - 1; !TT.signe && i < end; --i) {
-
- ptr = copy.num + i;
-
- q = 0;
- for (; (!status && ptr[len]) || bc_num_compare(ptr, bptr, len) >= 0; ++q)
- status = bc_num_subArrays(ptr, bptr, len);
-
+ memset(c->num + end, 0, (c->cap - end) * sizeof(BcDig));
+ c->rdx = cp.rdx;
+ c->len = cp.len;
+ p = b->num;
+
+ for (i = end - 1; !TT.signe && !s && i < end; --i) {
+ n = cp.num + i;
+ for (q = 0; (!s && n[len]) || bc_num_compare(n, p, len) >= 0; ++q)
+ s = bc_num_subArrays(n, p, len);
c->num[i] = q;
}
- if (status) goto err;
-
- c->neg = !a->neg != !b->neg;
- while (c->len > c->rdx && !c->num[c->len - 1]) --c->len;
- if (c->rdx > scale) bc_num_truncate(c, c->rdx - scale);
-
- for (i = 0, zero = 1; zero && i < c->len; ++i) zero = !c->num[i];
- if (zero) bc_num_zero(c);
+ if (!s) bc_num_retireMul(c, scale, a->neg, b->neg);
+ bc_num_free(&cp);
-err:
- bc_num_free(&copy);
- return status;
+ return s;
}
-BcStatus bc_num_alg_mod(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
-
- BcStatus status;
- BcNum c1, c2;
- size_t len;
+BcStatus bc_num_r(BcNum *a, BcNum *b, BcNum *restrict c,
+ BcNum *restrict d, size_t scale, size_t ts)
+{
+ BcStatus s;
+ BcNum temp;
+ int neg;
- if (!b->len) return BC_STATUS_MATH_DIVIDE_BY_ZERO;
+ if (b->len == 0) return BC_STATUS_MATH_DIVIDE_BY_ZERO;
- if (!a->len) {
- bc_num_zero(c);
+ if (a->len == 0) {
+ bc_num_setToZero(d, ts);
return BC_STATUS_SUCCESS;
}
- len = a->len + b->len + scale;
+ bc_num_init(&temp, d->cap);
+ bc_num_d(a, b, c, scale);
+
+ if (scale) scale = ts;
+
+ s = bc_num_m(c, b, &temp, scale);
+ if (s) goto err;
+ s = bc_num_sub(a, &temp, d, scale);
+ if (s) goto err;
- if ((status = bc_num_init(&c1, len))) return status;
- if ((status = bc_num_init(&c2, len))) goto c2_err;
- if ((status = bc_num_div(a, b, &c1, scale))) goto err;
+ if (ts > d->rdx && d->len) bc_num_extend(d, ts - d->rdx);
- c->rdx = maxof(scale + b->rdx, a->rdx);
- if ((status = bc_num_mul(&c1, b, &c2, scale))) goto err;
- status = bc_num_sub(a, &c2, c, scale);
+ neg = d->neg;
+ bc_num_retireMul(d, ts, a->neg, b->neg);
+ d->neg = neg;
err:
- bc_num_free(&c2);
-c2_err:
+ bc_num_free(&temp);
+ return s;
+}
+
+BcStatus bc_num_rem(BcNum *a, BcNum *b, BcNum *restrict c, size_t scale) {
+
+ BcStatus s;
+ BcNum c1;
+ size_t ts = maxof(scale + b->rdx, a->rdx), len = BC_NUM_MREQ(a, b, ts);
+
+ bc_num_init(&c1, len);
+ s = bc_num_r(a, b, &c1, c, scale, ts);
bc_num_free(&c1);
- return status;
+
+ return s;
}
-BcStatus bc_num_alg_p(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+BcStatus bc_num_p(BcNum *a, BcNum *b, BcNum *restrict c, size_t scale) {
- BcStatus status;
+ BcStatus s = BC_STATUS_SUCCESS;
BcNum copy;
unsigned long pow;
size_t i, powrdx, resrdx;
@@ -1517,28 +1658,28 @@ BcStatus bc_num_alg_p(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
if (b->rdx) return BC_STATUS_MATH_NON_INTEGER;
- if (!b->len) {
+ if (b->len == 0) {
bc_num_one(c);
return BC_STATUS_SUCCESS;
}
- else if (!a->len) {
- bc_num_zero(c);
+ else if (a->len == 0) {
+ bc_num_setToZero(c, scale);
return BC_STATUS_SUCCESS;
}
else if (BC_NUM_ONE(b)) {
-
- if (!b->neg) status = bc_num_copy(c, a);
- else status = bc_num_inv(a, c, scale);
-
- return status;
+ if (!b->neg) bc_num_copy(c, a);
+ else s = bc_num_inv(a, c, scale);
+ return s;
}
neg = b->neg;
b->neg = 0;
- if ((status = bc_num_ulong(b, &pow))) return status;
- if ((status = bc_num_init(&copy, a->len))) return status;
- if ((status = bc_num_copy(&copy, a))) goto err;
+ s = bc_num_ulong(b, &pow);
+ if (s) return s;
+
+ bc_num_init(&copy, a->len);
+ bc_num_copy(&copy, a);
if (!neg) scale = minof(a->rdx * pow, maxof(scale, a->rdx));
@@ -1546,100 +1687,100 @@ BcStatus bc_num_alg_p(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
for (powrdx = a->rdx; !TT.signe && !(pow & 1); pow >>= 1) {
powrdx <<= 1;
- if ((status = bc_num_mul(&copy, &copy, &copy, powrdx))) goto err;
+ s = bc_num_mul(&copy, &copy, &copy, powrdx);
+ if (s) goto err;
}
- if ((status = bc_num_copy(c, &copy))) goto err;
if (TT.signe) {
- status = BC_STATUS_EXEC_SIGNAL;
+ s = BC_STATUS_EXEC_SIGNAL;
goto err;
}
- resrdx = powrdx;
+ bc_num_copy(c, &copy);
- for (pow >>= 1; !TT.signe && pow != 0; pow >>= 1) {
+ for (resrdx = powrdx, pow >>= 1; !TT.signe && pow; pow >>= 1) {
powrdx <<= 1;
-
- if ((status = bc_num_mul(&copy, &copy, &copy, powrdx))) goto err;
+ s = bc_num_mul(&copy, &copy, &copy, powrdx);
+ if (s) goto err;
if (pow & 1) {
resrdx += powrdx;
- if ((status = bc_num_mul(c, &copy, c, resrdx))) goto err;
+ s = bc_num_mul(c, &copy, c, resrdx);
+ if (s) goto err;
}
}
- if (neg && (status = bc_num_inv(c, c, scale))) goto err;
+ if (neg) {
+ s = bc_num_inv(c, c, scale);
+ if (s) goto err;
+ }
+
if (TT.signe) {
- status = BC_STATUS_EXEC_SIGNAL;
+ s = BC_STATUS_EXEC_SIGNAL;
goto err;
}
if (c->rdx > scale) bc_num_truncate(c, c->rdx - scale);
+ // We can't use bc_num_clean() here.
for (zero = 1, i = 0; zero && i < c->len; ++i) zero = !c->num[i];
- if (zero) bc_num_zero(c);
+ if (zero) bc_num_setToZero(c, scale);
err:
bc_num_free(&copy);
- return status;
+ return s;
}
-BcStatus bc_num_binary(BcNum *a, BcNum *b, BcNum *c, size_t scale,
- BcNumBinaryFunc op, size_t req)
+BcStatus bc_num_binary(BcNum *a, BcNum *b, BcNum *c, size_t scale,
+ BcNumBinaryOp op, size_t req)
{
- BcStatus status;
+ BcStatus s;
BcNum num2, *ptr_a, *ptr_b;
int init = 0;
if (c == a) {
- memcpy(&num2, c, sizeof(BcNum));
ptr_a = &num2;
+ memcpy(ptr_a, c, sizeof(BcNum));
init = 1;
}
else ptr_a = a;
if (c == b) {
-
- if (c == a) {
- ptr_b = ptr_a;
- }
- else {
- memcpy(&num2, c, sizeof(BcNum));
- ptr_b = &num2;
+ ptr_b = &num2;
+ if (c != a) {
+ memcpy(ptr_b, c, sizeof(BcNum));
init = 1;
}
}
else ptr_b = b;
- if (init) status = bc_num_init(c, req);
- else status = bc_num_expand(c, req);
+ if (init) bc_num_init(c, req);
+ else bc_num_expand(c, req);
- if (status) goto err;
- status = op(ptr_a, ptr_b, c, scale);
+ s = op(ptr_a, ptr_b, c, scale);
-err:
- if (c == a || c == b) bc_num_free(&num2);
- return status;
+ if (init) bc_num_free(&num2);
+
+ return s;
}
int bc_num_strValid(const char *val, size_t base) {
- size_t len, i;
- BcDigit c, b;
- int small, radix;
-
- radix = 0;
- len = strlen(val);
+ BcDig b;
+ int small, radix = 0;
+ size_t i, len = strlen(val);
if (!len) return 1;
small = base <= 10;
- b = small ? base + '0' : base - 9 + 'A';
+ b = (BcDig) (small ? base + '0' : base - 10 + 'A');
for (i = 0; i < len; ++i) {
- if ((c = val[i]) == '.') {
+ BcDig c = val[i];
+
+ if (c == '.') {
if (radix) return 0;
@@ -1654,9 +1795,8 @@ int bc_num_strValid(const char *val, size_t base) {
return 1;
}
-BcStatus bc_num_parseDecimal(BcNum *n, const char *val) {
+void bc_num_parseDecimal(BcNum *n, const char *val) {
- BcStatus status;
size_t len, i;
const char *ptr;
int zero = 1;
@@ -1669,75 +1809,85 @@ BcStatus bc_num_parseDecimal(BcNum *n, const char *val) {
if (len) {
for (i = 0; zero && i < len; ++i) zero = val[i] == '0' || val[i] == '.';
- if ((status = bc_num_expand(n, len))) return status;
- }
-
- if (zero) {
- memset(n->num, 0, sizeof(BcDigit) * n->cap);
- n->neg = 0;
- return BC_STATUS_SUCCESS;
+ bc_num_expand(n, len);
}
ptr = strchr(val, '.');
// Explicitly test for NULL here to produce either a 0 or 1.
- n->rdx = (ptr != NULL) * ((val + len) - (ptr + 1));
-
- for (i = len - 1; i < len; ++n->len, i -= 1 + (i && val[i - 1] == '.'))
- n->num[n->len] = val[i] - '0';
+ n->rdx = (size_t) ((ptr != NULL) * ((val + len) - (ptr + 1)));
- return BC_STATUS_SUCCESS;
+ if (!zero) {
+ for (i = len - 1; i < len; ++n->len, i -= 1 + (i && val[i - 1] == '.'))
+ n->num[n->len] = val[i] - '0';
+ }
}
-BcStatus bc_num_parseBase(BcNum *n, const char *val, BcNum *base) {
+void bc_num_parseBase(BcNum *n, const char *val, BcNum *base) {
- BcStatus status;
+ BcStatus s;
BcNum temp, mult, result;
- size_t i, len, digits;
- BcDigit c;
- int zero;
+ BcDig c = '\0';
+ int zero = 1;
unsigned long v;
+ size_t i, digits, len = strlen(val);
- len = strlen(val);
bc_num_zero(n);
- for (zero = 1, i = 0; zero && i < len; ++i)
- zero = (val[i] == '.' || val[i] == '0');
- if (zero) return BC_STATUS_SUCCESS;
+ for (i = 0; zero && i < len; ++i) zero = (val[i] == '.' || val[i] == '0');
+ if (zero) return;
+
+ bc_num_init(&temp, BC_NUM_DEF_SIZE);
+ bc_num_init(&mult, BC_NUM_DEF_SIZE);
- if ((status = bc_num_init(&temp, BC_NUM_DEF_SIZE))) return status;
- if ((status = bc_num_init(&mult, BC_NUM_DEF_SIZE))) goto mult_err;
+ for (i = 0; i < len; ++i) {
- for (i = 0; i < len && (c = val[i]) != '.'; ++i) {
+ c = val[i];
+ if (c == '.') break;
- v = c <= '9' ? c - '0' : c - 'A' + 10;
+ v = (unsigned long) (c <= '9' ? c - '0' : c - 'A' + 10);
- if ((status = bc_num_mul(n, base, &mult, 0))) goto int_err;
- if ((status = bc_num_ulong2num(&temp, v))) goto int_err;
- if ((status = bc_num_add(&mult, &temp, n, 0))) goto int_err;
+ s = bc_num_mul(n, base, &mult, 0);
+ if (s) goto int_err;
+ s = bc_num_ulong2num(&temp, v);
+ if (s) goto int_err;
+ s = bc_num_add(&mult, &temp, n, 0);
+ if (s) goto int_err;
}
- if (i == len && !(c = val[i])) goto int_err;
- if ((status = bc_num_init(&result, base->len))) goto int_err;
+ if (i == len) {
+ c = val[i];
+ if (c == 0) goto int_err;
+ }
+ bc_num_init(&result, base->len);
bc_num_zero(&result);
bc_num_one(&mult);
- for (i += 1, digits = 0; i < len && (c = val[i]); ++i, ++digits) {
+ for (i += 1, digits = 0; i < len; ++i, ++digits) {
+
+ c = val[i];
+ if (c == 0) break;
- v = c <= '9' ? c - '0' : c - 'A' + 10;
+ v = (unsigned long) (c <= '9' ? c - '0' : c - 'A' + 10);
- if ((status = bc_num_mul(&result, base, &result, 0))) goto err;
- if ((status = bc_num_ulong2num(&temp, v))) goto err;
- if ((status = bc_num_add(&result, &temp, &result, 0))) goto err;
- if ((status = bc_num_mul(&mult, base, &mult, 0))) goto err;
+ s = bc_num_mul(&result, base, &result, 0);
+ if (s) goto err;
+ s = bc_num_ulong2num(&temp, v);
+ if (s) goto err;
+ s = bc_num_add(&result, &temp, &result, 0);
+ if (s) goto err;
+ s = bc_num_mul(&mult, base, &mult, 0);
+ if (s) goto err;
}
- if ((status = bc_num_div(&result, &mult, &result, digits))) goto err;
- if ((status = bc_num_add(n, &result, n, digits))) goto err;
+ s = bc_num_div(&result, &mult, &result, digits);
+ if (s) goto err;
+ s = bc_num_add(n, &result, n, digits);
+ if (s) goto err;
if (n->len) {
- if (n->rdx < digits && n->len) status = bc_num_extend(n, digits - n->rdx);
+ if (n->rdx < digits) bc_num_extend(n, digits - n->rdx);
}
else bc_num_zero(n);
@@ -1745,261 +1895,233 @@ err:
bc_num_free(&result);
int_err:
bc_num_free(&mult);
-mult_err:
bc_num_free(&temp);
- return status;
}
-BcStatus bc_num_printDigits(size_t num, size_t width, int radix,
- size_t *nchars, size_t line_len)
-{
- size_t exp, pow, div;
-
+void bc_num_printNewline(size_t *nchars, size_t line_len) {
if (*nchars == line_len - 1) {
- if (putchar('\\') == EOF) return BC_STATUS_IO_ERR;
- if (putchar('\n') == EOF) return BC_STATUS_IO_ERR;
+ bc_vm_putchar('\\');
+ bc_vm_putchar('\n');
*nchars = 0;
}
+}
- if (*nchars || radix) {
- if (putchar(radix ? '.' : ' ') == EOF) return BC_STATUS_IO_ERR;
- ++(*nchars);
- }
+void bc_num_printDigits(size_t num, size_t width, int radix,
+ size_t *nchars, size_t line_len)
+{
+ size_t exp, pow, div;
+
+ bc_num_printNewline(nchars, line_len);
+ bc_vm_putchar(radix ? '.' : ' ');
+ ++(*nchars);
+ bc_num_printNewline(nchars, line_len);
for (exp = 0, pow = 1; exp < width - 1; ++exp, pow *= 10);
for (exp = 0; exp < width; pow /= 10, ++(*nchars), ++exp) {
-
- if (*nchars == line_len - 1) {
- if (putchar('\\') == EOF) return BC_STATUS_IO_ERR;
- if (putchar('\n') == EOF) return BC_STATUS_IO_ERR;
- *nchars = 0;
- }
-
+ bc_num_printNewline(nchars, line_len);
div = num / pow;
num -= div * pow;
-
- if (putchar(((char) div) + '0') == EOF) return BC_STATUS_IO_ERR;
+ bc_vm_putchar(((char) div) + '0');
}
-
- return BC_STATUS_SUCCESS;
}
-BcStatus bc_num_printHex(size_t num, size_t width, int radix,
- size_t *nchars, size_t line_len)
+void bc_num_printHex(size_t num, size_t width, int radix,
+ size_t *nchars, size_t line_len)
{
- width += !!radix;
- if (*nchars + width >= line_len) {
- if (putchar('\\') == EOF) return BC_STATUS_IO_ERR;
- if (putchar('\n') == EOF) return BC_STATUS_IO_ERR;
- *nchars = 0;
- }
- if (radix && putchar('.') == EOF) return BC_STATUS_IO_ERR;
- if (putchar(bc_num_hex_digits[num]) == EOF) return BC_STATUS_IO_ERR;
+ if (radix) {
+ bc_num_printNewline(nchars, line_len);
+ bc_vm_putchar('.');
+ *nchars += 1;
+ }
+ bc_num_printNewline(nchars, line_len);
+ bc_vm_putchar(bc_num_hex_digits[num]);
*nchars = *nchars + width;
-
- return BC_STATUS_SUCCESS;
}
-BcStatus bc_num_printDecimal(BcNum *n, size_t *nchars, size_t line_len) {
+void bc_num_printDecimal(BcNum *n, size_t *nchars, size_t len) {
- BcStatus status;
- size_t i;
+ size_t i, rdx = n->rdx - 1;
- if (n->neg) {
- if (putchar('-') == EOF) return BC_STATUS_IO_ERR;
- ++(*nchars);
- }
+ if (n->neg) bc_vm_putchar('-');
+ (*nchars) += n->neg;
- status = BC_STATUS_SUCCESS;
-
- for (i = n->len - 1; !status && i < n->len; --i)
- status = bc_num_printHex(n->num[i], 1, i == n->rdx - 1, nchars, line_len);
-
- return status;
+ for (i = n->len - 1; i < n->len; --i)
+ bc_num_printHex((size_t) n->num[i], 1, i == rdx, nchars, len);
}
-BcStatus bc_num_printBase(BcNum *n, BcNum *base, size_t base_t,
- size_t *nchars, size_t line_len)
+BcStatus bc_num_printNum(BcNum *n, BcNum *base, size_t width, size_t *nchars,
+ size_t len, BcNumDigitOp print)
{
- BcStatus status;
+ BcStatus s;
BcVec stack;
BcNum intp, fracp, digit, frac_len;
- size_t width, i;
- BcNumDigitFunc print;
unsigned long dig, *ptr;
- int neg, radix;
-
- neg = n->neg;
- n->neg = 0;
-
- if (neg && putchar('-') == EOF) return BC_STATUS_IO_ERR;
- nchars += neg;
+ size_t i;
+ int radix;
- if (base_t <= BC_NUM_MAX_INPUT_BASE) {
- width = 1;
- print = bc_num_printHex;
- }
- else {
- width = (size_t) floor(log10((double) (base_t - 1)) + 1.0);
- print = bc_num_printDigits;
+ if (n->len == 0) {
+ print(0, width, 0, nchars, len);
+ return BC_STATUS_SUCCESS;
}
- if ((status = bc_vec_init(&stack, sizeof(long), NULL))) return status;
- if ((status = bc_num_init(&intp, n->len))) goto int_err;
- if ((status = bc_num_init(&fracp, n->rdx))) goto frac_err;
- if ((status = bc_num_init(&digit, width))) goto digit_err;
- if ((status = bc_num_copy(&intp, n))) goto frac_len_err;
+ bc_vec_init(&stack, sizeof(long), NULL);
+ bc_num_init(&intp, n->len);
+ bc_num_init(&fracp, n->rdx);
+ bc_num_init(&digit, width);
+ bc_num_init(&frac_len, BC_NUM_INT(n));
+ bc_num_copy(&intp, n);
+ bc_num_one(&frac_len);
bc_num_truncate(&intp, intp.rdx);
- if ((status = bc_num_sub(n, &intp, &fracp, 0))) goto frac_len_err;
+ s = bc_num_sub(n, &intp, &fracp, 0);
+ if (s) goto err;
while (intp.len) {
- if ((status = bc_num_mod(&intp, base, &digit, 0))) goto frac_len_err;
- if ((status = bc_num_ulong(&digit, &dig))) goto frac_len_err;
- if ((status = bc_vec_push(&stack, &dig))) goto frac_len_err;
- if ((status = bc_num_div(&intp, base, &intp, 0))) goto frac_len_err;
+ s = bc_num_divmod(&intp, base, &intp, &digit, 0);
+ if (s) goto err;
+ s = bc_num_ulong(&digit, &dig);
+ if (s) goto err;
+ bc_vec_push(&stack, &dig);
}
for (i = 0; i < stack.len; ++i) {
ptr = bc_vec_item_rev(&stack, i);
- status = print(*ptr, width, 0, nchars, line_len);
- if (status) goto frac_len_err;
+ print(*ptr, width, 0, nchars, len);
}
- if (!n->rdx || (status = bc_num_init(&frac_len, n->len - n->rdx)))
- goto frac_len_err;
-
- bc_num_one(&frac_len);
+ if (!n->rdx) goto err;
for (radix = 1; frac_len.len <= n->rdx; radix = 0) {
- if ((status = bc_num_mul(&fracp, base, &fracp, n->rdx))) goto err;
- if ((status = bc_num_ulong(&fracp, &dig))) goto err;
- if ((status = bc_num_ulong2num(&intp, dig))) goto err;
- if ((status = bc_num_sub(&fracp, &intp, &fracp, 0))) goto err;
- if ((status = print(dig, width, radix, nchars, line_len))) goto err;
- if ((status = bc_num_mul(&frac_len, base, &frac_len, 0))) goto err;
+ s = bc_num_mul(&fracp, base, &fracp, n->rdx);
+ if (s) goto err;
+ s = bc_num_ulong(&fracp, &dig);
+ if (s) goto err;
+ s = bc_num_ulong2num(&intp, dig);
+ if (s) goto err;
+ s = bc_num_sub(&fracp, &intp, &fracp, 0);
+ if (s) goto err;
+ print(dig, width, radix, nchars, len);
+ s = bc_num_mul(&frac_len, base, &frac_len, 0);
+ if (s) goto err;
}
err:
- n->neg = neg;
bc_num_free(&frac_len);
-frac_len_err:
bc_num_free(&digit);
-digit_err:
bc_num_free(&fracp);
-frac_err:
bc_num_free(&intp);
-int_err:
bc_vec_free(&stack);
- return status;
+ return s;
}
-BcStatus bc_num_init(BcNum *n, size_t request) {
-
- memset(n, 0, sizeof(BcNum));
-
- request = request >= BC_NUM_DEF_SIZE ? request : BC_NUM_DEF_SIZE;
- if (!(n->num = malloc(request))) return BC_STATUS_MALLOC_FAIL;
+BcStatus bc_num_printBase(BcNum *n, BcNum *base, size_t base_t,
+ size_t *nchars, size_t line_len)
+{
+ BcStatus s;
+ size_t width, i;
+ BcNumDigitOp print;
+ int neg = n->neg;
- n->cap = request;
+ if (neg) bc_vm_putchar('-');
+ (*nchars) += neg;
- return BC_STATUS_SUCCESS;
-}
+ n->neg = 0;
-BcStatus bc_num_expand(BcNum *n, size_t request) {
+ if (base_t <= BC_NUM_MAX_IBASE) {
+ width = 1;
+ print = bc_num_printHex;
+ }
+ else {
+ for (i = base_t - 1, width = 0; i; i /= 10, ++width);
+ print = bc_num_printDigits;
+ }
- BcDigit *temp;
+ s = bc_num_printNum(n, base, width, nchars, line_len, print);
+ n->neg = neg;
- if (request <= n->cap) return BC_STATUS_SUCCESS;
- if (!(temp = realloc(n->num, request))) return BC_STATUS_MALLOC_FAIL;
+ return s;
+}
- memset(temp + n->cap, 0, sizeof(char) * (request - n->cap));
- n->num = temp;
- n->cap = request;
+void bc_num_init(BcNum *n, size_t req) {
+ req = req >= BC_NUM_DEF_SIZE ? req : BC_NUM_DEF_SIZE;
+ memset(n, 0, sizeof(BcNum));
+ n->num = xmalloc(req);
+ n->cap = req;
+}
- return BC_STATUS_SUCCESS;
+void bc_num_expand(BcNum *n, size_t req) {
+ req = req >= BC_NUM_DEF_SIZE ? req : BC_NUM_DEF_SIZE;
+ if (req > n->cap) {
+ n->num = xrealloc(n->num, req);
+ n->cap = req;
+ }
}
void bc_num_free(void *num) {
- BcNum *n = (BcNum*) num;
- if (n && n->num) free(n->num);
+ free(((BcNum*) num)->num);
}
-BcStatus bc_num_copy(BcNum *d, BcNum *s) {
+void bc_num_copy(BcNum *d, BcNum *s) {
- BcStatus status;
-
- if (d == s) return BC_STATUS_SUCCESS;
- if ((status = bc_num_expand(d, s->cap))) return status;
-
- d->len = s->len;
- d->neg = s->neg;
- d->rdx = s->rdx;
-
- memcpy(d->num, s->num, sizeof(BcDigit) * d->len);
- memset(d->num + d->len, 0, sizeof(BcDigit) * (d->cap - d->len));
-
- return BC_STATUS_SUCCESS;
+ if (d != s) {
+ bc_num_expand(d, s->cap);
+ d->len = s->len;
+ d->neg = s->neg;
+ d->rdx = s->rdx;
+ memcpy(d->num, s->num, sizeof(BcDig) * d->len);
+ }
}
BcStatus bc_num_parse(BcNum *n, const char *val, BcNum *base, size_t base_t) {
- BcStatus status;
-
if (!bc_num_strValid(val, base_t)) return BC_STATUS_MATH_BAD_STRING;
- if (base_t == 10) status = bc_num_parseDecimal(n, val);
- else status = bc_num_parseBase(n, val, base);
+ if (base_t == 10) bc_num_parseDecimal(n, val);
+ else bc_num_parseBase(n, val, base);
- return status;
+ return BC_STATUS_SUCCESS;
}
BcStatus bc_num_print(BcNum *n, BcNum *base, size_t base_t, int newline,
size_t *nchars, size_t line_len)
{
- BcStatus status;
+ BcStatus s = BC_STATUS_SUCCESS;
- if (*nchars >= line_len) {
- if (putchar('\\') == EOF) return BC_STATUS_IO_ERR;
- if (putchar('\n') == EOF) return BC_STATUS_IO_ERR;
- *nchars = 0;
- }
+ bc_num_printNewline(nchars, line_len);
- if (!n->len) {
- if (putchar('0') == EOF) return BC_STATUS_IO_ERR;
+ if (n->len == 0) {
+ bc_vm_putchar('0');
++(*nchars);
- status = BC_STATUS_SUCCESS;
}
- else if (base_t == 10) status = bc_num_printDecimal(n, nchars, line_len);
- else status = bc_num_printBase(n, base, base_t, nchars, line_len);
-
- if (status) return status;
+ else if (base_t == 10) bc_num_printDecimal(n, nchars, line_len);
+ else s = bc_num_printBase(n, base, base_t, nchars, line_len);
if (newline) {
- if (putchar('\n') == EOF) return BC_STATUS_IO_ERR;
+ bc_vm_putchar('\n');
*nchars = 0;
}
- return status;
+ return s;
}
BcStatus bc_num_ulong(BcNum *n, unsigned long *result) {
size_t i;
- unsigned long prev, pow;
+ unsigned long pow;
if (n->neg) return BC_STATUS_MATH_NEGATIVE;
for (*result = 0, pow = 1, i = n->rdx; i < n->len; ++i) {
- prev = *result;
- *result += n->num[i] * pow;
+ unsigned long prev = *result, powprev = pow;
+
+ *result += ((unsigned long) n->num[i]) * pow;
pow *= 10;
- if (*result < prev) return BC_STATUS_MATH_OVERFLOW;
+ if (*result < prev || pow < powprev) return BC_STATUS_MATH_OVERFLOW;
}
return BC_STATUS_SUCCESS;
@@ -2007,145 +2129,130 @@ BcStatus bc_num_ulong(BcNum *n, unsigned long *result) {
BcStatus bc_num_ulong2num(BcNum *n, unsigned long val) {
- BcStatus status;
- size_t len, i;
- BcDigit *ptr;
+ size_t len;
+ BcDig *ptr;
+ unsigned long i;
bc_num_zero(n);
- if (!val) {
- memset(n->num, 0, sizeof(char) * n->cap);
- return BC_STATUS_SUCCESS;
- }
-
- len = (size_t) ceil(log10(((double) ULONG_MAX) + 1.0f));
+ if (val == 0) return BC_STATUS_SUCCESS;
- if ((status = bc_num_expand(n, len))) return status;
-
- for (ptr = n->num, i = 0; val; ++i, ++n->len) {
- ptr[i] = (char) (val % 10);
- val /= 10;
- }
+ for (len = 1, i = ULONG_MAX; i; i /= 10, ++len)
+ bc_num_expand(n, len);
+ for (ptr = n->num, i = 0; val; ++i, ++n->len, val /= 10) ptr[i] = val % 10;
return BC_STATUS_SUCCESS;
}
-BcStatus bc_num_add(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
+BcStatus bc_num_add(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ BcNumBinaryOp op = (!a->neg == !b->neg) ? bc_num_a : bc_num_s;
(void) scale;
- BcNumBinaryFunc op = (!a->neg == !b->neg) ? bc_num_alg_a : bc_num_alg_s;
- return bc_num_binary(a, b, result, 0, op, a->len + b->len + 1);
+ return bc_num_binary(a, b, c, 0, op, BC_NUM_AREQ(a, b));
}
-BcStatus bc_num_sub(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
+BcStatus bc_num_sub(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ BcNumBinaryOp op = (!a->neg == !b->neg) ? bc_num_s : bc_num_a;
(void) scale;
- BcNumBinaryFunc op = (!a->neg == !b->neg) ? bc_num_alg_s : bc_num_alg_a;
- return bc_num_binary(a, b, result, 1, op, a->len + b->len + 1);
+ return bc_num_binary(a, b, c, 1, op, BC_NUM_AREQ(a, b));
}
-BcStatus bc_num_mul(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
- return bc_num_binary(a, b, result, scale, bc_num_alg_m,
- a->len + b->len + scale + 1);
+BcStatus bc_num_mul(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ size_t req = BC_NUM_MREQ(a, b, scale);
+ return bc_num_binary(a, b, c, scale, bc_num_m, req);
}
-BcStatus bc_num_div(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
- return bc_num_binary(a, b, result, scale, bc_num_alg_d,
- a->len + b->len + scale + 1);
+BcStatus bc_num_div(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ size_t req = BC_NUM_MREQ(a, b, scale);
+ return bc_num_binary(a, b, c, scale, bc_num_d, req);
}
-BcStatus bc_num_mod(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
- return bc_num_binary(a, b, result, scale, bc_num_alg_mod,
- a->len + b->len + scale + 1);
+BcStatus bc_num_mod(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ size_t req = BC_NUM_MREQ(a, b, scale);
+ return bc_num_binary(a, b, c, scale, bc_num_rem, req);
}
-BcStatus bc_num_pow(BcNum *a, BcNum *b, BcNum *result, size_t scale) {
- return bc_num_binary(a, b, result, scale, bc_num_alg_p,
- (a->len + 1) * (b->len + 1));
+BcStatus bc_num_pow(BcNum *a, BcNum *b, BcNum *c, size_t scale) {
+ return bc_num_binary(a, b, c, scale, bc_num_p, a->len * b->len + 1);
}
-BcStatus bc_num_sqrt(BcNum *a, BcNum *result, size_t scale) {
-
- BcStatus status;
- BcNum a2, *ptr_a, num1, num2, two, f, fprime, *x0, *x1, *temp;
- size_t pow, len, digits, resrdx, req;
- int cmp;
+BcStatus bc_num_sqrt(BcNum *a, BcNum *restrict b, size_t scale) {
- req = a->rdx + (a->len - a->rdx) * 2 + 1;
-
- if (result == a) {
- memcpy(&a2, result, sizeof(BcNum));
- ptr_a = &a2;
- status = bc_num_init(result, req);
- }
- else {
- ptr_a = a;
- status = bc_num_expand(result, req);
- }
+ BcStatus s;
+ BcNum num1, num2, half, f, fprime, *x0, *x1, *temp;
+ size_t pow, len, digs, digs1, resrdx, req, times = 0;
+ ssize_t cmp = 1, cmp1 = SSIZE_MAX, cmp2 = SSIZE_MAX;
- if (status) goto init_err;
+ req = maxof(scale, a->rdx) + ((BC_NUM_INT(a) + 1) >> 1) + 1;
+ bc_num_expand(b, req);
- if (!ptr_a->len) {
- bc_num_zero(result);
+ if (a->len == 0) {
+ bc_num_setToZero(b, scale);
return BC_STATUS_SUCCESS;
}
- else if (ptr_a->neg) return BC_STATUS_MATH_NEG_SQRT;
+ else if (a->neg) return BC_STATUS_MATH_NEGATIVE;
else if (BC_NUM_ONE(a)) {
- bc_num_one(result);
- return bc_num_extend(result, scale);
+ bc_num_one(b);
+ bc_num_extend(b, scale);
+ return BC_STATUS_SUCCESS;
}
- memset(result->num, 0, result->cap * sizeof(BcDigit));
- len = ptr_a->len;
-
- scale = maxof(scale, ptr_a->rdx) + 1;
-
- if ((status = bc_num_init(&num1, len))) return status;
- if ((status = bc_num_init(&num2, num1.len))) goto num2_err;
- if ((status = bc_num_init(&two, BC_NUM_DEF_SIZE))) goto two_err;
+ scale = maxof(scale, a->rdx) + 1;
+ len = a->len + scale;
- bc_num_one(&two);
- two.num[0] = 2;
+ bc_num_init(&num1, len);
+ bc_num_init(&num2, len);
+ bc_num_init(&half, BC_NUM_DEF_SIZE);
- len += scale;
+ bc_num_one(&half);
+ half.num[0] = 5;
+ half.rdx = 1;
- if ((status = bc_num_init(&f, len))) goto f_err;
- if ((status = bc_num_init(&fprime, len + scale))) goto fprime_err;
+ bc_num_init(&f, len);
+ bc_num_init(&fprime, len);
x0 = &num1;
x1 = &num2;
bc_num_one(x0);
-
- pow = ptr_a->len - ptr_a->rdx;
+ pow = BC_NUM_INT(a);
if (pow) {
- if (pow & 1) {
- x0->num[0] = 2;
- pow -= 1;
- }
- else {
- x0->num[0] = 6;
- pow -= 2;
- }
+ if (pow & 1) x0->num[0] = 2;
+ else x0->num[0] = 6;
- if ((status = bc_num_extend(x0, pow))) goto err;
+ pow -= 2 - (pow & 1);
+
+ bc_num_extend(x0, pow);
+
+ // Make sure to move the radix back.
+ x0->rdx -= pow;
}
- cmp = 1;
- x0->rdx = digits = 0;
- resrdx = scale + 1;
- len = (x0->len - x0->rdx) + resrdx;
+ x0->rdx = digs = digs1 = 0;
+ resrdx = scale + 2;
+ len = BC_NUM_INT(x0) + resrdx - 1;
- while (!TT.signe && cmp && digits <= len) {
+ while (!TT.signe && (cmp || digs < len)) {
- if ((status = bc_num_mul(x0, x0, &f, resrdx))) goto err;
- if ((status = bc_num_sub(&f, a, &f, resrdx))) goto err;
- if ((status = bc_num_mul(x0, &two, &fprime, resrdx))) goto err;
- if ((status = bc_num_div(&f, &fprime, &f, resrdx))) goto err;
- if ((status = bc_num_sub(x0, &f, x1, resrdx))) goto err;
+ s = bc_num_div(a, x0, &f, resrdx);
+ if (s) goto err;
+ s = bc_num_add(x0, &f, &fprime, resrdx);
+ if (s) goto err;
+ s = bc_num_mul(&fprime, &half, x1, resrdx);
+ if (s) goto err;
cmp = bc_num_cmp(x1, x0);
- digits = x1->len - llabs(cmp);
+ digs = x1->len - (unsigned long long) llabs(cmp);
+
+ if (cmp == cmp2 && digs == digs1) times += 1;
+ else times = 0;
+
+ resrdx += times > 4;
+
+ cmp2 = cmp1;
+ cmp1 = cmp;
+ digs1 = digs;
temp = x0;
x0 = x1;
@@ -2153,183 +2260,151 @@ BcStatus bc_num_sqrt(BcNum *a, BcNum *result, size_t scale) {
}
if (TT.signe) {
- status = BC_STATUS_EXEC_SIGNAL;
+ s = BC_STATUS_EXEC_SIGNAL;
goto err;
}
- if ((status = bc_num_copy(result, x0))) goto err;
-
- if (result->rdx > --scale) bc_num_truncate(result, result->rdx - scale);
- else if (result->rdx < scale)
- status = bc_num_extend(result, scale - result->rdx);
+ bc_num_copy(b, x0);
+ scale -= 1;
+ if (b->rdx > scale) bc_num_truncate(b, b->rdx - scale);
err:
bc_num_free(&fprime);
-fprime_err:
bc_num_free(&f);
-f_err:
- bc_num_free(&two);
-two_err:
+ bc_num_free(&half);
bc_num_free(&num2);
-num2_err:
bc_num_free(&num1);
-init_err:
- if (result == a) bc_num_free(&a2);
- return status;
+ return s;
}
-void bc_num_zero(BcNum *n) {
- if (!n) return;
- memset(n->num, 0, n->cap * sizeof(char));
- n->neg = 0;
- n->len = 0;
- n->rdx = 0;
+BcStatus bc_num_divmod(BcNum *a, BcNum *b, BcNum *c, BcNum *d, size_t scale) {
+
+ BcStatus s;
+ BcNum num2, *ptr_a;
+ int init = 0;
+ size_t ts = maxof(scale + b->rdx, a->rdx), len = BC_NUM_MREQ(a, b, ts);
+
+ if (c == a) {
+ memcpy(&num2, c, sizeof(BcNum));
+ ptr_a = &num2;
+ bc_num_init(c, len);
+ init = 1;
+ }
+ else {
+ ptr_a = a;
+ bc_num_expand(c, len);
+ }
+
+ s = bc_num_r(ptr_a, b, c, d, scale, ts);
+
+ if (init) bc_num_free(&num2);
+
+ return s;
}
-void bc_num_one(BcNum *n) {
- if (!n) return;
- bc_num_zero(n);
- n->len = 1;
- n->num[0] = 1;
+int bc_id_cmp(const void *e1, const void *e2) {
+ return strcmp(((const BcId*) e1)->name, ((const BcId*) e2)->name);
}
-void bc_num_ten(BcNum *n) {
- if (!n) return;
- bc_num_zero(n);
- n->len = 2;
- n->num[0] = 0;
- n->num[1] = 1;
+void bc_id_free(void *id) {
+ free(((BcId*) id)->name);
}
BcStatus bc_func_insert(BcFunc *f, char *name, int var) {
- BcAuto a;
+ BcId a;
size_t i;
for (i = 0; i < f->autos.len; ++i) {
- if (!strcmp(name, ((BcAuto*) bc_vec_item(&f->autos, i))->name))
+ if (!strcmp(name, ((BcId*) bc_vec_item(&f->autos, i))->name))
return BC_STATUS_PARSE_DUPLICATE_LOCAL;
}
- a.var = var;
+ a.idx = var;
a.name = name;
- return bc_vec_push(&f->autos, &a);
-}
-
-BcStatus bc_func_init(BcFunc *f) {
-
- BcStatus status;
-
- if ((status = bc_vec_init(&f->code, sizeof(uint8_t), NULL))) return status;
- if ((status = bc_vec_init(&f->autos, sizeof(BcAuto), bc_auto_free))) goto err;
- if ((status = bc_vec_init(&f->labels, sizeof(size_t), NULL))) goto label_err;
-
- f->nparams = 0;
+ bc_vec_push(&f->autos, &a);
return BC_STATUS_SUCCESS;
+}
-label_err:
- bc_vec_free(&f->autos);
-err:
- bc_vec_free(&f->code);
- return status;
+void bc_func_init(BcFunc *f) {
+ bc_vec_init(&f->code, sizeof(char), NULL);
+ bc_vec_init(&f->autos, sizeof(BcId), bc_id_free);
+ bc_vec_init(&f->labels, sizeof(size_t), NULL);
+ f->nparams = 0;
}
void bc_func_free(void *func) {
-
BcFunc *f = (BcFunc*) func;
-
- if (!f) return;
-
bc_vec_free(&f->code);
bc_vec_free(&f->autos);
bc_vec_free(&f->labels);
}
-BcStatus bc_array_copy(BcVec *d, BcVec *s) {
+void bc_array_init(BcVec *a, int nums) {
+ if (nums) bc_vec_init(a, sizeof(BcNum), bc_num_free);
+ else bc_vec_init(a, sizeof(BcVec), bc_vec_free);
+ bc_array_expand(a, 1);
+}
+
+void bc_array_copy(BcVec *d, const BcVec *s) {
- BcStatus status;
size_t i;
- BcNum *dnum, *snum;
bc_vec_npop(d, d->len);
-
- if ((status = bc_vec_expand(d, s->cap))) return status;
-
+ bc_vec_expand(d, s->cap);
d->len = s->len;
- for (i = 0; !status && i < s->len; ++i) {
-
- dnum = bc_vec_item(d, i);
- snum = bc_vec_item(s, i);
-
- if ((status = bc_num_init(dnum, snum->len))) return status;
- if ((status = bc_num_copy(dnum, snum))) bc_num_free(dnum);
+ for (i = 0; i < s->len; ++i) {
+ BcNum *dnum = bc_vec_item(d, i), *snum = bc_vec_item(s, i);
+ bc_num_init(dnum, snum->len);
+ bc_num_copy(dnum, snum);
}
-
- return status;
}
-BcStatus bc_array_expand(BcVec *a, size_t len) {
+void bc_array_expand(BcVec *a, size_t len) {
- BcStatus status = BC_STATUS_SUCCESS;
- BcNum num;
+ BcResultData data;
- while (!status && len > a->len) {
- if ((status = bc_num_init(&num, BC_NUM_DEF_SIZE))) return status;
- bc_num_zero(&num);
- if ((status = bc_vec_push(a, &num))) bc_num_free(&num);
+ if (a->size == sizeof(BcNum) && a->dtor == bc_num_free) {
+ while (len > a->len) {
+ bc_num_init(&data.n, BC_NUM_DEF_SIZE);
+ bc_vec_push(a, &data.n);
+ }
+ }
+ else {
+ while (len > a->len) {
+ bc_array_init(&data.v, 1);
+ bc_vec_push(a, &data.v);
+ }
}
-
- return status;
}
void bc_string_free(void *string) {
- char **s = string;
- if (s) free(*s);
-}
-
-int bc_entry_cmp(void *entry1, void *entry2) {
- return strcmp(((BcEntry*) entry1)->name, ((BcEntry*) entry2)->name);
-}
-
-void bc_entry_free(void *entry) {
- BcEntry *e = entry;
- if (e) free(e->name);
-}
-
-void bc_auto_free(void *auto1) {
- BcAuto *a = (BcAuto*) auto1;
- if (a && a->name) free(a->name);
+ free(*((char**) string));
}
void bc_result_free(void *result) {
BcResult *r = (BcResult*) result;
- if (!r) return;
-
- switch (r->type) {
+ switch (r->t) {
case BC_RESULT_TEMP:
+ case BC_RESULT_IBASE:
case BC_RESULT_SCALE:
- case BC_RESULT_VAR_AUTO:
- {
- bc_num_free(&r->data.num);
- break;
- }
-
- case BC_RESULT_ARRAY_AUTO:
+ case BC_RESULT_OBASE:
{
- bc_vec_free(&r->data.array);
+ bc_num_free(&r->d.n);
break;
}
case BC_RESULT_VAR:
case BC_RESULT_ARRAY:
+ case BC_RESULT_ARRAY_ELEM:
{
- if (r->data.id.name) free(r->data.id.name);
+ free(r->d.id.name);
break;
}
@@ -2341,198 +2416,242 @@ void bc_result_free(void *result) {
}
}
-BcStatus bc_lex_string(BcLex *lex) {
+void bc_lex_lineComment(BcLex *l) {
+ l->t.t = BC_LEX_WHITESPACE;
+ while (l->i < l->len && l->buf[l->i++] != '\n');
+ --l->i;
+}
- const char *start;
- size_t newlines, len, i, j;
+void bc_lex_whitespace(BcLex *l) {
char c;
+ l->t.t = BC_LEX_WHITESPACE;
+ for (c = l->buf[l->i]; c != '\n' && isspace(c); c = l->buf[++l->i]);
+}
- newlines = 0;
- lex->token.type = BC_LEX_STRING;
- i = lex->idx;
+BcStatus bc_lex_number(BcLex *l, char start) {
- for (c = lex->buffer[i]; c != '"' && c != '\0'; c = lex->buffer[++i]) {
- if (c == '\n') ++newlines;
- }
+ const char *buf = l->buf + l->i;
+ size_t len, hits = 0, bslashes = 0, i = 0, j;
+ char c = buf[i];
+ int last_pt, pt = start == '.';
- if (c == '\0') {
- lex->idx = i;
- return BC_STATUS_LEX_NO_STRING_END;
+ last_pt = pt;
+ l->t.t = BC_LEX_NUMBER;
+
+ while (c && (isdigit(c) || (c >= 'A' && c <= 'F') ||
+ (c == '.' && !pt) || (c == '\\' && buf[i + 1] == '\n')))
+ {
+ if (c != '\\') {
+ last_pt = c == '.';
+ pt = pt || last_pt;
+ }
+ else {
+ ++i;
+ bslashes += 1;
+ }
+
+ c = buf[++i];
}
- len = i - lex->idx;
- if (!(lex->token.string = malloc(len + 1))) return BC_STATUS_MALLOC_FAIL;
+ len = i + 1 * !last_pt - bslashes * 2;
+ if (len > BC_MAX_NUM) return BC_STATUS_EXEC_NUM_LEN;
- start = lex->buffer + lex->idx;
+ bc_vec_npop(&l->t.v, l->t.v.len);
+ bc_vec_expand(&l->t.v, len + 1);
+ bc_vec_push(&l->t.v, &start);
- for (j = 0; j < len; ++j) lex->token.string[j] = start[j];
+ for (buf -= 1, j = 1; j < len + hits * 2; ++j) {
- lex->token.string[len] = '\0';
- lex->idx = i + 1;
- lex->line += newlines;
+ c = buf[j];
+
+ // If we have hit a backslash, skip it. We don't have
+ // to check for a newline because it's guaranteed.
+ if (hits < bslashes && c == '\\') {
+ ++hits;
+ ++j;
+ continue;
+ }
+
+ bc_vec_push(&l->t.v, &c);
+ }
+
+ bc_vec_pushByte(&l->t.v, '\0');
+ l->i += i;
return BC_STATUS_SUCCESS;
}
-BcStatus bc_lex_comment(BcLex *lex) {
+BcStatus bc_lex_name(BcLex *l) {
- size_t newlines, i;
- const char *buffer;
- char c;
- int end;
+ size_t i = 0;
+ const char *buf = l->buf + l->i - 1;
+ char c = buf[i];
- newlines = 0;
- lex->token.type = BC_LEX_WHITESPACE;
- end = 0;
+ l->t.t = BC_LEX_NAME;
- buffer = lex->buffer;
+ while ((c >= 'a' && c <= 'z') || isdigit(c) || c == '_') c = buf[++i];
- for (i = ++lex->idx; !end; i += !end) {
+ if (i > BC_MAX_STRING) return BC_STATUS_EXEC_NAME_LEN;
+ bc_vec_string(&l->t.v, i, buf);
- while ((c = buffer[i]) != '*' && c != '\0') {
- if (c == '\n') ++newlines;
- c = buffer[++i];
- }
+ // Increment the index. We minus 1 because it has already been incremented.
+ l->i += i - 1;
- if (c == '\0' || buffer[i + 1] == '\0') {
- lex->idx = i;
- return BC_STATUS_LEX_NO_COMMENT_END;
- }
+ return BC_STATUS_SUCCESS;
+}
- end = buffer[i + 1] == '/';
- }
+void bc_lex_init(BcLex *l) {
- lex->idx = i + 2;
- lex->line += newlines;
+ bc_vec_init(&l->t.v, sizeof(char), NULL);
+}
- return BC_STATUS_SUCCESS;
+void bc_lex_free(BcLex *l) {
+ bc_vec_free(&l->t.v);
}
-BcStatus bc_lex_number(BcLex *lex, char start) {
+void bc_lex_file(BcLex *l, const char *file) {
+ l->line = 1;
+ l->newline = 0;
+ l->f = file;
+}
- const char *buffer, *buf;
- size_t backslashes, len, hits, i, j;
- char c;
- int point;
+BcStatus bc_lex_next(BcLex *l) {
- lex->token.type = BC_LEX_NUMBER;
- point = start == '.';
- buffer = lex->buffer + lex->idx;
- backslashes = 0;
- i = 0;
- c = buffer[i];
+ BcStatus s;
- while (c && ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
- (c == '.' && !point) || (c == '\\' && buffer[i + 1] == '\n')))
- {
- if (c == '\\') {
- ++i;
- backslashes += 1;
- }
+ l->t.last = l->t.t;
+ if (l->t.last == BC_LEX_EOF) return BC_STATUS_LEX_EOF;
- c = buffer[++i];
- }
+ l->line += l->newline;
+ l->t.t = BC_LEX_EOF;
- len = i + 1 * (*(buffer + i - 1) != '.');
+ l->newline = (l->i == l->len);
+ if (l->newline) return BC_STATUS_SUCCESS;
- lex->token.string = malloc(len - backslashes * 2 + 1);
- if (!lex->token.string) return BC_STATUS_MALLOC_FAIL;
+ // Loop until failure or we don't have whitespace. This
+ // is so the parser doesn't get inundated with whitespace.
+ do {
+ s = bc_lex_token(l);
+ } while (!s && l->t.t == BC_LEX_WHITESPACE);
- lex->token.string[0] = start;
- buf = buffer - 1;
- hits = 0;
+ return s;
+}
- for (j = 1; j < len; ++j) {
+BcStatus bc_lex_text(BcLex *l, const char *text) {
+ l->buf = text;
+ l->i = 0;
+ l->len = strlen(text);
+ l->t.t = l->t.last = BC_LEX_INVALID;
+ return bc_lex_next(l);
+}
- c = buf[j];
+BcStatus bc_lex_identifier(BcLex *l) {
- // If we have hit a backslash, skip it.
- // We don't have to check for a newline
- // because it's guaranteed.
- if (hits < backslashes && c == '\\') {
- ++hits;
- ++j;
- continue;
- }
+ BcStatus s;
+ size_t i;
+ const char *buf = l->buf + l->i - 1;
+
+ for (i = 0; i < sizeof(bc_lex_kws) / sizeof(bc_lex_kws[0]); ++i) {
+
+ unsigned long len = (unsigned long) bc_lex_kws[i].len;
+
+ if (strncmp(buf, bc_lex_kws[i].name, len) == 0) {
+
+ l->t.t = BC_LEX_KEY_AUTO + (BcLexType) i;
- lex->token.string[j - (hits * 2)] = c;
+ if (!bc_lex_kws[i].posix) {
+ s = bc_vm_posixError(BC_STATUS_POSIX_BAD_KW, l->f,
+ l->line, bc_lex_kws[i].name);
+ if (s) return s;
+ }
+
+ // We minus 1 because the index has already been incremented.
+ l->i += len - 1;
+ return BC_STATUS_SUCCESS;
+ }
}
- lex->token.string[j - (hits * 2)] = '\0';
- lex->idx += i;
+ s = bc_lex_name(l);
+ if (s) return s;
- return BC_STATUS_SUCCESS;
+ if (l->t.v.len - 1 > 1)
+ s = bc_vm_posixError(BC_STATUS_POSIX_NAME_LEN, l->f, l->line, buf);
+
+ return s;
}
-BcStatus bc_lex_name(BcLex *lex) {
+BcStatus bc_lex_string(BcLex *l) {
- BcStatus status;
- const char *buffer;
- size_t i;
+ size_t len, nls = 0, i = l->i;
char c;
- buffer = lex->buffer + lex->idx - 1;
+ l->t.t = BC_LEX_STR;
- for (i = 0; i < sizeof(bc_lex_keywords) / sizeof(bc_lex_keywords[0]); ++i) {
+ for (c = l->buf[i]; c && c != '"'; c = l->buf[++i]) nls += (c == '\n');
- if (!strncmp(buffer, bc_lex_keywords[i].name, bc_lex_keywords[i].len)) {
+ if (c == '\0') {
+ l->i = i;
+ return BC_STATUS_LEX_NO_STRING_END;
+ }
- lex->token.type = BC_LEX_KEY_AUTO + i;
+ len = i - l->i;
+ if (len > BC_MAX_STRING) return BC_STATUS_EXEC_STRING_LEN;
+ bc_vec_string(&l->t.v, len, l->buf + l->i);
- if (!bc_lex_keywords[i].posix &&
- (status = bc_posix_error(BC_STATUS_POSIX_BAD_KEYWORD, lex->file,
- lex->line, bc_lex_keywords[i].name)))
- {
- return status;
- }
+ l->i = i + 1;
+ l->line += nls;
- // We need to minus one because the
- // index has already been incremented.
- lex->idx += bc_lex_keywords[i].len - 1;
+ return BC_STATUS_SUCCESS;
+}
- return BC_STATUS_SUCCESS;
- }
+void bc_lex_assign(BcLex *l, BcLexType with, BcLexType without) {
+ if (l->buf[l->i] == '=') {
+ ++l->i;
+ l->t.t = with;
}
+ else l->t.t = without;
+}
- lex->token.type = BC_LEX_NAME;
+BcStatus bc_lex_comment(BcLex *l) {
- i = 0;
- c = buffer[i];
+ size_t i, nls = 0;
+ const char *buf = l->buf;
+ int end = 0;
+ char c;
- while ((c >= 'a' && c<= 'z') || (c >= '0' && c <= '9') || c == '_')
- c = buffer[++i];
+ l->t.t = BC_LEX_WHITESPACE;
- if (i > 1 && (status = bc_posix_error(BC_STATUS_POSIX_NAME_LEN,
- lex->file, lex->line, buffer)))
- {
- return status;
- }
+ for (i = ++l->i; !end; i += !end) {
- if (!(lex->token.string = malloc(i + 1))) return BC_STATUS_MALLOC_FAIL;
+ for (c = buf[i]; c != '*' && c; c = buf[++i]) nls += (c == '\n');
- strncpy(lex->token.string, buffer, i);
- lex->token.string[i] = '\0';
+ if (c == 0 || buf[i + 1] == '\0') {
+ l->i = i;
+ return BC_STATUS_LEX_NO_COMMENT_END;
+ }
- // Increment the index. It is minus one
- // because it has already been incremented.
- lex->idx += i - 1;
+ end = buf[i + 1] == '/';
+ }
+
+ l->i = i + 2;
+ l->line += nls;
return BC_STATUS_SUCCESS;
}
-BcStatus bc_lex_token(BcLex *lex) {
+BcStatus bc_lex_token(BcLex *l) {
- BcStatus status = BC_STATUS_SUCCESS;
- char c, c2;
+ BcStatus s = BC_STATUS_SUCCESS;
+ char c = l->buf[l->i++], c2;
// This is the workhorse of the lexer.
- switch ((c = lex->buffer[lex->idx++])) {
+ switch (c) {
case '\0':
case '\n':
{
- lex->newline = 1;
- lex->token.type = BC_LEX_NEWLINE + (!c) * (BC_LEX_EOF - BC_LEX_NEWLINE);
+ l->newline = 1;
+ l->t.t = !c ? BC_LEX_EOF : BC_LEX_NLINE;
break;
}
@@ -2541,34 +2660,18 @@ BcStatus bc_lex_token(BcLex *lex) {
case '\f':
case '\r':
case ' ':
- case '\\':
{
- lex->token.type = BC_LEX_WHITESPACE;
- c = lex->buffer[lex->idx];
-
- while ((isspace(c) && c != '\n') || c == '\\')
- c = lex->buffer[++lex->idx];
-
+ bc_lex_whitespace(l);
break;
}
case '!':
{
- c2 = lex->buffer[lex->idx];
+ bc_lex_assign(l, BC_LEX_OP_REL_NE, BC_LEX_OP_BOOL_NOT);
- if (c2 == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_REL_NOT_EQ;
- }
- else {
-
- if ((status = bc_posix_error(BC_STATUS_POSIX_BOOL_OPS,
- lex->file, lex->line, "!")))
- {
- return status;
- }
-
- lex->token.type = BC_LEX_OP_BOOL_NOT;
+ if (l->t.t == BC_LEX_OP_BOOL_NOT) {
+ s = bc_vm_posixError(BC_STATUS_POSIX_BOOL, l->f, l->line, "!");
+ if (s) return s;
}
break;
@@ -2576,50 +2679,40 @@ BcStatus bc_lex_token(BcLex *lex) {
case '"':
{
- status = bc_lex_string(lex);
+ s = bc_lex_string(l);
break;
}
case '#':
{
- if ((status = bc_posix_error(BC_STATUS_POSIX_SCRIPT_COMMENT,
- lex->file, lex->line, NULL)))
- {
- return status;
- }
+ s = bc_vm_posixError(BC_STATUS_POSIX_COMMENT, l->f, l->line, NULL);
+ if (s) return s;
- lex->token.type = BC_LEX_WHITESPACE;
- while (++lex->idx < lex->len && lex->buffer[lex->idx] != '\n');
+ bc_lex_lineComment(l);
break;
}
case '%':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_MODULUS;
- }
- else lex->token.type = BC_LEX_OP_MODULUS;
+ bc_lex_assign(l, BC_LEX_OP_ASSIGN_MODULUS, BC_LEX_OP_MODULUS);
break;
}
case '&':
{
- if ((c2 = lex->buffer[lex->idx]) == '&') {
+ c2 = l->buf[l->i];
+ if (c2 == '&') {
- if ((status = bc_posix_error(BC_STATUS_POSIX_BOOL_OPS,
- lex->file, lex->line, "&&")))
- {
- return status;
- }
+ s = bc_vm_posixError(BC_STATUS_POSIX_BOOL, l->f, l->line, "&&");
+ if (s) return s;
- ++lex->idx;
- lex->token.type = BC_LEX_OP_BOOL_AND;
+ ++l->i;
+ l->t.t = BC_LEX_OP_BOOL_AND;
}
else {
- lex->token.type = BC_LEX_INVALID;
- status = BC_STATUS_LEX_BAD_CHARACTER;
+ l->t.t = BC_LEX_INVALID;
+ s = BC_STATUS_LEX_BAD_CHAR;
}
break;
@@ -2628,74 +2721,59 @@ BcStatus bc_lex_token(BcLex *lex) {
case '(':
case ')':
{
- lex->token.type = c - '(' + BC_LEX_LEFT_PAREN;
+ l->t.t = (BcLexType) (c - '(' + BC_LEX_LPAREN);
break;
}
case '*':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_MULTIPLY;
- }
- else lex->token.type = BC_LEX_OP_MULTIPLY;
+ bc_lex_assign(l, BC_LEX_OP_ASSIGN_MULTIPLY, BC_LEX_OP_MULTIPLY);
break;
}
case '+':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_PLUS;
+ c2 = l->buf[l->i];
+ if (c2 == '+') {
+ ++l->i;
+ l->t.t = BC_LEX_OP_INC;
}
- else if (c2 == '+') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_INC;
- }
- else lex->token.type = BC_LEX_OP_PLUS;
+ else bc_lex_assign(l, BC_LEX_OP_ASSIGN_PLUS, BC_LEX_OP_PLUS);
break;
}
case ',':
{
- lex->token.type = BC_LEX_COMMA;
+ l->t.t = BC_LEX_COMMA;
break;
}
case '-':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_MINUS;
- }
- else if (c2 == '-') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_DEC;
+ c2 = l->buf[l->i];
+ if (c2 == '-') {
+ ++l->i;
+ l->t.t = BC_LEX_OP_DEC;
}
- else lex->token.type = BC_LEX_OP_MINUS;
+ else bc_lex_assign(l, BC_LEX_OP_ASSIGN_MINUS, BC_LEX_OP_MINUS);
break;
}
case '.':
{
- c2 = lex->buffer[lex->idx];
- if (isdigit(c2)) status = bc_lex_number(lex, c);
+ if (isdigit(l->buf[l->i])) s = bc_lex_number(l, c);
else {
- status = bc_posix_error(BC_STATUS_POSIX_DOT_LAST,
- lex->file, lex->line, NULL);
- lex->token.type = BC_LEX_KEY_LAST;
+ l->t.t = BC_LEX_KEY_LAST;
+ s = bc_vm_posixError(BC_STATUS_POSIX_DOT, l->f, l->line, NULL);
}
break;
}
case '/':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_DIVIDE;
- }
- else if (c2 == '*') status = bc_lex_comment(lex);
- else lex->token.type = BC_LEX_OP_DIVIDE;
+ c2 = l->buf[l->i];
+ if (c2 =='*') s = bc_lex_comment(l);
+ else bc_lex_assign(l, BC_LEX_OP_ASSIGN_DIVIDE, BC_LEX_OP_DIVIDE);
break;
}
@@ -2709,72 +2787,61 @@ BcStatus bc_lex_token(BcLex *lex) {
case '7':
case '8':
case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
{
- status = bc_lex_number(lex, c);
+ s = bc_lex_number(l, c);
break;
}
case ';':
{
- lex->token.type = BC_LEX_SEMICOLON;
+ l->t.t = BC_LEX_SCOLON;
break;
}
case '<':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_REL_LESS_EQ;
- }
- else lex->token.type = BC_LEX_OP_REL_LESS;
+ bc_lex_assign(l, BC_LEX_OP_REL_LE, BC_LEX_OP_REL_LT);
break;
}
case '=':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_REL_EQUAL;
- }
- else lex->token.type = BC_LEX_OP_ASSIGN;
+ bc_lex_assign(l, BC_LEX_OP_REL_EQ, BC_LEX_OP_ASSIGN);
break;
}
case '>':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_REL_GREATER_EQ;
- }
- else lex->token.type = BC_LEX_OP_REL_GREATER;
+ bc_lex_assign(l, BC_LEX_OP_REL_GE, BC_LEX_OP_REL_GT);
break;
}
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
+ case '[':
+ case ']':
{
- status = bc_lex_number(lex, c);
+ l->t.t = (BcLexType) (c - '[' + BC_LEX_LBRACKET);
break;
}
- case '[':
- case ']':
+ case '\\':
{
- lex->token.type = c - '[' + BC_LEX_LEFT_BRACKET;
+ if (l->buf[l->i] == '\n') {
+ l->t.t = BC_LEX_WHITESPACE;
+ ++l->i;
+ }
+ else s = BC_STATUS_LEX_BAD_CHAR;
break;
}
case '^':
{
- if ((c2 = lex->buffer[lex->idx]) == '=') {
- ++lex->idx;
- lex->token.type = BC_LEX_OP_ASSIGN_POWER;
- }
- else lex->token.type = BC_LEX_OP_POWER;
+ bc_lex_assign(l, BC_LEX_OP_ASSIGN_POWER, BC_LEX_OP_POWER);
break;
}
@@ -2805,33 +2872,32 @@ BcStatus bc_lex_token(BcLex *lex) {
case 'y':
case 'z':
{
- status = bc_lex_name(lex);
+ s = bc_lex_identifier(l);
break;
}
case '{':
case '}':
{
- lex->token.type = c - '{' + BC_LEX_LEFT_BRACE;
+ l->t.t = (BcLexType) (c - '{' + BC_LEX_LBRACE);
break;
}
case '|':
{
- if ((c2 = lex->buffer[lex->idx]) == '|') {
+ c2 = l->buf[l->i];
- if ((status = bc_posix_error(BC_STATUS_POSIX_BOOL_OPS,
- lex->file, lex->line, "||")))
- {
- return status;
- }
+ if (c2 == '|') {
+
+ s = bc_vm_posixError(BC_STATUS_POSIX_BOOL, l->f, l->line, "||");
+ if (s) return s;
- ++lex->idx;
- lex->token.type = BC_LEX_OP_BOOL_OR;
+ ++l->i;
+ l->t.t = BC_LEX_OP_BOOL_OR;
}
else {
- lex->token.type = BC_LEX_INVALID;
- status = BC_STATUS_LEX_BAD_CHARACTER;
+ l->t.t = BC_LEX_INVALID;
+ s = BC_STATUS_LEX_BAD_CHAR;
}
break;
@@ -2839,337 +2905,392 @@ BcStatus bc_lex_token(BcLex *lex) {
default:
{
- lex->token.type = BC_LEX_INVALID;
- status = BC_STATUS_LEX_BAD_CHARACTER;
+ l->t.t = BC_LEX_INVALID;
+ s = BC_STATUS_LEX_BAD_CHAR;
break;
}
}
- return status;
+ return s;
}
-void bc_lex_init(BcLex *lex, const char *file) {
- lex->line = 1;
- lex->newline = 0;
- lex->file = file;
+void bc_parse_addFunc(BcParse *p, char *name, size_t *idx) {
+ bc_program_addFunc(p->prog, name, idx);
+ p->func = bc_vec_item(&p->prog->fns, p->fidx);
}
-BcStatus bc_lex_next(BcLex *lex) {
+void bc_parse_pushName(BcParse *p, char *name) {
- BcStatus status;
+ size_t i = 0, len = strlen(name);
- if (lex->token.type == BC_LEX_EOF) return BC_STATUS_LEX_EOF;
+ for (; i < len; ++i) bc_parse_push(p, name[i]);
+ bc_parse_push(p, BC_PARSE_STREND);
- if (lex->idx == lex->len) {
- lex->newline = 1;
- lex->token.type = BC_LEX_EOF;
- return BC_STATUS_SUCCESS;
- }
+ free(name);
+}
- if (lex->newline) {
- ++lex->line;
- lex->newline = 0;
- }
+void bc_parse_pushIndex(BcParse *p, size_t idx) {
- // Loop until failure or we don't have whitespace. This
- // is so the parser doesn't get inundated with whitespace.
- do {
- lex->token.string = NULL;
- status = bc_lex_token(lex);
- } while (!status && lex->token.type == BC_LEX_WHITESPACE);
+ unsigned char amt, i, nums[sizeof(size_t)];
- return status;
-}
+ for (amt = 0; idx; ++amt) {
+ nums[amt] = (char) idx;
+ idx = (idx & ((unsigned long) ~(UCHAR_MAX))) >> sizeof(char) * CHAR_BIT;
+ }
-BcStatus bc_lex_text(BcLex *lex, const char *text) {
- lex->buffer = text;
- lex->idx = 0;
- lex->len = strlen(text);
- lex->token.type = BC_LEX_INVALID;
- return bc_lex_next(lex);
+ bc_parse_push(p, amt);
+ for (i = 0; i < amt; ++i) bc_parse_push(p, nums[i]);
}
-BcStatus bc_parse_else(BcParse *p, BcVec *code);
-BcStatus bc_parse_stmt(BcParse *p, BcVec *code);
+void bc_parse_number(BcParse *p, BcInst *prev, size_t *nexs) {
-BcStatus bc_parse_pushName(BcVec *code, char *name) {
+ char *num = xstrdup(p->l.t.v.v);
+ size_t idx = p->prog->consts.len;
- BcStatus status;
- size_t len, i;
+ bc_vec_push(&p->prog->consts, &num);
+
+ bc_parse_push(p, BC_INST_NUM);
+ bc_parse_pushIndex(p, idx);
- status = BC_STATUS_SUCCESS;
- len = strlen(name);
+ ++(*nexs);
+ (*prev) = BC_INST_NUM;
+}
- for (i = 0; !status && i < len; ++i)
- status = bc_vec_pushByte(code, (uint8_t) name[i]);
+BcStatus bc_parse_text(BcParse *p, const char *text) {
- if (status) return status;
+ BcStatus s;
- free(name);
+ p->func = bc_vec_item(&p->prog->fns, p->fidx);
- return bc_vec_pushByte(code, (uint8_t) ':');
+ if (!strcmp(text, "") && !BC_PARSE_CAN_EXEC(p)) {
+ p->l.t.t = BC_LEX_INVALID;
+ s = bc_parse_parse(p);
+ if (s) return s;
+ if (!BC_PARSE_CAN_EXEC(p)) return BC_STATUS_EXEC_FILE_NOT_EXECUTABLE;
+ }
+
+ return bc_lex_text(&p->l, text);
}
-BcStatus bc_parse_pushIndex(BcVec *code, size_t idx) {
+BcStatus bc_parse_reset(BcParse *p, BcStatus s) {
- BcStatus status;
- uint8_t amt, i, nums[sizeof(size_t)];
+ if (p->fidx != BC_PROG_MAIN) {
- for (amt = 0; idx; ++amt) {
- nums[amt] = (uint8_t) idx;
- idx = (idx & ~(UINT8_MAX)) >> sizeof(uint8_t) * CHAR_BIT;
+ p->func->nparams = 0;
+ bc_vec_npop(&p->func->code, p->func->code.len);
+ bc_vec_npop(&p->func->autos, p->func->autos.len);
+ bc_vec_npop(&p->func->labels, p->func->labels.len);
+
+ bc_parse_updateFunc(p, BC_PROG_MAIN);
}
- if ((status = bc_vec_pushByte(code, amt))) return status;
- for (i = 0; !status && i < amt; ++i) status = bc_vec_pushByte(code, nums[i]);
+ p->l.i = p->l.len;
+ p->l.t.t = BC_LEX_EOF;
+ p->auto_part = (p->nbraces = 0);
+
+ bc_vec_npop(&p->flags, p->flags.len - 1);
+ bc_vec_npop(&p->exits, p->exits.len);
+ bc_vec_npop(&p->conds, p->conds.len);
+ bc_vec_npop(&p->ops, p->ops.len);
+
+ return bc_program_reset(p->prog, s);
+}
+
+void bc_parse_free(BcParse *p) {
+ bc_vec_free(&p->flags);
+ bc_vec_free(&p->exits);
+ bc_vec_free(&p->conds);
+ bc_vec_free(&p->ops);
+ bc_lex_free(&p->l);
+}
+
+void bc_parse_init(BcParse *p, BcProgram *prog, size_t func) {
+
+ memset(p, 0, sizeof(BcParse));
+
+ bc_lex_init(&p->l);
+ bc_vec_init(&p->flags, sizeof(uint8_t), NULL);
+ bc_vec_init(&p->exits, sizeof(BcInstPtr), NULL);
+ bc_vec_init(&p->conds, sizeof(size_t), NULL);
+ bc_vec_pushByte(&p->flags, 0);
+ bc_vec_init(&p->ops, sizeof(BcLexType), NULL);
- return status;
+ p->prog = prog;
+ p->auto_part = (p->nbraces = 0);
+ bc_parse_updateFunc(p, func);
}
-BcStatus bc_parse_operator(BcParse *p, BcVec *code, BcVec *ops, BcLexToken t,
- uint32_t *num_exprs, int next)
+BcStatus bc_parse_else(BcParse *p);
+BcStatus bc_parse_stmt(BcParse *p);
+
+BcStatus bc_parse_operator(BcParse *p, BcLexType type, size_t start,
+ size_t *nexprs, int next)
{
- BcStatus status;
- BcLexToken top;
- uint8_t lp, rp;
- int rleft;
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcLexType t;
+ char l, r = bc_parse_ops[type - BC_LEX_OP_INC].prec;
+ int left = bc_parse_ops[type - BC_LEX_OP_INC].left;
- rp = bc_parse_ops[t].prec;
- rleft = bc_parse_ops[t].left;
+ while (p->ops.len > start) {
- while (ops->len &&
- (top = *((BcLexToken*) bc_vec_top(ops))) != BC_LEX_LEFT_PAREN &&
- ((lp = bc_parse_ops[top].prec) < rp || (lp == rp && rleft)))
- {
- status = bc_vec_pushByte(code, BC_PARSE_TOKEN_TO_INST(top));
- if (status) return status;
+ t = BC_PARSE_TOP_OP(p);
+ if (t == BC_LEX_LPAREN) break;
- bc_vec_pop(ops);
+ l = bc_parse_ops[t - BC_LEX_OP_INC].prec;
+ if (l >= r && (l != r || !left)) break;
- *num_exprs -= top != BC_LEX_OP_BOOL_NOT && top != BC_LEX_OP_NEG;
+ bc_parse_push(p, BC_PARSE_TOKEN_INST(t));
+ bc_vec_pop(&p->ops);
+ *nexprs -= t != BC_LEX_OP_BOOL_NOT && t != BC_LEX_NEG;
}
- if ((status = bc_vec_push(ops, &t))) return status;
- if (next && (status = bc_lex_next(&p->lex)) && p->lex.token.string) {
- free(p->lex.token.string);
- p->lex.token.string = NULL;
- }
+ bc_vec_push(&p->ops, &type);
+ if (next) s = bc_lex_next(&p->l);
- return status;
+ return s;
}
-BcStatus bc_parse_rightParen(BcParse *p, BcVec *code,
- BcVec *ops, uint32_t *nexs)
-{
- BcStatus status;
- BcLexToken top;
+BcStatus bc_parse_rightParen(BcParse *p, size_t ops_bgn, size_t *nexs) {
- if (!ops->len) return BC_STATUS_PARSE_BAD_EXPR;
+ BcLexType top;
- while ((top = *((BcLexToken*) bc_vec_top(ops))) != BC_LEX_LEFT_PAREN) {
+ if (p->ops.len <= ops_bgn) return BC_STATUS_PARSE_BAD_EXP;
+ top = BC_PARSE_TOP_OP(p);
- status = bc_vec_pushByte(code, BC_PARSE_TOKEN_TO_INST(top));
- if (status) return status;
+ while (top != BC_LEX_LPAREN) {
- bc_vec_pop(ops);
- *nexs -= top != BC_LEX_OP_BOOL_NOT && top != BC_LEX_OP_NEG;
+ bc_parse_push(p, BC_PARSE_TOKEN_INST(top));
- if (!ops->len) return BC_STATUS_PARSE_BAD_EXPR;
+ bc_vec_pop(&p->ops);
+ *nexs -= top != BC_LEX_OP_BOOL_NOT && top != BC_LEX_NEG;
+
+ if (p->ops.len <= ops_bgn) return BC_STATUS_PARSE_BAD_EXP;
+ top = BC_PARSE_TOP_OP(p);
}
- bc_vec_pop(ops);
+ bc_vec_pop(&p->ops);
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_params(BcParse *p, BcVec *code, uint8_t flags) {
+BcStatus bc_parse_params(BcParse *p, uint8_t flags) {
- BcStatus status;
+ BcStatus s;
int comma = 0;
size_t nparams;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- for (nparams = 0; p->lex.token.type != BC_LEX_RIGHT_PAREN; ++nparams) {
+ for (nparams = 0; p->l.t.t != BC_LEX_RPAREN; ++nparams) {
- status = bc_parse_expr(p, code, flags & ~(BC_PARSE_EXPR_PRINT));
- if (status) return status;
+ flags = (flags & ~(BC_PARSE_PRINT | BC_PARSE_REL)) | BC_PARSE_ARRAY;
+ s = bc_parse_expr(p, flags, bc_parse_next_param);
+ if (s) return s;
- if (p->lex.token.type == BC_LEX_COMMA) {
- comma = 1;
- if ((status = bc_lex_next(&p->lex))) return status;
+ comma = p->l.t.t == BC_LEX_COMMA;
+ if (comma) {
+ s = bc_lex_next(&p->l);
+ if (s) return s;
}
- else comma = 0;
}
if (comma) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_vec_pushByte(code, BC_INST_CALL))) return status;
+ bc_parse_push(p, BC_INST_CALL);
+ bc_parse_pushIndex(p, nparams);
- return bc_parse_pushIndex(code, nparams);
+ return BC_STATUS_SUCCESS;
}
-BcStatus bc_parse_call(BcParse *p, BcVec *code, char *name, uint8_t flags) {
+BcStatus bc_parse_call(BcParse *p, char *name, uint8_t flags) {
- BcStatus status;
- BcEntry entry, *entry_ptr;
+ BcStatus s;
+ BcId entry, *entry_ptr;
size_t idx;
entry.name = name;
- if ((status = bc_parse_params(p, code, flags))) goto err;
+ s = bc_parse_params(p, flags);
+ if (s) goto err;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) {
- status = BC_STATUS_PARSE_BAD_TOKEN;
+ if (p->l.t.t != BC_LEX_RPAREN) {
+ s = BC_STATUS_PARSE_BAD_TOKEN;
goto err;
}
- idx = bc_veco_index(&p->prog->func_map, &entry);
+ idx = bc_map_index(&p->prog->fn_map, &entry);
- if (idx == -1) {
- if ((status = bc_program_addFunc(p->prog, name, &idx))) return status;
- name = NULL;
+ if (idx == ((size_t) -1)) {
+ name = xstrdup(entry.name);
+ bc_parse_addFunc(p, name, &idx);
+ idx = bc_map_index(&p->prog->fn_map, &entry);
+ free(entry.name);
}
else free(name);
- entry_ptr = bc_veco_item(&p->prog->func_map, idx);
- if ((status = bc_parse_pushIndex(code, entry_ptr->idx))) return status;
+ entry_ptr = bc_vec_item(&p->prog->fn_map, idx);
+ bc_parse_pushIndex(p, entry_ptr->idx);
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
err:
- if (name) free(name);
- return status;
+ free(name);
+ return s;
}
-BcStatus bc_parse_name(BcParse *p, BcVec *code, BcInst *type, uint8_t flags)
-{
- BcStatus status;
+BcStatus bc_parse_name(BcParse *p, BcInst *type, uint8_t flags) {
+
+ BcStatus s;
char *name;
- name = p->lex.token.string;
+ name = xstrdup(p->l.t.v.v);
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
- if ((status = bc_lex_next(&p->lex))) goto err;
+ if (p->l.t.t == BC_LEX_LBRACKET) {
- if (p->lex.token.type == BC_LEX_LEFT_BRACKET) {
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
- *type = BC_INST_PUSH_ARRAY_ELEM;
+ if (p->l.t.t == BC_LEX_RBRACKET) {
- if ((status = bc_lex_next(&p->lex))) goto err;
- if ((status = bc_parse_expr(p, code, flags))) goto err;
+ if (!(flags & BC_PARSE_ARRAY)) {
+ s = BC_STATUS_PARSE_BAD_EXP;
+ goto err;
+ }
- if (p->lex.token.type != BC_LEX_RIGHT_BRACKET) {
- status = BC_STATUS_PARSE_BAD_TOKEN;
- goto err;
+ *type = BC_INST_ARRAY;
}
+ else {
+
+ *type = BC_INST_ARRAY_ELEM;
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_ARRAY_ELEM))) goto err;
+ flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL);
+ s = bc_parse_expr(p, flags, bc_parse_next_elem);
+ if (s) goto err;
+ }
- status = bc_parse_pushName(code, name);
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
+ bc_parse_push(p, *type);
+ bc_parse_pushName(p, name);
}
- else if (p->lex.token.type == BC_LEX_LEFT_PAREN) {
+ else if (p->l.t.t == BC_LEX_LPAREN) {
- if (flags & BC_PARSE_EXPR_NOCALL) {
- status = BC_STATUS_PARSE_BAD_TOKEN;
+ if (flags & BC_PARSE_NOCALL) {
+ s = BC_STATUS_PARSE_BAD_TOKEN;
goto err;
}
*type = BC_INST_CALL;
- status = bc_parse_call(p, code, name, flags);
+ s = bc_parse_call(p, name, flags);
}
else {
- *type = BC_INST_PUSH_VAR;
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_VAR))) goto err;
- status = bc_parse_pushName(code, name);
+ *type = BC_INST_VAR;
+ bc_parse_push(p, BC_INST_VAR);
+ bc_parse_pushName(p, name);
}
- return status;
+ return s;
err:
free(name);
- return status;
+ return s;
}
-BcStatus bc_parse_read(BcParse *p, BcVec *code) {
+BcStatus bc_parse_read(BcParse *p) {
- BcStatus status;
+ BcStatus s;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_vec_pushByte(code, BC_INST_READ))) return status;
+ bc_parse_push(p, BC_INST_READ);
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_builtin(BcParse *p, BcVec *code,
- BcLexToken type, uint8_t flags)
+BcStatus bc_parse_builtin(BcParse *p, BcLexType type,
+ uint8_t flags, BcInst *prev)
{
- BcStatus status;
- uint8_t inst;
+ BcStatus s;
+
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ flags = (flags & ~(BC_PARSE_PRINT | BC_PARSE_REL)) | BC_PARSE_ARRAY;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- status = bc_parse_expr(p, code, flags & ~(BC_PARSE_EXPR_PRINT));
- if (status) return status;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_parse_expr(p, flags, bc_parse_next_rel);
+ if (s) return s;
- inst = type == BC_LEX_KEY_LENGTH ? BC_INST_LENGTH : BC_INST_SQRT;
- if ((status = bc_vec_pushByte(code, inst))) return status;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- return bc_lex_next(&p->lex);
+ *prev = (type == BC_LEX_KEY_LENGTH) ? BC_INST_LENGTH : BC_INST_SQRT;
+ bc_parse_push(p, *prev);
+
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_scale(BcParse *p, BcVec *code, BcInst *type, uint8_t flags) {
+BcStatus bc_parse_scale(BcParse *p, BcInst *type, uint8_t flags) {
- BcStatus status;
+ BcStatus s;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) {
- *type = BC_INST_PUSH_SCALE;
- return bc_vec_pushByte(code, BC_INST_PUSH_SCALE);
+ if (p->l.t.t != BC_LEX_LPAREN) {
+ *type = BC_INST_SCALE;
+ bc_parse_push(p, BC_INST_SCALE);
+ return BC_STATUS_SUCCESS;
}
*type = BC_INST_SCALE_FUNC;
+ flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL);
- if ((status = bc_lex_next(&p->lex))) return status;
- if ((status = bc_parse_expr(p, code, flags))) return status;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_vec_pushByte(code, BC_INST_SCALE_FUNC))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- return bc_lex_next(&p->lex);
+ s = bc_parse_expr(p, flags, bc_parse_next_rel);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ bc_parse_push(p, BC_INST_SCALE_FUNC);
+
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_incdec(BcParse *p, BcVec *code, BcInst *prev,
- uint32_t *nexprs, uint8_t flags)
+BcStatus bc_parse_incdec(BcParse *p, BcInst *prev, int *paren_expr,
+ size_t *nexprs, uint8_t flags)
{
- BcStatus status;
- BcLexToken type;
- BcInst etype;
- uint8_t inst;
-
- etype = *prev;
+ BcStatus s;
+ BcLexType type;
+ char inst;
+ BcInst etype = *prev;
- if (etype == BC_INST_PUSH_VAR || etype == BC_INST_PUSH_ARRAY_ELEM ||
- etype == BC_INST_PUSH_SCALE || etype == BC_INST_PUSH_LAST ||
- etype == BC_INST_PUSH_IBASE || etype == BC_INST_PUSH_OBASE)
+ if (etype == BC_INST_VAR || etype == BC_INST_ARRAY_ELEM ||
+ etype == BC_INST_SCALE || etype == BC_INST_LAST ||
+ etype == BC_INST_IBASE || etype == BC_INST_OBASE)
{
- *prev = inst = BC_INST_INC_POST + (p->lex.token.type != BC_LEX_OP_INC);
- if ((status = bc_vec_pushByte(code, inst))) return status;
- status = bc_lex_next(&p->lex);
+ *prev = inst = BC_INST_INC_POST + (p->l.t.t != BC_LEX_OP_INC);
+ bc_parse_push(p, inst);
+ s = bc_lex_next(&p->l);
}
else {
- *prev = inst = BC_INST_INC_PRE + (p->lex.token.type != BC_LEX_OP_INC);
+ *prev = inst = BC_INST_INC_PRE + (p->l.t.t != BC_LEX_OP_INC);
+ *paren_expr = 1;
- if ((status = bc_lex_next(&p->lex))) return status;
- type = p->lex.token.type;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ type = p->l.t.t;
// Because we parse the next part of the expression
// right here, we need to increment this.
@@ -3179,222 +3300,173 @@ BcStatus bc_parse_incdec(BcParse *p, BcVec *code, BcInst *prev,
case BC_LEX_NAME:
{
- status = bc_parse_name(p, code, prev, flags | BC_PARSE_EXPR_NOCALL);
+ s = bc_parse_name(p, prev, flags | BC_PARSE_NOCALL);
break;
}
case BC_LEX_KEY_IBASE:
- {
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_IBASE))) return status;
- status = bc_lex_next(&p->lex);
- break;
- }
-
case BC_LEX_KEY_LAST:
- {
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_LAST))) return status;
- status = bc_lex_next(&p->lex);
- break;
- }
-
case BC_LEX_KEY_OBASE:
{
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_OBASE))) return status;
- status = bc_lex_next(&p->lex);
+ bc_parse_push(p, type - BC_LEX_KEY_IBASE + BC_INST_IBASE);
+ s = bc_lex_next(&p->l);
break;
}
case BC_LEX_KEY_SCALE:
{
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type == BC_LEX_LEFT_PAREN)
- return BC_STATUS_PARSE_BAD_TOKEN;
-
- status = bc_vec_pushByte(code, BC_INST_PUSH_SCALE);
-
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t == BC_LEX_LPAREN) s = BC_STATUS_PARSE_BAD_TOKEN;
+ else bc_parse_push(p, BC_INST_SCALE);
break;
}
default:
{
- return BC_STATUS_PARSE_BAD_TOKEN;
+ s = BC_STATUS_PARSE_BAD_TOKEN;
+ break;
}
}
- if (status) return status;
- status = bc_vec_pushByte(code, inst);
+ if (!s) bc_parse_push(p, inst);
}
- return status;
+ return s;
}
-BcStatus bc_parse_minus(BcParse *p, BcVec *exs, BcVec *ops, BcInst *prev,
- int rparen, uint32_t *nexprs)
+BcStatus bc_parse_minus(BcParse *p, BcInst *prev, size_t ops_bgn,
+ int rparen, size_t *nexprs)
{
- BcStatus status;
- BcLexToken type;
- BcInst etype;
-
- if ((status = bc_lex_next(&p->lex))) return status;
-
- etype = *prev;
- type = p->lex.token.type;
+ BcStatus s;
+ BcLexType type;
+ BcInst etype = *prev;
- if (type != BC_LEX_NAME && type != BC_LEX_NUMBER &&
- type != BC_LEX_KEY_SCALE && type != BC_LEX_KEY_LAST &&
- type != BC_LEX_KEY_IBASE && type != BC_LEX_KEY_OBASE &&
- type != BC_LEX_LEFT_PAREN && type != BC_LEX_OP_MINUS &&
- type != BC_LEX_OP_INC && type != BC_LEX_OP_DEC &&
- type != BC_LEX_OP_BOOL_NOT)
- {
- return BC_STATUS_PARSE_BAD_TOKEN;
- }
+ s = bc_lex_next(&p->l);
+ if (s) return s;
type = rparen || etype == BC_INST_INC_POST || etype == BC_INST_DEC_POST ||
- (etype >= BC_INST_PUSH_NUM && etype <= BC_INST_SQRT) ?
- BC_LEX_OP_MINUS : BC_LEX_OP_NEG;
- *prev = BC_PARSE_TOKEN_TO_INST(type);
+ (etype >= BC_INST_NUM && etype <= BC_INST_SQRT) ?
+ BC_LEX_OP_MINUS : BC_LEX_NEG;
+ *prev = BC_PARSE_TOKEN_INST(type);
- if (type == BC_LEX_OP_MINUS)
- status = bc_parse_operator(p, exs, ops, type, nexprs, 0);
- else
- // We can just push onto the op stack because this is the largest
- // precedence operator that gets pushed. Inc/dec does not.
- status = bc_vec_push(ops, &type);
+ // We can just push onto the op stack because this is the largest
+ // precedence operator that gets pushed. Inc/dec does not.
+ if (type != BC_LEX_OP_MINUS) bc_vec_push(&p->ops, &type);
+ else s = bc_parse_operator(p, type, ops_bgn, nexprs, 0);
- return status;
+ return s;
}
-BcStatus bc_parse_string(BcParse *p, BcVec *code) {
+BcStatus bc_parse_string(BcParse *p, char inst) {
- BcStatus status;
- size_t len;
+ char *str = xstrdup(p->l.t.v.v);
- if (strlen(p->lex.token.string) > (unsigned long) maxof_STRING) {
- status = BC_STATUS_EXEC_STRING_LEN;
- goto err;
- }
-
- len = p->prog->strings.len;
+ bc_parse_push(p, BC_INST_STR);
+ bc_parse_pushIndex(p, p->prog->strs.len);
+ bc_vec_push(&p->prog->strs, &str);
+ bc_parse_push(p, inst);
- if ((status = bc_vec_push(&p->prog->strings, &p->lex.token.string))) goto err;
- if ((status = bc_vec_pushByte(code, BC_INST_STR))) return status;
- if ((status = bc_parse_pushIndex(code, len))) return status;
-
- return bc_lex_next(&p->lex);
-
-err:
- free(p->lex.token.string);
- return status;
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_print(BcParse *p, BcVec *code) {
+BcStatus bc_parse_print(BcParse *p) {
- BcStatus status;
- BcLexToken type;
- int comma;
+ BcStatus s;
+ BcLexType type;
+ int comma = 0;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- type = p->lex.token.type;
+ type = p->l.t.t;
- if (type == BC_LEX_SEMICOLON || type == BC_LEX_NEWLINE)
+ if (type == BC_LEX_SCOLON || type == BC_LEX_NLINE)
return BC_STATUS_PARSE_BAD_PRINT;
- comma = 0;
-
- while (!status && type != BC_LEX_SEMICOLON && type != BC_LEX_NEWLINE) {
-
- if (type == BC_LEX_STRING) {
-
- size_t len = p->prog->strings.len;
+ while (!s && type != BC_LEX_SCOLON && type != BC_LEX_NLINE) {
- status = bc_vec_push(&p->prog->strings, &p->lex.token.string);
- if (status) {
- free(p->lex.token.string);
- return status;
- }
-
- if ((status = bc_vec_pushByte(code, BC_INST_PRINT_STR))) return status;
- status = bc_parse_pushIndex(code, len);
- }
+ if (type == BC_LEX_STR) s = bc_parse_string(p, BC_INST_PRINT_POP);
else {
- if ((status = bc_parse_expr(p, code, 0))) return status;
- status = bc_vec_pushByte(code, BC_INST_PRINT_EXPR);
+ s = bc_parse_expr(p, 0, bc_parse_next_print);
+ if (s) return s;
+ bc_parse_push(p, BC_INST_PRINT_POP);
}
- if (status) return status;
- if ((status = bc_lex_next(&p->lex))) return status;
+ if (s) return s;
- if (p->lex.token.type == BC_LEX_COMMA) {
- comma = 1;
- status = bc_lex_next(&p->lex);
- }
- else comma = 0;
-
- type = p->lex.token.type;
+ comma = p->l.t.t == BC_LEX_COMMA;
+ if (comma) s = bc_lex_next(&p->l);
+ type = p->l.t.t;
}
- if (status) return status;
+ if (s) return s;
if (comma) return BC_STATUS_PARSE_BAD_TOKEN;
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_return(BcParse *p, BcVec *code) {
+BcStatus bc_parse_return(BcParse *p) {
- BcStatus status;
+ BcStatus s;
+ BcLexType t;
+ int paren;
if (!BC_PARSE_FUNC(p)) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- if (p->lex.token.type != BC_LEX_NEWLINE &&
- p->lex.token.type != BC_LEX_SEMICOLON &&
- p->lex.token.type != BC_LEX_LEFT_PAREN &&
- (status = bc_posix_error(BC_STATUS_POSIX_RETURN_PARENS,
- p->lex.file, p->lex.line, NULL)))
- {
- return status;
- }
+ t = p->l.t.t;
+ paren = t == BC_LEX_LPAREN;
- if (p->lex.token.type == BC_LEX_NEWLINE ||
- p->lex.token.type == BC_LEX_SEMICOLON)
- {
- status = bc_vec_pushByte(code, BC_INST_RETURN_ZERO);
- }
+ if (t == BC_LEX_NLINE || t == BC_LEX_SCOLON) bc_parse_push(p, BC_INST_RET0);
else {
- if ((status = bc_parse_expr(p, code, 0))) return status;
- status = bc_vec_pushByte(code, BC_INST_RETURN);
- }
- return status;
-}
+ s = bc_parse_expr(p, 0, bc_parse_next_expr);
+ if (s && s != BC_STATUS_PARSE_EMPTY_EXP) return s;
+ else if (s == BC_STATUS_PARSE_EMPTY_EXP) {
+ bc_parse_push(p, BC_INST_RET0);
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ }
-BcStatus bc_parse_endBody(BcParse *p, BcVec *code, int brace) {
+ if (!paren || p->l.t.last != BC_LEX_RPAREN) {
+ s = bc_vm_posixError(BC_STATUS_POSIX_RET, p->l.f, p->l.line, NULL);
+ if (s) return s;
+ }
- BcStatus status = BC_STATUS_SUCCESS;
- uint8_t *flag_ptr;
+ bc_parse_push(p, BC_INST_RET);
+ }
- if (p->flags.len <= 1 || p->num_braces == 0) return BC_STATUS_PARSE_BAD_TOKEN;
+ return s;
+}
- if (brace) {
+BcStatus bc_parse_endBody(BcParse *p, int brace) {
- if (p->lex.token.type == BC_LEX_RIGHT_BRACE) {
+ BcStatus s = BC_STATUS_SUCCESS;
- if (!p->num_braces) return BC_STATUS_PARSE_BAD_TOKEN;
+ if (p->flags.len <= 1 || (brace && p->nbraces == 0))
+ return BC_STATUS_PARSE_BAD_TOKEN;
- --p->num_braces;
+ if (brace) {
- if ((status = bc_lex_next(&p->lex))) return status;
+ if (p->l.t.t == BC_LEX_RBRACE) {
+ if (!p->nbraces) return BC_STATUS_PARSE_BAD_TOKEN;
+ --p->nbraces;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
}
else return BC_STATUS_PARSE_BAD_TOKEN;
}
if (BC_PARSE_IF(p)) {
- while (p->lex.token.type == BC_LEX_NEWLINE) {
- if ((status = bc_lex_next(&p->lex))) return status;
+ uint8_t *flag_ptr;
+
+ while (p->l.t.t == BC_LEX_NLINE) {
+ s = bc_lex_next(&p->l);
+ if (s) return s;
}
bc_vec_pop(&p->flags);
@@ -3402,438 +3474,424 @@ BcStatus bc_parse_endBody(BcParse *p, BcVec *code, int brace) {
flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
*flag_ptr = (*flag_ptr | BC_PARSE_FLAG_IF_END);
- if (p->lex.token.type == BC_LEX_KEY_ELSE) status = bc_parse_else(p, code);
+ if (p->l.t.t == BC_LEX_KEY_ELSE) s = bc_parse_else(p);
}
else if (BC_PARSE_ELSE(p)) {
BcInstPtr *ip;
- BcFunc *func;
size_t *label;
bc_vec_pop(&p->flags);
ip = bc_vec_top(&p->exits);
- func = bc_vec_item(&p->prog->funcs, p->func);
- label = bc_vec_item(&func->labels, ip->idx);
- *label = code->len;
+ label = bc_vec_item(&p->func->labels, ip->idx);
+ *label = p->func->code.len;
bc_vec_pop(&p->exits);
}
else if (BC_PARSE_FUNC_INNER(p)) {
- p->func = 0;
- if ((status = bc_vec_pushByte(code, BC_INST_RETURN_ZERO))) return status;
+ bc_parse_push(p, BC_INST_RET0);
+ bc_parse_updateFunc(p, BC_PROG_MAIN);
bc_vec_pop(&p->flags);
}
else {
- BcInstPtr *ip;
- BcFunc *func;
- size_t *label;
-
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP))) return status;
-
- ip = bc_vec_top(&p->exits);
- label = bc_vec_top(&p->conds);
+ BcInstPtr *ip = bc_vec_top(&p->exits);
+ size_t *label = bc_vec_top(&p->conds);
- if ((status = bc_parse_pushIndex(code, *label))) return status;
+ bc_parse_push(p, BC_INST_JUMP);
+ bc_parse_pushIndex(p, *label);
- func = bc_vec_item(&p->prog->funcs, p->func);
- label = bc_vec_item(&func->labels, ip->idx);
- *label = code->len;
+ label = bc_vec_item(&p->func->labels, ip->idx);
+ *label = p->func->code.len;
bc_vec_pop(&p->flags);
bc_vec_pop(&p->exits);
bc_vec_pop(&p->conds);
}
- return status;
+ return s;
}
-BcStatus bc_parse_startBody(BcParse *p, uint8_t flags) {
+void bc_parse_startBody(BcParse *p, uint8_t flags) {
uint8_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
flags |= (*flag_ptr & (BC_PARSE_FLAG_FUNC | BC_PARSE_FLAG_LOOP));
flags |= BC_PARSE_FLAG_BODY;
- return bc_vec_push(&p->flags, &flags);
+ bc_vec_push(&p->flags, &flags);
}
-void bc_parse_noElse(BcParse *p, BcVec *code) {
+void bc_parse_noElse(BcParse *p) {
- uint8_t *flag_ptr;
BcInstPtr *ip;
- BcFunc *func;
size_t *label;
+ uint8_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
- flag_ptr = BC_PARSE_TOP_FLAG_PTR(p);
*flag_ptr = (*flag_ptr & ~(BC_PARSE_FLAG_IF_END));
ip = bc_vec_top(&p->exits);
- func = bc_vec_item(&p->prog->funcs, p->func);
- label = bc_vec_item(&func->labels, ip->idx);
- *label = code->len;
+ label = bc_vec_item(&p->func->labels, ip->idx);
+ *label = p->func->code.len;
bc_vec_pop(&p->exits);
}
-BcStatus bc_parse_if(BcParse *p, BcVec *code) {
+BcStatus bc_parse_if(BcParse *p) {
- BcStatus status;
+ BcStatus s;
BcInstPtr ip;
- BcFunc *func;
-
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
- status = bc_parse_expr(p, code, BC_PARSE_EXPR_POSIX_REL);
- if (status) return status;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP_ZERO))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ s = bc_parse_expr(p, BC_PARSE_REL, bc_parse_next_rel);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- func = bc_vec_item(&p->prog->funcs, p->func);
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ bc_parse_push(p, BC_INST_JUMP_ZERO);
- ip.idx = func->labels.len;
- ip.func = 0;
- ip.len = 0;
+ ip.idx = p->func->labels.len;
+ ip.func = ip.len = 0;
- if ((status = bc_parse_pushIndex(code, ip.idx))) return status;
- if ((status = bc_vec_push(&p->exits, &ip))) return status;
- if ((status = bc_vec_push(&func->labels, &ip.idx))) return status;
+ bc_parse_pushIndex(p, ip.idx);
+ bc_vec_push(&p->exits, &ip);
+ bc_vec_push(&p->func->labels, &ip.idx);
+ bc_parse_startBody(p, BC_PARSE_FLAG_IF);
- return bc_parse_startBody(p, BC_PARSE_FLAG_IF);
+ return BC_STATUS_SUCCESS;
}
-BcStatus bc_parse_else(BcParse *p, BcVec *code) {
+BcStatus bc_parse_else(BcParse *p) {
- BcStatus status;
BcInstPtr ip;
- BcFunc *func;
if (!BC_PARSE_IF_END(p)) return BC_STATUS_PARSE_BAD_TOKEN;
- func = bc_vec_item(&p->prog->funcs, p->func);
+ ip.idx = p->func->labels.len;
+ ip.func = ip.len = 0;
- ip.idx = func->labels.len;
- ip.func = 0;
- ip.len = 0;
-
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP))) return status;
- if ((status = bc_parse_pushIndex(code, ip.idx))) return status;
+ bc_parse_push(p, BC_INST_JUMP);
+ bc_parse_pushIndex(p, ip.idx);
- bc_parse_noElse(p, code);
+ bc_parse_noElse(p);
- if ((status = bc_vec_push(&p->exits, &ip))) return status;
- if ((status = bc_vec_push(&func->labels, &ip.idx))) return status;
- if ((status = bc_lex_next(&p->lex))) return status;
+ bc_vec_push(&p->exits, &ip);
+ bc_vec_push(&p->func->labels, &ip.idx);
+ bc_parse_startBody(p, BC_PARSE_FLAG_ELSE);
- return bc_parse_startBody(p, BC_PARSE_FLAG_ELSE);
+ return bc_lex_next(&p->l);
}
-BcStatus bc_parse_while(BcParse *p, BcVec *code) {
+BcStatus bc_parse_while(BcParse *p) {
- BcStatus status;
- BcFunc *func;
+ BcStatus s;
BcInstPtr ip;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- func = bc_vec_item(&p->prog->funcs, p->func);
- ip.idx = func->labels.len;
+ ip.idx = p->func->labels.len;
- if ((status = bc_vec_push(&func->labels, &code->len))) return status;
- if ((status = bc_vec_push(&p->conds, &ip.idx))) return status;
+ bc_vec_push(&p->func->labels, &p->func->code.len);
+ bc_vec_push(&p->conds, &ip.idx);
- ip.idx = func->labels.len;
+ ip.idx = p->func->labels.len;
ip.func = 1;
ip.len = 0;
- if ((status = bc_vec_push(&p->exits, &ip))) return status;
- if ((status = bc_vec_push(&func->labels, &ip.idx))) return status;
+ bc_vec_push(&p->exits, &ip);
+ bc_vec_push(&p->func->labels, &ip.idx);
- if ((status = bc_parse_expr(p, code, BC_PARSE_EXPR_POSIX_REL))) return status;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_parse_expr(p, BC_PARSE_REL, bc_parse_next_rel);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- if ((status = bc_lex_next(&p->lex))) return status;
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP_ZERO))) return status;
- if ((status = bc_parse_pushIndex(code, ip.idx))) return status;
+ bc_parse_push(p, BC_INST_JUMP_ZERO);
+ bc_parse_pushIndex(p, ip.idx);
+ bc_parse_startBody(p, BC_PARSE_FLAG_LOOP | BC_PARSE_FLAG_LOOP_INNER);
- return bc_parse_startBody(p, BC_PARSE_FLAG_LOOP | BC_PARSE_FLAG_LOOP_INNER);
+ return BC_STATUS_SUCCESS;
}
-BcStatus bc_parse_for(BcParse *p, BcVec *code) {
+BcStatus bc_parse_for(BcParse *p) {
- BcStatus status;
- BcFunc *func;
+ BcStatus s;
BcInstPtr ip;
size_t cond_idx, exit_idx, body_idx, update_idx;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
-
- if (p->lex.token.type != BC_LEX_SEMICOLON)
- status = bc_parse_expr(p, code, 0);
- else
- status = bc_posix_error(BC_STATUS_POSIX_NO_FOR_INIT,
- p->lex.file, p->lex.line, NULL);
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- if (status) return status;
- if (p->lex.token.type != BC_LEX_SEMICOLON) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
+ if (p->l.t.t != BC_LEX_SCOLON) s = bc_parse_expr(p, 0, bc_parse_next_for);
+ else s = bc_vm_posixError(BC_STATUS_POSIX_FOR1, p->l.f, p->l.line, NULL);
- func = bc_vec_item(&p->prog->funcs, p->func);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_SCOLON) return BC_STATUS_PARSE_BAD_TOKEN;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- cond_idx = func->labels.len;
+ cond_idx = p->func->labels.len;
update_idx = cond_idx + 1;
body_idx = update_idx + 1;
exit_idx = body_idx + 1;
- if ((status = bc_vec_push(&func->labels, &code->len))) return status;
+ bc_vec_push(&p->func->labels, &p->func->code.len);
- if (p->lex.token.type != BC_LEX_SEMICOLON)
- status = bc_parse_expr(p, code, BC_PARSE_EXPR_POSIX_REL);
- else status = bc_posix_error(BC_STATUS_POSIX_NO_FOR_COND,
- p->lex.file, p->lex.line, NULL);
+ if (p->l.t.t != BC_LEX_SCOLON)
+ s = bc_parse_expr(p, BC_PARSE_REL, bc_parse_next_for);
+ else s = bc_vm_posixError(BC_STATUS_POSIX_FOR2, p->l.f, p->l.line, NULL);
- if (status) return status;
- if (p->lex.token.type != BC_LEX_SEMICOLON) return BC_STATUS_PARSE_BAD_TOKEN;
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_SCOLON) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP_ZERO))) return status;
- if ((status = bc_parse_pushIndex(code, exit_idx))) return status;
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP))) return status;
- if ((status = bc_parse_pushIndex(code, body_idx))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- ip.idx = func->labels.len;
+ bc_parse_push(p, BC_INST_JUMP_ZERO);
+ bc_parse_pushIndex(p, exit_idx);
+ bc_parse_push(p, BC_INST_JUMP);
+ bc_parse_pushIndex(p, body_idx);
- if ((status = bc_vec_push(&p->conds, &update_idx))) return status;
- if ((status = bc_vec_push(&func->labels, &code->len))) return status;
+ ip.idx = p->func->labels.len;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN)
- status = bc_parse_expr(p, code, 0);
- else
- status = bc_posix_error(BC_STATUS_POSIX_NO_FOR_UPDATE,
- p->lex.file, p->lex.line, NULL);
+ bc_vec_push(&p->conds, &update_idx);
+ bc_vec_push(&p->func->labels, &p->func->code.len);
- if (status) return status;
+ if (p->l.t.t != BC_LEX_RPAREN) s = bc_parse_expr(p, 0, bc_parse_next_rel);
+ else s = bc_vm_posixError(BC_STATUS_POSIX_FOR3, p->l.f, p->l.line, NULL);
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) {
- status = bc_parse_expr(p, code, BC_PARSE_EXPR_POSIX_REL);
- if (status) return status;
- }
+ if (s) return s;
- if (p->lex.token.type != BC_LEX_RIGHT_PAREN) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP))) return status;
- if ((status = bc_parse_pushIndex(code, cond_idx))) return status;
- if ((status = bc_vec_push(&func->labels, &code->len))) return status;
+ if (p->l.t.t != BC_LEX_RPAREN) return BC_STATUS_PARSE_BAD_TOKEN;
+ bc_parse_push(p, BC_INST_JUMP);
+ bc_parse_pushIndex(p, cond_idx);
+ bc_vec_push(&p->func->labels, &p->func->code.len);
ip.idx = exit_idx;
ip.func = 1;
ip.len = 0;
- if ((status = bc_vec_push(&p->exits, &ip))) return status;
- if ((status = bc_vec_push(&func->labels, &ip.idx))) return status;
- if ((status = bc_lex_next(&p->lex))) return status;
+ bc_vec_push(&p->exits, &ip);
+ bc_vec_push(&p->func->labels, &ip.idx);
+ bc_lex_next(&p->l);
+ bc_parse_startBody(p, BC_PARSE_FLAG_LOOP | BC_PARSE_FLAG_LOOP_INNER);
- return bc_parse_startBody(p, BC_PARSE_FLAG_LOOP | BC_PARSE_FLAG_LOOP_INNER);
+ return BC_STATUS_SUCCESS;
}
-BcStatus bc_parse_loopExit(BcParse *p, BcVec *code, BcLexToken type) {
+BcStatus bc_parse_loopExit(BcParse *p, BcLexType type) {
- BcStatus status;
- size_t idx, top;
+ BcStatus s;
+ size_t i;
BcInstPtr *ip;
if (!BC_PARSE_LOOP(p)) return BC_STATUS_PARSE_BAD_TOKEN;
if (type == BC_LEX_KEY_BREAK) {
- if (!p->exits.len) return BC_STATUS_PARSE_BAD_TOKEN;
-
- top = p->exits.len - 1;
- ip = bc_vec_item(&p->exits, top);
+ if (p->exits.len == 0) return BC_STATUS_PARSE_BAD_TOKEN;
- while (top < p->exits.len && ip && !ip->func)
- ip = bc_vec_item(&p->exits, top--);
+ i = p->exits.len - 1;
+ ip = bc_vec_item(&p->exits, i);
- if (top >= p->exits.len || !ip) return BC_STATUS_PARSE_BAD_TOKEN;
+ while (!ip->func && i < p->exits.len) ip = bc_vec_item(&p->exits, i--);
+ if (i >= p->exits.len && !ip->func) return BC_STATUS_PARSE_BAD_TOKEN;
- idx = ip->idx;
+ i = ip->idx;
}
- else idx = *((size_t*) bc_vec_top(&p->conds));
+ else i = *((size_t*) bc_vec_top(&p->conds));
- if ((status = bc_vec_pushByte(code, BC_INST_JUMP))) return status;
- if ((status = bc_parse_pushIndex(code, idx))) return status;
- if ((status = bc_lex_next(&p->lex))) return status;
+ bc_parse_push(p, BC_INST_JUMP);
+ bc_parse_pushIndex(p, i);
- if (p->lex.token.type != BC_LEX_SEMICOLON &&
- p->lex.token.type != BC_LEX_NEWLINE)
- {
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+
+ if (p->l.t.t != BC_LEX_SCOLON && p->l.t.t != BC_LEX_NLINE)
return BC_STATUS_PARSE_BAD_TOKEN;
- }
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
}
BcStatus bc_parse_func(BcParse *p) {
- BcStatus status;
- BcFunc *fptr;
+ BcStatus s;
int var, comma = 0;
uint8_t flags;
char *name;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_NAME) return BC_STATUS_PARSE_BAD_FUNC;
- name = p->lex.token.string;
+ name = xstrdup(p->l.t.v.v);
+ bc_parse_addFunc(p, name, &p->fidx);
- if (p->lex.token.type != BC_LEX_NAME) {
- status = BC_STATUS_PARSE_BAD_FUNC;
- goto err;
- }
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ if (p->l.t.t != BC_LEX_LPAREN) return BC_STATUS_PARSE_BAD_FUNC;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- status = bc_program_addFunc(p->prog, name, &p->func);
- if (status) goto err;
+ while (p->l.t.t != BC_LEX_RPAREN) {
- fptr = bc_vec_item(&p->prog->funcs, p->func);
+ if (p->l.t.t != BC_LEX_NAME) return BC_STATUS_PARSE_BAD_FUNC;
- if ((status = bc_lex_next(&p->lex))) return status;
- if (p->lex.token.type != BC_LEX_LEFT_PAREN) return BC_STATUS_PARSE_BAD_FUNC;
- if ((status = bc_lex_next(&p->lex))) return status;
+ ++p->func->nparams;
- while (!status && p->lex.token.type != BC_LEX_RIGHT_PAREN) {
+ name = xstrdup(p->l.t.v.v);
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
- if (p->lex.token.type != BC_LEX_NAME) {
- status = BC_STATUS_PARSE_BAD_FUNC;
- goto err;
- }
+ var = p->l.t.t != BC_LEX_LBRACKET;
- ++fptr->nparams;
- name = p->lex.token.string;
+ if (!var) {
- if ((status = bc_lex_next(&p->lex))) goto err;
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
- var = p->lex.token.type != BC_LEX_LEFT_BRACKET;
+ if (p->l.t.t != BC_LEX_RBRACKET) {
+ s = BC_STATUS_PARSE_BAD_FUNC;
+ goto err;
+ }
- if (!var) {
- if ((status = bc_lex_next(&p->lex))) goto err;
- if (p->lex.token.type != BC_LEX_RIGHT_BRACKET)
- return BC_STATUS_PARSE_BAD_FUNC;
- if ((status = bc_lex_next(&p->lex))) goto err;
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
}
- comma = p->lex.token.type == BC_LEX_COMMA;
- if (comma && (status = bc_lex_next(&p->lex))) goto err;
+ comma = p->l.t.t == BC_LEX_COMMA;
+ if (comma) {
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
+ }
- if ((status = bc_func_insert(fptr, name, var))) goto err;
+ s = bc_func_insert(p->func, name, var);
+ if (s) goto err;
}
if (comma) return BC_STATUS_PARSE_BAD_FUNC;
flags = BC_PARSE_FLAG_FUNC | BC_PARSE_FLAG_FUNC_INNER | BC_PARSE_FLAG_BODY;
+ bc_parse_startBody(p, flags);
- if ((status = bc_parse_startBody(p, flags))) return status;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- if (p->lex.token.type != BC_LEX_LEFT_BRACE)
- return bc_posix_error(BC_STATUS_POSIX_HEADER_BRACE,
- p->lex.file, p->lex.line, NULL);
+ if (p->l.t.t != BC_LEX_LBRACE)
+ s = bc_vm_posixError(BC_STATUS_POSIX_BRACE, p->l.f, p->l.line, NULL);
- return status;
+ return s;
err:
free(name);
- return status;
+ return s;
}
BcStatus bc_parse_auto(BcParse *p) {
- BcStatus status;
+ BcStatus s;
int comma, var, one;
char *name;
- BcFunc *func;
if (!p->auto_part) return BC_STATUS_PARSE_BAD_TOKEN;
- if ((status = bc_lex_next(&p->lex))) return status;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- p->auto_part = comma = one = 0;
- func = bc_vec_item(&p->prog->funcs, p->func);
+ p->auto_part = comma = 0;
+ one = p->l.t.t == BC_LEX_NAME;
- while (!status && p->lex.token.type == BC_LEX_NAME) {
+ while (p->l.t.t == BC_LEX_NAME) {
- name = p->lex.token.string;
-
- if ((status = bc_lex_next(&p->lex))) return status;
-
- one = 1;
-
- var = p->lex.token.type != BC_LEX_LEFT_BRACKET;
+ name = xstrdup(p->l.t.v.v);
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
+ var = p->l.t.t != BC_LEX_LBRACKET;
if (!var) {
- if ((status = bc_lex_next(&p->lex))) goto err;
- if (p->lex.token.type != BC_LEX_RIGHT_BRACKET)
- return BC_STATUS_PARSE_BAD_FUNC;
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
+
+ if (p->l.t.t != BC_LEX_RBRACKET) {
+ s = BC_STATUS_PARSE_BAD_FUNC;
+ goto err;
+ }
- if ((status = bc_lex_next(&p->lex))) goto err;
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
}
- comma = p->lex.token.type == BC_LEX_COMMA;
- if (comma && (status = bc_lex_next(&p->lex))) goto err;
+ comma = p->l.t.t == BC_LEX_COMMA;
+ if (comma) {
+ s = bc_lex_next(&p->l);
+ if (s) goto err;
+ }
- if ((status = bc_func_insert(func, name, var))) goto err;
+ s = bc_func_insert(p->func, name, var);
+ if (s) goto err;
}
- if (status) return status;
if (comma) return BC_STATUS_PARSE_BAD_FUNC;
if (!one) return BC_STATUS_PARSE_NO_AUTO;
- if (p->lex.token.type != BC_LEX_NEWLINE &&
- p->lex.token.type != BC_LEX_SEMICOLON)
- {
+ if (p->l.t.t != BC_LEX_NLINE && p->l.t.t != BC_LEX_SCOLON)
return BC_STATUS_PARSE_BAD_TOKEN;
- }
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
err:
free(name);
- return status;
+ return s;
}
-BcStatus bc_parse_body(BcParse *p, BcVec *code, int brace) {
+BcStatus bc_parse_body(BcParse *p, int brace) {
- BcStatus status;
- uint8_t *flag_ptr;
+ BcStatus s = BC_STATUS_SUCCESS;
+ uint8_t *flag_ptr = bc_vec_top(&p->flags);
- flag_ptr = bc_vec_top(&p->flags);
*flag_ptr &= ~(BC_PARSE_FLAG_BODY);
if (*flag_ptr & BC_PARSE_FLAG_FUNC_INNER) {
+
if (!brace) return BC_STATUS_PARSE_BAD_TOKEN;
- p->auto_part = 1;
- status = bc_lex_next(&p->lex);
+ p->auto_part = p->l.t.t != BC_LEX_KEY_AUTO;
+
+ if (!p->auto_part) {
+ s = bc_parse_auto(p);
+ if (s) return s;
+ }
+
+ if (p->l.t.t == BC_LEX_NLINE) s = bc_lex_next(&p->l);
}
else {
- if ((status = bc_parse_stmt(p, code))) return status;
- if (!brace) status = bc_parse_endBody(p, code, 0);
+ s = bc_parse_stmt(p);
+ if (!s && !brace) s = bc_parse_endBody(p, 0);
}
- return status;
+ return s;
}
-BcStatus bc_parse_stmt(BcParse *p, BcVec *code) {
+BcStatus bc_parse_stmt(BcParse *p) {
- BcStatus status;
+ BcStatus s = BC_STATUS_SUCCESS;
- switch (p->lex.token.type) {
+ switch (p->l.t.t) {
- case BC_LEX_NEWLINE:
+ case BC_LEX_NLINE:
{
- return bc_lex_next(&p->lex);
+ return bc_lex_next(&p->l);
}
case BC_LEX_KEY_ELSE:
@@ -3842,14 +3900,15 @@ BcStatus bc_parse_stmt(BcParse *p, BcVec *code) {
break;
}
- case BC_LEX_LEFT_BRACE:
+ case BC_LEX_LBRACE:
{
if (!BC_PARSE_BODY(p)) return BC_STATUS_PARSE_BAD_TOKEN;
- ++p->num_braces;
- if ((status = bc_lex_next(&p->lex))) return status;
+ ++p->nbraces;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
- return bc_parse_body(p, code, 1);
+ return bc_parse_body(p, 1);
}
case BC_LEX_KEY_AUTO:
@@ -3862,22 +3921,22 @@ BcStatus bc_parse_stmt(BcParse *p, BcVec *code) {
p->auto_part = 0;
if (BC_PARSE_IF_END(p)) {
- bc_parse_noElse(p, code);
+ bc_parse_noElse(p);
return BC_STATUS_SUCCESS;
}
- else if (BC_PARSE_BODY(p)) return bc_parse_body(p, code, 0);
+ else if (BC_PARSE_BODY(p)) return bc_parse_body(p, 0);
break;
}
}
- switch (p->lex.token.type) {
+ switch (p->l.t.t) {
case BC_LEX_OP_INC:
case BC_LEX_OP_DEC:
case BC_LEX_OP_MINUS:
case BC_LEX_OP_BOOL_NOT:
- case BC_LEX_LEFT_PAREN:
+ case BC_LEX_LPAREN:
case BC_LEX_NAME:
case BC_LEX_NUMBER:
case BC_LEX_KEY_IBASE:
@@ -3888,234 +3947,153 @@ BcStatus bc_parse_stmt(BcParse *p, BcVec *code) {
case BC_LEX_KEY_SCALE:
case BC_LEX_KEY_SQRT:
{
- status = bc_parse_expr(p, code, BC_PARSE_EXPR_PRINT);
+ s = bc_parse_expr(p, BC_PARSE_PRINT, bc_parse_next_expr);
break;
}
case BC_LEX_KEY_ELSE:
{
- status = bc_parse_else(p, code);
+ s = bc_parse_else(p);
break;
}
- case BC_LEX_SEMICOLON:
+ case BC_LEX_SCOLON:
{
- status = BC_STATUS_SUCCESS;
-
- while (!status && p->lex.token.type == BC_LEX_SEMICOLON)
- status = bc_lex_next(&p->lex);
-
+ while (!s && p->l.t.t == BC_LEX_SCOLON) s = bc_lex_next(&p->l);
break;
}
- case BC_LEX_RIGHT_BRACE:
+ case BC_LEX_RBRACE:
{
- status = bc_parse_endBody(p, code, 1);
+ s = bc_parse_endBody(p, 1);
break;
}
- case BC_LEX_STRING:
+ case BC_LEX_STR:
{
- status = bc_parse_string(p, code);
+ s = bc_parse_string(p, BC_INST_PRINT_STR);
break;
}
case BC_LEX_KEY_BREAK:
case BC_LEX_KEY_CONTINUE:
{
- status = bc_parse_loopExit(p, code, p->lex.token.type);
+ s = bc_parse_loopExit(p, p->l.t.t);
break;
}
case BC_LEX_KEY_FOR:
{
- status = bc_parse_for(p, code);
+ s = bc_parse_for(p);
break;
}
case BC_LEX_KEY_HALT:
{
- if ((status = bc_vec_pushByte(code, BC_INST_HALT))) return status;
- status = bc_lex_next(&p->lex);
+ bc_parse_push(p, BC_INST_HALT);
+ s = bc_lex_next(&p->l);
break;
}
case BC_LEX_KEY_IF:
{
- status = bc_parse_if(p, code);
+ s = bc_parse_if(p);
break;
}
case BC_LEX_KEY_LIMITS:
{
- if ((status = bc_lex_next(&p->lex))) return status;
- status = BC_STATUS_LIMITS;
+ s = bc_lex_next(&p->l);
+ if (s) return s;
+ s = BC_STATUS_LIMITS;
break;
}
case BC_LEX_KEY_PRINT:
{
- status = bc_parse_print(p, code);
+ s = bc_parse_print(p);
break;
}
case BC_LEX_KEY_QUIT:
{
- // Quit is a compile-time command, so we send an exit command. We don't
- // exit directly, so the vm can clean up. Limits do the same thing.
- status = BC_STATUS_QUIT;
+ // Quit is a compile-time command. We don't exit directly,
+ // so the vm can clean up. Limits do the same thing.
+ s = BC_STATUS_QUIT;
break;
}
case BC_LEX_KEY_RETURN:
{
- if ((status = bc_parse_return(p, code))) return status;
+ s = bc_parse_return(p);
break;
}
case BC_LEX_KEY_WHILE:
{
- status = bc_parse_while(p, code);
- break;
- }
-
- case BC_LEX_EOF:
- {
- status = (p->flags.len > 0) * BC_STATUS_LEX_BAD_CHARACTER;
+ s = bc_parse_while(p);
break;
}
default:
{
- status = BC_STATUS_PARSE_BAD_TOKEN;
+ s = BC_STATUS_PARSE_BAD_TOKEN;
break;
}
}
- return status;
-}
-
-BcStatus bc_parse_init(BcParse *p, BcProgram *program) {
-
- BcStatus status;
- uint8_t flags = 0;
-
- if ((status = bc_vec_init(&p->flags, sizeof(uint8_t), NULL))) return status;
- if ((status = bc_vec_init(&p->exits, sizeof(BcInstPtr), NULL))) goto exit_err;
- if ((status = bc_vec_init(&p->conds, sizeof(size_t), NULL))) goto cond_err;
- if ((status = bc_vec_push(&p->flags, &flags))) goto push_err;
- if ((status = bc_vec_init(&p->ops, sizeof(BcLexToken), NULL))) goto push_err;
-
- p->prog = program;
- p->func = p->num_braces = 0;
- p->auto_part = 0;
-
- return status;
-
-push_err:
- bc_vec_free(&p->conds);
-cond_err:
- bc_vec_free(&p->exits);
-exit_err:
- bc_vec_free(&p->flags);
- return status;
+ return s;
}
BcStatus bc_parse_parse(BcParse *p) {
- BcStatus status;
+ BcStatus s;
- if (p->lex.token.type == BC_LEX_EOF) status = BC_STATUS_LEX_EOF;
- else if (p->lex.token.type == BC_LEX_KEY_DEFINE) {
+ if (p->l.t.t == BC_LEX_EOF)
+ s = p->flags.len > 0 ? BC_STATUS_PARSE_NO_BLOCK_END : BC_STATUS_LEX_EOF;
+ else if (p->l.t.t == BC_LEX_KEY_DEFINE) {
if (!BC_PARSE_CAN_EXEC(p)) return BC_STATUS_PARSE_BAD_TOKEN;
- status = bc_parse_func(p);
- }
- else {
- BcFunc *func = bc_vec_item(&p->prog->funcs, p->func);
- status = bc_parse_stmt(p, &func->code);
+ s = bc_parse_func(p);
}
+ else s = bc_parse_stmt(p);
- if (status || TT.signe) {
-
- if (p->func) {
-
- BcFunc *func = bc_vec_item(&p->prog->funcs, p->func);
-
- func->nparams = 0;
- bc_vec_npop(&func->code, func->code.len);
- bc_vec_npop(&func->autos, func->autos.len);
- bc_vec_npop(&func->labels, func->labels.len);
-
- p->func = 0;
- }
+ if ((s && s != BC_STATUS_QUIT && s != BC_STATUS_LIMITS) || TT.signe)
+ s = bc_parse_reset(p, s);
- p->lex.idx = p->lex.len;
- p->lex.token.type = BC_LEX_EOF;
- p->auto_part = 0;
- p->num_braces = 0;
-
- bc_vec_npop(&p->flags, p->flags.len - 1);
- bc_vec_npop(&p->exits, p->exits.len);
- bc_vec_npop(&p->conds, p->conds.len);
- bc_vec_npop(&p->ops, p->ops.len);
-
- status = bc_program_reset(p->prog, status);
- }
-
- return status;
+ return s;
}
-void bc_parse_free(BcParse *p) {
+BcStatus bc_parse_expr(BcParse *p, uint8_t flags, BcParseNext next) {
- if (!p) return;
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcInst prev = BC_INST_PRINT;
+ BcLexType top, t = p->l.t.t;
+ size_t nexprs = 0, ops_bgn = p->ops.len;
+ uint32_t i, nparens, nrelops;
+ int paren_first, paren_expr, rprn, done, get_token, assign, bin_last;
- bc_vec_free(&p->flags);
- bc_vec_free(&p->exits);
- bc_vec_free(&p->conds);
- bc_vec_free(&p->ops);
+ paren_first = p->l.t.t == BC_LEX_LPAREN;
+ nparens = nrelops = 0;
+ paren_expr = rprn = done = get_token = assign = 0;
+ bin_last = 1;
- if ((p->lex.token.type == BC_LEX_STRING || p->lex.token.type == BC_LEX_NAME ||
- p->lex.token.type == BC_LEX_NUMBER) && p->lex.token.string)
+ for (; !TT.signe && !s && !done && bc_parse_exprs[t]; t = p->l.t.t)
{
- free(p->lex.token.string);
- }
-}
-
-BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags) {
-
- BcStatus status;
- uint32_t nexprs, nparens, ops_start, nrelops;
- int paren_first, paren_expr, rparen, done, get_token, assign;
- BcInst prev;
- BcLexToken type, top;
-
- status = BC_STATUS_SUCCESS;
- prev = BC_INST_PRINT;
-
- ops_start = p->ops.len;
- paren_first = p->lex.token.type == BC_LEX_LEFT_PAREN;
- nexprs = nparens = nrelops = 0;
- paren_expr = rparen = done = get_token = assign = 0;
-
- type = p->lex.token.type;
-
- while (!TT.signe && !status && !done && bc_parse_token_exprs[type]) {
-
- switch (type) {
+ switch (t) {
case BC_LEX_OP_INC:
case BC_LEX_OP_DEC:
{
- status = bc_parse_incdec(p, code, &prev, &nexprs, flags);
- rparen = get_token = 0;
+ s = bc_parse_incdec(p, &prev, &paren_expr, &nexprs, flags);
+ rprn = get_token = bin_last = 0;
break;
}
case BC_LEX_OP_MINUS:
{
- status = bc_parse_minus(p, code, &p->ops, &prev,
- rparen, &nexprs);
- rparen = get_token = 0;
+ s = bc_parse_minus(p, &prev, ops_bgn, rprn, &nexprs);
+ rprn = get_token = 0;
+ bin_last = prev == BC_INST_MINUS;
break;
}
@@ -4126,93 +4104,99 @@ BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags) {
case BC_LEX_OP_ASSIGN_PLUS:
case BC_LEX_OP_ASSIGN_MINUS:
case BC_LEX_OP_ASSIGN:
- if (prev != BC_INST_PUSH_VAR && prev != BC_INST_PUSH_ARRAY_ELEM &&
- prev != BC_INST_PUSH_SCALE && prev != BC_INST_PUSH_IBASE &&
- prev != BC_INST_PUSH_OBASE && prev != BC_INST_PUSH_LAST)
+ {
+ if (prev != BC_INST_VAR && prev != BC_INST_ARRAY_ELEM &&
+ prev != BC_INST_SCALE && prev != BC_INST_IBASE &&
+ prev != BC_INST_OBASE && prev != BC_INST_LAST)
{
- status = BC_STATUS_PARSE_BAD_ASSIGN;
+ s = BC_STATUS_PARSE_BAD_ASSIGN;
break;
}
- // Fallthrough.
+ }
+ // Fallthrough.
case BC_LEX_OP_POWER:
case BC_LEX_OP_MULTIPLY:
case BC_LEX_OP_DIVIDE:
case BC_LEX_OP_MODULUS:
case BC_LEX_OP_PLUS:
- case BC_LEX_OP_REL_EQUAL:
- case BC_LEX_OP_REL_LESS_EQ:
- case BC_LEX_OP_REL_GREATER_EQ:
- case BC_LEX_OP_REL_NOT_EQ:
- case BC_LEX_OP_REL_LESS:
- case BC_LEX_OP_REL_GREATER:
+ case BC_LEX_OP_REL_EQ:
+ case BC_LEX_OP_REL_LE:
+ case BC_LEX_OP_REL_GE:
+ case BC_LEX_OP_REL_NE:
+ case BC_LEX_OP_REL_LT:
+ case BC_LEX_OP_REL_GT:
case BC_LEX_OP_BOOL_NOT:
case BC_LEX_OP_BOOL_OR:
case BC_LEX_OP_BOOL_AND:
{
- if (type >= BC_LEX_OP_REL_EQUAL && type <= BC_LEX_OP_REL_GREATER)
- nrelops += 1;
+ if (((t == BC_LEX_OP_BOOL_NOT) != bin_last) ||
+ (t != BC_LEX_OP_BOOL_NOT && prev == BC_INST_BOOL_NOT))
+ {
+ return BC_STATUS_PARSE_BAD_EXP;
+ }
- prev = BC_PARSE_TOKEN_TO_INST(type);
- status = bc_parse_operator(p, code, &p->ops, type, &nexprs, 1);
- rparen = get_token = 0;
+ nrelops += t >= BC_LEX_OP_REL_EQ && t <= BC_LEX_OP_REL_GT;
+ prev = BC_PARSE_TOKEN_INST(t);
+ s = bc_parse_operator(p, t, ops_bgn, &nexprs, 1);
+ rprn = get_token = 0;
+ bin_last = t != BC_LEX_OP_BOOL_NOT;
break;
}
- case BC_LEX_LEFT_PAREN:
+ case BC_LEX_LPAREN:
{
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+
++nparens;
- paren_expr = rparen = 0;
+ paren_expr = rprn = bin_last = 0;
get_token = 1;
- status = bc_vec_push(&p->ops, &type);
+ bc_vec_push(&p->ops, &t);
+
break;
}
- case BC_LEX_RIGHT_PAREN:
+ case BC_LEX_RPAREN:
{
+ if (bin_last || prev == BC_INST_BOOL_NOT)
+ return BC_STATUS_PARSE_BAD_EXP;
+
if (nparens == 0) {
- status = BC_STATUS_SUCCESS;
+ s = BC_STATUS_SUCCESS;
done = 1;
get_token = 0;
break;
}
- else if (!paren_expr) {
- status = BC_STATUS_PARSE_BAD_EXPR;
- goto err;
- }
+ else if (!paren_expr) return BC_STATUS_PARSE_EMPTY_EXP;
--nparens;
- paren_expr = rparen = 1;
- get_token = 0;
+ paren_expr = rprn = 1;
+ get_token = bin_last = 0;
- status = bc_parse_rightParen(p, code, &p->ops, &nexprs);
+ s = bc_parse_rightParen(p, ops_bgn, &nexprs);
break;
}
case BC_LEX_NAME:
{
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+
paren_expr = 1;
- rparen = get_token = 0;
- status = bc_parse_name(p, code, &prev, flags & ~(BC_PARSE_EXPR_NOCALL));
+ rprn = get_token = bin_last = 0;
+ s = bc_parse_name(p, &prev, flags & ~BC_PARSE_NOCALL);
++nexprs;
+
break;
}
case BC_LEX_NUMBER:
{
- size_t idx = p->prog->constants.len;
-
- status = bc_vec_push(&p->prog->constants, &p->lex.token.string);
- if (status) goto err;
-
- if ((status = bc_vec_pushByte(code, BC_INST_PUSH_NUM))) return status;
- if ((status = bc_parse_pushIndex(code, idx))) return status;
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+ bc_parse_number(p, &prev, &nexprs);
paren_expr = get_token = 1;
- rparen = 0;
- ++nexprs;
- prev = BC_INST_PUSH_NUM;
+ rprn = bin_last = 0;
break;
}
@@ -4221,13 +4205,14 @@ BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags) {
case BC_LEX_KEY_LAST:
case BC_LEX_KEY_OBASE:
{
- uint8_t inst = type - BC_LEX_KEY_IBASE + BC_INST_PUSH_IBASE;
- status = bc_vec_pushByte(code, inst);
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+
+ prev = (char) (t - BC_LEX_KEY_IBASE + BC_INST_IBASE);
+ bc_parse_push(p, (char) prev);
paren_expr = get_token = 1;
- rparen = 0;
+ rprn = bin_last = 0;
++nexprs;
- prev = BC_INST_PUSH_OBASE;
break;
}
@@ -4235,21 +4220,24 @@ BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags) {
case BC_LEX_KEY_LENGTH:
case BC_LEX_KEY_SQRT:
{
- status = bc_parse_builtin(p, code, type, flags);
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+
+ s = bc_parse_builtin(p, t, flags, &prev);
paren_expr = 1;
- rparen = get_token = 0;
+ rprn = get_token = bin_last = 0;
++nexprs;
- prev = type == BC_LEX_KEY_LENGTH ? BC_INST_LENGTH : BC_INST_SQRT;
+
break;
}
case BC_LEX_KEY_READ:
{
- if (flags & BC_PARSE_EXPR_NOREAD) status = BC_STATUS_EXEC_NESTED_READ;
- else status = bc_parse_read(p, code);
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+ else if (flags & BC_PARSE_NOREAD) s = BC_STATUS_EXEC_REC_READ;
+ else s = bc_parse_read(p);
paren_expr = 1;
- rparen = get_token = 0;
+ rprn = get_token = bin_last = 0;
++nexprs;
prev = BC_INST_READ;
@@ -4258,244 +4246,155 @@ BcStatus bc_parse_expr(BcParse *p, BcVec *code, uint8_t flags) {
case BC_LEX_KEY_SCALE:
{
- status = bc_parse_scale(p, code, &prev, flags);
+ if (BC_PARSE_LEAF(prev, rprn)) return BC_STATUS_PARSE_BAD_EXP;
+
+ s = bc_parse_scale(p, &prev, flags);
paren_expr = 1;
- rparen = get_token = 0;
+ rprn = get_token = bin_last = 0;
++nexprs;
- prev = BC_INST_PUSH_SCALE;
+ prev = BC_INST_SCALE;
+
break;
}
default:
{
- status = BC_STATUS_PARSE_BAD_TOKEN;
+ s = BC_STATUS_PARSE_BAD_TOKEN;
break;
}
}
- if (status) goto err;
- if (get_token) status = bc_lex_next(&p->lex);
-
- type = p->lex.token.type;
+ if (!s && get_token) s = bc_lex_next(&p->l);
}
- if (status) goto err;
- if (TT.signe) {
- status = BC_STATUS_EXEC_SIGNAL;
- goto err;
- }
-
- status = BC_STATUS_SUCCESS;
+ if (s) return s;
+ if (TT.signe) return BC_STATUS_EXEC_SIGNAL;
- while (!status && p->ops.len > ops_start) {
+ while (p->ops.len > ops_bgn) {
- top = *((BcLexToken*) bc_vec_top(&p->ops));
+ top = BC_PARSE_TOP_OP(p);
assign = top >= BC_LEX_OP_ASSIGN_POWER && top <= BC_LEX_OP_ASSIGN;
- if (top == BC_LEX_LEFT_PAREN || top == BC_LEX_RIGHT_PAREN) {
- status = BC_STATUS_PARSE_BAD_EXPR;
- goto err;
- }
+ if (top == BC_LEX_LPAREN || top == BC_LEX_RPAREN)
+ return BC_STATUS_PARSE_BAD_EXP;
- if ((status = bc_vec_pushByte(code, BC_PARSE_TOKEN_TO_INST(top)))) goto err;
+ bc_parse_push(p, BC_PARSE_TOKEN_INST(top));
- nexprs -= top != BC_LEX_OP_BOOL_NOT && top != BC_LEX_OP_NEG;
+ nexprs -= top != BC_LEX_OP_BOOL_NOT && top != BC_LEX_NEG;
bc_vec_pop(&p->ops);
}
- if (nexprs != 1) {
- status = BC_STATUS_PARSE_BAD_EXPR;
- goto err;
- }
+ s = BC_STATUS_PARSE_BAD_EXP;
+ if (prev == BC_INST_BOOL_NOT || nexprs != 1) return s;
- if (!(flags & BC_PARSE_EXPR_POSIX_REL) && nrelops &&
- (status = bc_posix_error(BC_STATUS_POSIX_REL_OUTSIDE,
- p->lex.file, p->lex.line, NULL)))
- {
- goto err;
- }
- else if ((flags & BC_PARSE_EXPR_POSIX_REL) && nrelops != 1 &&
- (status = bc_posix_error(BC_STATUS_POSIX_MULTIPLE_REL,
- p->lex.file, p->lex.line, NULL)))
- {
- goto err;
- }
+ for (i = 0; s && i < next.len; ++i) s *= t != next.tokens[i];
+ if (s) return s;
- if (flags & BC_PARSE_EXPR_PRINT) {
- if (paren_first || !assign) status = bc_vec_pushByte(code, BC_INST_PRINT);
- else status = bc_vec_pushByte(code, BC_INST_POP);
+ if (!(flags & BC_PARSE_REL) && nrelops) {
+ s = bc_vm_posixError(BC_STATUS_POSIX_REL_POS, p->l.f, p->l.line, NULL);
+ if (s) return s;
}
-
- return status;
-
-err:
-
- if (p->lex.token.string) {
- free(p->lex.token.string);
- p->lex.token.string = NULL;
- }
-
- return status;
-}
-
-BcStatus bc_program_search(BcProgram *p, BcResult *result,
- BcNum **ret, uint8_t flags)
-{
- BcStatus status;
- BcEntry entry, *entry_ptr;
- BcVec *vec;
- BcVecO *veco;
- size_t idx, ip_idx;
- BcAuto *a;
- int var;
-
- for (ip_idx = 0; ip_idx < p->stack.len - 1; ++ip_idx) {
-
- BcFunc *func;
- BcInstPtr *ip;
-
- ip = bc_vec_item_rev(&p->stack, ip_idx);
- if (ip->func == BC_PROGRAM_READ || ip->func == BC_PROGRAM_MAIN) continue;
-
- func = bc_vec_item(&p->funcs, ip->func);
-
- for (idx = 0; idx < func->autos.len; ++idx) {
-
- a = bc_vec_item(&func->autos, idx);
-
- if (!strcmp(a->name, result->data.id.name)) {
-
- BcResult *r;
- uint8_t cond;
-
- cond = flags & BC_PROGRAM_SEARCH_VAR;
-
- if (!a->var != !cond) return BC_STATUS_EXEC_BAD_TYPE;
-
- r = bc_vec_item(&p->results, ip->len + idx);
-
- if (cond || flags & BC_PROGRAM_SEARCH_ARRAY) *ret = &r->data.num;
- else {
- status = bc_array_expand(&r->data.array, result->data.id.idx + 1);
- if (status) return status;
- *ret = bc_vec_item(&r->data.array, result->data.id.idx);
- }
-
- return BC_STATUS_SUCCESS;
- }
- }
+ else if ((flags & BC_PARSE_REL) && nrelops > 1) {
+ s = bc_vm_posixError(BC_STATUS_POSIX_MULTIREL, p->l.f, p->l.line, NULL);
+ if (s) return s;
}
- var = flags & BC_PROGRAM_SEARCH_VAR;
- vec = var ? &p->vars : &p->arrays;
- veco = var ? &p->var_map : &p->array_map;
-
- entry.name = result->data.id.name;
- entry.idx = vec->len;
-
- status = bc_veco_insert(veco, &entry, &idx);
-
- if (status != BC_STATUS_VEC_ITEM_EXISTS) {
-
- // We use this because it has a union of BcNum and BcVec.
- BcResult data;
- size_t len;
-
- if (status) return status;
-
- len = strlen(entry.name) + 1;
-
- if (!(result->data.id.name = malloc(len))) return BC_STATUS_MALLOC_FAIL;
-
- strcpy(result->data.id.name, entry.name);
-
- if (flags & BC_PROGRAM_SEARCH_VAR)
- status = bc_num_init(&data.data.num, BC_NUM_DEF_SIZE);
- else status = bc_vec_init(&data.data.array, sizeof(BcNum), bc_num_free);
-
- if (status) return status;
- if ((status = bc_vec_push(vec, &data.data))) return status;
+ if (flags & BC_PARSE_PRINT) {
+ if (paren_first || !assign) bc_parse_push(p, BC_INST_PRINT);
+ bc_parse_push(p, BC_INST_POP);
}
- entry_ptr = bc_veco_item(veco, idx);
+ return s;
+}
- if (var) *ret = bc_vec_item(vec, entry_ptr->idx);
- else {
+void bc_program_search(BcProgram *p, char *id, BcVec **ret, int var) {
- BcVec *ptr = bc_vec_item(vec, entry_ptr->idx);
+ BcStatus s;
+ BcId e, *ptr;
+ BcVec *v, *map;
+ size_t i;
+ BcResultData data;
+ int new;
- if (flags & BC_PROGRAM_SEARCH_ARRAY) {
- *ret = (BcNum*) ptr;
- return BC_STATUS_SUCCESS;
- }
+ v = var ? &p->vars : &p->arrs;
+ map = var ? &p->var_map : &p->arr_map;
- if ((status = bc_array_expand(ptr, result->data.id.idx + 1))) return status;
+ e.name = id;
+ e.idx = v->len;
+ s = bc_map_insert(map, &e, &i);
+ new = s != BC_STATUS_VEC_ITEM_EXISTS;
- *ret = bc_vec_item(ptr, result->data.id.idx);
+ if (new) {
+ bc_array_init(&data.v, var);
+ bc_vec_push(v, &data.v);
}
- return BC_STATUS_SUCCESS;
+ ptr = bc_vec_item(map, i);
+ if (new) ptr->name = xstrdup(e.name);
+ *ret = bc_vec_item(v, ptr->idx);
}
-BcStatus bc_program_num(BcProgram *p, BcResult *result, BcNum** num, int hex) {
+BcStatus bc_program_num(BcProgram *p, BcResult *r, BcNum **num, int hex) {
- BcStatus status = BC_STATUS_SUCCESS;
+ BcStatus s = BC_STATUS_SUCCESS;
- switch (result->type) {
+ switch (r->t) {
+ case BC_RESULT_STR:
case BC_RESULT_TEMP:
+ case BC_RESULT_IBASE:
case BC_RESULT_SCALE:
+ case BC_RESULT_OBASE:
{
- *num = &result->data.num;
+ *num = &r->d.n;
break;
}
case BC_RESULT_CONSTANT:
{
- char** s;
- size_t len, base;
+ char **str = bc_vec_item(&p->consts, r->d.id.idx);
+ size_t base_t, len = strlen(*str);
+ BcNum *base;
- s = bc_vec_item(&p->constants, result->data.id.idx);
- len = strlen(*s);
+ bc_num_init(&r->d.n, len);
- if ((status = bc_num_init(&result->data.num, len))) return status;
+ hex = hex && len == 1;
+ base = hex ? &p->hexb : &p->ib;
+ base_t = hex ? BC_NUM_MAX_IBASE : p->ib_t;
+ s = bc_num_parse(&r->d.n, *str, base, base_t);
- base = hex && len == 1 ? BC_NUM_MAX_INPUT_BASE : p->ibase_t;
-
- if ((status = bc_num_parse(&result->data.num, *s, &p->ibase, base))) {
- bc_num_free(&result->data.num);
- return status;
+ if (s) {
+ bc_num_free(&r->d.n);
+ return s;
}
- *num = &result->data.num;
- result->type = BC_RESULT_TEMP;
+ *num = &r->d.n;
+ r->t = BC_RESULT_TEMP;
break;
}
case BC_RESULT_VAR:
case BC_RESULT_ARRAY:
+ case BC_RESULT_ARRAY_ELEM:
{
- uint8_t flags = result->type == BC_RESULT_VAR ? BC_PROGRAM_SEARCH_VAR : 0;
- status = bc_program_search(p, result, num, flags);
- break;
- }
+ BcVec *v;
- case BC_RESULT_LAST:
- {
- *num = &p->last;
- break;
- }
+ bc_program_search(p, r->d.id.name, &v, r->t == BC_RESULT_VAR);
+
+ if (r->t == BC_RESULT_ARRAY_ELEM) {
+ v = bc_vec_top(v);
+ if (v->len <= r->d.id.idx) bc_array_expand(v, r->d.id.idx + 1);
+ *num = bc_vec_item(v, r->d.id.idx);
+ }
+ else *num = bc_vec_top(v);
- case BC_RESULT_IBASE:
- {
- *num = &p->ibase;
break;
}
- case BC_RESULT_OBASE:
+ case BC_RESULT_LAST:
{
- *num = &p->obase;
+ *num = &p->last;
break;
}
@@ -4504,338 +4403,333 @@ BcStatus bc_program_num(BcProgram *p, BcResult *result, BcNum** num, int hex) {
*num = &p->one;
break;
}
-
- default:
- {
- // This is here to prevent compiler warnings in release mode.
- *num = &result->data.num;
- break;
- }
}
- return status;
+ return s;
}
-BcStatus bc_program_binaryOpPrep(BcProgram *p, BcResult **left, BcNum **lval,
- BcResult **right, BcNum **rval)
+BcStatus bc_program_binOpPrep(BcProgram *p, BcResult **l, BcNum **ln,
+ BcResult **r, BcNum **rn, int assign)
{
- BcStatus status;
- BcResult *l, *r;
+ BcStatus s;
int hex;
+ BcResultType lt, rt;
- r = bc_vec_item_rev(&p->results, 0);
- l = bc_vec_item_rev(&p->results, 1);
+ if (!BC_PROG_STACK(&p->results, 2)) return BC_STATUS_EXEC_STACK;
- *left = l;
- *right = r;
+ *r = bc_vec_item_rev(&p->results, 0);
+ *l = bc_vec_item_rev(&p->results, 1);
- hex = l->type == BC_RESULT_IBASE || l->type == BC_RESULT_OBASE;
+ lt = (*l)->t;
+ rt = (*r)->t;
+ hex = assign && (lt == BC_RESULT_IBASE || lt == BC_RESULT_OBASE);
- if ((status = bc_program_num(p, l, lval, 0))) return status;
- if ((status = bc_program_num(p, r, rval, hex))) return status;
+ s = bc_program_num(p, *l, ln, 0);
+ if (s) return s;
+ s = bc_program_num(p, *r, rn, hex);
+ if (s) return s;
- return BC_STATUS_SUCCESS;
+ // We run this again under these conditions in case any vector has been
+ // reallocated out from under the BcNums or arrays we had.
+ if (lt == rt && (lt == BC_RESULT_VAR || lt == BC_RESULT_ARRAY_ELEM)) {
+ s = bc_program_num(p, *l, ln, 0);
+ if (s) return s;
+ }
+
+ if (!BC_PROG_NUM((*l), (*ln)) && (!assign || (*l)->t != BC_RESULT_VAR))
+ return BC_STATUS_EXEC_BAD_TYPE;
+ if (!assign && !BC_PROG_NUM((*r), (*ln))) return BC_STATUS_EXEC_BAD_TYPE;
+
+ return s;
}
-BcStatus bc_program_binaryOpRetire(BcProgram *p, BcResult *result,
- BcResultType type)
-{
- result->type = type;
+void bc_program_binOpRetire(BcProgram *p, BcResult *r) {
+ r->t = BC_RESULT_TEMP;
bc_vec_pop(&p->results);
bc_vec_pop(&p->results);
- return bc_vec_push(&p->results, result);
+ bc_vec_push(&p->results, r);
}
-BcStatus bc_program_unaryOpPrep(BcProgram *p, BcResult **result, BcNum **val) {
+BcStatus bc_program_prep(BcProgram *p, BcResult **r, BcNum **n) {
- BcStatus status;
- BcResult *r;
+ BcStatus s;
- r = bc_vec_item_rev(&p->results, 0);
+ if (!BC_PROG_STACK(&p->results, 1)) return BC_STATUS_EXEC_STACK;
+ *r = bc_vec_top(&p->results);
- if ((status = bc_program_num(p, r, val, 0))) return status;
+ s = bc_program_num(p, *r, n, 0);
+ if (s) return s;
- *result = r;
+ if (!BC_PROG_NUM((*r), (*n))) return BC_STATUS_EXEC_BAD_TYPE;
- return BC_STATUS_SUCCESS;
+ return s;
}
-BcStatus bc_program_unaryOpRetire(BcProgram *p, BcResult *result,
- BcResultType type)
-{
- result->type = type;
+void bc_program_retire(BcProgram *p, BcResult *r, BcResultType t) {
+ r->t = t;
bc_vec_pop(&p->results);
- return bc_vec_push(&p->results, result);
+ bc_vec_push(&p->results, r);
}
-BcStatus bc_program_op(BcProgram *p, uint8_t inst) {
-
- BcStatus status;
- BcResult *operand1, *operand2, res;
- BcNum *num1, *num2;
- BcNumBinaryFunc op;
+BcStatus bc_program_op(BcProgram *p, char inst) {
- status = bc_program_binaryOpPrep(p, &operand1, &num1, &operand2, &num2);
- if (status) return status;
+ BcStatus s;
+ BcResult *opd1, *opd2, res;
+ BcNum *n1, *n2 = NULL;
- if ((status = bc_num_init(&res.data.num, BC_NUM_DEF_SIZE))) return status;
+ s = bc_program_binOpPrep(p, &opd1, &n1, &opd2, &n2, 0);
+ if (s) return s;
+ bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
- op = bc_program_math_ops[inst - BC_INST_POWER];
- if ((status = op(num1, num2, &res.data.num, p->scale))) goto err;
- if ((status = bc_program_binaryOpRetire(p, &res, BC_RESULT_TEMP))) goto err;
+ s = bc_program_ops[inst - BC_INST_POWER](n1, n2, &res.d.n, p->scale);
+ if (s) goto err;
+ bc_program_binOpRetire(p, &res);
- return status;
+ return s;
err:
- bc_num_free(&res.data.num);
- return status;
+ bc_num_free(&res.d.n);
+ return s;
}
BcStatus bc_program_read(BcProgram *p) {
- BcStatus status;
+ BcStatus s;
BcParse parse;
- char *buffer;
- size_t size;
- BcFunc *func;
+ BcVec buf;
BcInstPtr ip;
+ size_t i;
+ BcFunc *f = bc_vec_item(&p->fns, BC_PROG_READ);
- func = bc_vec_item(&p->funcs, BC_PROGRAM_READ);
- func->code.len = 0;
-
- if (!(buffer = malloc(BC_PROGRAM_BUF_SIZE + 1))) return BC_STATUS_MALLOC_FAIL;
+ for (i = 0; i < p->stack.len; ++i) {
+ BcInstPtr *ip_ptr = bc_vec_item(&p->stack, i);
+ if (ip_ptr->func == BC_PROG_READ) return BC_STATUS_EXEC_REC_READ;
+ }
- size = BC_PROGRAM_BUF_SIZE;
+ bc_vec_npop(&f->code, f->code.len);
+ bc_vec_init(&buf, sizeof(char), NULL);
- if ((status = bc_io_getline(&buffer, &size)))goto io_err;
+ s = bc_read_line(&buf, "read> ");
+ if (s) goto io_err;
- if ((status = bc_parse_init(&parse, p))) goto io_err;
- bc_lex_init(&parse.lex, "<stdin>");
- if ((status = bc_lex_text(&parse.lex, buffer))) goto exec_err;
+ bc_parse_init(&parse, p, BC_PROG_READ);
+ bc_lex_file(&parse.l, bc_program_stdin_name);
- if ((status = bc_parse_expr(&parse, &func->code, BC_PARSE_EXPR_NOREAD))) return status;
+ s = bc_parse_text(&parse, buf.v);
+ if (s) goto exec_err;
+ s = bc_parse_expr(&parse, BC_PARSE_NOREAD, bc_parse_next_read);
+ if (s) goto exec_err;
- if (parse.lex.token.type != BC_LEX_NEWLINE &&
- parse.lex.token.type != BC_LEX_EOF)
- {
- status = BC_STATUS_EXEC_BAD_READ_EXPR;
+ if (parse.l.t.t != BC_LEX_NLINE && parse.l.t.t != BC_LEX_EOF) {
+ s = BC_STATUS_EXEC_BAD_READ_EXPR;
goto exec_err;
}
- ip.func = BC_PROGRAM_READ;
+ ip.func = BC_PROG_READ;
ip.idx = 0;
ip.len = p->results.len;
- if ((status = bc_vec_push(&p->stack, &ip))) goto exec_err;
- if ((status = bc_program_exec(p))) goto exec_err;
+ // Update this pointer, just in case.
+ f = bc_vec_item(&p->fns, BC_PROG_READ);
- bc_vec_pop(&p->stack);
+ bc_vec_pushByte(&f->code, BC_INST_POP_EXEC);
+ bc_vec_push(&p->stack, &ip);
exec_err:
bc_parse_free(&parse);
io_err:
- free(buffer);
- return status;
+ bc_vec_free(&buf);
+ return s;
}
-size_t bc_program_index(uint8_t *code, size_t *start) {
+size_t bc_program_index(char *code, size_t *bgn) {
- uint8_t bytes, i;
- size_t result;
+ char amt = code[(*bgn)++], i = 0;
+ size_t res = 0;
- for (bytes = code[(*start)++], result = 0, i = 0; i < bytes; ++i)
- result |= (((size_t) code[(*start)++]) << (i * CHAR_BIT));
+ for (; i < amt; ++i, ++(*bgn))
+ res |= (((size_t) ((int) code[*bgn]) & UCHAR_MAX) << (i * CHAR_BIT));
- return result;
+ return res;
}
-char* bc_program_name(uint8_t *code, size_t *start) {
-
- char byte, *s, *string, *ptr;
- size_t len, i;
-
- string = (char*) (code + *start);
- ptr = strchr((char*) string, ':');
+char* bc_program_name(char *code, size_t *bgn) {
- if (ptr) len = ((unsigned long) ptr) - ((unsigned long) string);
- else len = strlen(string);
+ size_t i;
+ char c, *s, *str = code + *bgn, *ptr = strchr(str, BC_PARSE_STREND);
- if (!(s = malloc(len + 1))) return NULL;
+ s = xmalloc(ptr - str + 1);
+ c = code[(*bgn)++];
- for (byte = code[(*start)++], i = 0; byte && byte != ':'; ++i) {
- s[i] = byte;
- byte = code[(*start)++];
- }
+ for (i = 0; c && c != BC_PARSE_STREND; c = code[(*bgn)++], ++i)
+ s[i] = c;
s[i] = '\0';
return s;
}
-BcStatus bc_program_printString(const char *str, size_t *nchars) {
+void bc_program_printString(const char *str, size_t *nchars) {
- char c, c2;
- size_t len, i;
- int err;
+ size_t i, len = strlen(str);
- len = strlen(str);
+ for (i = 0; i < len; ++i, ++(*nchars)) {
- for (i = 0; i < len; ++i, ++(*nchars)) {
+ int c = str[i];
- if ((c = str[i]) != '\\') err = putchar(c);
+ if (c != '\\' || i == len - 1) bc_vm_putchar(c);
else {
- ++i;
- c2 = str[i];
+ c = str[++i];
- switch (c2) {
+ switch (c) {
case 'a':
{
- err = putchar('\a');
+ bc_vm_putchar('\a');
break;
}
case 'b':
{
- err = putchar('\b');
+ bc_vm_putchar('\b');
break;
}
+ case '\\':
case 'e':
{
- err = putchar('\\');
+ bc_vm_putchar('\\');
break;
}
case 'f':
{
- err = putchar('\f');
+ bc_vm_putchar('\f');
break;
}
case 'n':
{
- err = putchar('\n');
+ bc_vm_putchar('\n');
*nchars = SIZE_MAX;
break;
}
case 'r':
{
- err = putchar('\r');
+ bc_vm_putchar('\r');
break;
}
case 'q':
{
- err = putchar('"');
+ bc_vm_putchar('"');
break;
}
case 't':
{
- err = putchar('\t');
+ bc_vm_putchar('\t');
break;
}
default:
{
- // Do nothing.
- err = 0;
+ // Just print the backslash and following character.
+ bc_vm_putchar('\\');
+ ++(*nchars);
+ bc_vm_putchar(c);
break;
}
}
}
-
- if (err == EOF) return BC_STATUS_IO_ERR;
}
-
- return BC_STATUS_SUCCESS;
}
-BcStatus bc_program_push(BcProgram *p, uint8_t *code, size_t *start, int var) {
+BcStatus bc_program_print(BcProgram *p, char inst, size_t idx) {
- BcStatus status;
- BcResult result;
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcResult *r;
+ size_t len, i;
+ char *str;
+ BcNum *num = NULL;
+ int pop = inst != BC_INST_PRINT;
- result.data.id.name = bc_program_name(code, start);
+ if (!BC_PROG_STACK(&p->results, idx + 1)) return BC_STATUS_EXEC_STACK;
- if (var) {
- result.type = BC_RESULT_VAR;
- status = bc_vec_push(&p->results, &result);
+ r = bc_vec_item_rev(&p->results, idx);
+ s = bc_program_num(p, r, &num, 0);
+ if (s) return s;
+
+ if (BC_PROG_NUM(r, num)) {
+ s = bc_num_print(num, &p->ob, p->ob_t, !pop, &p->nchars, p->len);
+ if (!s) bc_num_copy(&p->last, num);
}
else {
- BcResult *operand;
- BcNum *num;
- unsigned long temp;
-
- if ((status = bc_program_unaryOpPrep(p, &operand, &num))) goto err;
- if ((status = bc_num_ulong(num, &temp))) goto err;
+ idx = (r->t == BC_RESULT_STR) ? r->d.id.idx : num->rdx;
+ str = *((char**) bc_vec_item(&p->strs, idx));
- if (temp > (unsigned long) maxof_DIM) {
- status = BC_STATUS_EXEC_ARRAY_LEN;
- goto err;
+ if (inst == BC_INST_PRINT_STR) {
+ for (i = 0, len = strlen(str); i < len; ++i) {
+ char c = str[i];
+ bc_vm_putchar(c);
+ if (c == '\n') p->nchars = SIZE_MAX;
+ ++p->nchars;
+ }
+ }
+ else {
+ bc_program_printString(str, &p->nchars);
+ if (inst == BC_INST_PRINT) bc_vm_putchar('\n');
}
-
- result.data.id.idx = (size_t) temp;
-
- status = bc_program_unaryOpRetire(p, &result, BC_RESULT_ARRAY);
}
- if (status) goto err;
+ if (!s && pop) bc_vec_pop(&p->results);
- return status;
-
-err:
- free(result.data.id.name);
- return status;
+ return s;
}
BcStatus bc_program_negate(BcProgram *p) {
- BcStatus status;
- BcResult result, *ptr;
- BcNum *num;
-
- if ((status = bc_program_unaryOpPrep(p, &ptr, &num))) return status;
- if ((status = bc_num_init(&result.data.num, num->len))) return status;
- if ((status = bc_num_copy(&result.data.num, num))) goto err;
+ BcStatus s;
+ BcResult res, *ptr;
+ BcNum *num = NULL;
- result.data.num.neg = !result.data.num.neg;
+ s = bc_program_prep(p, &ptr, &num);
+ if (s) return s;
- if ((status = bc_program_unaryOpRetire(p, &result, BC_RESULT_TEMP))) goto err;
+ bc_num_init(&res.d.n, num->len);
+ bc_num_copy(&res.d.n, num);
+ if (res.d.n.len) res.d.n.neg = !res.d.n.neg;
- return status;
+ bc_program_retire(p, &res, BC_RESULT_TEMP);
-err:
- bc_num_free(&result.data.num);
- return status;
+ return s;
}
-BcStatus bc_program_logical(BcProgram *p, uint8_t inst) {
-
- BcStatus status;
- BcResult *operand1, *operand2, res;
- BcNum *num1, *num2;
- int cond;
- int cmp;
+BcStatus bc_program_logical(BcProgram *p, char inst) {
- status = bc_program_binaryOpPrep(p, &operand1, &num1, &operand2, &num2);
- if (status) return status;
+ BcStatus s;
+ BcResult *opd1, *opd2, res;
+ BcNum *n1, *n2;
+ int cond = 0;
+ ssize_t cmp;
- if ((status = bc_num_init(&res.data.num, BC_NUM_DEF_SIZE))) return status;
+ s = bc_program_binOpPrep(p, &opd1, &n1, &opd2, &n2, 0);
+ if (s) return s;
+ bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
if (inst == BC_INST_BOOL_AND)
- cond = bc_num_cmp(num1, &p->zero) && bc_num_cmp(num2, &p->zero);
+ cond = bc_num_cmp(n1, &p->zero) && bc_num_cmp(n2, &p->zero);
else if (inst == BC_INST_BOOL_OR)
- cond = bc_num_cmp(num1, &p->zero) || bc_num_cmp(num2, &p->zero);
+ cond = bc_num_cmp(n1, &p->zero) || bc_num_cmp(n2, &p->zero);
else {
- cmp = bc_num_cmp(num1, num2);
+ cmp = bc_num_cmp(n1, n2);
switch (inst) {
+
case BC_INST_REL_EQ:
{
cond = cmp == 0;
@@ -4856,7 +4750,7 @@ BcStatus bc_program_logical(BcProgram *p, uint8_t inst) {
case BC_INST_REL_NE:
{
- cond = cmp != 0;
+ cond = cmp;
break;
}
@@ -4871,442 +4765,447 @@ BcStatus bc_program_logical(BcProgram *p, uint8_t inst) {
cond = cmp > 0;
break;
}
-
- default:
- {
- // This is here to silence a compiler warning in release mode.
- cond = 0;
- break;
- }
}
}
- (cond ? bc_num_one : bc_num_zero)(&res.data.num);
+ (cond ? bc_num_one : bc_num_zero)(&res.d.n);
- if ((status = bc_program_binaryOpRetire(p, &res, BC_RESULT_TEMP))) goto err;
+ bc_program_binOpRetire(p, &res);
- return status;
+ return s;
+}
-err:
- bc_num_free(&res.data.num);
- return status;
+BcStatus bc_program_copyToVar(BcProgram *p, char *name, int var) {
+
+ BcStatus s;
+ BcResult *ptr, r;
+ BcVec *v;
+ BcNum *n;
+
+ if (!BC_PROG_STACK(&p->results, 1)) return BC_STATUS_EXEC_STACK;
+
+ ptr = bc_vec_top(&p->results);
+ if ((ptr->t == BC_RESULT_ARRAY) != !var) return BC_STATUS_EXEC_BAD_TYPE;
+ bc_program_search(p, name, &v, var);
+
+ s = bc_program_num(p, ptr, &n, 0);
+ if (s) return s;
+
+ // Do this once more to make sure that pointers were not invalidated.
+ bc_program_search(p, name, &v, var);
+
+ if (var) {
+ bc_num_init(&r.d.n, BC_NUM_DEF_SIZE);
+ bc_num_copy(&r.d.n, n);
+ }
+ else {
+ bc_array_init(&r.d.v, 1);
+ bc_array_copy(&r.d.v, (BcVec*) n);
+ }
+
+ bc_vec_push(v, &r.d);
+ bc_vec_pop(&p->results);
+
+ return s;
}
-BcStatus bc_program_assign(BcProgram *p, uint8_t inst) {
+BcStatus bc_program_assign(BcProgram *p, char inst) {
- BcStatus status;
+ BcStatus s;
BcResult *left, *right, res;
- BcNum *l, *r;
- BcNumBinaryFunc op;
+ BcNum *l = NULL, *r = NULL;
unsigned long val, max;
- size_t *ptr;
+ int assign = inst == BC_INST_ASSIGN, ib, sc;
- status = bc_program_binaryOpPrep(p, &left, &l, &right, &r);
- if (status) return status;
+ s = bc_program_binOpPrep(p, &left, &l, &right, &r, assign);
+ if (s) return s;
- if (left->type == BC_RESULT_CONSTANT || left->type == BC_RESULT_TEMP)
+ ib = left->t == BC_RESULT_IBASE;
+ sc = left->t == BC_RESULT_SCALE;
+
+ if (left->t == BC_RESULT_CONSTANT || left->t == BC_RESULT_TEMP)
return BC_STATUS_PARSE_BAD_ASSIGN;
if (inst == BC_INST_ASSIGN_DIVIDE && !bc_num_cmp(r, &p->zero))
return BC_STATUS_MATH_DIVIDE_BY_ZERO;
- if (inst == BC_INST_ASSIGN) status = bc_num_copy(l, r);
- else {
- op = bc_program_math_ops[inst - BC_INST_ASSIGN_POWER];
- status = op(l, r, l, p->scale);
- }
+ if (assign) bc_num_copy(l, r);
+ else s = bc_program_ops[inst - BC_INST_ASSIGN_POWER](l, r, l, p->scale);
- if (status) return status;
+ if (s) return s;
- if (left->type == BC_RESULT_IBASE || left->type == BC_RESULT_OBASE) {
+ if (ib || sc || left->t == BC_RESULT_OBASE) {
- ptr = left->type == BC_RESULT_IBASE ? &p->ibase_t : &p->obase_t;
- max = left->type == BC_RESULT_IBASE ? BC_NUM_MAX_INPUT_BASE : maxof_BASE;
+ size_t *ptr;
- if ((status = bc_num_ulong(l, &val))) return status;
+ s = bc_num_ulong(l, &val);
+ if (s) return s;
+ s = left->t - BC_RESULT_IBASE + BC_STATUS_EXEC_BAD_IBASE;
- if (val < BC_NUM_MIN_BASE || val > max)
- return left->type - BC_RESULT_IBASE + BC_STATUS_EXEC_BAD_IBASE;
+ if (sc) {
+ max = BC_MAX_SCALE;
+ ptr = &p->scale;
+ }
+ else {
+ if (val < BC_NUM_MIN_BASE) return s;
+ max = ib ? BC_NUM_MAX_IBASE : BC_MAX_OBASE;
+ ptr = ib ? &p->ib_t : &p->ob_t;
+ }
+
+ if (val > max) return s;
+ if (!sc) bc_num_copy(ib ? &p->ib : &p->ob, l);
*ptr = (size_t) val;
+ s = BC_STATUS_SUCCESS;
}
- else if (left->type == BC_RESULT_SCALE) {
- if ((status = bc_num_ulong(l, &val))) return status;
- if (val > (unsigned long) maxof_SCALE) return BC_STATUS_EXEC_BAD_SCALE;
+ bc_num_init(&res.d.n, l->len);
+ bc_num_copy(&res.d.n, l);
+ bc_program_binOpRetire(p, &res);
- p->scale = (size_t) val;
- }
+ return s;
+}
- if ((status = bc_num_init(&res.data.num, l->len))) return status;
- if ((status = bc_num_copy(&res.data.num, l))) goto err;
+BcStatus bc_program_pushVar(BcProgram *p, char *code, size_t *bgn,
+ int pop, int copy)
+{
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcResult r;
+ char *name = bc_program_name(code, bgn);
- if ((status = bc_program_binaryOpRetire(p, &res, BC_RESULT_TEMP))) goto err;
+ r.t = BC_RESULT_VAR;
+ r.d.id.name = name;
- return status;
+ bc_vec_push(&p->results, &r);
-err:
- bc_num_free(&res.data.num);
- return status;
+ return s;
}
-BcStatus bc_program_call(BcProgram *p, uint8_t *code, size_t *idx) {
+BcStatus bc_program_pushArray(BcProgram *p, char *code, size_t *bgn, char inst)
+{
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcResult r;
+ BcNum *num;
- BcStatus status;
- BcInstPtr ip;
- size_t nparams, i;
- BcFunc *func;
- BcAuto *auto_ptr;
- BcResult param, *arg;
+ r.d.id.name = bc_program_name(code, bgn);
- status = BC_STATUS_SUCCESS;
- nparams = bc_program_index(code, idx);
+ if (inst == BC_INST_ARRAY) {
+ r.t = BC_RESULT_ARRAY;
+ bc_vec_push(&p->results, &r);
+ }
+ else {
- ip.idx = 0;
- ip.len = p->results.len;
- ip.func = bc_program_index(code, idx);
+ BcResult *operand;
+ unsigned long temp;
- func = bc_vec_item(&p->funcs, ip.func);
+ s = bc_program_prep(p, &operand, &num);
+ if (s) goto err;
+ s = bc_num_ulong(num, &temp);
+ if (s) goto err;
- if (!func->code.len) return BC_STATUS_EXEC_UNDEFINED_FUNC;
- if (nparams != func->nparams) return BC_STATUS_EXEC_MISMATCHED_PARAMS;
+ if (temp > BC_MAX_DIM) {
+ s = BC_STATUS_EXEC_ARRAY_LEN;
+ goto err;
+ }
- for (i = 0; i < nparams; ++i) {
+ r.d.id.idx = (size_t) temp;
+ bc_program_retire(p, &r, BC_RESULT_ARRAY_ELEM);
+ }
+
+err:
+ if (s) free(r.d.id.name);
+ return s;
+}
- auto_ptr = bc_vec_item(&func->autos, i);
- arg = bc_vec_item_rev(&p->results, nparams - 1);
- param.type = auto_ptr->var + BC_RESULT_ARRAY_AUTO;
+BcStatus bc_program_incdec(BcProgram *p, char inst) {
- if (auto_ptr->var) {
+ BcStatus s;
+ BcResult *ptr, res, copy;
+ BcNum *num = NULL;
+ char inst2 = inst;
- BcNum *n;
+ s = bc_program_prep(p, &ptr, &num);
+ if (s) return s;
- if ((status = bc_program_num(p, arg, &n, 0))) return status;
- if ((status = bc_num_init(&param.data.num, n->len))) return status;
+ if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST) {
+ copy.t = BC_RESULT_TEMP;
+ bc_num_init(&copy.d.n, num->len);
+ bc_num_copy(&copy.d.n, num);
+ }
- status = bc_num_copy(&param.data.num, n);
- }
- else {
+ res.t = BC_RESULT_ONE;
+ inst = inst == BC_INST_INC_PRE || inst == BC_INST_INC_POST ?
+ BC_INST_ASSIGN_PLUS : BC_INST_ASSIGN_MINUS;
- BcVec *a;
+ bc_vec_push(&p->results, &res);
+ bc_program_assign(p, inst);
- if (arg->type != BC_RESULT_VAR || arg->type != BC_RESULT_ARRAY)
- return BC_STATUS_EXEC_BAD_TYPE;
+ if (inst2 == BC_INST_INC_POST || inst2 == BC_INST_DEC_POST) {
+ bc_vec_pop(&p->results);
+ bc_vec_push(&p->results, &copy);
+ }
- status = bc_program_search(p, arg, (BcNum**) &a, BC_PROGRAM_SEARCH_ARRAY);
- if (status) return status;
+ return s;
+}
- status = bc_vec_init(&param.data.array, sizeof(BcNum), bc_num_free);
- if (status) return status;
+BcStatus bc_program_call(BcProgram *p, char *code, size_t *idx) {
- status = bc_array_copy(&param.data.array, a);
- }
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcInstPtr ip;
+ size_t i, nparams = bc_program_index(code, idx);
+ BcFunc *func;
+ BcVec *v;
+ BcId *a;
+ BcResultData param;
+ BcResult *arg;
- if (status || (status = bc_vec_push(&p->results, &param))) goto err;
- }
+ ip.idx = 0;
+ ip.func = bc_program_index(code, idx);
+ func = bc_vec_item(&p->fns, ip.func);
- for (; !status && i < func->autos.len; ++i) {
+ if (func->code.len == 0) return BC_STATUS_EXEC_UNDEFINED_FUNC;
+ if (nparams != func->nparams) return BC_STATUS_EXEC_MISMATCHED_PARAMS;
+ ip.len = p->results.len - nparams;
- auto_ptr = bc_vec_item_rev(&func->autos, i);
- param.type = auto_ptr->var + BC_RESULT_ARRAY_AUTO;
+ for (i = 0; i < nparams; ++i) {
- if (auto_ptr->var) status = bc_num_init(&param.data.num, BC_NUM_DEF_SIZE);
- else status = bc_vec_init(&param.data.array, sizeof(BcNum), bc_num_free);
+ a = bc_vec_item(&func->autos, nparams - 1 - i);
+ arg = bc_vec_top(&p->results);
- if (status) return status;
+ if ((!a->idx) != (arg->t == BC_RESULT_ARRAY) || arg->t == BC_RESULT_STR)
+ return BC_STATUS_EXEC_BAD_TYPE;
- status = bc_vec_push(&p->results, &param);
+ s = bc_program_copyToVar(p, a->name, a->idx);
+ if (s) return s;
}
- if (status) goto err;
+ for (; i < func->autos.len; ++i) {
- return bc_vec_push(&p->stack, &ip);
+ a = bc_vec_item(&func->autos, i);
+ bc_program_search(p, a->name, &v, a->idx);
-err:
- bc_result_free(&param);
- return status;
+ if (a->idx) {
+ bc_num_init(&param.n, BC_NUM_DEF_SIZE);
+ bc_vec_push(v, &param.n);
+ }
+ else {
+ bc_array_init(&param.v, 1);
+ bc_vec_push(v, &param.v);
+ }
+ }
+
+ bc_vec_push(&p->stack, &ip);
+
+ return BC_STATUS_SUCCESS;
}
-BcStatus bc_program_return(BcProgram *p, uint8_t inst) {
+BcStatus bc_program_return(BcProgram *p, char inst) {
- BcStatus status;
- BcResult result, *operand;
- BcInstPtr *ip;
- BcFunc *func;
+ BcStatus s;
+ BcResult res;
+ BcFunc *f;
+ size_t i;
+ BcInstPtr *ip = bc_vec_top(&p->stack);
- ip = bc_vec_top(&p->stack);
- func = bc_vec_item(&p->funcs, ip->func);
+ if (!BC_PROG_STACK(&p->results, ip->len + inst == BC_INST_RET))
+ return BC_STATUS_EXEC_STACK;
- result.type = BC_RESULT_TEMP;
+ f = bc_vec_item(&p->fns, ip->func);
+ res.t = BC_RESULT_TEMP;
- if (inst == BC_INST_RETURN) {
+ if (inst == BC_INST_RET) {
BcNum *num;
+ BcResult *operand = bc_vec_top(&p->results);
- operand = bc_vec_top(&p->results);
-
- if ((status = bc_program_num(p, operand, &num, 0))) return status;
- if ((status = bc_num_init(&result.data.num, num->len))) return status;
- if ((status = bc_num_copy(&result.data.num, num))) goto err;
+ s = bc_program_num(p, operand, &num, 0);
+ if (s) return s;
+ bc_num_init(&res.d.n, num->len);
+ bc_num_copy(&res.d.n, num);
}
else {
- status = bc_num_init(&result.data.num, BC_NUM_DEF_SIZE);
- if (status) return status;
- bc_num_zero(&result.data.num);
+ bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
+ bc_num_zero(&res.d.n);
}
// We need to pop arguments as well, so this takes that into account.
- bc_vec_npop(&p->results, p->results.len - (ip->len - func->nparams));
+ for (i = 0; i < f->autos.len; ++i) {
- if ((status = bc_vec_push(&p->results, &result))) goto err;
- bc_vec_pop(&p->stack);
+ BcVec *v;
+ BcId *a = bc_vec_item(&f->autos, i);
- return status;
+ bc_program_search(p, a->name, &v, a->idx);
+ bc_vec_pop(v);
+ }
-err:
- bc_num_free(&result.data.num);
- return status;
+ bc_vec_npop(&p->results, p->results.len - ip->len);
+ bc_vec_push(&p->results, &res);
+ bc_vec_pop(&p->stack);
+
+ return BC_STATUS_SUCCESS;
}
unsigned long bc_program_scale(BcNum *n) {
return (unsigned long) n->rdx;
}
-unsigned long bc_program_length(BcNum *n) {
+unsigned long bc_program_len(BcNum *n) {
- size_t i;
unsigned long len = n->len;
+ size_t i;
- if (n->rdx == n->len) {
- for (i = n->len - 1; i < n->len && !n->num[i]; --len, --i);
- }
+ if (n->rdx != n->len) return len;
+ for (i = n->len - 1; i < n->len && n->num[i] == 0; --len, --i);
return len;
}
-BcStatus bc_program_builtin(BcProgram *p, uint8_t inst) {
+BcStatus bc_program_builtin(BcProgram *p, char inst) {
- BcStatus status;
- BcResult *operand;
- BcNum *num1;
- BcResult result;
-
- if ((status = bc_program_unaryOpPrep(p, &operand, &num1))) return status;
- if ((status = bc_num_init(&result.data.num, BC_NUM_DEF_SIZE))) return status;
+ BcStatus s;
+ BcResult *opnd;
+ BcNum *num = NULL;
+ BcResult res;
+ int len = inst == BC_INST_LENGTH;
- if (inst == BC_INST_SQRT)
- status = bc_num_sqrt(num1, &result.data.num, p->scale);
- else {
+ if (!BC_PROG_STACK(&p->results, 1)) return BC_STATUS_EXEC_STACK;
+ opnd = bc_vec_top(&p->results);
- BcProgramBuiltInFunc func;
- unsigned long ans;
+ s = bc_program_num(p, opnd, &num, 0);
+ if (s) return s;
- func = inst == BC_INST_LENGTH ? bc_program_length : bc_program_scale;
- ans = func(num1);
+ bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
- status = bc_num_ulong2num(&result.data.num, ans);
+ if (inst == BC_INST_SQRT) s = bc_num_sqrt(num, &res.d.n, p->scale);
+ else if (len && opnd->t == BC_RESULT_ARRAY) {
+ s = bc_num_ulong2num(&res.d.n, (unsigned long) ((BcVec*) num)->len);
+ }
+ else {
+ BcProgramBuiltIn f = len ? bc_program_len : bc_program_scale;
+ s = bc_num_ulong2num(&res.d.n, f(num));
+ if (s) goto err;
}
- if (status || (status = bc_program_unaryOpRetire(p, &result, BC_RESULT_TEMP)))
- goto err;
+ bc_program_retire(p, &res, BC_RESULT_TEMP);
- return status;
+ return s;
err:
- bc_num_free(&result.data.num);
- return status;
+ bc_num_free(&res.d.n);
+ return s;
}
-BcStatus bc_program_pushScale(BcProgram *p) {
+BcStatus bc_program_pushGlobal(BcProgram *p, char inst) {
- BcStatus status;
- BcResult result;
+ BcStatus s;
+ BcResult res;
+ unsigned long val;
- result.type = BC_RESULT_SCALE;
+ res.t = inst - BC_INST_IBASE + BC_RESULT_IBASE;
+ if (inst == BC_INST_IBASE) val = (unsigned long) p->ib_t;
+ else if (inst == BC_INST_SCALE) val = (unsigned long) p->scale;
+ else val = (unsigned long) p->ob_t;
- if ((status = bc_num_init(&result.data.num, BC_NUM_DEF_SIZE))) return status;
- status = bc_num_ulong2num(&result.data.num, (unsigned long) p->scale);
- if (status || (status = bc_vec_push(&p->results, &result))) goto err;
+ bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
+ s = bc_num_ulong2num(&res.d.n, val);
+ if (s) goto err;
+ bc_vec_push(&p->results, &res);
- return status;
+ return s;
err:
- bc_num_free(&result.data.num);
- return status;
+ bc_num_free(&res.d.n);
+ return s;
}
-BcStatus bc_program_incdec(BcProgram *p, uint8_t inst) {
-
- BcStatus status;
- BcResult *ptr, result, copy;
- BcNum *num;
-
- if ((status = bc_program_unaryOpPrep(p, &ptr, &num))) return status;
-
- if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST) {
- copy.type = BC_RESULT_TEMP;
- if ((status = bc_num_init(&copy.data.num, num->len))) return status;
- }
-
- result.type = BC_RESULT_ONE;
- inst = inst == BC_INST_INC_PRE || inst == BC_INST_INC_POST ?
- BC_INST_ASSIGN_PLUS : BC_INST_ASSIGN_MINUS;
-
- if ((status = bc_vec_push(&p->results, &result))) goto err;
- if ((status = bc_program_assign(p, inst))) goto err;
-
- if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST) {
- bc_vec_pop(&p->results);
- if ((status = bc_vec_push(&p->results, &copy))) goto err;
- }
-
- return status;
-
-err:
-
- if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST)
- bc_num_free(&copy.data.num);
-
- return status;
+void bc_program_free(BcProgram *p) {
+ bc_num_free(&p->ib);
+ bc_num_free(&p->ob);
+ bc_num_free(&p->hexb);
+ bc_vec_free(&p->fns);
+ bc_vec_free(&p->fn_map);
+ bc_vec_free(&p->vars);
+ bc_vec_free(&p->var_map);
+ bc_vec_free(&p->arrs);
+ bc_vec_free(&p->arr_map);
+ bc_vec_free(&p->strs);
+ bc_vec_free(&p->consts);
+ bc_vec_free(&p->results);
+ bc_vec_free(&p->stack);
+ bc_num_free(&p->last);
+ bc_num_free(&p->zero);
+ bc_num_free(&p->one);
}
-BcStatus bc_program_init(BcProgram *p, size_t line_len) {
+void bc_program_init(BcProgram *p, size_t line_len) {
- BcStatus s;
size_t idx;
- char *main_name, *read_name;
BcInstPtr ip;
- main_name = read_name = NULL;
+ memset(p, 0, sizeof(BcProgram));
+ memset(&ip, 0, sizeof(BcInstPtr));
+
p->nchars = p->scale = 0;
- p->line_len = line_len;
+ p->len = line_len;
- if ((s = bc_num_init(&p->ibase, BC_NUM_DEF_SIZE))) return s;
- bc_num_ten(&p->ibase);
- p->ibase_t = 10;
+ bc_num_init(&p->ib, BC_NUM_DEF_SIZE);
+ bc_num_ten(&p->ib);
+ p->ib_t = 10;
- if ((s = bc_num_init(&p->obase, BC_NUM_DEF_SIZE))) goto obase_err;
- bc_num_ten(&p->obase);
- p->obase_t = 10;
+ bc_num_init(&p->ob, BC_NUM_DEF_SIZE);
+ bc_num_ten(&p->ob);
+ p->ob_t = 10;
- if ((s = bc_num_init(&p->last, BC_NUM_DEF_SIZE))) goto last_err;
+ bc_num_init(&p->hexb, BC_NUM_DEF_SIZE);
+ bc_num_ten(&p->hexb);
+ p->hexb.num[0] = 6;
+
+ bc_num_init(&p->last, BC_NUM_DEF_SIZE);
bc_num_zero(&p->last);
- if ((s = bc_num_init(&p->zero, BC_NUM_DEF_SIZE))) goto zero_err;
+ bc_num_init(&p->zero, BC_NUM_DEF_SIZE);
bc_num_zero(&p->zero);
- if ((s = bc_num_init(&p->one, BC_NUM_DEF_SIZE))) goto one_err;
+ bc_num_init(&p->one, BC_NUM_DEF_SIZE);
bc_num_one(&p->one);
- if ((s = bc_vec_init(&p->funcs, sizeof(BcFunc), bc_func_free))) goto func_err;
-
- s = bc_veco_init(&p->func_map, sizeof(BcEntry), bc_entry_free, bc_entry_cmp);
- if (s) goto func_map_err;
-
- if (!(main_name = malloc(sizeof(bc_lang_func_main)))) {
- s = BC_STATUS_MALLOC_FAIL;
- goto name_err;
- }
-
- strcpy(main_name, bc_lang_func_main);
- s = bc_program_addFunc(p, main_name, &idx);
- main_name = NULL;
- if (s || idx != BC_PROGRAM_MAIN) goto read_err;
-
- if (!(read_name = malloc(sizeof(bc_lang_func_read)))) {
- s = BC_STATUS_MALLOC_FAIL;
- goto read_err;
- }
-
- strcpy(read_name, bc_lang_func_read);
- s = bc_program_addFunc(p, read_name, &idx);
- read_name = NULL;
- if (s || idx != BC_PROGRAM_READ) goto var_err;
+ bc_vec_init(&p->fns, sizeof(BcFunc), bc_func_free);
+ bc_map_init(&p->fn_map);
- if ((s = bc_vec_init(&p->vars, sizeof(BcNum), bc_num_free))) goto var_err;
- s = bc_veco_init(&p->var_map, sizeof(BcEntry), bc_entry_free, bc_entry_cmp);
- if (s) goto var_map_err;
+ bc_program_addFunc(p, xstrdup(bc_func_main), &idx);
+ bc_program_addFunc(p, xstrdup(bc_func_read), &idx);
- if ((s = bc_vec_init(&p->arrays, sizeof(BcVec), bc_vec_free))) goto array_err;
- s = bc_veco_init(&p->array_map, sizeof(BcEntry), bc_entry_free, bc_entry_cmp);
- if (s) goto array_map_err;
+ bc_vec_init(&p->vars, sizeof(BcVec), bc_vec_free);
+ bc_map_init(&p->var_map);
- s = bc_vec_init(&p->strings, sizeof(char*), bc_string_free);
- if (s) goto string_err;
+ bc_vec_init(&p->arrs, sizeof(BcVec), bc_vec_free);
+ bc_map_init(&p->arr_map);
- s = bc_vec_init(&p->constants, sizeof(char*), bc_string_free);
- if (s) goto const_err;
-
- s = bc_vec_init(&p->results, sizeof(BcResult), bc_result_free);
- if (s) goto expr_err;
-
- if ((s = bc_vec_init(&p->stack, sizeof(BcInstPtr), NULL))) goto stack_err;
-
- memset(&ip, 0, sizeof(BcInstPtr));
-
- if ((s = bc_vec_push(&p->stack, &ip))) goto push_err;
-
- return s;
-
-push_err:
- bc_vec_free(&p->stack);
-stack_err:
- bc_vec_free(&p->results);
-expr_err:
- bc_vec_free(&p->constants);
-const_err:
- bc_vec_free(&p->strings);
-string_err:
- bc_veco_free(&p->array_map);
-array_map_err:
- bc_vec_free(&p->arrays);
-array_err:
- bc_veco_free(&p->var_map);
-var_map_err:
- bc_vec_free(&p->vars);
-var_err:
- if (read_name) free(read_name);
-read_err:
- if (main_name) free(main_name);
-name_err:
- bc_veco_free(&p->func_map);
-func_map_err:
- bc_vec_free(&p->funcs);
-func_err:
- bc_num_free(&p->one);
-one_err:
- bc_num_free(&p->zero);
-zero_err:
- bc_num_free(&p->last);
-last_err:
- bc_num_free(&p->obase);
-obase_err:
- bc_num_free(&p->ibase);
- return s;
+ bc_vec_init(&p->strs, sizeof(char*), bc_string_free);
+ bc_vec_init(&p->consts, sizeof(char*), bc_string_free);
+ bc_vec_init(&p->results, sizeof(BcResult), bc_result_free);
+ bc_vec_init(&p->stack, sizeof(BcInstPtr), NULL);
+ bc_vec_push(&p->stack, &ip);
}
-BcStatus bc_program_addFunc(BcProgram *p, char *name, size_t *idx) {
+void bc_program_addFunc(BcProgram *p, char *name, size_t *idx) {
- BcStatus status;
- BcEntry entry, *entry_ptr;
+ BcStatus s;
+ BcId entry, *entry_ptr;
BcFunc f;
entry.name = name;
- entry.idx = p->funcs.len;
+ entry.idx = p->fns.len;
- if ((status = bc_veco_insert(&p->func_map, &entry, idx))) {
- free(name);
- if (status != BC_STATUS_VEC_ITEM_EXISTS) return status;
- }
+ s = bc_map_insert(&p->fn_map, &entry, idx);
+ if (s) free(name);
- entry_ptr = bc_veco_item(&p->func_map, *idx);
+ entry_ptr = bc_vec_item(&p->fn_map, *idx);
*idx = entry_ptr->idx;
- if (status == BC_STATUS_VEC_ITEM_EXISTS) {
-
- BcFunc *func = bc_vec_item(&p->funcs, entry_ptr->idx);
+ if (s == BC_STATUS_VEC_ITEM_EXISTS) {
- status = BC_STATUS_SUCCESS;
+ BcFunc *func = bc_vec_item(&p->fns, entry_ptr->idx);
// We need to reset these, so the function can be repopulated.
func->nparams = 0;
@@ -5315,208 +5214,191 @@ BcStatus bc_program_addFunc(BcProgram *p, char *name, size_t *idx) {
bc_vec_npop(&func->labels, func->labels.len);
}
else {
- if ((status = bc_func_init(&f))) return status;
- if ((status = bc_vec_push(&p->funcs, &f))) bc_func_free(&f);
+ bc_func_init(&f);
+ bc_vec_push(&p->fns, &f);
}
-
- return status;
}
-BcStatus bc_program_reset(BcProgram *p, BcStatus status) {
+BcStatus bc_program_reset(BcProgram *p, BcStatus s) {
- BcFunc *func;
+ BcFunc *f;
BcInstPtr *ip;
bc_vec_npop(&p->stack, p->stack.len - 1);
bc_vec_npop(&p->results, p->results.len);
- func = bc_vec_item(&p->funcs, 0);
+ f = bc_vec_item(&p->fns, 0);
ip = bc_vec_top(&p->stack);
- ip->idx = func->code.len;
+ ip->idx = f->code.len;
- if (!status && TT.signe && !TT.tty) return BC_STATUS_QUIT;
+ if (!s && TT.signe && !TT.tty) return BC_STATUS_QUIT;
TT.sigc += TT.signe;
TT.signe = TT.sig != TT.sigc;
- if ((!status || status == BC_STATUS_EXEC_SIGNAL) && TT.tty) {
- status = BC_STATUS_SUCCESS;
- fprintf(stderr, "%s", bc_program_ready_prompt);
- fflush(stderr);
+ if (!s || s == BC_STATUS_EXEC_SIGNAL) {
+ if (TT.ttyin) {
+ bc_vm_puts(bc_program_ready_msg, stderr);
+ bc_vm_fflush(stderr);
+ s = BC_STATUS_SUCCESS;
+ }
+ else s = BC_STATUS_QUIT;
}
- return status;
+ return s;
}
BcStatus bc_program_exec(BcProgram *p) {
- BcStatus status;
- uint8_t *code;
- size_t idx, len, *addr;
- BcResult result;
- BcResult *ptr;
+ BcStatus s = BC_STATUS_SUCCESS;
+ size_t idx;
+ BcResult r, *ptr;
BcNum *num;
- BcFunc *func;
- BcInstPtr *ip;
- int cond;
- const char **string, *s;
-
- status = BC_STATUS_SUCCESS;
- cond = 0;
+ BcInstPtr *ip = bc_vec_top(&p->stack);
+ BcFunc *func = bc_vec_item(&p->fns, ip->func);
+ char *code = func->code.v;
+ int cond = 0;
- ip = bc_vec_top(&p->stack);
- func = bc_vec_item(&p->funcs, ip->func);
- code = func->code.array;
-
- while (!status && !TT.sig_other && ip->idx < func->code.len) {
+ while (!s && ip->idx < func->code.len) {
- uint8_t inst = code[(ip->idx)++];
+ char inst = code[(ip->idx)++];
switch (inst) {
- case BC_INST_CALL:
- {
- status = bc_program_call(p, code, &ip->idx);
- break;
- }
-
- case BC_INST_RETURN:
- case BC_INST_RETURN_ZERO:
- {
- status = bc_program_return(p, inst);
- break;
- }
-
- case BC_INST_READ:
- {
- status = bc_program_read(p);
- break;
- }
-
case BC_INST_JUMP_ZERO:
{
- if ((status = bc_program_unaryOpPrep(p, &ptr, &num))) return status;
+ s = bc_program_prep(p, &ptr, &num);
+ if (s) return s;
cond = !bc_num_cmp(num, &p->zero);
bc_vec_pop(&p->results);
}
// Fallthrough.
case BC_INST_JUMP:
{
+ size_t *addr;
idx = bc_program_index(code, &ip->idx);
addr = bc_vec_item(&func->labels, idx);
if (inst == BC_INST_JUMP || cond) ip->idx = *addr;
break;
}
- case BC_INST_PUSH_VAR:
- case BC_INST_PUSH_ARRAY_ELEM:
+ case BC_INST_CALL:
{
- status = bc_program_push(p, code, &ip->idx, inst == BC_INST_PUSH_VAR);
+ s = bc_program_call(p, code, &ip->idx);
break;
}
- case BC_INST_PUSH_LAST:
+ case BC_INST_INC_PRE:
+ case BC_INST_DEC_PRE:
+ case BC_INST_INC_POST:
+ case BC_INST_DEC_POST:
{
- result.type = BC_RESULT_LAST;
- status = bc_vec_push(&p->results, &result);
+ s = bc_program_incdec(p, inst);
break;
}
- case BC_INST_PUSH_SCALE:
+ case BC_INST_HALT:
{
- status = bc_program_pushScale(p);
+ s = BC_STATUS_QUIT;
break;
}
- case BC_INST_PUSH_IBASE:
+ case BC_INST_RET:
+ case BC_INST_RET0:
{
- result.type = BC_RESULT_IBASE;
- status = bc_vec_push(&p->results, &result);
+ s = bc_program_return(p, inst);
break;
}
- case BC_INST_PUSH_OBASE:
+ case BC_INST_BOOL_OR:
+ case BC_INST_BOOL_AND:
+ case BC_INST_REL_EQ:
+ case BC_INST_REL_LE:
+ case BC_INST_REL_GE:
+ case BC_INST_REL_NE:
+ case BC_INST_REL_LT:
+ case BC_INST_REL_GT:
{
- result.type = BC_RESULT_OBASE;
- status = bc_vec_push(&p->results, &result);
+ s = bc_program_logical(p, inst);
break;
}
- case BC_INST_SCALE_FUNC:
- case BC_INST_LENGTH:
- case BC_INST_SQRT:
+ case BC_INST_READ:
{
- status = bc_program_builtin(p, inst);
+ s = bc_program_read(p);
break;
}
- case BC_INST_PUSH_NUM:
+ case BC_INST_VAR:
{
- result.type = BC_RESULT_CONSTANT;
- result.data.id.idx = bc_program_index(code, &ip->idx);
- status = bc_vec_push(&p->results, &result);
+ s = bc_program_pushVar(p, code, &ip->idx, 0, 0);
break;
}
- case BC_INST_POP:
+ case BC_INST_ARRAY_ELEM:
+ case BC_INST_ARRAY:
{
- bc_vec_pop(&p->results);
+ s = bc_program_pushArray(p, code, &ip->idx, inst);
break;
}
- case BC_INST_INC_POST:
- case BC_INST_DEC_POST:
- case BC_INST_INC_PRE:
- case BC_INST_DEC_PRE:
+ case BC_INST_LAST:
{
- status = bc_program_incdec(p, inst);
+ r.t = BC_RESULT_LAST;
+ bc_vec_push(&p->results, &r);
break;
}
- case BC_INST_HALT:
+ case BC_INST_IBASE:
+ case BC_INST_SCALE:
+ case BC_INST_OBASE:
{
- status = BC_STATUS_QUIT;
+ s = bc_program_pushGlobal(p, inst);
break;
}
- case BC_INST_PRINT:
- case BC_INST_PRINT_EXPR:
+ case BC_INST_SCALE_FUNC:
+ case BC_INST_LENGTH:
+ case BC_INST_SQRT:
{
- if ((status = bc_program_unaryOpPrep(p, &ptr, &num))) return status;
-
- status = bc_num_print(num, &p->obase, p->obase_t, inst == BC_INST_PRINT,
- &p->nchars, p->line_len);
- if (status) return status;
- if ((status = bc_num_copy(&p->last, num))) return status;
-
- bc_vec_pop(&p->results);
-
+ s = bc_program_builtin(p, inst);
break;
}
- case BC_INST_STR:
+ case BC_INST_NUM:
{
- idx = bc_program_index(code, &ip->idx);
- string = bc_vec_item(&p->strings, idx);
-
- s = *string;
- len = strlen(s);
+ r.t = BC_RESULT_CONSTANT;
+ r.d.id.idx = bc_program_index(code, &ip->idx);
+ bc_vec_push(&p->results, &r);
+ break;
+ }
- for (idx = 0; idx < len; ++idx) {
- char c = s[idx];
- if (putchar(c) == EOF) return BC_STATUS_IO_ERR;
- if (c == '\n') p->nchars = SIZE_MAX;
- ++p->nchars;
- }
+ case BC_INST_POP:
+ {
+ if (!BC_PROG_STACK(&p->results, 1)) s = BC_STATUS_EXEC_STACK;
+ else bc_vec_pop(&p->results);
+ break;
+ }
+ case BC_INST_POP_EXEC:
+ {
+ bc_vec_pop(&p->stack);
break;
}
+ case BC_INST_PRINT:
+ case BC_INST_PRINT_POP:
case BC_INST_PRINT_STR:
{
- idx = bc_program_index(code, &ip->idx);
- string = bc_vec_item(&p->strings, idx);
- status = bc_program_printString(*string, &p->nchars);
+ s = bc_program_print(p, inst, 0);
+ break;
+ }
+
+ case BC_INST_STR:
+ {
+ r.t = BC_RESULT_STR;
+ r.d.id.idx = bc_program_index(code, &ip->idx);
+ bc_vec_push(&p->results, &r);
break;
}
@@ -5527,46 +5409,25 @@ BcStatus bc_program_exec(BcProgram *p) {
case BC_INST_PLUS:
case BC_INST_MINUS:
{
- status = bc_program_op(p, inst);
- break;
- }
-
- case BC_INST_REL_EQ:
- case BC_INST_REL_LE:
- case BC_INST_REL_GE:
- case BC_INST_REL_NE:
- case BC_INST_REL_LT:
- case BC_INST_REL_GT:
- {
- status = bc_program_logical(p, inst);
+ s = bc_program_op(p, inst);
break;
}
case BC_INST_BOOL_NOT:
{
- if ((status = bc_program_unaryOpPrep(p, &ptr, &num))) return status;
- status = bc_num_init(&result.data.num, BC_NUM_DEF_SIZE);
- if (status) return status;
+ s = bc_program_prep(p, &ptr, &num);
+ if (s) return s;
- if (bc_num_cmp(num, &p->zero)) bc_num_one(&result.data.num);
- else bc_num_zero(&result.data.num);
-
- status = bc_program_unaryOpRetire(p, &result, BC_RESULT_TEMP);
- if (status) bc_num_free(&result.data.num);
+ bc_num_init(&r.d.n, BC_NUM_DEF_SIZE);
+ (!bc_num_cmp(num, &p->zero) ? bc_num_one : bc_num_zero)(&r.d.n);
+ bc_program_retire(p, &r, BC_RESULT_TEMP);
break;
}
- case BC_INST_BOOL_OR:
- case BC_INST_BOOL_AND:
- {
- status = bc_program_logical(p, inst);
- break;
- }
-
case BC_INST_NEG:
{
- status = bc_program_negate(p);
+ s = bc_program_negate(p);
break;
}
@@ -5578,315 +5439,326 @@ BcStatus bc_program_exec(BcProgram *p) {
case BC_INST_ASSIGN_MINUS:
case BC_INST_ASSIGN:
{
- status = bc_program_assign(p, inst);
- break;
- }
-
- default:
- {
+ s = bc_program_assign(p, inst);
break;
}
}
- if ((status && status != BC_STATUS_QUIT) || TT.signe)
- status = bc_program_reset(p, status);
+ if ((s && s != BC_STATUS_QUIT) || TT.signe) s = bc_program_reset(p, s);
- // We need to update because if the stack changes, pointers may be invalid.
+ // If the stack has changed, pointers may be invalid.
ip = bc_vec_top(&p->stack);
- func = bc_vec_item(&p->funcs, ip->func);
- code = func->code.array;
+ func = bc_vec_item(&p->fns, ip->func);
+ code = func->code.v;
}
- return status;
+ return s;
}
-void bc_program_free(BcProgram *p) {
+void bc_vm_sig(int sig) {
+ int err = errno;
+ size_t len = strlen(bc_sig_msg);
+ if (sig == SIGINT && write(2, bc_sig_msg, len) == (ssize_t) len) {
+ TT.signe = TT.sig == TT.sigc;
+ TT.sig += TT.signe;
+ }
+ errno = err;
+}
- if (!p) return;
+void bc_vm_info(void) {
+ bc_vm_printf(stdout, "%s %s\n", toys.which->name, "1.1");
+ bc_vm_puts(bc_copyright, stdout);
+}
- bc_num_free(&p->ibase);
- bc_num_free(&p->obase);
+BcStatus bc_vm_error(BcStatus s, const char *file, size_t line) {
- bc_vec_free(&p->funcs);
- bc_veco_free(&p->func_map);
+ if (!s || s > BC_STATUS_VEC_ITEM_EXISTS) return s;
- bc_vec_free(&p->vars);
- bc_veco_free(&p->var_map);
+ bc_vm_printf(stderr, bc_err_fmt, bc_errs[bc_err_ids[s]], bc_err_msgs[s]);
+ bc_vm_printf(stderr, " %s", file);
+ bc_vm_printf(stderr, bc_err_line + 4 * !line, line);
- bc_vec_free(&p->arrays);
- bc_veco_free(&p->array_map);
+ return s * (!TT.ttyin || !!strcmp(file, bc_program_stdin_name));
+}
- bc_vec_free(&p->strings);
- bc_vec_free(&p->constants);
+BcStatus bc_vm_posixError(BcStatus s, const char *file,
+ size_t line, const char *msg)
+{
+ int p = (int) (toys.optflags & FLAG_s), w = (int) (toys.optflags & FLAG_w);
+ const char* const fmt = p ? bc_err_fmt : bc_warn_fmt;
- bc_vec_free(&p->results);
- bc_vec_free(&p->stack);
+ if (!(p || w) || s < BC_STATUS_POSIX_NAME_LEN) return BC_STATUS_SUCCESS;
- bc_num_free(&p->last);
- bc_num_free(&p->zero);
- bc_num_free(&p->one);
+ bc_vm_printf(stderr, fmt, bc_errs[bc_err_ids[s]], bc_err_msgs[s]);
+ if (msg) bc_vm_printf(stderr, " %s\n", msg);
+ bc_vm_printf(stderr, " %s", file);
+ bc_vm_printf(stderr, bc_err_line + 4 * !line, line);
- memset(p, 0, sizeof(BcProgram));
+ return s * (!TT.ttyin && !!p);
}
-void bc_sig(int sig) {
- if (sig == SIGINT) {
- if (write(2, bc_sig_msg, sizeof(bc_sig_msg) - 1) >= 0)
- TT.sig += (TT.signe = TT.sig == TT.sigc);
+size_t bc_vm_envLen(const char *var) {
+
+ char *lenv = getenv(var);
+ size_t i, len = BC_NUM_PRINT_WIDTH;
+ int num;
+
+ if (!lenv) return len;
+
+ len = strlen(lenv);
+
+ for (num = 1, i = 0; num && i < len; ++i) num = isdigit(lenv[i]);
+ if (num) {
+ len = (size_t) atoi(lenv) - 1;
+ if (len < 2 || len >= INT32_MAX) len = BC_NUM_PRINT_WIDTH;
}
- else TT.sig_other = 1;
-}
+ else len = BC_NUM_PRINT_WIDTH;
-BcStatus bc_error(BcStatus s) {
- if (!s || s >= BC_STATUS_POSIX_NAME_LEN) return BC_STATUS_SUCCESS;
- fprintf(stderr, bc_err_fmt, bc_errs[bc_err_indices[s]], bc_err_descs[s]);
- return s * !TT.tty;
+ return len;
}
-BcStatus bc_error_file(BcStatus s, const char *file, size_t line) {
- if (!s || !file || s >= BC_STATUS_POSIX_NAME_LEN) return BC_STATUS_SUCCESS;
- fprintf(stderr, bc_err_fmt, bc_errs[bc_err_indices[s]], bc_err_descs[s]);
- fprintf(stderr, " %s", file);
- fprintf(stderr, &":%d\n\n"[3 * !line], line);
- return s * !TT.tty;
+void bc_vm_exit(BcStatus s) {
+ bc_vm_printf(stderr, bc_err_fmt, bc_errs[bc_err_ids[s]], bc_err_msgs[s]);
+ exit((int) s);
}
-BcStatus bc_posix_error(BcStatus s, const char *file,
- size_t line, const char *msg)
-{
- int p = (int) (toys.optflags & FLAG_s), w = (int) (toys.optflags & FLAG_w);
+void bc_vm_printf(FILE *restrict f, const char *fmt, ...) {
- if (!(p || w) || s < BC_STATUS_POSIX_NAME_LEN || !file)
- return BC_STATUS_SUCCESS;
+ va_list args;
+ int bad;
- fprintf(stderr, "\n%s %s: %s\n", bc_errs[bc_err_indices[s]],
- p ? "error" : "warning", bc_err_descs[s]);
+ va_start(args, fmt);
+ bad = vfprintf(f, fmt, args) < 0;
+ va_end(args);
- if (msg) fprintf(stderr, " %s\n", msg);
- fprintf(stderr, " %s", file);
- fprintf(stderr, &":%d\n\n"[3 * !line], line);
+ if (bad) bc_vm_exit(BC_STATUS_IO_ERR);
+}
- return s * !!p;
+void bc_vm_puts(const char *str, FILE *restrict f) {
+ if (fputs(str, f) == EOF) bc_vm_exit(BC_STATUS_IO_ERR);
}
-BcStatus bc_process(Bc *bc, const char *text) {
+void bc_vm_putchar(int c) {
+ if (putchar(c) == EOF) bc_vm_exit(BC_STATUS_IO_ERR);
+}
- BcStatus s = bc_lex_text(&bc->parse.lex, text);
+void bc_vm_fflush(FILE *restrict f) {
+ if (fflush(f) == EOF) bc_vm_exit(BC_STATUS_IO_ERR);
+}
- if (s && (s = bc_error_file(s, bc->parse.lex.file, bc->parse.lex.line)))
- return s;
+BcStatus bc_vm_process(BcVm *vm, const char *text) {
- while (bc->parse.lex.token.type != BC_LEX_EOF) {
+ BcStatus s = bc_parse_text(&vm->prs, text);
- if ((s = bc_parse_parse(&bc->parse)) == BC_STATUS_LIMITS) {
+ s = bc_vm_error(s, vm->prs.l.f, vm->prs.l.line);
+ if (s) return s;
- s = BC_STATUS_IO_ERR;
+ while (vm->prs.l.t.t != BC_LEX_EOF) {
- if (putchar('\n') == EOF) return s;
+ s = bc_parse_parse(&vm->prs);
- if (printf("BC_BASE_MAX = %zu\n", (size_t) maxof_BASE) < 0 ||
- printf("BC_DIM_MAX = %zu\n", (size_t) maxof_DIM) < 0 ||
- printf("BC_SCALE_MAX = %zu\n", (size_t) maxof_SCALE) < 0 ||
- printf("BC_STRING_MAX = %zu\n", (size_t) maxof_STRING) < 0 ||
- printf("Max Exponent = %ld\n", (long) LONG_MAX) < 0 ||
- printf("Number of Vars = %zu\n", (size_t) SIZE_MAX) < 0)
- {
- return s;
- }
+ if (s == BC_STATUS_LIMITS) {
+
+ bc_vm_putchar('\n');
+ bc_vm_printf(stdout, "BC_BASE_MAX = %lu\n", BC_MAX_OBASE);
+ bc_vm_printf(stdout, "BC_DIM_MAX = %lu\n", BC_MAX_DIM);
+ bc_vm_printf(stdout, "BC_SCALE_MAX = %lu\n", BC_MAX_SCALE);
+ bc_vm_printf(stdout, "BC_STRING_MAX = %lu\n", BC_MAX_STRING);
+ bc_vm_printf(stdout, "BC_NAME_MAX = %lu\n", BC_MAX_NAME);
+ bc_vm_printf(stdout, "BC_NUM_MAX = %lu\n", BC_MAX_NUM);
+ bc_vm_printf(stdout, "Max Exponent = %lu\n", BC_MAX_EXP);
+ bc_vm_printf(stdout, "Number of Vars = %lu\n", BC_MAX_VARS);
+ bc_vm_putchar('\n');
- if (putchar('\n') == EOF) return s;
+ s = BC_STATUS_SUCCESS;
}
- else if (s == BC_STATUS_QUIT || TT.sig_other ||
- (s && (s = bc_error_file(s, bc->parse.lex.file, bc->parse.lex.line))))
- {
- return s;
+ else {
+ if (s == BC_STATUS_QUIT) return s;
+ s = bc_vm_error(s, vm->prs.l.f, vm->prs.l.line);
+ if (s) return s;
}
}
- if (BC_PARSE_CAN_EXEC(&bc->parse)) {
- s = bc_program_exec(&bc->prog);
- if (TT.tty) fflush(stdout);
- if (s && s != BC_STATUS_QUIT) s = bc_error(s);
+ if (BC_PARSE_CAN_EXEC(&vm->prs)) {
+ s = bc_program_exec(&vm->prog);
+ if (!s && TT.tty) bc_vm_fflush(stdout);
+ if (s && s != BC_STATUS_QUIT)
+ s = bc_vm_error(bc_program_reset(&vm->prog, s), vm->prs.l.f, 0);
}
return s;
}
-BcStatus bc_file(Bc *bc, const char *file) {
+BcStatus bc_vm_file(BcVm *vm, const char *file) {
BcStatus s;
char *data;
BcFunc *main_func;
BcInstPtr *ip;
- bc->prog.file = file;
- if ((s = bc_io_fread(file, &data))) return s;
+ vm->prog.file = file;
+ s = bc_read_file(file, &data);
+ if (s) return bc_vm_error(s, file, 0);
- bc_lex_init(&bc->parse.lex, file);
- if ((s = bc_process(bc, data))) goto err;
+ bc_lex_file(&vm->prs.l, file);
+ s = bc_vm_process(vm, data);
+ if (s) goto err;
- main_func = bc_vec_item(&bc->prog.funcs, BC_PROGRAM_MAIN);
- ip = bc_vec_item(&bc->prog.stack, 0);
+ main_func = bc_vec_item(&vm->prog.fns, BC_PROG_MAIN);
+ ip = bc_vec_item(&vm->prog.stack, 0);
- if (main_func->code.len > ip->idx) s = BC_STATUS_EXEC_FILE_NOT_EXECUTABLE;
+ if (main_func->code.len < ip->idx)
+ s = BC_STATUS_EXEC_FILE_NOT_EXECUTABLE;
err:
free(data);
return s;
}
-BcStatus bc_concat(char **buffer, size_t *n, char *buf, size_t total_len) {
-
- if (total_len > *n) {
-
- char *temp = realloc(*buffer, total_len + 1);
- if (!temp) return BC_STATUS_MALLOC_FAIL;
-
- *buffer = temp;
- *n = total_len;
- }
-
- strcat(*buffer, buf);
+BcStatus bc_vm_stdin(BcVm *vm) {
- return BC_STATUS_SUCCESS;
-}
-
-BcStatus bc_stdin(Bc *bc) {
-
- BcStatus s;
- char *buf, *buffer, c;
- size_t n, bufn, slen, total_len, len, i;
- int string, comment, notend;
+ BcStatus s = BC_STATUS_SUCCESS;
+ BcVec buf, buffer;
+ char c;
+ size_t len, i, str = 0;
+ int comment = 0, notend;
- bc->prog.file = bc_program_stdin_name;
- bc_lex_init(&bc->parse.lex, bc_program_stdin_name);
+ vm->prog.file = bc_program_stdin_name;
+ bc_lex_file(&vm->prs.l, bc_program_stdin_name);
- n = bufn = BC_BUF_SIZE;
+ bc_vec_init(&buffer, sizeof(char), NULL);
+ bc_vec_init(&buf, sizeof(char), NULL);
+ bc_vec_pushByte(&buffer, '\0');
- if (!(buffer = malloc(BC_BUF_SIZE + 1))) return BC_STATUS_MALLOC_FAIL;
+ // This loop is complex because the vm tries not to send any lines that end
+ // with a backslash to the parser. The reason for that is because the parser
+ // treats a backslash+newline combo as whitespace, per the bc spec. In that
+ // case, and for strings and comments, the parser will expect more stuff.
+ for (s = bc_read_line(&buf, ">>> "); !s; s = bc_read_line(&buf, ">>> ")) {
- if (!(buf = malloc(BC_BUF_SIZE + 1))) {
- s = BC_STATUS_MALLOC_FAIL;
- goto buf_err;
- }
+ char *string = buf.v;
- buffer[0] = '\0';
- string = comment = 0;
- s = BC_STATUS_SUCCESS;
+ len = buf.len - 1;
- // The following loop is complex because the vm tries not to send any lines
- // that end with a backslash to the parser. The reason for that is because the
- // parser treats a backslash+newline combo as whitespace, per the bc spec. In
- // that case, and for strings and comments, the parser will expect more stuff.
- while ((!s || s != BC_STATUS_QUIT) &&
- !((s = bc_io_getline(&buf, &bufn)) && s != BC_STATUS_BINARY_FILE))
- {
- if (s == BC_STATUS_BINARY_FILE) {
- putchar('\a');
- s = BC_STATUS_SUCCESS;
- continue;
+ if (len == 1) {
+ if (str && buf.v[0] == '"') str -= 1;
+ else if (buf.v[0] == '"') str += 1;
}
-
- len = strlen(buf);
- slen = strlen(buffer);
- total_len = slen + len;
-
- if (len == 1 && buf[0] == '"') string = !string;
else if (len > 1 || comment) {
for (i = 0; i < len; ++i) {
notend = len > i + 1;
+ c = string[i];
- if ((c = buf[i]) == '"') string = !string;
- else if (c == '/' && notend && !comment && buf[i + 1] == '*') {
+ if ((i - 1 > len || string[i - 1] != '\\') && c == '"') str = !str;
+
+ if (c == '/' && notend && !comment && string[i + 1] == '*') {
comment = 1;
break;
}
- else if (c == '*' && notend && comment && buf[i + 1] == '/')
+ else if (c == '*' && notend && comment && string[i + 1] == '/')
comment = 0;
}
- if (string || comment || buf[len - 2] == '\\') {
- if ((s = bc_concat(&buffer, &n, buf, total_len))) goto exit_err;
+ if (str || comment || string[len - 2] == '\\') {
+ bc_vec_concat(&buffer, buf.v);
continue;
}
}
- if ((s = bc_concat(&buffer, &n, buf, total_len))) goto exit_err;
+ bc_vec_concat(&buffer, buf.v);
+ s = bc_vm_process(vm, buffer.v);
+ if (s) goto err;
- s = bc_process(bc, buffer);
- buffer[0] = '\0';
+ bc_vec_npop(&buffer, buffer.len);
}
+ if (s == BC_STATUS_BIN_FILE) s = bc_vm_error(s, vm->prs.l.f, 0);
+
// I/O error will always happen when stdin is
// closed. It's not a problem in that case.
- s = s == BC_STATUS_IO_ERR ? BC_STATUS_SUCCESS : s;
+ s = s == BC_STATUS_IO_ERR || s == BC_STATUS_QUIT ? BC_STATUS_SUCCESS : s;
+
+ if (str) s = bc_vm_error(BC_STATUS_LEX_NO_STRING_END,
+ vm->prs.l.f, vm->prs.l.line);
+ else if (comment) s = bc_vm_error(BC_STATUS_LEX_NO_COMMENT_END,
+ vm->prs.l.f, vm->prs.l.line);
-exit_err:
- free(buf);
-buf_err:
- free(buffer);
+err:
+ bc_vec_free(&buf);
+ bc_vec_free(&buffer);
return s;
}
-void bc_main(void) {
+BcStatus bc_vm_exec(BcVm *vm) {
- BcStatus status;
- Bc bc;
- struct sigaction sa;
- size_t i, len;
- char *lenv;
- int num;
+ BcStatus s = BC_STATUS_SUCCESS;
+ size_t i;
+
+ if (toys.optflags & FLAG_l) {
+
+ bc_lex_file(&vm->prs.l, bc_lib_name);
+ s = bc_parse_text(&vm->prs, bc_lib);
- TT.tty = (toys.optflags & FLAG_i) || (isatty(0) && isatty(1));
+ while (!s && vm->prs.l.t.t != BC_LEX_EOF) s = bc_parse_parse(&vm->prs);
- if ((lenv = getenv("BC_LINE_LENGTH"))) {
- len = strlen(lenv);
- for (num = 1, i = 0; num && i < len; ++i) num = isdigit(lenv[i]);
- if (!num || (len = (size_t) atoi(lenv) - 1) < 2) len = BC_NUM_PRINT_WIDTH;
+ if (s) return s;
+ s = bc_program_exec(&vm->prog);
+ if (s) return s;
}
- else len = BC_NUM_PRINT_WIDTH;
- if ((toys.exitval = bc_program_init(&bc.prog, len))) return;
- if ((status = bc_parse_init(&bc.parse, &bc.prog))) goto parse_err;
+ for (i = 0; !s && i < toys.optc; ++i)
+ s = bc_vm_file(vm, toys.optargs[i]);
+ if (s && s != BC_STATUS_QUIT) return s;
+
+ s = bc_vm_stdin(vm);
+ if (!s && !BC_PARSE_CAN_EXEC(&vm->prs)) s = bc_vm_process(vm, "");
+
+ return s == BC_STATUS_QUIT ? BC_STATUS_SUCCESS : s;
+}
+
+void bc_vm_free(BcVm *vm) {
+ bc_program_free(&vm->prog);
+ bc_parse_free(&vm->prs);
+}
+
+BcStatus bc_vm_init(BcVm *vm) {
+
+ BcStatus s = BC_STATUS_SUCCESS;
+ size_t len = bc_vm_envLen("BC_LINE_LENGTH");
+ struct sigaction sa;
sigemptyset(&sa.sa_mask);
- sa.sa_handler = bc_sig;
+ sa.sa_handler = bc_vm_sig;
sa.sa_flags = 0;
+ sigaction(SIGINT, &sa, NULL);
- if (sigaction(SIGINT, &sa, NULL) < 0 || sigaction(SIGPIPE, &sa, NULL) < 0 ||
- sigaction(SIGHUP, &sa, NULL) < 0 || sigaction(SIGTERM, &sa, NULL) < 0)
- {
- status = BC_STATUS_EXEC_SIGACTION_FAIL;
- goto err;
- }
+ memset(vm, 0, sizeof(BcVm));
- if (TT.tty && !(toys.optflags & FLAG_q) && printf("%s", bc_header) < 0) {
- status = BC_STATUS_IO_ERR;
- goto err;
- }
+ toys.optflags |= FLAG_s * (getenv("POSIXLY_CORRECT") != NULL);
- if (toys.optflags & FLAG_l) {
+ bc_program_init(&vm->prog, len);
+ bc_parse_init(&vm->prs, &vm->prog, BC_PROG_MAIN);
- bc_lex_init(&bc.parse.lex, bc_lib_name);
- if ((status = bc_lex_text(&bc.parse.lex, bc_lib))) goto err;
+ return s;
+}
- while (!status && bc.parse.lex.token.type != BC_LEX_EOF)
- status = bc_parse_parse(&bc.parse);
+void bc_main(void) {
- if (status || (status = bc_program_exec(&bc.prog))) goto err;
- }
+ BcStatus st;
+ BcVm vm;
- for (i = 0; !TT.sig_other && !status && i < toys.optc; ++i)
- status = bc_file(&bc, toys.optargs[i]);
- if (status || TT.sig_other) goto err;
+ st = bc_vm_init(&vm);
+ if (st) goto exit;
- status = bc_stdin(&bc);
+ TT.ttyin = isatty(0);
+ TT.tty = TT.ttyin || (toys.optflags & FLAG_i) || isatty(1);
-err:
- if (CFG_TOYBOX_FREE) bc_parse_free(&bc.parse);
-parse_err:
- bc_program_free(&bc.prog);
- toys.exitval = status == BC_STATUS_QUIT ? BC_STATUS_SUCCESS : status;
+ if (TT.ttyin && !(toys.optflags & FLAG_q)) bc_vm_info();
+ st = bc_vm_exec(&vm);
+
+exit:
+ if (CFG_TOYBOX_FREE) bc_vm_free(&vm);
+ toys.exitval = (int) st;
}