Average Error: 0.0 → 0.0
Time: 11.2s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{-\sqrt{1}}\right)}^{\left(\sqrt{1} - x\right)} \cdot {\left(e^{-x}\right)}^{\left(\sqrt{1} - x\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{-\sqrt{1}}\right)}^{\left(\sqrt{1} - x\right)} \cdot {\left(e^{-x}\right)}^{\left(\sqrt{1} - x\right)}
double f(double x) {
        double r29139 = 1.0;
        double r29140 = x;
        double r29141 = r29140 * r29140;
        double r29142 = r29139 - r29141;
        double r29143 = -r29142;
        double r29144 = exp(r29143);
        return r29144;
}

double f(double x) {
        double r29145 = 1.0;
        double r29146 = sqrt(r29145);
        double r29147 = -r29146;
        double r29148 = exp(r29147);
        double r29149 = x;
        double r29150 = r29146 - r29149;
        double r29151 = pow(r29148, r29150);
        double r29152 = -r29149;
        double r29153 = exp(r29152);
        double r29154 = pow(r29153, r29150);
        double r29155 = r29151 * r29154;
        return r29155;
}

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-lft-neg-in0.0

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

    \[\leadsto \color{blue}{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{\left(\sqrt{1} - x\right)}}\]
  7. Using strategy rm
  8. Applied distribute-neg-in0.0

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

    \[\leadsto {\color{blue}{\left(e^{-\sqrt{1}} \cdot e^{-x}\right)}}^{\left(\sqrt{1} - x\right)}\]
  10. Using strategy rm
  11. Applied unpow-prod-down0.0

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

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

Reproduce

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