XAD documentation
Smoothed mathematics
The functions in this section are smoothed equivalents of the original math functions and can be used to allow computing derivatives around discontinuities.
smooth_abs
T smooth_abs(T x, T c = 0.001) is a smoothed version of abs, defined as:
xis the input valuecis the cut-off point for the spline-approximated area (default:0.001)- returns: The smoothed absolute value, defined as above.
smooth_max
T smooth_max(T x, T y, T c = 0.001) is a smoothed version of max, defined as:
xFirst argument to maxySecond argument to maxcCut-off point for the spline-approximated area (default:0.001)- returns: The smoothed max function, defined as above
smooth_min
T smooth_min(T x, T y, T c = 0.001) is a smoothed version of min, defined as:
xFirst argument to minySecond argument to mincCut-off point for the spline-approximated area (default:0.001)- returns: The smoothed min function, defined as above
Questions or issues: GitHub Discussions · issues. Would you rather we AAD-enabled your code? Get a free speed-up estimate.