Average Error: 2.1 → 0.3
Time: 33.6s
Precision: 64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
\[{1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left(x \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right) \cdot 2\right)}\right)\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
{1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left(x \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right) \cdot 2\right)}\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r101911 = x;
        double r101912 = y;
        double r101913 = z;
        double r101914 = log(r101913);
        double r101915 = t;
        double r101916 = r101914 - r101915;
        double r101917 = r101912 * r101916;
        double r101918 = a;
        double r101919 = 1.0;
        double r101920 = r101919 - r101913;
        double r101921 = log(r101920);
        double r101922 = b;
        double r101923 = r101921 - r101922;
        double r101924 = r101918 * r101923;
        double r101925 = r101917 + r101924;
        double r101926 = exp(r101925);
        double r101927 = r101911 * r101926;
        return r101927;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r101928 = 1.0;
        double r101929 = y;
        double r101930 = z;
        double r101931 = log(r101930);
        double r101932 = t;
        double r101933 = r101931 - r101932;
        double r101934 = a;
        double r101935 = 1.0;
        double r101936 = log(r101935);
        double r101937 = b;
        double r101938 = r101936 - r101937;
        double r101939 = r101935 * r101930;
        double r101940 = r101938 - r101939;
        double r101941 = r101934 * r101940;
        double r101942 = fma(r101929, r101933, r101941);
        double r101943 = pow(r101928, r101942);
        double r101944 = x;
        double r101945 = exp(1.0);
        double r101946 = sqrt(r101945);
        double r101947 = fma(r101935, r101930, r101937);
        double r101948 = r101936 - r101947;
        double r101949 = r101934 * r101948;
        double r101950 = fma(r101929, r101933, r101949);
        double r101951 = 2.0;
        double r101952 = r101950 * r101951;
        double r101953 = pow(r101946, r101952);
        double r101954 = r101944 * r101953;
        double r101955 = r101943 * r101954;
        return r101955;
}

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

Derivation

  1. Initial program 2.1

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
  2. Simplified1.8

    \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log \left(1 - z\right) - b\right)\right)} \cdot x}\]
  3. Taylor expanded around 0 0.3

    \[\leadsto e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{a \cdot \log 1 - \left(a \cdot b + 1 \cdot \left(a \cdot z\right)\right)}\right)} \cdot x\]
  4. Simplified0.3

    \[\leadsto e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)}\right)} \cdot x\]
  5. Using strategy rm
  6. Applied *-un-lft-identity0.3

    \[\leadsto e^{\color{blue}{1 \cdot \mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)}} \cdot x\]
  7. Applied exp-prod0.3

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)}} \cdot x\]
  8. Simplified0.3

    \[\leadsto {\color{blue}{e}}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot x\]
  9. Using strategy rm
  10. Applied add-sqr-sqrt0.3

    \[\leadsto {\color{blue}{\left(\sqrt{e} \cdot \sqrt{e}\right)}}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot x\]
  11. Applied unpow-prod-down0.3

    \[\leadsto \color{blue}{\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)}\right)} \cdot x\]
  12. Applied associate-*l*0.3

    \[\leadsto \color{blue}{{\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot x\right)}\]
  13. Simplified0.3

    \[\leadsto {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \color{blue}{\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right)\right)} \cdot x\right)}\]
  14. Using strategy rm
  15. Applied *-un-lft-identity0.3

    \[\leadsto {\color{blue}{\left(1 \cdot \sqrt{e}\right)}}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right)\right)} \cdot x\right)\]
  16. Applied unpow-prod-down0.3

    \[\leadsto \color{blue}{\left({1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)}\right)} \cdot \left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right)\right)} \cdot x\right)\]
  17. Applied associate-*l*0.3

    \[\leadsto \color{blue}{{1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right)\right)} \cdot x\right)\right)}\]
  18. Simplified0.3

    \[\leadsto {1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \color{blue}{\left(x \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right) \cdot 2\right)}\right)}\]
  19. Final simplification0.3

    \[\leadsto {1}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - b\right) - 1 \cdot z\right)\right)\right)} \cdot \left(x \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log 1 - \mathsf{fma}\left(1, z, b\right)\right)\right) \cdot 2\right)}\right)\]

Reproduce

herbie shell --seed 2019322 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1 z)) b))))))