News for hackers. Stuff that matters.
Re:First-Class Automatic Differentiation in Swift by adamnemecek on Monday October 22, 2018 @01:30AM (#18272409)
Dual numbers are magic. They are somewhat obscure but very powerful e.g for reasoning about dynamically evolving systems. They are like complex numbers but instead of i^2=-1 you have epsilon such that epsilon^=0. Shit gets real from then on.

Dual number functions give you the value at the function as well as the derivative at that point. Very cool.

Re:First-Class Automatic Differentiation in Swift by nestorD on Monday October 22, 2018 @03:57AM (#18272916)
And if you want the second derivative... You have hyper-dual numbers! http://adl.stanford.edu/hyperdual/
Re:First-Class Automatic Differentiation in Swift by banach on Monday October 22, 2018 @12:05PM (#18275828)
Why settle for two, when you can have them all? https://link.springer.com/article/10.1023/A:1011501232197
Re:First-Class Automatic Differentiation in Swift by eigenspace on Monday October 22, 2018 @10:01AM (#18274689)
That’s not normally necessary. One can often just use tagged dual numbers.

I guess one might consider tagged duals hyperduals.

Re:First-Class Automatic Differentiation in Swift by adamnemecek on Monday October 22, 2018 @10:06AM (#18274730)
What’s a tagged number? Google isn’t helpful.