Skip to content
class

AsinBackward

AsinBackward

Python wrappers

Public Python APIs implemented by this engine symbol.

Autograd node for element-wise arcsine y=arcsin⁡(x)y = \arcsin(x).

Saves the input x so the backward pass can form the radicand 1−x21 - x^2. Defined on the closed input domain [−1,1][-1, 1] with range [−π2,π2][-\tfrac{\pi}{2}, \tfrac{\pi}{2}]; the gradient is unbounded at the endpoints x=±1x = \pm 1.

Math

\frac{\partial y}{\partial x} = \frac{1}{\sqrt{1 - x^2}}, \qquad \frac{\partial \mathcal{L}}{\partial x} = \frac{1}{\sqrt{1 - x^2}}\,\frac{\partial \mathcal{L}}{\partial y}.$$

Attributes

schema_v1OpSchema
Registered as "arcsin" with AmpPolicy::Promote.

Notes

Dispatch: Accelerate vvasinf/vvasin (CPU) / MLX arcsin (GPU).

Static methods

1
static

dispatch

int dispatch(backend::IBackend & be, const int & a, const int & s, Dtype dt)

Forward — calls IBackend::asin to compute y=arcsin⁡xy = \arcsin x.

Methods

2
fn

grad_formula

int grad_formula(const int & g)

Backward — ∂y/∂x=1/1−x2\partial y/\partial x = 1/\sqrt{1 - x^2}, scaled by grad_out.

fn

grad_formula_impl

int grad_formula_impl(const int & g, const int & x, const int &)

Graph-mode backward: the same derivative built from composable ops, so the gradient itself stays differentiable.