Average Error: 6.9 → 1.0
Time: 8.5s
Precision: 64
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
\[\begin{array}{l} \mathbf{if}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le -4.2047589194060473 \cdot 10^{160}:\\ \;\;\;\;\left(\sqrt{x - 1} \cdot \left(\sqrt{x - 1} \cdot \log 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\\ \mathbf{elif}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le 1.03371824216468415 \cdot 10^{155}:\\ \;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log \left(\sqrt{y}\right)}{x + 1} + \left(\log \left(\sqrt{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\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\left(\sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)} \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right) \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right)\right) - t\\ \end{array}\]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\begin{array}{l}
\mathbf{if}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le -4.2047589194060473 \cdot 10^{160}:\\
\;\;\;\;\left(\sqrt{x - 1} \cdot \left(\sqrt{x - 1} \cdot \log 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\\

\mathbf{elif}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le 1.03371824216468415 \cdot 10^{155}:\\
\;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log \left(\sqrt{y}\right)}{x + 1} + \left(\log \left(\sqrt{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\\

\mathbf{else}:\\
\;\;\;\;\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\left(\sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)} \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right) \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right)\right) - t\\

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (((double) (((double) (x - 1.0)) * ((double) log(y)))) + ((double) (((double) (z - 1.0)) * ((double) log(((double) (1.0 - y)))))))) - t));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((((double) (((double) (((double) (x - 1.0)) * ((double) log(y)))) + ((double) (((double) (z - 1.0)) * ((double) log(((double) (1.0 - y)))))))) <= -4.204758919406047e+160)) {
		VAR = ((double) (((double) (((double) (((double) sqrt(((double) (x - 1.0)))) * ((double) (((double) sqrt(((double) (x - 1.0)))) * ((double) log(y)))))) + ((double) (((double) (z - 1.0)) * ((double) (((double) log(1.0)) - ((double) (((double) (1.0 * y)) + ((double) (0.5 * ((double) (((double) pow(y, 2.0)) / ((double) pow(1.0, 2.0)))))))))))))) - t));
	} else {
		double VAR_1;
		if ((((double) (((double) (((double) (x - 1.0)) * ((double) log(y)))) + ((double) (((double) (z - 1.0)) * ((double) log(((double) (1.0 - y)))))))) <= 1.0337182421646842e+155)) {
			VAR_1 = ((double) (((double) (((double) (((double) (((double) (((double) (x * x)) - ((double) (1.0 * 1.0)))) * ((double) log(((double) sqrt(y)))))) / ((double) (x + 1.0)))) + ((double) (((double) (((double) log(((double) sqrt(y)))) * ((double) (x - 1.0)))) + ((double) (((double) (z - 1.0)) * ((double) (((double) log(1.0)) - ((double) (((double) (1.0 * y)) + ((double) (0.5 * ((double) (((double) pow(y, 2.0)) / ((double) pow(1.0, 2.0)))))))))))))))) - t));
		} else {
			VAR_1 = ((double) (((double) (((double) (((double) (x - 1.0)) * ((double) log(y)))) + ((double) (((double) (z - 1.0)) * ((double) (((double) (((double) cbrt(((double) (((double) log(((double) (((double) sqrt(1.0)) + ((double) sqrt(y)))))) + ((double) log(((double) (((double) sqrt(1.0)) - ((double) sqrt(y)))))))))) * ((double) cbrt(((double) (((double) log(((double) (((double) sqrt(1.0)) + ((double) sqrt(y)))))) + ((double) log(((double) (((double) sqrt(1.0)) - ((double) sqrt(y)))))))))))) * ((double) cbrt(((double) (((double) log(((double) (((double) sqrt(1.0)) + ((double) sqrt(y)))))) + ((double) log(((double) (((double) sqrt(1.0)) - ((double) sqrt(y)))))))))))))))) - t));
		}
		VAR = VAR_1;
	}
	return VAR;
}

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. Split input into 3 regimes
  2. if (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) < -4.204758919406047e+160

    1. Initial program 2.2

      \[\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.6

      \[\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-sqr-sqrt2.6

      \[\leadsto \left(\color{blue}{\left(\sqrt{x - 1} \cdot \sqrt{x - 1}\right)} \cdot \log y + \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 associate-*l*2.6

      \[\leadsto \left(\color{blue}{\sqrt{x - 1} \cdot \left(\sqrt{x - 1} \cdot \log 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\]

    if -4.204758919406047e+160 < (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) < 1.0337182421646842e+155

    1. Initial program 8.6

      \[\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.2

      \[\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-sqr-sqrt0.2

      \[\leadsto \left(\left(x - 1\right) \cdot \log \color{blue}{\left(\sqrt{y} \cdot \sqrt{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.2

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\left(\log \left(\sqrt{y}\right) + \log \left(\sqrt{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-lft-in0.2

      \[\leadsto \left(\color{blue}{\left(\left(x - 1\right) \cdot \log \left(\sqrt{y}\right) + \left(x - 1\right) \cdot \log \left(\sqrt{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\]
    7. Applied associate-+l+0.3

      \[\leadsto \color{blue}{\left(\left(x - 1\right) \cdot \log \left(\sqrt{y}\right) + \left(\left(x - 1\right) \cdot \log \left(\sqrt{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)\right)} - t\]
    8. Simplified0.3

      \[\leadsto \left(\left(x - 1\right) \cdot \log \left(\sqrt{y}\right) + \color{blue}{\left(\log \left(\sqrt{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\]
    9. Using strategy rm
    10. Applied flip--0.5

      \[\leadsto \left(\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x + 1}} \cdot \log \left(\sqrt{y}\right) + \left(\log \left(\sqrt{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\]
    11. Applied associate-*l/0.6

      \[\leadsto \left(\color{blue}{\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log \left(\sqrt{y}\right)}{x + 1}} + \left(\log \left(\sqrt{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\]

    if 1.0337182421646842e+155 < (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y))))

    1. Initial program 1.9

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt1.9

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - \color{blue}{\sqrt{y} \cdot \sqrt{y}}\right)\right) - t\]
    4. Applied add-sqr-sqrt1.9

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(\color{blue}{\sqrt{1} \cdot \sqrt{1}} - \sqrt{y} \cdot \sqrt{y}\right)\right) - t\]
    5. Applied difference-of-squares2.1

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \color{blue}{\left(\left(\sqrt{1} + \sqrt{y}\right) \cdot \left(\sqrt{1} - \sqrt{y}\right)\right)}\right) - t\]
    6. Applied log-prod1.8

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)\right)}\right) - t\]
    7. Using strategy rm
    8. Applied add-cube-cbrt1.8

      \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)} \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right) \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right)}\right) - t\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le -4.2047589194060473 \cdot 10^{160}:\\ \;\;\;\;\left(\sqrt{x - 1} \cdot \left(\sqrt{x - 1} \cdot \log 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\\ \mathbf{elif}\;\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right) \le 1.03371824216468415 \cdot 10^{155}:\\ \;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log \left(\sqrt{y}\right)}{x + 1} + \left(\log \left(\sqrt{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\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\left(\sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)} \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right) \cdot \sqrt[3]{\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)}\right)\right) - t\\ \end{array}\]

Reproduce

herbie shell --seed 2020121 
(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))