Trigonometric derivatives #
Sine and cosine act independently on each tensor entry, with angles measured in radians.
Their Jacobians are diagonal, so the same pointwise derivative multiplication computes a JVP
or a VJP. The scalar operations come from MathFunctions, which also supplies their derivatives
when the scalar type is a dual number.
Elementwise sine with VJP cos(x) * dLdy.
Evaluating the cosine at the original input preserves its sign across periods; recovering it from the sine output would lose that information.
Instances For
Elementwise cosine with VJP -sin(x) * dLdy, for inputs measured in radians.