Read the equation
The real exponential is its own derivative. The backward pass therefore multiplies the incoming gradient by the already computed output. Large positive inputs can overflow floating-point range, while very negative inputs can underflow toward zero.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| x | Exponent |
| z | Exponential output |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
double denom = 1.0 + smooth_abs;
double dphi = -diff / (smooth_abs * denom * denom);
x->grad += z->grad * dphi;
};
return tape.record(z);
}
// Exp: z = exp(x), dz/dx = exp(x)
inline GradNodePtr exp_op(GradNodePtr x, TapeRecorder& tape) {
double e = std::exp(x->value);
auto z = std::make_shared<GradNode>(e);
z->inputs = {x};
z->backward_fn = [x, z, e]() {
x->grad += z->grad * e;
};
return tape.record(z);
}
Exact original notation
Exp: z = exp(x), dz/dx = exp(x)