Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2

Percentage Accurate: 88.7% → 99.8%
Time: 16.4s
Alternatives: 18
Speedup: 1.9×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) 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;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t):
	return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 88.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) 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;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t):
	return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}

Alternative 1: 99.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(-1 + x, \log y, -t\right)\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (fma (+ z -1.0) (log1p (- y)) (fma (+ -1.0 x) (log y) (- t))))
double code(double x, double y, double z, double t) {
	return fma((z + -1.0), log1p(-y), fma((-1.0 + x), log(y), -t));
}
function code(x, y, z, t)
	return fma(Float64(z + -1.0), log1p(Float64(-y)), fma(Float64(-1.0 + x), log(y), Float64(-t)))
end
code[x_, y_, z_, t_] := N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-t)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(-1 + x, \log y, -t\right)\right)
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. sub-neg85.1%

      \[\leadsto \color{blue}{\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) + \left(-t\right)} \]
    2. +-commutative85.1%

      \[\leadsto \color{blue}{\left(\left(z - 1\right) \cdot \log \left(1 - y\right) + \left(x - 1\right) \cdot \log y\right)} + \left(-t\right) \]
    3. associate-+l+85.1%

      \[\leadsto \color{blue}{\left(z - 1\right) \cdot \log \left(1 - y\right) + \left(\left(x - 1\right) \cdot \log y + \left(-t\right)\right)} \]
    4. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - 1, \log \left(1 - y\right), \left(x - 1\right) \cdot \log y + \left(-t\right)\right)} \]
    5. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{z + \left(-1\right)}, \log \left(1 - y\right), \left(x - 1\right) \cdot \log y + \left(-t\right)\right) \]
    6. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(z + \color{blue}{-1}, \log \left(1 - y\right), \left(x - 1\right) \cdot \log y + \left(-t\right)\right) \]
    7. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(z + -1, \log \color{blue}{\left(1 + \left(-y\right)\right)}, \left(x - 1\right) \cdot \log y + \left(-t\right)\right) \]
    8. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(z + -1, \color{blue}{\mathsf{log1p}\left(-y\right)}, \left(x - 1\right) \cdot \log y + \left(-t\right)\right) \]
    9. fma-define99.8%

      \[\leadsto \mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \color{blue}{\mathsf{fma}\left(x - 1, \log y, -t\right)}\right) \]
    10. sub-neg99.8%

      \[\leadsto \mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, -t\right)\right) \]
    11. metadata-eval99.8%

      \[\leadsto \mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(x + \color{blue}{-1}, \log y, -t\right)\right) \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(x + -1, \log y, -t\right)\right)} \]
  4. Add Preprocessing
  5. Final simplification99.8%

    \[\leadsto \mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(-1 + x, \log y, -t\right)\right) \]
  6. Add Preprocessing

Alternative 2: 99.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-1 + x, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (fma (+ -1.0 x) (log y) (* (+ z -1.0) (log1p (- y)))) t))
double code(double x, double y, double z, double t) {
	return fma((-1.0 + x), log(y), ((z + -1.0) * log1p(-y))) - t;
}
function code(x, y, z, t)
	return Float64(fma(Float64(-1.0 + x), log(y), Float64(Float64(z + -1.0) * log1p(Float64(-y)))) - t)
end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(-1 + x, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
    2. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    3. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
    5. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
    6. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
    7. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
  4. Add Preprocessing
  5. Final simplification99.8%

    \[\leadsto \mathsf{fma}\left(-1 + x, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
  6. Add Preprocessing

Alternative 3: 99.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (-
  (+
   (*
    (+ z -1.0)
    (* y (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5)))))
   (* (+ -1.0 x) (log y)))
  t))
double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) + ((-1.0 + x) * log(y))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0))))) + (((-1.0d0) + x) * log(y))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) + ((-1.0 + x) * Math.log(y))) - t;
}
def code(x, y, z, t):
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) + ((-1.0 + x) * math.log(y))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5))))) + Float64(Float64(-1.0 + x) * log(y))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) + ((-1.0 + x) * log(y))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 99.7%

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(y \cdot \left(-0.25 \cdot y - 0.3333333333333333\right) - 0.5\right) - 1\right)\right)}\right) - t \]
  4. Final simplification99.7%

    \[\leadsto \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \]
  5. Add Preprocessing

Alternative 4: 99.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (-
  (+
   (* (+ z -1.0) (* y (+ -1.0 (* y (- (* y -0.3333333333333333) 0.5)))))
   (* (+ -1.0 x) (log y)))
  t))
double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) + ((-1.0 + x) * log(y))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * (-0.3333333333333333d0)) - 0.5d0))))) + (((-1.0d0) + x) * log(y))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) + ((-1.0 + x) * Math.log(y))) - t;
}
def code(x, y, z, t):
	return (((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) + ((-1.0 + x) * math.log(y))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * -0.3333333333333333) - 0.5))))) + Float64(Float64(-1.0 + x) * log(y))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) + ((-1.0 + x) * log(y))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(N[(y * -0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 99.7%

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(y \cdot \left(y \cdot \left(-0.3333333333333333 \cdot y - 0.5\right) - 1\right)\right)}\right) - t \]
  4. Final simplification99.7%

    \[\leadsto \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \]
  5. Add Preprocessing

Alternative 5: 95.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-1 + x\right) \cdot \log y\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1320000000000\right):\\ \;\;\;\;t\_1 - t\\ \mathbf{else}:\\ \;\;\;\;t\_1 - z \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (+ -1.0 x) (log y))))
   (if (or (<= t -2.7e-11) (not (<= t 1320000000000.0)))
     (- t_1 t)
     (- t_1 (* z y)))))
