alibaba-archive / node-biginteger

node.js version of java.math.BigInteger
10 stars 5 forks source link

BigInteger.fromString("zzzzzzz", 36).toString("36") === "z-z141z5" #7

Closed Yaffle closed 10 years ago

Yaffle commented 10 years ago

possible fix:

-    digitGroup[numGroups++] = r2.longValue().toString(radix);
+    digitGroup[numGroups++] = new Long(r2._getInt(0), r2._getInt(1), true).toString(radix);
coolme200 commented 10 years ago

thank you, i will fix it.

coolme200 commented 10 years ago

In fact, this anomaly is caused because long.toString problems, such as free time I will find out and then submitted to the author long

Long.fromString('zzzzzz',36).toString(36); '-z141z5' Long.fromString('zzzzzz',36).toString(10); '2176782335'