Timothy Stiles

Results 93 comments of Timothy Stiles

next time I'm in the mood to code I'll do whatever you haven't done yet (optimistically it'll be sometime this week)

I got them from slabdrill iirc lol but I can figure out a good replacement

As you say the less allocations, the better. We're going for speed here (as much speed as we can get in JS anyway...) Directly mutating break_infinity.js is allowed, but it...

Hmm, here's an approximation to factorial that'd be easier (and smaller) to implement. It's called Stirling's approximation. https://en.wikipedia.org/wiki/Stirling%27s_approximation Ramanujan's approximation improves accuracy in some cases: https://math.stackexchange.com/questions/676952/is-ramanujans-approximation-for-the-factorial-optimal-or-can-it-be-tweaked-a Inverse gamma has an...

Specifically, this happens because ``` 1.00968*1e6 1009679.9999999999 ``` So we can't trust that an integer turned into mantissa*exp format and then having the reverse operation done remains an integer after...

floor and ceil are also busted for similar reasons the root cause is toNumber though

ah, it's because I have a line like if (Math.abs(resultRounded - result) < ROUND_TOLERANCE) { and ROUND_TOLERANCE is 1e-10, and this is when it starts being hit

yeah OK, now I remember why this is fundamentally tricky to fix. basically, after we make our Decimal and it's split into mantissa and exponent, we don't know if it...

the autoupdater would only work if you use git anyway, and if you're doing that you may as well use Github Desktop, then you can just click one button to...