double code(double x, double y, double z, double t) {
	double t_1 = (-1.0 + x) * log(y);
	double tmp;
	if ((t <= -2.7e-11) || !(t <= 1320000000000.0)) {
		tmp = t_1 - t;
	} else {
		tmp = t_1 - (z * y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((-1.0d0) + x) * log(y)
    if ((t <= (-2.7d-11)) .or. (.not. (t <= 1320000000000.0d0))) then
        tmp = t_1 - t
    else
        tmp = t_1 - (z * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (-1.0 + x) * Math.log(y);
	double tmp;
	if ((t <= -2.7e-11) || !(t <= 1320000000000.0)) {
		tmp = t_1 - t;
	} else {
		tmp = t_1 - (z * y);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (-1.0 + x) * math.log(y)
	tmp = 0
	if (t <= -2.7e-11) or not (t <= 1320000000000.0):
		tmp = t_1 - t
	else:
		tmp = t_1 - (z * y)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-1.0 + x) * log(y))
	tmp = 0.0
	if ((t <= -2.7e-11) || !(t <= 1320000000000.0))
		tmp = Float64(t_1 - t);
	else
		tmp = Float64(t_1 - Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (-1.0 + x) * log(y);
	tmp = 0.0;
	if ((t <= -2.7e-11) || ~((t <= 1320000000000.0)))
		tmp = t_1 - t;
	else
		tmp = t_1 - (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.7e-11], N[Not[LessEqual[t, 1320000000000.0]], $MachinePrecision]], N[(t$95$1 - t), $MachinePrecision], N[(t$95$1 - N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(-1 + x\right) \cdot \log y\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1320000000000\right):\\
\;\;\;\;t\_1 - t\\

\mathbf{else}:\\
\;\;\;\;t\_1 - z \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.70000000000000005e-11 or 1.32e12 < t

    1. Initial program 92.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define92.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval92.0%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.9%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 92.0%

      \[\leadsto \color{blue}{\log y \cdot \left(x - 1\right) - t} \]

    if -2.70000000000000005e-11 < t < 1.32e12

    1. Initial program 79.7%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define79.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval79.7%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.5%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in y around 0 98.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{-1 \cdot \left(y \cdot z\right)}\right) - t \]
    7. Step-by-step derivation
      1. associate-*r*98.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-1 \cdot y\right) \cdot z}\right) - t \]
      2. mul-1-neg98.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right)} \cdot z\right) - t \]
    8. Simplified98.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right) \cdot z}\right) - t \]
    9. Taylor expanded in t around 0 98.5%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right) + \log y \cdot \left(x - 1\right)} \]
    10. Step-by-step derivation
      1. neg-mul-198.5%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \log y \cdot \left(x - 1\right) \]
      2. distribute-lft-neg-in98.5%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} + \log y \cdot \left(x - 1\right) \]
      3. sub-neg98.5%

        \[\leadsto \left(-y\right) \cdot z + \log y \cdot \color{blue}{\left(x + \left(-1\right)\right)} \]
      4. metadata-eval98.5%

        \[\leadsto \left(-y\right) \cdot z + \log y \cdot \left(x + \color{blue}{-1}\right) \]
      5. +-commutative98.5%

        \[\leadsto \color{blue}{\log y \cdot \left(x + -1\right) + \left(-y\right) \cdot z} \]
      6. cancel-sign-sub-inv98.5%

        \[\leadsto \color{blue}{\log y \cdot \left(x + -1\right) - y \cdot z} \]
      7. +-commutative98.5%

        \[\leadsto \log y \cdot \color{blue}{\left(-1 + x\right)} - y \cdot z \]
    11. Simplified98.5%

      \[\leadsto \color{blue}{\log y \cdot \left(-1 + x\right) - y \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1320000000000\right):\\ \;\;\;\;\left(-1 + x\right) \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + x\right) \cdot \log y - z \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 99.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (+ z -1.0) (* y (+ -1.0 (* y -0.5)))) (* (+ -1.0 x) (log y))) t))
double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + ((-1.0 + x) * log(y))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((z + (-1.0d0)) * (y * ((-1.0d0) + (y * (-0.5d0))))) + (((-1.0d0) + x) * log(y))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + ((-1.0 + x) * Math.log(y))) - t;
}
def code(x, y, z, t):
	return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + ((-1.0 + x) * math.log(y))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * -0.5)))) + Float64(Float64(-1.0 + x) * log(y))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + ((-1.0 + x) * log(y))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 99.5%

    \[\leadsto \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \color{blue}{\left(y \cdot \left(-0.5 \cdot y - 1\right)\right)}\right) - t \]
  4. Final simplification99.5%

    \[\leadsto \left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right) + \left(-1 + x\right) \cdot \log y\right) - t \]
  5. Add Preprocessing

Alternative 7: 89.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+216}:\\ \;\;\;\;\left(-t\right) - z \cdot y\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+161}:\\ \;\;\;\;\left(-1 + x\right) \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -5e+216)
   (- (- t) (* z y))
   (if (<= z 5.4e+161)
     (- (* (+ -1.0 x) (log y)) t)
     (- (* z (log1p (- y))) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5e+216) {
		tmp = -t - (z * y);
	} else if (z <= 5.4e+161) {
		tmp = ((-1.0 + x) * log(y)) - t;
	} else {
		tmp = (z * log1p(-y)) - t;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5e+216) {
		tmp = -t - (z * y);
	} else if (z <= 5.4e+161) {
		tmp = ((-1.0 + x) * Math.log(y)) - t;
	} else {
		tmp = (z * Math.log1p(-y)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -5e+216:
		tmp = -t - (z * y)
	elif z <= 5.4e+161:
		tmp = ((-1.0 + x) * math.log(y)) - t
	else:
		tmp = (z * math.log1p(-y)) - t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -5e+216)
		tmp = Float64(Float64(-t) - Float64(z * y));
	elseif (z <= 5.4e+161)
		tmp = Float64(Float64(Float64(-1.0 + x) * log(y)) - t);
	else
		tmp = Float64(Float64(z * log1p(Float64(-y))) - t);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e+216], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+161], N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(z * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+216}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+161}:\\
