Average Error: 0.0 → 0.0
Time: 3.3s
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 r103534 = 1.0;
        double r103535 = x;
        double r103536 = r103535 * r103535;
        double r103537 = r103534 - r103536;
        double r103538 = -r103537;
        double r103539 = exp(r103538);
        return r103539;
}

double f(double x) {
        double r103540 = 1.0;
        double r103541 = sqrt(r103540);
        double r103542 = x;
        double r103543 = r103541 + r103542;
        double r103544 = exp(r103543);
        double r103545 = r103541 - r103542;
        double r103546 = -r103545;
        double r103547 = pow(r103544, r103546);
        return r103547;
}

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 2020036 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))