Average Error: 5.2 → 20.3
Time: 27.6s
Precision: 64
\[\left(\left(e^{\left(-a\right) \cdot a} - e^{\left(-b\right) \cdot b}\right) \cdot e^{c}\right) \cdot e^{d}\]
\[\begin{array}{l} \mathbf{if}\;d \le -3.617464602681961210819372151322127963725 \cdot 10^{-81}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le -6.736604019857715362077744150143953250299 \cdot 10^{-122}:\\ \;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\ \mathbf{elif}\;d \le -1.287167055617189934908973934090387605637 \cdot 10^{-155}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le -2.891024518558354888166312546702144242433 \cdot 10^{-189}:\\ \;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\ \mathbf{elif}\;d \le -2.205443539831299022954698194824981633893 \cdot 10^{-251}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le 9.276453314622241353133833869742885795804 \cdot 10^{-298}:\\ \;\;\;\;\frac{e^{\left(\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)\right) + \left(\left(d - a \cdot a\right) + c\right)} - e^{\left(d + \left(c - b \cdot b\right)\right) + \left(\left(d + \left(c - b \cdot b\right)\right) + \left(d + \left(c - b \cdot b\right)\right)\right)}}{e^{d + \left(c - b \cdot b\right)} \cdot \left(e^{d + \left(c - b \cdot b\right)} + e^{\left(d - a \cdot a\right) + c}\right) + e^{\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)}}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
\left(\left(e^{\left(-a\right) \cdot a} - e^{\left(-b\right) \cdot b}\right) \cdot e^{c}\right) \cdot e^{d}
\begin{array}{l}
\mathbf{if}\;d \le -3.617464602681961210819372151322127963725 \cdot 10^{-81}:\\
\;\;\;\;0\\

\mathbf{elif}\;d \le -6.736604019857715362077744150143953250299 \cdot 10^{-122}:\\
\;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\

\mathbf{elif}\;d \le -1.287167055617189934908973934090387605637 \cdot 10^{-155}:\\
\;\;\;\;0\\

\mathbf{elif}\;d \le -2.891024518558354888166312546702144242433 \cdot 10^{-189}:\\
\;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\

\mathbf{elif}\;d \le -2.205443539831299022954698194824981633893 \cdot 10^{-251}:\\
\;\;\;\;0\\

\mathbf{elif}\;d \le 9.276453314622241353133833869742885795804 \cdot 10^{-298}:\\
\;\;\;\;\frac{e^{\left(\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)\right) + \left(\left(d - a \cdot a\right) + c\right)} - e^{\left(d + \left(c - b \cdot b\right)\right) + \left(\left(d + \left(c - b \cdot b\right)\right) + \left(d + \left(c - b \cdot b\right)\right)\right)}}{e^{d + \left(c - b \cdot b\right)} \cdot \left(e^{d + \left(c - b \cdot b\right)} + e^{\left(d - a \cdot a\right) + c}\right) + e^{\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)}}\\

\mathbf{else}:\\
\;\;\;\;0\\

\end{array}
double f(double a, double b, double c, double d) {
        double r52697336 = a;
        double r52697337 = -r52697336;
        double r52697338 = r52697337 * r52697336;
        double r52697339 = exp(r52697338);
        double r52697340 = b;
        double r52697341 = -r52697340;
        double r52697342 = r52697341 * r52697340;
        double r52697343 = exp(r52697342);
        double r52697344 = r52697339 - r52697343;
        double r52697345 = c;
        double r52697346 = exp(r52697345);
        double r52697347 = r52697344 * r52697346;
        double r52697348 = d;
        double r52697349 = exp(r52697348);
        double r52697350 = r52697347 * r52697349;
        return r52697350;
}