\;\;\;\;\left(-1 + x\right) \cdot \log y - t\\

\mathbf{else}:\\
\;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.9999999999999998e216

    1. Initial program 55.1%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube55.0%

        \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log y \cdot \log y\right) \cdot \log y}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      2. pow355.0%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. Applied egg-rr55.0%

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    5. Taylor expanded in y around 0 99.9%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
    6. Step-by-step derivation
      1. mul-1-neg99.9%

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

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    8. Taylor expanded in z around inf 74.3%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} - t \]
    9. Step-by-step derivation
      1. associate-*r*74.3%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} - t \]
      2. mul-1-neg74.3%

        \[\leadsto \color{blue}{\left(-y\right)} \cdot z - t \]
    10. Simplified74.3%

      \[\leadsto \color{blue}{\left(-y\right) \cdot z} - t \]

    if -4.9999999999999998e216 < z < 5.3999999999999995e161

    1. Initial program 94.9%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define94.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg94.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval94.9%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg94.9%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval94.9%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg94.9%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 94.7%

      \[\leadsto \color{blue}{\log y \cdot \left(x - 1\right) - t} \]

    if 5.3999999999999995e161 < z

    1. Initial program 50.8%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define50.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg50.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval50.8%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg50.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval50.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg50.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in z around inf 30.7%

      \[\leadsto \color{blue}{z \cdot \log \left(1 - y\right)} - t \]
    7. Step-by-step derivation
      1. sub-neg30.7%

        \[\leadsto z \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)} - t \]
      2. log1p-define79.2%

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-y\right)} - t \]
    8. Simplified79.2%

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right)} - t \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+216}:\\ \;\;\;\;\left(-t\right) - z \cdot y\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+161}:\\ \;\;\;\;\left(-1 + x\right) \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(y - \log y\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -1.0) (not (<= x 1.15e-19)))
   (- (* x (log y)) t)
   (- (- y (log y)) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.0) || !(x <= 1.15e-19)) {
		tmp = (x * log(y)) - t;
	} else {
		tmp = (y - log(y)) - t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-1.0d0)) .or. (.not. (x <= 1.15d-19))) then
        tmp = (x * log(y)) - t
    else
        tmp = (y - log(y)) - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.0) || !(x <= 1.15e-19)) {
		tmp = (x * Math.log(y)) - t;
	} else {
		tmp = (y - Math.log(y)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -1.0) or not (x <= 1.15e-19):
		tmp = (x * math.log(y)) - t
	else:
		tmp = (y - math.log(y)) - t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -1.0) || !(x <= 1.15e-19))
		tmp = Float64(Float64(x * log(y)) - t);
	else
		tmp = Float64(Float64(y - log(y)) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -1.0) || ~((x <= 1.15e-19)))
		tmp = (x * log(y)) - t;
	else
		tmp = (y - log(y)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.0], N[Not[LessEqual[x, 1.15e-19]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(y - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot \log y - t\\

\mathbf{else}:\\
\;\;\;\;\left(y - \log y\right) - t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1 or 1.1499999999999999e-19 < x

    1. Initial program 91.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define91.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in x around inf 90.3%

      \[\leadsto \color{blue}{x \cdot \log y} - t \]
    7. Step-by-step derivation
      1. *-commutative90.3%

        \[\leadsto \color{blue}{\log y \cdot x} - t \]
    8. Simplified90.3%

      \[\leadsto \color{blue}{\log y \cdot x} - t \]

    if -1 < x < 1.1499999999999999e-19

    1. Initial program 78.6%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube78.3%

        \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log y \cdot \log y\right) \cdot \log y}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      2. pow378.3%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. Applied egg-rr78.3%

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    5. Taylor expanded in y around 0 98.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
    6. Step-by-step derivation
      1. mul-1-neg98.7%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    7. Simplified98.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    8. Taylor expanded in x around 0 98.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right)} - t \]
    9. Step-by-step derivation
      1. +-commutative98.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + -1 \cdot \log y\right)} - t \]
      2. mul-1-neg98.4%

        \[\leadsto \left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + \color{blue}{\left(-\log y\right)}\right) - t \]
      3. unsub-neg98.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) - \log y\right)} - t \]
      4. mul-1-neg98.4%

        \[\leadsto \left(\color{blue}{\left(-y \cdot \left(z - 1\right)\right)} - \log y\right) - t \]
      5. sub-neg98.4%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - \log y\right) - t \]
      6. metadata-eval98.4%

        \[\leadsto \left(\left(-y \cdot \left(z + \color{blue}{-1}\right)\right) - \log y\right) - t \]
      7. +-commutative98.4%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(-1 + z\right)}\right) - \log y\right) - t \]
      8. distribute-rgt-neg-in98.4%

        \[\leadsto \left(\color{blue}{y \cdot \left(-\left(-1 + z\right)\right)} - \log y\right) - t \]
      9. distribute-neg-in98.4%

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(--1\right) + \left(-z\right)\right)} - \log y\right) - t \]
      10. metadata-eval98.4%

        \[\leadsto \left(y \cdot \left(\color{blue}{1} + \left(-z\right)\right) - \log y\right) - t \]
      11. sub-neg98.4%

        \[\leadsto \left(y \cdot \color{blue}{\left(1 - z\right)} - \log y\right) - t \]
    10. Simplified98.4%

      \[\leadsto \color{blue}{\left(y \cdot \left(1 - z\right) - \log y\right)} - t \]
    11. Taylor expanded in z around 0 76.7%

      \[\leadsto \left(\color{blue}{y} - \log y\right) - t \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(y - \log y\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - \log y\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -1.0) (not (<= x 1.15e-19)))
   (- (* x (log y)) t)
   (- (- t) (log y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.0) || !(x <= 1.15e-19)) {
		tmp = (x * log(y)) - t;
	} else {
		tmp = -t - log(y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-1.0d0)) .or. (.not. (x <= 1.15d-19))) then
        tmp = (x * log(y)) - t
    else
        tmp = -t - log(y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.0) || !(x <= 1.15e-19)) {
		tmp = (x * Math.log(y)) - t;
	} else {
		tmp = -t - Math.log(y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -1.0) or not (x <= 1.15e-19):
		tmp = (x * math.log(y)) - t
	else:
		tmp = -t - math.log(y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -1.0) || !(x <= 1.15e-19))
		tmp = Float64(Float64(x * log(y)) - t);
	else
		tmp = Float64(Float64(-t) - log(y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -1.0) || ~((x <= 1.15e-19)))
		tmp = (x * log(y)) - t;
	else
		tmp = -t - log(y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.0], N[Not[LessEqual[x, 1.15e-19]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot \log y - t\\

\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \log y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1 or 1.1499999999999999e-19 < x

    1. Initial program 91.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define91.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg91.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in x around inf 90.3%

      \[\leadsto \color{blue}{x \cdot \log y} - t \]
    7. Step-by-step derivation
      1. *-commutative90.3%

        \[\leadsto \color{blue}{\log y \cdot x} - t \]
    8. Simplified90.3%

      \[\leadsto \color{blue}{\log y \cdot x} - t \]

    if -1 < x < 1.1499999999999999e-19

    1. Initial program 78.6%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube78.3%

        \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log y \cdot \log y\right) \cdot \log y}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      2. pow378.3%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. Applied egg-rr78.3%

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    5. Taylor expanded in y around 0 98.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
    6. Step-by-step derivation
      1. mul-1-neg98.7%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    7. Simplified98.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    8. Taylor expanded in x around 0 98.4%

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right)} - t \]
    9. Step-by-step derivation
      1. +-commutative98.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + -1 \cdot \log y\right)} - t \]
      2. mul-1-neg98.4%

        \[\leadsto \left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + \color{blue}{\left(-\log y\right)}\right) - t \]
      3. unsub-neg98.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) - \log y\right)} - t \]
      4. mul-1-neg98.4%

        \[\leadsto \left(\color{blue}{\left(-y \cdot \left(z - 1\right)\right)} - \log y\right) - t \]
      5. sub-neg98.4%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - \log y\right) - t \]
      6. metadata-eval98.4%

        \[\leadsto \left(\left(-y \cdot \left(z + \color{blue}{-1}\right)\right) - \log y\right) - t \]
      7. +-commutative98.4%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(-1 + z\right)}\right) - \log y\right) - t \]
      8. distribute-rgt-neg-in98.4%

        \[\leadsto \left(\color{blue}{y \cdot \left(-\left(-1 + z\right)\right)} - \log y\right) - t \]
      9. distribute-neg-in98.4%

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(--1\right) + \left(-z\right)\right)} - \log y\right) - t \]
      10. metadata-eval98.4%

        \[\leadsto \left(y \cdot \left(\color{blue}{1} + \left(-z\right)\right) - \log y\right) - t \]
      11. sub-neg98.4%

        \[\leadsto \left(y \cdot \color{blue}{\left(1 - z\right)} - \log y\right) - t \]
    10. Simplified98.4%

      \[\leadsto \color{blue}{\left(y \cdot \left(1 - z\right) - \log y\right)} - t \]
    11. Taylor expanded in y around 0 76.4%

      \[\leadsto \color{blue}{-1 \cdot \left(t + \log y\right)} \]
    12. Step-by-step derivation
      1. mul-1-neg76.4%

        \[\leadsto \color{blue}{-\left(t + \log y\right)} \]
      2. distribute-neg-in76.4%

        \[\leadsto \color{blue}{\left(-t\right) + \left(-\log y\right)} \]
      3. unsub-neg76.4%

        \[\leadsto \color{blue}{\left(-t\right) - \log y} \]
    13. Simplified76.4%

      \[\leadsto \color{blue}{\left(-t\right) - \log y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1.15 \cdot 10^{-19}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - \log y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{+20} \lor \neg \left(x \leq 1.25 \cdot 10^{+16}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - \log y\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -8.2e+20) (not (<= x 1.25e+16)))
   (* x (log y))
   (- (- t) (log y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -8.2e+20) || !(x <= 1.25e+16)) {
		tmp = x * log(y);
	} else {
		tmp = -t - log(y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-8.2d+20)) .or. (.not. (x <= 1.25d+16))) then
        tmp = x * log(y)
    else
        tmp = -t - log(y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -8.2e+20) || !(x <= 1.25e+16)) {
		tmp = x * Math.log(y);
	} else {
		tmp = -t - Math.log(y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -8.2e+20) or not (x <= 1.25e+16):
		tmp = x * math.log(y)
	else:
		tmp = -t - math.log(y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -8.2e+20) || !(x <= 1.25e+16))
		tmp = Float64(x * log(y));
	else
		tmp = Float64(Float64(-t) - log(y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -8.2e+20) || ~((x <= 1.25e+16)))
		tmp = x * log(y);
	else
		tmp = -t - log(y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.2e+20], N[Not[LessEqual[x, 1.25e+16]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+20} \lor \neg \left(x \leq 1.25 \cdot 10^{+16}\right):\\
\;\;\;\;x \cdot \log y\\

\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \log y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.2e20 or 1.25e16 < x

    1. Initial program 91.7%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define91.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg91.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval91.7%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg91.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval91.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg91.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in y around 0 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{-1 \cdot \left(y \cdot z\right)}\right) - t \]
    7. Step-by-step derivation
      1. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-1 \cdot y\right) \cdot z}\right) - t \]
      2. mul-1-neg99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right)} \cdot z\right) - t \]
    8. Simplified99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right) \cdot z}\right) - t \]
    9. Taylor expanded in x around inf 73.4%

      \[\leadsto \color{blue}{x \cdot \log y} \]
    10. Step-by-step derivation
      1. *-commutative73.4%

        \[\leadsto \color{blue}{\log y \cdot x} \]
    11. Simplified73.4%

      \[\leadsto \color{blue}{\log y \cdot x} \]

    if -8.2e20 < x < 1.25e16

    1. Initial program 79.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube78.7%

        \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log y \cdot \log y\right) \cdot \log y}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      2. pow378.7%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. Applied egg-rr78.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    5. Taylor expanded in y around 0 98.8%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
    6. Step-by-step derivation
      1. mul-1-neg98.8%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    7. Simplified98.8%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    8. Taylor expanded in x around 0 97.0%

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right)} - t \]
    9. Step-by-step derivation
      1. +-commutative97.0%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + -1 \cdot \log y\right)} - t \]
      2. mul-1-neg97.0%

        \[\leadsto \left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + \color{blue}{\left(-\log y\right)}\right) - t \]
      3. unsub-neg97.0%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) - \log y\right)} - t \]
      4. mul-1-neg97.0%

        \[\leadsto \left(\color{blue}{\left(-y \cdot \left(z - 1\right)\right)} - \log y\right) - t \]
      5. sub-neg97.0%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - \log y\right) - t \]
      6. metadata-eval97.0%

        \[\leadsto \left(\left(-y \cdot \left(z + \color{blue}{-1}\right)\right) - \log y\right) - t \]
      7. +-commutative97.0%

        \[\leadsto \left(\left(-y \cdot \color{blue}{\left(-1 + z\right)}\right) - \log y\right) - t \]
      8. distribute-rgt-neg-in97.0%

        \[\leadsto \left(\color{blue}{y \cdot \left(-\left(-1 + z\right)\right)} - \log y\right) - t \]
      9. distribute-neg-in97.0%

        \[\leadsto \left(y \cdot \color{blue}{\left(\left(--1\right) + \left(-z\right)\right)} - \log y\right) - t \]
      10. metadata-eval97.0%

        \[\leadsto \left(y \cdot \left(\color{blue}{1} + \left(-z\right)\right) - \log y\right) - t \]
      11. sub-neg97.0%

        \[\leadsto \left(y \cdot \color{blue}{\left(1 - z\right)} - \log y\right) - t \]
    10. Simplified97.0%

      \[\leadsto \color{blue}{\left(y \cdot \left(1 - z\right) - \log y\right)} - t \]
    11. Taylor expanded in y around 0 75.5%

      \[\leadsto \color{blue}{-1 \cdot \left(t + \log y\right)} \]
    12. Step-by-step derivation
      1. mul-1-neg75.5%

        \[\leadsto \color{blue}{-\left(t + \log y\right)} \]
      2. distribute-neg-in75.5%

        \[\leadsto \color{blue}{\left(-t\right) + \left(-\log y\right)} \]
      3. unsub-neg75.5%

        \[\leadsto \color{blue}{\left(-t\right) - \log y} \]
    13. Simplified75.5%

      \[\leadsto \color{blue}{\left(-t\right) - \log y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{+20} \lor \neg \left(x \leq 1.25 \cdot 10^{+16}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - \log y\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+25} \lor \neg \left(x \leq 5.6 \cdot 10^{+72}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - z\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -3.7e+25) (not (<= x 5.6e+72)))
   (* x (log y))
   (- (* y (- 1.0 z)) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.7e+25) || !(x <= 5.6e+72)) {
		tmp = x * log(y);
	} else {
		tmp = (y * (1.0 - z)) - t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-3.7d+25)) .or. (.not. (x <= 5.6d+72))) then
        tmp = x * log(y)
    else
        tmp = (y * (1.0d0 - z)) - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.7e+25) || !(x <= 5.6e+72)) {
		tmp = x * Math.log(y);
	} else {
		tmp = (y * (1.0 - z)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -3.7e+25) or not (x <= 5.6e+72):
		tmp = x * math.log(y)
	else:
		tmp = (y * (1.0 - z)) - t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -3.7e+25) || !(x <= 5.6e+72))
		tmp = Float64(x * log(y));
	else
		tmp = Float64(Float64(y * Float64(1.0 - z)) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -3.7e+25) || ~((x <= 5.6e+72)))
		tmp = x * log(y);
	else
		tmp = (y * (1.0 - z)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.7e+25], N[Not[LessEqual[x, 5.6e+72]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+25} \lor \neg \left(x \leq 5.6 \cdot 10^{+72}\right):\\
\;\;\;\;x \cdot \log y\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.6999999999999999e25 or 5.5999999999999998e72 < x

    1. Initial program 93.3%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define93.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg93.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval93.3%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg93.3%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval93.3%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg93.3%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in y around 0 99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{-1 \cdot \left(y \cdot z\right)}\right) - t \]
    7. Step-by-step derivation
      1. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-1 \cdot y\right) \cdot z}\right) - t \]
      2. mul-1-neg99.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right)} \cdot z\right) - t \]
    8. Simplified99.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right) \cdot z}\right) - t \]
    9. Taylor expanded in x around inf 76.6%

      \[\leadsto \color{blue}{x \cdot \log y} \]
    10. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \color{blue}{\log y \cdot x} \]
    11. Simplified76.6%

      \[\leadsto \color{blue}{\log y \cdot x} \]

    if -3.6999999999999999e25 < x < 5.5999999999999998e72

    1. Initial program 78.9%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube78.6%

        \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log y \cdot \log y\right) \cdot \log y}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      2. pow378.7%

        \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. Applied egg-rr78.7%

      \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    5. Taylor expanded in y around 0 98.9%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
    6. Step-by-step derivation
      1. mul-1-neg98.9%

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

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
    8. Taylor expanded in y around inf 61.8%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(z - 1\right)\right)} - t \]
    9. Step-by-step derivation
      1. mul-1-neg61.8%

        \[\leadsto \color{blue}{\left(-y \cdot \left(z - 1\right)\right)} - t \]
      2. sub-neg61.8%

        \[\leadsto \left(-y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - t \]
      3. metadata-eval61.8%

        \[\leadsto \left(-y \cdot \left(z + \color{blue}{-1}\right)\right) - t \]
      4. +-commutative61.8%

        \[\leadsto \left(-y \cdot \color{blue}{\left(-1 + z\right)}\right) - t \]
      5. distribute-rgt-neg-in61.8%

        \[\leadsto \color{blue}{y \cdot \left(-\left(-1 + z\right)\right)} - t \]
      6. distribute-neg-in61.8%

        \[\leadsto y \cdot \color{blue}{\left(\left(--1\right) + \left(-z\right)\right)} - t \]
      7. metadata-eval61.8%

        \[\leadsto y \cdot \left(\color{blue}{1} + \left(-z\right)\right) - t \]
      8. sub-neg61.8%

        \[\leadsto y \cdot \color{blue}{\left(1 - z\right)} - t \]
    10. Simplified61.8%

      \[\leadsto \color{blue}{y \cdot \left(1 - z\right)} - t \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+25} \lor \neg \left(x \leq 5.6 \cdot 10^{+72}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - z\right) - t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 99.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \left(\left(-1 + x\right) \cdot \log y - \left(z + -1\right) \cdot y\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (- (* (+ -1.0 x) (log y)) (* (+ z -1.0) y)) t))
