Average Error: 2.1 → 0.3
Time: 15.6s
Precision: binary64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
\[\begin{array}{l} t_1 := \sqrt[3]{e^{2}}\\ t_2 := \frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\\ x \cdot \left({\left(t_1 \cdot t_1\right)}^{t_2} \cdot {\left(\sqrt[3]{{\left(e^{2}\right)}^{0.6666666666666666}} \cdot \sqrt[3]{t_1}\right)}^{t_2}\right) \end{array} \]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\begin{array}{l}
t_1 := \sqrt[3]{e^{2}}\\
t_2 := \frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\\
x \cdot \left({\left(t_1 \cdot t_1\right)}^{t_2} \cdot {\left(\sqrt[3]{{\left(e^{2}\right)}^{0.6666666666666666}} \cdot \sqrt[3]{t_1}\right)}^{t_2}\right)
\end{array}
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (cbrt (exp 2.0)))
        (t_2 (/ (fma y (- (log z) t) (* a (- (log1p (- z)) b))) 2.0)))
   (*
    x
    (*
     (pow (* t_1 t_1) t_2)
     (pow (* (cbrt (pow (exp 2.0) 0.6666666666666666)) (cbrt t_1)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp((y * (log(z) - t)) + (a * (log(1.0 - z) - b)));
}
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = cbrt(exp(2.0));
	double t_2 = fma(y, (log(z) - t), (a * (log1p(-z) - b))) / 2.0;
	return x * (pow((t_1 * t_1), t_2) * pow((cbrt(pow(exp(2.0), 0.6666666666666666)) * cbrt(t_1)), t_2));
}

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. Simplified0.3

    \[\leadsto \color{blue}{x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}} \]
  3. Applied add-sqr-sqrt_binary640.3

    \[\leadsto x \cdot \color{blue}{\left(\sqrt{e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}}\right)} \]
  4. Applied *-un-lft-identity_binary640.3

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

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

    \[\leadsto x \cdot \left(\sqrt{e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}} \cdot \color{blue}{{\left(e^{1}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}}\right) \]
  7. Applied *-un-lft-identity_binary640.3

    \[\leadsto x \cdot \left(\sqrt{e^{\color{blue}{1 \cdot \mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}}} \cdot {\left(e^{1}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}\right) \]
  8. Applied exp-prod_binary640.3

    \[\leadsto x \cdot \left(\sqrt{\color{blue}{{\left(e^{1}\right)}^{\left(\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)\right)}}} \cdot {\left(e^{1}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}\right) \]
  9. Applied sqrt-pow1_binary640.3

    \[\leadsto x \cdot \left(\color{blue}{{\left(e^{1}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}} \cdot {\left(e^{1}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}\right) \]
  10. Applied pow-prod-down_binary640.3

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

    \[\leadsto x \cdot {\color{blue}{\left(e^{2}\right)}}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)} \]
  12. Applied add-cube-cbrt_binary640.3

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

    \[\leadsto x \cdot \color{blue}{\left({\left(\sqrt[3]{e^{2}} \cdot \sqrt[3]{e^{2}}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)} \cdot {\left(\sqrt[3]{e^{2}}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}\right)} \]
  14. Applied add-cube-cbrt_binary640.3

    \[\leadsto x \cdot \left({\left(\sqrt[3]{e^{2}} \cdot \sqrt[3]{e^{2}}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)} \cdot {\left(\sqrt[3]{\color{blue}{\left(\sqrt[3]{e^{2}} \cdot \sqrt[3]{e^{2}}\right) \cdot \sqrt[3]{e^{2}}}}\right)}^{\left(\frac{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}{2}\right)}\right) \]
  15. Applied cbrt-prod_binary640.3

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

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

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

Reproduce

herbie shell --seed 2022081 
(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.0 z)) b))))))