double f(double a, double b, double c, double d) {
        double r52697351 = d;
        double r52697352 = -3.617464602681961e-81;
        bool r52697353 = r52697351 <= r52697352;
        double r52697354 = 0.0;
        double r52697355 = -6.736604019857715e-122;
        bool r52697356 = r52697351 <= r52697355;
        double r52697357 = c;
        double r52697358 = r52697351 + r52697357;
        double r52697359 = a;
        double r52697360 = r52697359 * r52697359;
        double r52697361 = r52697358 - r52697360;
        double r52697362 = exp(r52697361);
        double r52697363 = r52697362 * r52697362;
        double r52697364 = b;
        double r52697365 = r52697364 * r52697364;
        double r52697366 = r52697357 - r52697365;
        double r52697367 = r52697351 + r52697366;
        double r52697368 = exp(r52697367);
        double r52697369 = r52697368 * r52697368;
        double r52697370 = r52697363 - r52697369;
        double r52697371 = r52697362 + r52697368;
        double r52697372 = r52697370 / r52697371;
        double r52697373 = -1.28716705561719e-155;
        bool r52697374 = r52697351 <= r52697373;
        double r52697375 = -2.891024518558355e-189;
        bool r52697376 = r52697351 <= r52697375;
        double r52697377 = -2.205443539831299e-251;
        bool r52697378 = r52697351 <= r52697377;
        double r52697379 = 9.276453314622241e-298;
        bool r52697380 = r52697351 <= r52697379;
        double r52697381 = r52697351 - r52697360;
        double r52697382 = r52697381 + r52697357;
        double r52697383 = r52697382 + r52697382;
        double r52697384 = r52697383 + r52697382;
        double r52697385 = exp(r52697384);
        double r52697386 = r52697367 + r52697367;
        double r52697387 = r52697367 + r52697386;
        double r52697388 = exp(r52697387);
        double r52697389 = r52697385 - r52697388;
        double r52697390 = exp(r52697382);
        double r52697391 = r52697368 + r52697390;
        double r52697392 = r52697368 * r52697391;
        double r52697393 = exp(r52697383);
        double r52697394 = r52697392 + r52697393;
        double r52697395 = r52697389 / r52697394;
        double r52697396 = r52697380 ? r52697395 : r52697354;
        double r52697397 = r52697378 ? r52697354 : r52697396;
        double r52697398 = r52697376 ? r52697372 : r52697397;
        double r52697399 = r52697374 ? r52697354 : r52697398;
        double r52697400 = r52697356 ? r52697372 : r52697399;
        double r52697401 = r52697353 ? r52697354 : r52697400;
        return r52697401;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if d < -3.617464602681961e-81 or -6.736604019857715e-122 < d < -1.28716705561719e-155 or -2.891024518558355e-189 < d < -2.205443539831299e-251 or 9.276453314622241e-298 < d

    1. Initial program 4.8

      \[\left(\left(e^{\left(-a\right) \cdot a} - e^{\left(-b\right) \cdot b}\right) \cdot e^{c}\right) \cdot e^{d}\]
    2. Simplified4.3

      \[\leadsto \color{blue}{e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)}}\]
    3. Taylor expanded around 0 16.9

      \[\leadsto \color{blue}{0}\]

    if -3.617464602681961e-81 < d < -6.736604019857715e-122 or -1.28716705561719e-155 < d < -2.891024518558355e-189

    1. Initial program 6.8

      \[\left(\left(e^{\left(-a\right) \cdot a} - e^{\left(-b\right) \cdot b}\right) \cdot e^{c}\right) \cdot e^{d}\]
    2. Simplified6.7

      \[\leadsto \color{blue}{e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)}}\]
    3. Using strategy rm
    4. Applied flip--38.8

      \[\leadsto \color{blue}{\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}}\]

    if -2.205443539831299e-251 < d < 9.276453314622241e-298

    1. Initial program 8.5

      \[\left(\left(e^{\left(-a\right) \cdot a} - e^{\left(-b\right) \cdot b}\right) \cdot e^{c}\right) \cdot e^{d}\]
    2. Simplified8.3

      \[\leadsto \color{blue}{e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)}}\]
    3. Using strategy rm
    4. Applied flip3--39.3

      \[\leadsto \color{blue}{\frac{{\left(e^{\left(d + c\right) - a \cdot a}\right)}^{3} - {\left(e^{d + \left(c - b \cdot b\right)}\right)}^{3}}{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} + \left(e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)} + e^{\left(d + c\right) - a \cdot a} \cdot e^{d + \left(c - b \cdot b\right)}\right)}}\]
    5. Simplified39.4

      \[\leadsto \frac{\color{blue}{e^{\left(\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)\right) + \left(\left(d - a \cdot a\right) + c\right)} - e^{\left(\left(d + \left(c - b \cdot b\right)\right) + \left(d + \left(c - b \cdot b\right)\right)\right) + \left(d + \left(c - b \cdot b\right)\right)}}}{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} + \left(e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)} + e^{\left(d + c\right) - a \cdot a} \cdot e^{d + \left(c - b \cdot b\right)}\right)}\]
    6. Simplified39.4

      \[\leadsto \frac{e^{\left(\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)\right) + \left(\left(d - a \cdot a\right) + c\right)} - e^{\left(\left(d + \left(c - b \cdot b\right)\right) + \left(d + \left(c - b \cdot b\right)\right)\right) + \left(d + \left(c - b \cdot b\right)\right)}}{\color{blue}{e^{d + \left(c - b \cdot b\right)} \cdot \left(e^{d + \left(c - b \cdot b\right)} + e^{\left(d - a \cdot a\right) + c}\right) + e^{\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification20.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \le -3.617464602681961210819372151322127963725 \cdot 10^{-81}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le -6.736604019857715362077744150143953250299 \cdot 10^{-122}:\\ \;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\ \mathbf{elif}\;d \le -1.287167055617189934908973934090387605637 \cdot 10^{-155}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le -2.891024518558354888166312546702144242433 \cdot 10^{-189}:\\ \;\;\;\;\frac{e^{\left(d + c\right) - a \cdot a} \cdot e^{\left(d + c\right) - a \cdot a} - e^{d + \left(c - b \cdot b\right)} \cdot e^{d + \left(c - b \cdot b\right)}}{e^{\left(d + c\right) - a \cdot a} + e^{d + \left(c - b \cdot b\right)}}\\ \mathbf{elif}\;d \le -2.205443539831299022954698194824981633893 \cdot 10^{-251}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \le 9.276453314622241353133833869742885795804 \cdot 10^{-298}:\\ \;\;\;\;\frac{e^{\left(\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)\right) + \left(\left(d - a \cdot a\right) + c\right)} - e^{\left(d + \left(c - b \cdot b\right)\right) + \left(\left(d + \left(c - b \cdot b\right)\right) + \left(d + \left(c - b \cdot b\right)\right)\right)}}{e^{d + \left(c - b \cdot b\right)} \cdot \left(e^{d + \left(c - b \cdot b\right)} + e^{\left(d - a \cdot a\right) + c}\right) + e^{\left(\left(d - a \cdot a\right) + c\right) + \left(\left(d - a \cdot a\right) + c\right)}}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]

Reproduce

herbie shell --seed 1 
(FPCore (a b c d)
  :name "(exp(-a*a) - exp(-b*b))*exp(c)*exp(d) "
  (* (* (- (exp (* (- a) a)) (exp (* (- b) b))) (exp c)) (exp d)))