Average Error: 5.2 → 0.0
Time: 5.2s
Precision: 64
\[e^{\alpha \cdot \left(\left(1 - x\right) - 1\right)}\]
\[e^{\left(-x\right) \cdot \alpha}\]
e^{\alpha \cdot \left(\left(1 - x\right) - 1\right)}
e^{\left(-x\right) \cdot \alpha}
double f(double alpha, double x) {
        double r539007 = alpha;
        double r539008 = 1.0;
        double r539009 = x;
        double r539010 = r539008 - r539009;
        double r539011 = r539010 - r539008;
        double r539012 = r539007 * r539011;
        double r539013 = exp(r539012);
        return r539013;
}

double f(double alpha, double x) {
        double r539014 = x;
        double r539015 = -r539014;
        double r539016 = alpha;
        double r539017 = r539015 * r539016;
        double r539018 = exp(r539017);
        return r539018;
}

Error

Bits error versus alpha

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 5.2

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

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

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

Reproduce

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