Average Error: 0.1 → 0.1
Time: 17.6s
Precision: binary64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
\[\begin{array}{l} t_1 := \log \left(\frac{1}{c}\right)\\ \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot t_1 + \left(t + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\right) - t_1 \cdot b\right) \end{array} \]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\begin{array}{l}
t_1 := \log \left(\frac{1}{c}\right)\\
\mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot t_1 + \left(t + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\right) - t_1 \cdot b\right)
\end{array}
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (log (/ 1.0 c))))
   (fma y i (- (+ a (+ (* 0.5 t_1) (+ t (fma (log y) x z)))) (* t_1 b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = log(1.0 / c);
	return fma(y, i, ((a + ((0.5 * t_1) + (t + fma(log(y), x, z)))) - (t_1 * b)));
}

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

Bits error versus i

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \left(\mathsf{fma}\left(x, \log y, z\right) + t\right) + a\right)\right)} \]
  3. Taylor expanded in c around inf 0.1

    \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\log y \cdot x + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b}\right) \]
  4. Applied add-cube-cbrt_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\color{blue}{\left(\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \sqrt[3]{\log y}\right)} \cdot x + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  5. Applied associate-*l*_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\color{blue}{\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \left(\sqrt[3]{\log y} \cdot x\right)} + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  6. Applied pow1_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \left(\sqrt[3]{\log y} \cdot \color{blue}{{x}^{1}}\right) + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  7. Applied pow1_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{\log y}\right)}^{1}} \cdot {x}^{1}\right) + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  8. Applied pow-prod-down_binary640.3

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

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\left(\sqrt[3]{\log y} \cdot \color{blue}{{\left(\sqrt[3]{\log y}\right)}^{1}}\right) \cdot {\left(\sqrt[3]{\log y} \cdot x\right)}^{1} + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  10. Applied pow1_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\left(\color{blue}{{\left(\sqrt[3]{\log y}\right)}^{1}} \cdot {\left(\sqrt[3]{\log y}\right)}^{1}\right) \cdot {\left(\sqrt[3]{\log y} \cdot x\right)}^{1} + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  11. Applied pow-prod-down_binary640.3

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\color{blue}{{\left(\sqrt[3]{\log y} \cdot \sqrt[3]{\log y}\right)}^{1}} \cdot {\left(\sqrt[3]{\log y} \cdot x\right)}^{1} + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  12. Applied pow-prod-down_binary640.3

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

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left({\color{blue}{\left(\log y \cdot x\right)}}^{1} + z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  14. Applied *-un-lft-identity_binary640.1

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left({\left(\log y \cdot x\right)}^{1} + \color{blue}{1 \cdot z}\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  15. Applied *-un-lft-identity_binary640.1

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \left(\color{blue}{1 \cdot {\left(\log y \cdot x\right)}^{1}} + 1 \cdot z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  16. Applied distribute-lft-out_binary640.1

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \color{blue}{1 \cdot \left({\left(\log y \cdot x\right)}^{1} + z\right)}\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  17. Simplified0.1

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + 1 \cdot \color{blue}{\mathsf{fma}\left(\log y, x, z\right)}\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]
  18. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(y, i, \left(a + \left(0.5 \cdot \log \left(\frac{1}{c}\right) + \left(t + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\right) - \log \left(\frac{1}{c}\right) \cdot b\right) \]

Reproduce

herbie shell --seed 2022097 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))