Average Error: 0.7 → 0
Time: 15.1s
Precision: 64
\[e^{x} \cdot e^{\left(-2\right) \cdot x}\]
\[e^{x - 2 \cdot x}\]
e^{x} \cdot e^{\left(-2\right) \cdot x}
e^{x - 2 \cdot x}
double f(double x) {
        double r1631600 = x;
        double r1631601 = exp(r1631600);
        double r1631602 = 2.0;
        double r1631603 = -r1631602;
        double r1631604 = r1631603 * r1631600;
        double r1631605 = exp(r1631604);
        double r1631606 = r1631601 * r1631605;
        return r1631606;
}

double f(double x) {
        double r1631607 = x;
        double r1631608 = 2.0;
        double r1631609 = r1631608 * r1631607;
        double r1631610 = r1631607 - r1631609;
        double r1631611 = exp(r1631610);
        return r1631611;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.7

    \[e^{x} \cdot e^{\left(-2\right) \cdot x}\]
  2. Simplified0

    \[\leadsto \color{blue}{e^{x - 2 \cdot x}}\]
  3. Final simplification0

    \[\leadsto e^{x - 2 \cdot x}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "exp(x)*exp(-2*x)"
  :precision binary64
  (* (exp x) (exp (* (- 2) x))))