double code(double x, double y, double z, double t) {
	return (((-1.0 + x) * log(y)) - ((z + -1.0) * y)) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((((-1.0d0) + x) * log(y)) - ((z + (-1.0d0)) * y)) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((-1.0 + x) * Math.log(y)) - ((z + -1.0) * y)) - t;
}
def code(x, y, z, t):
	return (((-1.0 + x) * math.log(y)) - ((z + -1.0) * y)) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) - Float64(Float64(z + -1.0) * y)) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((-1.0 + x) * log(y)) - ((z + -1.0) * y)) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(N[(z + -1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(-1 + x\right) \cdot \log y - \left(z + -1\right) \cdot y\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
    2. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    3. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
    5. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
    6. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
    7. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 99.4%

    \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + \log y \cdot \left(x - 1\right)\right)} - t \]
  6. Step-by-step derivation
    1. +-commutative99.4%

      \[\leadsto \color{blue}{\left(\log y \cdot \left(x - 1\right) + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right)} - t \]
    2. sub-neg99.4%

      \[\leadsto \left(\log y \cdot \color{blue}{\left(x + \left(-1\right)\right)} + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right) - t \]
    3. metadata-eval99.4%

      \[\leadsto \left(\log y \cdot \left(x + \color{blue}{-1}\right) + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right) - t \]
    4. mul-1-neg99.4%

      \[\leadsto \left(\log y \cdot \left(x + -1\right) + \color{blue}{\left(-y \cdot \left(z - 1\right)\right)}\right) - t \]
    5. unsub-neg99.4%

      \[\leadsto \color{blue}{\left(\log y \cdot \left(x + -1\right) - y \cdot \left(z - 1\right)\right)} - t \]
    6. +-commutative99.4%

      \[\leadsto \left(\log y \cdot \color{blue}{\left(-1 + x\right)} - y \cdot \left(z - 1\right)\right) - t \]
    7. sub-neg99.4%

      \[\leadsto \left(\log y \cdot \left(-1 + x\right) - y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - t \]
    8. metadata-eval99.4%

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

      \[\leadsto \left(\log y \cdot \left(-1 + x\right) - y \cdot \color{blue}{\left(-1 + z\right)}\right) - t \]
  7. Simplified99.4%

    \[\leadsto \color{blue}{\left(\log y \cdot \left(-1 + x\right) - y \cdot \left(-1 + z\right)\right)} - t \]
  8. Final simplification99.4%

    \[\leadsto \left(\left(-1 + x\right) \cdot \log y - \left(z + -1\right) \cdot y\right) - t \]
  9. Add Preprocessing

Alternative 13: 99.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \left(\left(-1 + x\right) \cdot \log y - z \cdot y\right) - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (- (* (+ -1.0 x) (log y)) (* z y)) t))
double code(double x, double y, double z, double t) {
	return (((-1.0 + x) * log(y)) - (z * y)) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((((-1.0d0) + x) * log(y)) - (z * y)) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((-1.0 + x) * Math.log(y)) - (z * y)) - t;
}
def code(x, y, z, t):
	return (((-1.0 + x) * math.log(y)) - (z * y)) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) - Float64(z * y)) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((-1.0 + x) * log(y)) - (z * y)) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(-1 + x\right) \cdot \log y - z \cdot y\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
    2. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    3. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
    5. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
    6. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
    7. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 99.4%

    \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \left(z - 1\right)\right) + \log y \cdot \left(x - 1\right)\right)} - t \]
  6. Step-by-step derivation
    1. +-commutative99.4%

      \[\leadsto \color{blue}{\left(\log y \cdot \left(x - 1\right) + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right)} - t \]
    2. sub-neg99.4%

      \[\leadsto \left(\log y \cdot \color{blue}{\left(x + \left(-1\right)\right)} + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right) - t \]
    3. metadata-eval99.4%

      \[\leadsto \left(\log y \cdot \left(x + \color{blue}{-1}\right) + -1 \cdot \left(y \cdot \left(z - 1\right)\right)\right) - t \]
    4. mul-1-neg99.4%

      \[\leadsto \left(\log y \cdot \left(x + -1\right) + \color{blue}{\left(-y \cdot \left(z - 1\right)\right)}\right) - t \]
    5. unsub-neg99.4%

      \[\leadsto \color{blue}{\left(\log y \cdot \left(x + -1\right) - y \cdot \left(z - 1\right)\right)} - t \]
    6. +-commutative99.4%

      \[\leadsto \left(\log y \cdot \color{blue}{\left(-1 + x\right)} - y \cdot \left(z - 1\right)\right) - t \]
    7. sub-neg99.4%

      \[\leadsto \left(\log y \cdot \left(-1 + x\right) - y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - t \]
    8. metadata-eval99.4%

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

      \[\leadsto \left(\log y \cdot \left(-1 + x\right) - y \cdot \color{blue}{\left(-1 + z\right)}\right) - t \]
  7. Simplified99.4%

    \[\leadsto \color{blue}{\left(\log y \cdot \left(-1 + x\right) - y \cdot \left(-1 + z\right)\right)} - t \]
  8. Taylor expanded in z around inf 99.2%

    \[\leadsto \left(\log y \cdot \left(-1 + x\right) - \color{blue}{y \cdot z}\right) - t \]
  9. Final simplification99.2%

    \[\leadsto \left(\left(-1 + x\right) \cdot \log y - z \cdot y\right) - t \]
  10. Add Preprocessing

Alternative 14: 43.3% accurate, 15.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1450000000000\right):\\ \;\;\;\;-t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -2.7e-11) (not (<= t 1450000000000.0))) (- t) (* z (- y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.7e-11) || !(t <= 1450000000000.0)) {
		tmp = -t;
	} else {
		tmp = z * -y;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-2.7d-11)) .or. (.not. (t <= 1450000000000.0d0))) then
        tmp = -t
    else
        tmp = z * -y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.7e-11) || !(t <= 1450000000000.0)) {
		tmp = -t;
	} else {
		tmp = z * -y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -2.7e-11) or not (t <= 1450000000000.0):
		tmp = -t
	else:
		tmp = z * -y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -2.7e-11) || !(t <= 1450000000000.0))
		tmp = Float64(-t);
	else
		tmp = Float64(z * Float64(-y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -2.7e-11) || ~((t <= 1450000000000.0)))
		tmp = -t;
	else
		tmp = z * -y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.7e-11], N[Not[LessEqual[t, 1450000000000.0]], $MachinePrecision]], (-t), N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1450000000000\right):\\
