fn exp()

in gad/src/analytic.rs [18:55]


    fn exp(&mut self, v: &Value) -> Value;

    /// Element-wise natural logarithm `log(x)`.
    fn log(&mut self, v: &Value) -> Value;

    /// Element-wise natural logarithm shifted by one `log(1 + x)`.
    fn log1p(&mut self, v: &Value) -> Value;

    /// Element-wise sinus `sin(x)`.
    fn sin(&mut self, v: &Value) -> Value;

    /// Element-wise cosinus `cos(x)`.
    fn cos(&mut self, v: &Value) -> Value;

    /// Element-wise hyperbolic tangent `tanh(x)`.
    fn tanh(&mut self, v: &Value) -> Value;

    /// Element-wise sigmoid `1 / (1 + exp(-x))`.
    fn sigmoid(&mut self, v: &Value) -> Value;

    /// Element-wise reciprocal `1/x`.
    fn reciprocal(&mut self, v: &Value) -> Value;

    /// Element-wise square root `sqrt(x)`.
    fn sqrt(&mut self, v: &Value) -> Value;

    /// Element-wise division `x / y`.
    fn div(&mut self, v0: &Value, v1: &Value) -> Result<Value>;

    /// Element-wise power `x ^ p`.
    fn pow(&mut self, v: &Value, p: &Value) -> Result<Value>
    where
        Self: ArithAlgebra<Value>,
    {
        let l = self.log(v);
        let e = self.mul(p, &l)?;
        Ok(self.exp(&e))
    }