AD ≠ AI. That being said, it’s common to benefit from hand-rolled derivatives in tricky calculations.
I do know that AI and AD are not the same. ![]()
The reason I hand differentiate is that this should be more efficient: Then I can declare all coefficients as const and then no further changes are necessary, apart from precalculation of the subgrid using Horner’s method for polynomials (added thanks to @mkitti at an earlier stage), but now evaluated on the exact rationals of the kernels. I also have to use BigInt, otherwise I get integer overflow, and I’m currently just at the 11th degree kernel lower derivatives. But I hope this pays off as efficiency in the end. ![]()
I made this extra plot using Makie.jl, showing the frequency spectra of all the kernels in the package.
All of the :b type kernels are dark colored with a marker, while all :a kernels are lighter.
The ideal sinc filter is shown as well, as a performance comparison.
Please note that I have renamed :b3 --> :a4 in the upcoming release.
The reason for this renaming is that I did not develop this kernel and it is 4th order, not 7th.
After this renaming, all of the :b kernels are 7th order, and all the :a kernels are the previously published ones. ![]()