\;\;\;\;-t\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.70000000000000005e-11 or 1.45e12 < t

    1. Initial program 92.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define92.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval92.0%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg92.0%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.9%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 65.0%

      \[\leadsto \color{blue}{-1 \cdot t} \]
    6. Step-by-step derivation
      1. mul-1-neg65.0%

        \[\leadsto \color{blue}{-t} \]
    7. Simplified65.0%

      \[\leadsto \color{blue}{-t} \]

    if -2.70000000000000005e-11 < t < 1.45e12

    1. Initial program 79.7%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Step-by-step derivation
      1. fma-define79.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
      2. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      3. metadata-eval79.7%

        \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
      4. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
      5. metadata-eval79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
      6. sub-neg79.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
      7. log1p-define99.8%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.5%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{z} \cdot \mathsf{log1p}\left(-y\right)\right) - t \]
    6. Taylor expanded in y around 0 98.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{-1 \cdot \left(y \cdot z\right)}\right) - t \]
    7. Step-by-step derivation
      1. associate-*r*98.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-1 \cdot y\right) \cdot z}\right) - t \]
      2. mul-1-neg98.7%

        \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right)} \cdot z\right) - t \]
    8. Simplified98.7%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(-y\right) \cdot z}\right) - t \]
    9. Taylor expanded in y around inf 22.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    10. Step-by-step derivation
      1. neg-mul-122.6%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-in22.6%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative22.6%

        \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]
    11. Simplified22.6%

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-11} \lor \neg \left(t \leq 1450000000000\right):\\ \;\;\;\;-t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 46.6% accurate, 30.7× speedup?

