aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/bigint2.stanza
diff options
context:
space:
mode:
authorazidar2015-08-25 14:51:08 -0700
committerazidar2015-08-25 14:51:08 -0700
commit9fd6d47c5ee82e4dac924e15b60f2a519d566b14 (patch)
tree999ea3f223d228cef7f84ae7647ec95db7294e56 /src/main/stanza/bigint2.stanza
parenteb1ab67b6cc3fd4a549da563bf643bd519d7562e (diff)
Removed IntWidth, now only use LongWidth. Now do width inference for Constants in parser, and correctly subtract 1 (except when 0) when calculating width from num-bits of BigInt
Diffstat (limited to 'src/main/stanza/bigint2.stanza')
-rw-r--r--src/main/stanza/bigint2.stanza3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/stanza/bigint2.stanza b/src/main/stanza/bigint2.stanza
index ebd01652..64c587ee 100644
--- a/src/main/stanza/bigint2.stanza
+++ b/src/main/stanza/bigint2.stanza
@@ -88,9 +88,10 @@ defmethod set (b:BigInt, index:Int, bit:Int) -> False :
d(b)[word-index] = ((bit & 1) << bit-index) | d(b)[word-index]
public defmethod to-string (b:BigInt) : to-hex(b)
+ ;string-join([to-hex(b) "'" num-bits(b)])
public defmethod print (o:OutputStream, b:BigInt) :
- print(o, to-string(b))
+ print(o, to-string(b))
public defn BigIntZero (num-bits:Int) -> BigInt :
val num-words = (num-bits + word-size - 1) / word-size