Well, take a look. How long would it take to rewrite this algorithm in JavaScript and test it on all the corner cases?
Rewrite it, perhaps one or two hours, assuming the code is very similar to the one you ported to JS. Testing it for a dozen cases, some number of minutes. There is no such thing as perfect testing.
Can you explain where this is needed in the Tachyon compiler? Is it blocking us from progressing? Moreover, in JavaScript there is no integer division, so how can the bignum division help constant fold expressions like 101/4 or 2/3 ?
Blocking us? No. It would just help us be closer to feature complete.
There is integer division in our IIR, and when an integer perfectly divides another.
Perhaps we can look at it together at some point and I can do the porting when I have time.
- Maxime