Average Error: 3.8 → 2.5
Time: 35.3s
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 -5.0089747297515344 \cdot 10^{-254}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \log \left(e^{\mathsf{fma}\left(\frac{\sqrt{t + a}}{t}, z, \left(c - b\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}\right)}, x\right)}\\ \mathbf{elif}\;t \le 5.358377107920803 \cdot 10^{-277}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \mathsf{fma}\left(c - b, \frac{5.0}{6.0} - \left(\frac{\frac{2.0}{t}}{3.0} - a\right), \left(\left(\frac{\sqrt{t + a}}{\frac{t}{z}}\right)\right)\right)}, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \log \left(e^{\mathsf{fma}\left(\frac{\sqrt{t + a}}{t}, z, \left(c - b\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}\right)}, 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 -5.0089747297515344 \cdot 10^{-254}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2.0 \cdot \log \left(e^{\mathsf{fma}\left(\frac{\sqrt{t + a}}{t}, z, \left(c - b\right) \cdot \left(\left(a + \frac{5.0}{6.0}\right) - \frac{2.0}{t \cdot 3.0}\right)\right)}\right)}, x\right)}\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c) {
        double r3246557 = x;
        double r3246558 = y;
        double r3246559 = 2.0;
        double r3246560 = z;
        double r3246561 = t;
        double r3246562 = a;
        double r3246563 = r3246561 + r3246562;
        double r3246564 = sqrt(r3246563);
        double r3246565 = r3246560 * r3246564;
        double r3246566 = r3246565 / r3246561;
        double r3246567 = b;
        double r3246568 = c;
        double r3246569 = r3246567 - r3246568;
        double r3246570 = 5.0;
        double r3246571 = 6.0;
        double r3246572 = r3246570 / r3246571;
        double r3246573 = r3246562 + r3246572;
        double r3246574 = 3.0;
        double r3246575 = r3246561 * r3246574;
        double r3246576 = r3246559 / r3246575;
        double r3246577 = r3246573 - r3246576;
        double r3246578 = r3246569 * r3246577;
        double r3246579 = r3246566 - r3246578;
        double r3246580 = r3246559 * r3246579;
        double r3246581 = exp(r3246580);
        double r3246582 = r3246558 * r3246581;
        double r3246583 = r3246557 + r3246582;
        double r3246584 = r3246557 / r3246583;
        return r3246584;
}

double f(double x, double y, double z, double t, double a, double b, double c) {
        double r3246585 = t;
        double r3246586 = -5.0089747297515344e-254;
        bool r3246587 = r3246585 <= r3246586;
        double r3246588 = x;
        double r3246589 = y;
        double r3246590 = 2.0;
        double r3246591 = a;
        double r3246592 = r3246585 + r3246591;
        double r3246593 = sqrt(r3246592);
        double r3246594 = r3246593 / r3246585;
        double r3246595 = z;
        double r3246596 = c;
        double r3246597 = b;
        double r3246598 = r3246596 - r3246597;
        double r3246599 = 5.0;
        double r3246600 = 6.0;
        double r3246601 = r3246599 / r3246600;
        double r3246602 = r3246591 + r3246601;
        double r3246603 = 3.0;
        double r3246604 = r3246585 * r3246603;
        double r3246605 = r3246590 / r3246604;
        double r3246606 = r3246602 - r3246605;
        double r3246607 = r3246598 * r3246606;
        double r3246608 = fma(r3246594, r3246595, r3246607);
        double r3246609 = exp(r3246608);
        double r3246610 = log(r3246609);
        double r3246611 = r3246590 * r3246610;
        double r3246612 = exp(r3246611);
        double r3246613 = fma(r3246589, r3246612, r3246588);
        double r3246614 = r3246588 / r3246613;
        double r3246615 = 5.358377107920803e-277;
        bool r3246616 = r3246585 <= r3246615;
        double r3246617 = r3246590 / r3246585;
        double r3246618 = r3246617 / r3246603;
        double r3246619 = r3246618 - r3246591;
        double r3246620 = r3246601 - r3246619;
        double r3246621 = r3246585 / r3246595;
        double r3246622 = r3246593 / r3246621;
        double r3246623 = /* ERROR: no posit support in C */;
        double r3246624 = /* ERROR: no posit support in C */;
        double r3246625 = fma(r3246598, r3246620, r3246624);
        double r3246626 = r3246590 * r3246625;
        double r3246627 = exp(r3246626);
        double r3246628 = fma(r3246589, r3246627, r3246588);
        double r3246629 = r3246588 / r3246628;
        double r3246630 = r3246616 ? r3246629 : r3246614;
        double r3246631 = r3246587 ? r3246614 : r3246630;
        return r3246631;
}

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 2 regimes
  2. if t < -5.0089747297515344e-254 or 5.358377107920803e-277 < t

    1. Initial program 3.1

      \[\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. Simplified1.3

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

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

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

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

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

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

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

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

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

    if -5.0089747297515344e-254 < t < 5.358377107920803e-277

    1. Initial program 12.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. Simplified7.8

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

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

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

Reproduce

herbie shell --seed 2019158 +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)))))))))))