elrnv / autodiff

Auto differentiation library
Apache License 2.0
63 stars 7 forks source link

Fix some remainder/truncation duals #4

Open ryan-williams opened 1 year ago

ryan-williams commented 1 year ago

I could be wrong about these, but:

I considered adding tests but simple tests would just repeat my assumptions about how the math should work (e.g. asserting dx == 0 in some cases). It would be nice to add tests that perturb values by EPSILON, and verify that the empirical and theoretical gradients match. I'm open to trying that out, but maybe as a follow-on PR, as ≈all of the operations warrant that, not just the ones I've touched here.

elrnv commented 1 year ago

I think you are right! Thank you for the PR. It would be awesome to have more tests here!