Patashu / break_infinity.js

A replacement for decimal.js for incremental games who want to deal with very large numbers (bigger in magnitude than 1e308, up to as much as 1e(9e15) ) and want to prioritize speed over accuracy.
MIT License
203 stars 35 forks source link

fix unit test failures #139

Open Patashu opened 2 years ago

Patashu commented 2 years ago

7:08 AM] Razenpok: Hey, Pata I've ported Number-compatibility tests from C# version to check if Decimal operations produce same values as Number operations. You can check them on tests branch by running npm ci and then npm run test [7:08 AM] Razenpok: It will run for a bit (takes several seconds on my PC) image 7:08 AM] Razenpok: And there are a lot of test cases because combinatorial explosion [7:09 AM] Razenpok: You can check all the source in tests folder [7:09 AM] Razenpok: Currently, I observe a lot of "Unreachable code" errors and I'm not sure what to do with them [7:09 AM] Razenpok: Either to disable these test cases or fix the bugs

Razenpok commented 2 years ago

Current issues:

@Patashu I need your thoughts about what to do with these I've also merged tests branch into master, so run tests from there

Patashu commented 2 years ago
Razenpok commented 2 years ago

Would like to pick up some of these? I'm going to fix the infinity one at least

Patashu commented 2 years ago

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)

Razenpok commented 2 years ago

Good news: most of the broken tests were non-finite-values-related *proceeds with fixing infinity on master* image

Razenpok commented 2 years ago

I would suggest grabbing hyperbolic functions since I have no idea how they work %) I'll probably do something with the rounding issue

Patashu commented 2 years ago

I got them from slabdrill iirc lol

but I can figure out a good replacement