Average Error: 6.7 → 0.9
Time: 8.1s
Precision: binary64
\[\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}\;x - 1 \le -5.1169069168213087 \cdot 10^{111} \lor \neg \left(x - 1 \le 3.4068704378041217 \cdot 10^{94}\right):\\ \;\;\;\;\left(\left(\left(x - 1\right) \cdot \log y + e^{\log \left(\log \left(\sqrt{1} + \sqrt{y}\right)\right)} \cdot \left(z - 1\right)\right) + \left(z - 1\right) \cdot \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log y}{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) - 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}\;x - 1 \le -5.1169069168213087 \cdot 10^{111} \lor \neg \left(x - 1 \le 3.4068704378041217 \cdot 10^{94}\right):\\
\;\;\;\;\left(\left(\left(x - 1\right) \cdot \log y + e^{\log \left(\log \left(\sqrt{1} + \sqrt{y}\right)\right)} \cdot \left(z - 1\right)\right) + \left(z - 1\right) \cdot \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log y}{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) - 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) (x - 1.0)) <= -5.116906916821309e+111) || !(((double) (x - 1.0)) <= 3.406870437804122e+94))) {
		VAR = ((double) (((double) (((double) (((double) (((double) (x - 1.0)) * ((double) log(y)))) + ((double) (((double) exp(((double) log(((double) log(((double) (((double) sqrt(1.0)) + ((double) sqrt(y)))))))))) * ((double) (z - 1.0)))))) + ((double) (((double) (z - 1.0)) * ((double) log(((double) (((double) sqrt(1.0)) - ((double) sqrt(y)))))))))) - t));
	} else {
		VAR = ((double) (((double) (((double) (((double) (((double) (((double) (x * x)) - ((double) (1.0 * 1.0)))) * ((double) log(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));
	}
	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 2 regimes
  2. if (- x 1.0) < -5.1169069168213087e111 or 3.4068704378041217e94 < (- x 1.0)

    1. Initial program 2.0

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

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

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

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

      \[\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. Applied distribute-lft-in1.9

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

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

      \[\leadsto \left(\color{blue}{\left(\left(x - 1\right) \cdot \log y + \log \left(\sqrt{1} + \sqrt{y}\right) \cdot \left(z - 1\right)\right)} + \left(z - 1\right) \cdot \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\]
    10. Using strategy rm
    11. Applied add-exp-log1.9

      \[\leadsto \left(\left(\left(x - 1\right) \cdot \log y + \color{blue}{e^{\log \left(\log \left(\sqrt{1} + \sqrt{y}\right)\right)}} \cdot \left(z - 1\right)\right) + \left(z - 1\right) \cdot \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\]

    if -5.1169069168213087e111 < (- x 1.0) < 3.4068704378041217e94

    1. Initial program 9.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.4

      \[\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 flip--0.4

      \[\leadsto \left(\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x + 1}} \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/0.4

      \[\leadsto \left(\color{blue}{\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log y}{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) - t\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - 1 \le -5.1169069168213087 \cdot 10^{111} \lor \neg \left(x - 1 \le 3.4068704378041217 \cdot 10^{94}\right):\\ \;\;\;\;\left(\left(\left(x - 1\right) \cdot \log y + e^{\log \left(\log \left(\sqrt{1} + \sqrt{y}\right)\right)} \cdot \left(z - 1\right)\right) + \left(z - 1\right) \cdot \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\left(x \cdot x - 1 \cdot 1\right) \cdot \log y}{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) - t\\ \end{array}\]

Reproduce

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