Automatic Differentiation Modes

ad_trait supports three primary modes of differentiation, each with its own strengths and weaknesses.

Summary Table

ModeTypeSpeed (Few Inputs)Speed (Many Inputs)Precision
Forward-ModeExactVery FastSlowExact
Reverse-ModeExactModerateVery FastExact
Finite DifferencingApproxFastVery SlowLow

In the following chapters, we will explore each of these modes in detail.