Average Error: 4.0 → 2.8
Time: 25.0s
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 r1265842 = x;
        double r1265843 = y;
        double r1265844 = 2.0;
        double r1265845 = z;
        double r1265846 = t;
        double r1265847 = a;
        double r1265848 = r1265846 + r1265847;
        double r1265849 = sqrt(r1265848);
        double r1265850 = r1265845 * r1265849;
        double r1265851 = r1265850 / r1265846;
        double r1265852 = b;
        double r1265853 = c;
        double r1265854 = r1265852 - r1265853;
        double r1265855 = 5.0;
        double r1265856 = 6.0;
        double r1265857 = r1265855 / r1265856;
        double r1265858 = r1265847 + r1265857;
        double r1265859 = 3.0;
        double r1265860 = r1265846 * r1265859;
        double r1265861 = r1265844 / r1265860;
        double r1265862 = r1265858 - r1265861;
        double r1265863 = r1265854 * r1265862;
        double r1265864 = r1265851 - r1265863;
        double r1265865 = r1265844 * r1265864;
        double r1265866 = exp(r1265865);
        double r1265867 = r1265843 * r1265866;
        double r1265868 = r1265842 + r1265867;
        double r1265869 = r1265842 / r1265868;
        return r1265869;
}

double f(double x, double y, double z, double t, double a, double b, double c) {
        double r1265870 = t;
        double r1265871 = -1.9603767098720115e-87;
        bool r1265872 = r1265870 <= r1265871;
        double r1265873 = x;
        double r1265874 = y;
        double r1265875 = 2.0;
        double r1265876 = c;
        double r1265877 = b;
        double r1265878 = r1265876 - r1265877;
        double r1265879 = a;
        double r1265880 = 5.0;
        double r1265881 = 6.0;
        double r1265882 = r1265880 / r1265881;
        double r1265883 = r1265879 + r1265882;
        double r1265884 = 3.0;
        double r1265885 = r1265870 * r1265884;
        double r1265886 = r1265875 / r1265885;
        double r1265887 = r1265883 - r1265886;
        double r1265888 = z;
        double r1265889 = cbrt(r1265870);
        double r1265890 = r1265889 * r1265889;
        double r1265891 = r1265888 / r1265890;
        double r1265892 = r1265879 + r1265870;
        double r1265893 = sqrt(r1265892);
        double r1265894 = r1265893 / r1265889;
        double r1265895 = r1265891 * r1265894;
        double r1265896 = /* ERROR: no posit support in C */;
        double r1265897 = /* ERROR: no posit support in C */;
        double r1265898 = fma(r1265878, r1265887, r1265897);
        double r1265899 = r1265875 * r1265898;
        double r1265900 = exp(r1265899);
        double r1265901 = fma(r1265874, r1265900, r1265873);
        double r1265902 = r1265873 / r1265901;
        double r1265903 = 1.0654066290336557e-228;
        bool r1265904 = r1265870 <= r1265903;
        double r1265905 = r1265893 * r1265888;
        double r1265906 = /* ERROR: no posit support in C */;
        double r1265907 = /* ERROR: no posit support in C */;
        double r1265908 = r1265907 / r1265870;
        double r1265909 = fma(r1265878, r1265887, r1265908);
        double r1265910 = r1265875 * r1265909;
        double r1265911 = exp(r1265910);
        double r1265912 = fma(r1265874, r1265911, r1265873);
        double r1265913 = r1265873 / r1265912;
        double r1265914 = fma(r1265878, r1265887, r1265895);
        double r1265915 = r1265914 * r1265875;
        double r1265916 = exp(r1265915);
        double r1265917 = fma(r1265874, r1265916, r1265873);
        double r1265918 = r1265873 / r1265917;
        double r1265919 = r1265904 ? r1265913 : r1265918;
        double r1265920 = r1265872 ? r1265902 : r1265919;
        return r1265920;
}

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)))))))))))