\[\begin{array}{l} \\ y \cdot \left(1 - z\right) - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (* y (- 1.0 z)) t))
double code(double x, double y, double z, double t) {
	return (y * (1.0 - z)) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (y * (1.0d0 - z)) - t
end function
public static double code(double x, double y, double z, double t) {
	return (y * (1.0 - z)) - t;
}
def code(x, y, z, t):
	return (y * (1.0 - z)) - t
function code(x, y, z, t)
	return Float64(Float64(y * Float64(1.0 - z)) - t)
end
function tmp = code(x, y, z, t)
	tmp = (y * (1.0 - z)) - t;
end
code[x_, y_, z_, t_] := N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
y \cdot \left(1 - z\right) - t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube84.8%

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

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  4. Applied egg-rr84.9%

    \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  5. Taylor expanded in y around 0 99.1%

    \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
  6. Step-by-step derivation
    1. mul-1-neg99.1%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
  7. Simplified99.1%

    \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
  8. Taylor expanded in y around inf 45.1%

    \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(z - 1\right)\right)} - t \]
  9. Step-by-step derivation
    1. mul-1-neg45.1%

      \[\leadsto \color{blue}{\left(-y \cdot \left(z - 1\right)\right)} - t \]
    2. sub-neg45.1%

      \[\leadsto \left(-y \cdot \color{blue}{\left(z + \left(-1\right)\right)}\right) - t \]
    3. metadata-eval45.1%

      \[\leadsto \left(-y \cdot \left(z + \color{blue}{-1}\right)\right) - t \]
    4. +-commutative45.1%

      \[\leadsto \left(-y \cdot \color{blue}{\left(-1 + z\right)}\right) - t \]
    5. distribute-rgt-neg-in45.1%

      \[\leadsto \color{blue}{y \cdot \left(-\left(-1 + z\right)\right)} - t \]
    6. distribute-neg-in45.1%

      \[\leadsto y \cdot \color{blue}{\left(\left(--1\right) + \left(-z\right)\right)} - t \]
    7. metadata-eval45.1%

      \[\leadsto y \cdot \left(\color{blue}{1} + \left(-z\right)\right) - t \]
    8. sub-neg45.1%

      \[\leadsto y \cdot \color{blue}{\left(1 - z\right)} - t \]
  10. Simplified45.1%

    \[\leadsto \color{blue}{y \cdot \left(1 - z\right)} - t \]
  11. Add Preprocessing

Alternative 16: 46.4% accurate, 35.8× speedup?

\[\begin{array}{l} \\ \left(-t\right) - z \cdot y \end{array} \]
(FPCore (x y z t) :precision binary64 (- (- t) (* z y)))
double code(double x, double y, double z, double t) {
	return -t - (z * y);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = -t - (z * y)
end function
public static double code(double x, double y, double z, double t) {
	return -t - (z * y);
}
def code(x, y, z, t):
	return -t - (z * y)
function code(x, y, z, t)
	return Float64(Float64(-t) - Float64(z * y))
end
function tmp = code(x, y, z, t)
	tmp = -t - (z * y);
end
code[x_, y_, z_, t_] := N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(-t\right) - z \cdot y
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube84.8%

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

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  4. Applied egg-rr84.9%

    \[\leadsto \left(\left(x - 1\right) \cdot \color{blue}{\sqrt[3]{{\log y}^{3}}} + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  5. Taylor expanded in y around 0 99.1%

    \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-1 \cdot y\right)}\right) - t \]
  6. Step-by-step derivation
    1. mul-1-neg99.1%

      \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
  7. Simplified99.1%

    \[\leadsto \left(\left(x - 1\right) \cdot \sqrt[3]{{\log y}^{3}} + \left(z - 1\right) \cdot \color{blue}{\left(-y\right)}\right) - t \]
  8. Taylor expanded in z around inf 44.8%

    \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} - t \]
  9. Step-by-step derivation
    1. associate-*r*44.8%

      \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} - t \]
    2. mul-1-neg44.8%

      \[\leadsto \color{blue}{\left(-y\right)} \cdot z - t \]
  10. Simplified44.8%

    \[\leadsto \color{blue}{\left(-y\right) \cdot z} - t \]
  11. Final simplification44.8%

    \[\leadsto \left(-t\right) - z \cdot y \]
  12. Add Preprocessing

