Average Error: 0.0 → 0.0
Time: 1.9s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}
double f(double x) {
        double r23774 = 1.0;
        double r23775 = x;
        double r23776 = r23775 * r23775;
        double r23777 = r23774 - r23776;
        double r23778 = -r23777;
        double r23779 = exp(r23778);
        return r23779;
}

double f(double x) {
        double r23780 = 1.0;
        double r23781 = sqrt(r23780);
        double r23782 = x;
        double r23783 = r23781 + r23782;
        double r23784 = exp(r23783);
        double r23785 = r23781 - r23782;
        double r23786 = -r23785;
        double r23787 = pow(r23784, r23786);
        return r23787;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

    \[\leadsto e^{-\left(\color{blue}{\sqrt{1} \cdot \sqrt{1}} - x \cdot x\right)}\]
  4. Applied difference-of-squares0.0

    \[\leadsto e^{-\color{blue}{\left(\sqrt{1} + x\right) \cdot \left(\sqrt{1} - x\right)}}\]
  5. Applied distribute-rgt-neg-in0.0

    \[\leadsto e^{\color{blue}{\left(\sqrt{1} + x\right) \cdot \left(-\left(\sqrt{1} - x\right)\right)}}\]
  6. Applied exp-prod0.0

    \[\leadsto \color{blue}{{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}}\]
  7. Final simplification0.0

    \[\leadsto {\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}\]

Reproduce

herbie shell --seed 2020056 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))