Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> this seems like a perfect fit for automatic differentiation.

Why?



It would let you represent physical systems as normal Haskell functions and get accurate derivatives "for free". At least in the one-dimensional case it's probably simpler than numeric differentiation while also letting you worry far less about accuracy and stability.

I've never worked this through to a full conclusion, but you could even write it in a way that would let you get symbolic differentiation out of it too.


Yes, if you get to automatic differentiation by overloading your operators to also take a “differential” type, you can further overload them to do symbolic arithmetic and then symbolic differentiation falls out for free.

See https://sritchie.github.io/emmy/src/emmy/differential.html for detail!


Makes sense. I initially thought, that automatic differentiation would be mostly useful for long derivative chains, but of course even for single derivatives it does have advantages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: