dyoo/js-numbers — pull request #3 by danking (2014-01-20 17:08:04+00:00)
Title: Add support for exactness and radix hashtags

Add support for exactness and radix hashtag syntax

This syntax is specified in "1.3.3 Reading Numbers" [1] of the Racket Documentation.

Although the exactness syntax is now supported, it doesn't actually for parsing as bignums. I need help writing a bignum number parser for non-decimal numbers.

Add support for parsing base 2, 8, and 16 numbers.

I don't know how tests are supposed to be written in this project. While developing I appending the following cods snippet to the file and executed the file with node. With this patch, the project passes all the tests below.

```racket
function testThis(x){
console.log(__PLTNUMBERS_TOP__.fromString(x))
return __PLTNUMBERS_TOP__.fromString(x)
}

console.log(testThis("-1") == -1)
console.log((function (actual) { return actual.n == 1 && actual.d == 2})(testThis("1/2")))
console.log(testThis("1.0") == 1.0)
console.log(testThis("2e5") == 200000)
console.log(testThis("#i5") == 5)
console.log(testThis("#e2e5") == 200000)
console.log(testThis("#x2e5") == 741)
console.log(testThis("#b101") == 5)
```

[1] http://www.cs.utah.edu/plt/snapshots/current/doc/reference/reader.html?q=parsing%20numbers#%28part._parse-number%29