Average Error: 7.1 → 0.4
Time: 9.7s
Precision: 64
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(1 \cdot {\left({y}^{\left(\sqrt{\frac{1}{3}}\right)}\right)}^{\left(\sqrt{\frac{1}{3}}\right)}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(1 \cdot {\left({y}^{\left(\sqrt{\frac{1}{3}}\right)}\right)}^{\left(\sqrt{\frac{1}{3}}\right)}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t
double code(double x, double y, double z, double t) {
	return ((((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t);
}
double code(double x, double y, double z, double t) {
	return (((log((cbrt(y) * cbrt(y))) * (x - 1.0)) + fma(log((1.0 * pow(pow(y, sqrt(0.3333333333333333)), sqrt(0.3333333333333333)))), (x - 1.0), ((z - 1.0) * (log(1.0) - ((1.0 * y) + (0.5 * (pow(y, 2.0) / pow(1.0, 2.0)))))))) - t);
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 7.1

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
  2. Taylor expanded around 0 0.3

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)}\right) - t\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.3

    \[\leadsto \left(\left(x - 1\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}\right)} + \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
  5. Applied log-prod0.4

    \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \log \left(\sqrt[3]{y}\right)\right)} + \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
  6. Applied distribute-rgt-in0.4

    \[\leadsto \left(\color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \log \left(\sqrt[3]{y}\right) \cdot \left(x - 1\right)\right)} + \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
  7. Applied associate-+l+0.4

    \[\leadsto \color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \left(\log \left(\sqrt[3]{y}\right) \cdot \left(x - 1\right) + \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right)} - t\]
  8. Simplified0.4

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \color{blue}{\mathsf{fma}\left(\log \left(\sqrt[3]{y}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)}\right) - t\]
  9. Using strategy rm
  10. Applied *-un-lft-identity0.4

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(\sqrt[3]{\color{blue}{1 \cdot y}}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
  11. Applied cbrt-prod0.4

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

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

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(1 \cdot \color{blue}{{y}^{\frac{1}{3}}}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
  14. Using strategy rm
  15. Applied add-sqr-sqrt0.4

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(1 \cdot {y}^{\color{blue}{\left(\sqrt{\frac{1}{3}} \cdot \sqrt{\frac{1}{3}}\right)}}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
  16. Applied pow-unpow0.4

    \[\leadsto \left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(x - 1\right) + \mathsf{fma}\left(\log \left(1 \cdot \color{blue}{{\left({y}^{\left(\sqrt{\frac{1}{3}}\right)}\right)}^{\left(\sqrt{\frac{1}{3}}\right)}}\right), x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
  17. Final simplification0.4

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

Reproduce

herbie shell --seed 2020049 +o rules:numerics
(FPCore (x y z t)
  :name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
  :precision binary64
  (- (+ (* (- x 1) (log y)) (* (- z 1) (log (- 1 y)))) t))