Horace He
Horace He
I also wouldn't comment on small style things/trivial golfing for now, I'll fix them once this PR is more settled.
I've finished porting all the functions (or their equivalents) from MIT, and added fuzz tests/benchmarking as well. I'd appreciate notes on what cases I should be testing in my benchmarks....
> Do you handle pow(*, 0) correctly? I believe so. > The performance differences probably all arise from doing twice as many fft's in inverse. Ok, so I moved some...
> Document various assumptions Yeah that's definitely something that should be done. Splitting these into multiple files should luckily give us plenty of space for documentation about requirements and such.
Seems like the main cause of the relatively slow performance is the big performance discrepancy in `inverse` for small values. For large values the difference is only about 40%, but...
Now that we've reached what I consider reasonable feature/performance parity, I'll start formatting things into files/writing some documentation next.
So the current `FFTMod` PR has some work on reusing the `rt` array - I think the `rev` array needs to be recomputed for each different size. It seems that...
It seems to make no impact on performance (perhaps even a negative impact).
I've reorganized the functions into 5 files (with their dependencies by the side (including transitive dependencies). I've tried to balance minimizing number of extraneous dependencies, giving enough space for documentation,...
I removed the `euclid` dependency in `ModularArithmetic.h` for 2 reasons: 1. It makes the total Polynomial code longer :^) 2. I suspect that there's not much point in supporting division...