rat.fromDecimal() is much faster with this new algorithm
https://github.com/acerix/rational.js/issues/1