Average Error: 4.0 → 2.8
Time: 32.2s
Precision: 64
\[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
\[\begin{array}{l} \mathbf{if}\;t \le -1.9603767098720115 \cdot 10^{-87}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \left(\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right)\right)\right)}, x\right)}\\ \mathbf{elif}\;t \le 1.0654066290336557 \cdot 10^{-228}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{\left(\left(\sqrt{a + t} \cdot z\right)\right)}{t}\right)}, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{\mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right) \cdot 2.0}, x\right)}\\ \end{array}\]
\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}
\begin{array}{l}
\mathbf{if}\;t \le -1.9603767098720115 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \left(\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right)\right)\right)}, x\right)}\\

\mathbf{elif}\;t \le 1.0654066290336557 \cdot 10^{-228}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{\left(\left(\sqrt{a + t} \cdot z\right)\right)}{t}\right)}, x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{\mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right) \cdot 2.0}, x\right)}\\

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c) {
        double r1322349 = x;
        double r1322350 = y;
        double r1322351 = 2.0;
        double r1322352 = z;
        double r1322353 = t;
        double r1322354 = a;
        double r1322355 = r1322353 + r1322354;
        double r1322356 = sqrt(r1322355);
        double r1322357 = r1322352 * r1322356;
        double r1322358 = r1322357 / r1322353;
        double r1322359 = b;
        double r1322360 = c;
        double r1322361 = r1322359 - r1322360;
        double r1322362 = 5.0;
        double r1322363 = 6.0;
        double r1322364 = r1322362 / r1322363;
        double r1322365 = r1322354 + r1322364;
        double r1322366 = 3.0;
        double r1322367 = r1322353 * r1322366;
        double r1322368 = r1322351 / r1322367;
        double r1322369 = r1322365 - r1322368;
        double r1322370 = r1322361 * r1322369;
        double r1322371 = r1322358 - r1322370;
        double r1322372 = r1322351 * r1322371;
        double r1322373 = exp(r1322372);
        double r1322374 = r1322350 * r1322373;
        double r1322375 = r1322349 + r1322374;
        double r1322376 = r1322349 / r1322375;
        return r1322376;
}

double f(double x, double y, double z, double t, double a, double b, double c) {
        double r1322377 = t;
        double r1322378 = -1.9603767098720115e-87;
        bool r1322379 = r1322377 <= r1322378;
        double r1322380 = x;
        double r1322381 = y;
        double r1322382 = 2.0;
        double r1322383 = c;
        double r1322384 = b;
        double r1322385 = r1322383 - r1322384;
        double r1322386 = a;
        double r1322387 = 5.0;
        double r1322388 = 6.0;
        double r1322389 = r1322387 / r1322388;
        double r1322390 = r1322386 + r1322389;
        double r1322391 = 3.0;
        double r1322392 = r1322377 * r1322391;
        double r1322393 = r1322382 / r1322392;
        double r1322394 = r1322390 - r1322393;
        double r1322395 = z;
        double r1322396 = cbrt(r1322377);
        double r1322397 = r1322396 * r1322396;
        double r1322398 = r1322395 / r1322397;
        double r1322399 = r1322386 + r1322377;
        double r1322400 = sqrt(r1322399);
        double r1322401 = r1322400 / r1322396;
        double r1322402 = r1322398 * r1322401;
        double r1322403 = /* ERROR: no posit support in C */;
        double r1322404 = /* ERROR: no posit support in C */;
        double r1322405 = fma(r1322385, r1322394, r1322404);
        double r1322406 = r1322382 * r1322405;
        double r1322407 = exp(r1322406);
        double r1322408 = fma(r1322381, r1322407, r1322380);
        double r1322409 = r1322380 / r1322408;
        double r1322410 = 1.0654066290336557e-228;
        bool r1322411 = r1322377 <= r1322410;
        double r1322412 = r1322400 * r1322395;
        double r1322413 = /* ERROR: no posit support in C */;
        double r1322414 = /* ERROR: no posit support in C */;
        double r1322415 = r1322414 / r1322377;
        double r1322416 = fma(r1322385, r1322394, r1322415);
        double r1322417 = r1322382 * r1322416;
        double r1322418 = exp(r1322417);
        double r1322419 = fma(r1322381, r1322418, r1322380);
        double r1322420 = r1322380 / r1322419;
        double r1322421 = fma(r1322385, r1322394, r1322402);
        double r1322422 = r1322421 * r1322382;
        double r1322423 = exp(r1322422);
        double r1322424 = fma(r1322381, r1322423, r1322380);
        double r1322425 = r1322380 / r1322424;
        double r1322426 = r1322411 ? r1322420 : r1322425;
        double r1322427 = r1322379 ? r1322409 : r1322426;
        return r1322427;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 3 regimes
  2. if t < -1.9603767098720115e-87

    1. Initial program 2.6

      \[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
    2. Simplified2.1

      \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{z \cdot \sqrt{a + t}}{t}\right)}, x\right)}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt2.1

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{z \cdot \sqrt{a + t}}{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}\right)}, x\right)}\]
    5. Applied times-frac0.6

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \color{blue}{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}}\right)}, x\right)}\]
    6. Using strategy rm
    7. Applied insert-posit164.7

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \color{blue}{\left(\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right)\right)}\right)}, x\right)}\]

    if -1.9603767098720115e-87 < t < 1.0654066290336557e-228

    1. Initial program 8.0

      \[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
    2. Simplified4.4

      \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{z \cdot \sqrt{a + t}}{t}\right)}, x\right)}}\]
    3. Using strategy rm
    4. Applied insert-posit168.1

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{\color{blue}{\left(\left(z \cdot \sqrt{a + t}\right)\right)}}{t}\right)}, x\right)}\]

    if 1.0654066290336557e-228 < t

    1. Initial program 2.9

      \[\frac{x}{x + y \cdot e^{2.0 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}}\]
    2. Simplified2.3

      \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{z \cdot \sqrt{a + t}}{t}\right)}, x\right)}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt2.3

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \frac{z \cdot \sqrt{a + t}}{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}\right)}, x\right)}\]
    5. Applied times-frac0.8

      \[\leadsto \frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(\frac{5.0}{6.0} + a\right) - \frac{2.0}{t \cdot 3.0}, \color{blue}{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}}\right)}, x\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.9603767098720115 \cdot 10^{-87}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \left(\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right)\right)\right)}, x\right)}\\ \mathbf{elif}\;t \le 1.0654066290336557 \cdot 10^{-228}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{\left(\left(\sqrt{a + t} \cdot z\right)\right)}{t}\right)}, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{\mathsf{fma}\left(c - b, \left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}, \frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{\sqrt{a + t}}{\sqrt[3]{t}}\right) \cdot 2.0}, x\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019153 +o rules:numerics
(FPCore (x y z t a b c)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2"
  (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))