Khan/khan-exercises — comment on commit 290dab24798bacb40783e7214a04b8a38525fc27
File:  line 0
By beneater:

No idea... Load an exercise (without this fix) and plug this into your chrome console:

for (var x = 0; x < 10000; ++x ) {
var frac = KhanUtil.toFraction( -1/8, 0.001 )
if ( frac[0] !== -1 ) {
console.log( x, frac );
break;
}
}

@kamens and I looked at it for a while and we don't have a good explanation.