Alternative 17: 35.7% accurate, 107.5× speedup?

\[\begin{array}{l} \\ -t \end{array} \]
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
	return -t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = -t
end function
public static double code(double x, double y, double z, double t) {
	return -t;
}
def code(x, y, z, t):
	return -t
function code(x, y, z, t)
	return Float64(-t)
end
function tmp = code(x, y, z, t)
	tmp = -t;
end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}

\\
-t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
    2. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    3. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
    5. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
    6. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
    7. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
  4. Add Preprocessing
  5. Taylor expanded in t around inf 30.2%

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. mul-1-neg30.2%

      \[\leadsto \color{blue}{-t} \]
  7. Simplified30.2%

    \[\leadsto \color{blue}{-t} \]
  8. Add Preprocessing

Alternative 18: 2.3% accurate, 215.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
	return t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = t
end function
public static double code(double x, double y, double z, double t) {
	return t;
}
def code(x, y, z, t):
	return t
function code(x, y, z, t)
	return t
end
function tmp = code(x, y, z, t)
	tmp = t;
end
code[x_, y_, z_, t_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 85.1%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Step-by-step derivation
    1. fma-define85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 1, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right)} - t \]
    2. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-1\right)}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    3. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + \color{blue}{-1}, \log y, \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    4. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \color{blue}{\left(z + \left(-1\right)\right)} \cdot \log \left(1 - y\right)\right) - t \]
    5. metadata-eval85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + \color{blue}{-1}\right) \cdot \log \left(1 - y\right)\right) - t \]
    6. sub-neg85.1%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \log \color{blue}{\left(1 + \left(-y\right)\right)}\right) - t \]
    7. log1p-define99.8%

      \[\leadsto \mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \color{blue}{\mathsf{log1p}\left(-y\right)}\right) - t \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x + -1, \log y, \left(z + -1\right) \cdot \mathsf{log1p}\left(-y\right)\right) - t} \]
  4. Add Preprocessing
  5. Taylor expanded in t around inf 30.2%

    \[\leadsto \color{blue}{-1 \cdot t} \]
  6. Step-by-step derivation
    1. mul-1-neg30.2%

      \[\leadsto \color{blue}{-t} \]
  7. Simplified30.2%

    \[\leadsto \color{blue}{-t} \]
  8. Step-by-step derivation
    1. neg-sub030.2%

      \[\leadsto \color{blue}{0 - t} \]
    2. sub-neg30.2%

      \[\leadsto \color{blue}{0 + \left(-t\right)} \]
    3. add-sqr-sqrt14.9%

      \[\leadsto 0 + \color{blue}{\sqrt{-t} \cdot \sqrt{-t}} \]
    4. sqrt-unprod7.8%

      \[\leadsto 0 + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \]
    5. sqr-neg7.8%

      \[\leadsto 0 + \sqrt{\color{blue}{t \cdot t}} \]
    6. sqrt-unprod1.2%

      \[\leadsto 0 + \color{blue}{\sqrt{t} \cdot \sqrt{t}} \]
    7. add-sqr-sqrt2.2%

      \[\leadsto 0 + \color{blue}{t} \]
  9. Applied egg-rr2.2%

    \[\leadsto \color{blue}{0 + t} \]
  10. Step-by-step derivation
    1. +-lft-identity2.2%

      \[\leadsto \color{blue}{t} \]
  11. Simplified2.2%

    \[\leadsto \color{blue}{t} \]
  12. Add Preprocessing

Reproduce

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