Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B

Percentage Accurate: 85.2% → 99.8%
Time: 13.3s
Alternatives: 12
Speedup: 1.9×

Specification

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

\\
\left(x \cdot \log y + z \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 12 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: 85.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \mathsf{log1p}\left(-y\right), -t\right)\right) \]

Alternative 2: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(z, \mathsf{log1p}\left(-y\right), x \cdot \log y\right) - t \]

Alternative 3: 99.1% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-y, z, \mathsf{fma}\left(x, \log y, -t\right)\right)} \]
  5. Final simplification99.2%

    \[\leadsto \mathsf{fma}\left(-y, z, \mathsf{fma}\left(x, \log y, -t\right)\right) \]

Alternative 4: 76.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.25 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -2.25e+74)
     t_1
     (if (<= x -1.9e-54)
       (- (- t) (* y z))
       (if (or (<= x -1e-78) (not (<= x 0.036)))
         t_1
         (- (* (* y z) (+ (* y -0.5) -1.0)) t))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -2.25e+74) {
		tmp = t_1;
	} else if (x <= -1.9e-54) {
		tmp = -t - (y * z);
	} else if ((x <= -1e-78) || !(x <= 0.036)) {
		tmp = t_1;
	} else {
		tmp = ((y * z) * ((y * -0.5) + -1.0)) - 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) :: t_1
    real(8) :: tmp
    t_1 = x * log(y)
    if (x <= (-2.25d+74)) then
        tmp = t_1
    else if (x <= (-1.9d-54)) then
        tmp = -t - (y * z)
    else if ((x <= (-1d-78)) .or. (.not. (x <= 0.036d0))) then
        tmp = t_1
    else
        tmp = ((y * z) * ((y * (-0.5d0)) + (-1.0d0))) - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * Math.log(y);
	double tmp;
	if (x <= -2.25e+74) {
		tmp = t_1;
	} else if (x <= -1.9e-54) {
		tmp = -t - (y * z);
	} else if ((x <= -1e-78) || !(x <= 0.036)) {
		tmp = t_1;
	} else {
		tmp = ((y * z) * ((y * -0.5) + -1.0)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -2.25e+74:
		tmp = t_1
	elif x <= -1.9e-54:
		tmp = -t - (y * z)
	elif (x <= -1e-78) or not (x <= 0.036):
		tmp = t_1
	else:
		tmp = ((y * z) * ((y * -0.5) + -1.0)) - t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -2.25e+74)
		tmp = t_1;
	elseif (x <= -1.9e-54)
		tmp = Float64(Float64(-t) - Float64(y * z));
	elseif ((x <= -1e-78) || !(x <= 0.036))
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(y * z) * Float64(Float64(y * -0.5) + -1.0)) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * log(y);
	tmp = 0.0;
	if (x <= -2.25e+74)
		tmp = t_1;
	elseif (x <= -1.9e-54)
		tmp = -t - (y * z);
	elseif ((x <= -1e-78) || ~((x <= 0.036)))
		tmp = t_1;
	else
		tmp = ((y * z) * ((y * -0.5) + -1.0)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.25e+74], t$95$1, If[LessEqual[x, -1.9e-54], N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1e-78], N[Not[LessEqual[x, 0.036]], $MachinePrecision]], t$95$1, N[(N[(N[(y * z), $MachinePrecision] * N[(N[(y * -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.25 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\
\;\;\;\;\left(-t\right) - y \cdot z\\

\mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.25e74 or -1.9000000000000001e-54 < x < -9.99999999999999999e-79 or 0.0359999999999999973 < x

    1. Initial program 97.6%

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

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

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

        \[\leadsto \left(x \cdot \log y + \left(\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) + \color{blue}{\left(-y \cdot z\right)}\right)\right) - t \]
      3. unsub-neg99.1%

        \[\leadsto \left(x \cdot \log y + \color{blue}{\left(\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) - y \cdot z\right)}\right) - t \]
      4. associate-*r*99.1%

        \[\leadsto \left(x \cdot \log y + \left(\left(\color{blue}{\left(-0.5 \cdot {y}^{2}\right) \cdot z} + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) - y \cdot z\right)\right) - t \]
      5. associate-*r*99.1%

        \[\leadsto \left(x \cdot \log y + \left(\left(\left(-0.5 \cdot {y}^{2}\right) \cdot z + \color{blue}{\left(-0.3333333333333333 \cdot {y}^{3}\right) \cdot z}\right) - y \cdot z\right)\right) - t \]
      6. distribute-rgt-out99.1%

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

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \color{blue}{\left(-0.3333333333333333 \cdot {y}^{3} + -0.5 \cdot {y}^{2}\right)} - y \cdot z\right)\right) - t \]
      8. fma-def99.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \color{blue}{\mathsf{fma}\left(-0.3333333333333333, {y}^{3}, -0.5 \cdot {y}^{2}\right)} - y \cdot z\right)\right) - t \]
      9. *-commutative99.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \mathsf{fma}\left(-0.3333333333333333, {y}^{3}, \color{blue}{{y}^{2} \cdot -0.5}\right) - y \cdot z\right)\right) - t \]
      10. unpow299.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \mathsf{fma}\left(-0.3333333333333333, {y}^{3}, \color{blue}{\left(y \cdot y\right)} \cdot -0.5\right) - y \cdot z\right)\right) - t \]
      11. associate-*l*99.1%

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

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

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

    if -2.25e74 < x < -1.9000000000000001e-54

    1. Initial program 73.2%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
      4. mul-1-neg73.2%

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

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
    5. Taylor expanded in y around 0 73.2%

      \[\leadsto \color{blue}{-1 \cdot t + -1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-out73.2%

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

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

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

    if -9.99999999999999999e-79 < x < 0.0359999999999999973

    1. Initial program 74.1%

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
    4. Simplified92.0%

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
    5. Taylor expanded in y around 0 91.9%

      \[\leadsto \color{blue}{-1 \cdot t + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg91.9%

        \[\leadsto \color{blue}{\left(-t\right)} + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) \]
      2. +-commutative91.9%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) + \left(-t\right)} \]
      3. unsub-neg91.9%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) - t} \]
      4. +-commutative91.9%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -1 \cdot \left(y \cdot z\right)\right)} - t \]
      5. *-commutative91.9%

        \[\leadsto \left(\color{blue}{\left({y}^{2} \cdot z\right) \cdot -0.5} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      6. *-commutative91.9%

        \[\leadsto \left(\color{blue}{\left(z \cdot {y}^{2}\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      7. unpow291.9%

        \[\leadsto \left(\left(z \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      8. associate-*r*91.9%

        \[\leadsto \left(\color{blue}{\left(\left(z \cdot y\right) \cdot y\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      9. *-commutative91.9%

        \[\leadsto \left(\left(\color{blue}{\left(y \cdot z\right)} \cdot y\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      10. associate-*r*91.9%

        \[\leadsto \left(\color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right)} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      11. *-commutative91.9%

        \[\leadsto \left(\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right) + \color{blue}{\left(y \cdot z\right) \cdot -1}\right) - t \]
      12. distribute-lft-out91.9%

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right)} - t \]
      13. *-commutative91.9%

        \[\leadsto \color{blue}{\left(z \cdot y\right)} \cdot \left(y \cdot -0.5 + -1\right) - t \]
      14. *-commutative91.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t\\ \end{array} \]

Alternative 5: 76.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -6.1 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\ \;\;\;\;-\mathsf{fma}\left(z, y, t\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -6.1e+76)
     t_1
     (if (<= x -1.9e-54)
       (- (fma z y t))
       (if (or (<= x -1e-78) (not (<= x 0.036)))
         t_1
         (- (* (* y z) (+ (* y -0.5) -1.0)) t))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -6.1e+76) {
		tmp = t_1;
	} else if (x <= -1.9e-54) {
		tmp = -fma(z, y, t);
	} else if ((x <= -1e-78) || !(x <= 0.036)) {
		tmp = t_1;
	} else {
		tmp = ((y * z) * ((y * -0.5) + -1.0)) - t;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -6.1e+76)
		tmp = t_1;
	elseif (x <= -1.9e-54)
		tmp = Float64(-fma(z, y, t));
	elseif ((x <= -1e-78) || !(x <= 0.036))
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(y * z) * Float64(Float64(y * -0.5) + -1.0)) - t);
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.1e+76], t$95$1, If[LessEqual[x, -1.9e-54], (-N[(z * y + t), $MachinePrecision]), If[Or[LessEqual[x, -1e-78], N[Not[LessEqual[x, 0.036]], $MachinePrecision]], t$95$1, N[(N[(N[(y * z), $MachinePrecision] * N[(N[(y * -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\
\;\;\;\;-\mathsf{fma}\left(z, y, t\right)\\

\mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.10000000000000058e76 or -1.9000000000000001e-54 < x < -9.99999999999999999e-79 or 0.0359999999999999973 < x

    1. Initial program 97.6%

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

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

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

        \[\leadsto \left(x \cdot \log y + \left(\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) + \color{blue}{\left(-y \cdot z\right)}\right)\right) - t \]
      3. unsub-neg99.1%

        \[\leadsto \left(x \cdot \log y + \color{blue}{\left(\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) - y \cdot z\right)}\right) - t \]
      4. associate-*r*99.1%

        \[\leadsto \left(x \cdot \log y + \left(\left(\color{blue}{\left(-0.5 \cdot {y}^{2}\right) \cdot z} + -0.3333333333333333 \cdot \left({y}^{3} \cdot z\right)\right) - y \cdot z\right)\right) - t \]
      5. associate-*r*99.1%

        \[\leadsto \left(x \cdot \log y + \left(\left(\left(-0.5 \cdot {y}^{2}\right) \cdot z + \color{blue}{\left(-0.3333333333333333 \cdot {y}^{3}\right) \cdot z}\right) - y \cdot z\right)\right) - t \]
      6. distribute-rgt-out99.1%

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

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \color{blue}{\left(-0.3333333333333333 \cdot {y}^{3} + -0.5 \cdot {y}^{2}\right)} - y \cdot z\right)\right) - t \]
      8. fma-def99.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \color{blue}{\mathsf{fma}\left(-0.3333333333333333, {y}^{3}, -0.5 \cdot {y}^{2}\right)} - y \cdot z\right)\right) - t \]
      9. *-commutative99.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \mathsf{fma}\left(-0.3333333333333333, {y}^{3}, \color{blue}{{y}^{2} \cdot -0.5}\right) - y \cdot z\right)\right) - t \]
      10. unpow299.1%

        \[\leadsto \left(x \cdot \log y + \left(z \cdot \mathsf{fma}\left(-0.3333333333333333, {y}^{3}, \color{blue}{\left(y \cdot y\right)} \cdot -0.5\right) - y \cdot z\right)\right) - t \]
      11. associate-*l*99.1%

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

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

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

    if -6.10000000000000058e76 < x < -1.9000000000000001e-54

    1. Initial program 73.2%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
      4. mul-1-neg73.2%

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

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
    5. Taylor expanded in y around 0 73.2%

      \[\leadsto \color{blue}{-1 \cdot t + -1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-out73.2%

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

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

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

        \[\leadsto -\left(\color{blue}{z \cdot y} + t\right) \]
      5. fma-def73.3%

        \[\leadsto -\color{blue}{\mathsf{fma}\left(z, y, t\right)} \]
    7. Simplified73.3%

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

    if -9.99999999999999999e-79 < x < 0.0359999999999999973

    1. Initial program 74.1%

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
    4. Simplified92.0%

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
    5. Taylor expanded in y around 0 91.9%

      \[\leadsto \color{blue}{-1 \cdot t + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg91.9%

        \[\leadsto \color{blue}{\left(-t\right)} + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) \]
      2. +-commutative91.9%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) + \left(-t\right)} \]
      3. unsub-neg91.9%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) - t} \]
      4. +-commutative91.9%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -1 \cdot \left(y \cdot z\right)\right)} - t \]
      5. *-commutative91.9%

        \[\leadsto \left(\color{blue}{\left({y}^{2} \cdot z\right) \cdot -0.5} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      6. *-commutative91.9%

        \[\leadsto \left(\color{blue}{\left(z \cdot {y}^{2}\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      7. unpow291.9%

        \[\leadsto \left(\left(z \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      8. associate-*r*91.9%

        \[\leadsto \left(\color{blue}{\left(\left(z \cdot y\right) \cdot y\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      9. *-commutative91.9%

        \[\leadsto \left(\left(\color{blue}{\left(y \cdot z\right)} \cdot y\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      10. associate-*r*91.9%

        \[\leadsto \left(\color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right)} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      11. *-commutative91.9%

        \[\leadsto \left(\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right) + \color{blue}{\left(y \cdot z\right) \cdot -1}\right) - t \]
      12. distribute-lft-out91.9%

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right)} - t \]
      13. *-commutative91.9%

        \[\leadsto \color{blue}{\left(z \cdot y\right)} \cdot \left(y \cdot -0.5 + -1\right) - t \]
      14. *-commutative91.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.1 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-54}:\\ \;\;\;\;-\mathsf{fma}\left(z, y, t\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-78} \lor \neg \left(x \leq 0.036\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t\\ \end{array} \]

Alternative 6: 90.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-81} \lor \neg \left(x \leq 6.6 \cdot 10^{-58}\right):\\ \;\;\;\;x \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 (or (<= x -2.7e-81) (not (<= x 6.6e-58)))
   (- (* x (log y)) t)
   (- (* z (log1p (- y))) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.7e-81) || !(x <= 6.6e-58)) {
		tmp = (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 ((x <= -2.7e-81) || !(x <= 6.6e-58)) {
		tmp = (x * Math.log(y)) - t;
	} else {
		tmp = (z * Math.log1p(-y)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -2.7e-81) or not (x <= 6.6e-58):
		tmp = (x * math.log(y)) - t
	else:
		tmp = (z * math.log1p(-y)) - t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -2.7e-81) || !(x <= 6.6e-58))
		tmp = Float64(Float64(x * log(y)) - t);
	else
		tmp = Float64(Float64(z * log1p(Float64(-y))) - t);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.7e-81], N[Not[LessEqual[x, 6.6e-58]], $MachinePrecision]], N[(N[(x * 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}\;x \leq -2.7 \cdot 10^{-81} \lor \neg \left(x \leq 6.6 \cdot 10^{-58}\right):\\
\;\;\;\;x \cdot \log y - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6999999999999999e-81 or 6.60000000000000052e-58 < x

    1. Initial program 92.7%

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

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

    if -2.6999999999999999e-81 < x < 6.60000000000000052e-58

    1. Initial program 72.1%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
      4. mul-1-neg94.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-81} \lor \neg \left(x \leq 6.6 \cdot 10^{-58}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \end{array} \]

Alternative 7: 90.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-84} \lor \neg \left(x \leq 9.2 \cdot 10^{-58}\right):\\
\;\;\;\;x \cdot \log y - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.1999999999999999e-84 or 9.1999999999999995e-58 < x

    1. Initial program 92.7%

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

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

    if -3.1999999999999999e-84 < x < 9.1999999999999995e-58

    1. Initial program 72.1%

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
      4. mul-1-neg94.8%

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

      \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
    5. Taylor expanded in y around 0 94.7%

      \[\leadsto \color{blue}{-1 \cdot t + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg94.7%

        \[\leadsto \color{blue}{\left(-t\right)} + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) \]
      2. +-commutative94.7%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) + \left(-t\right)} \]
      3. unsub-neg94.7%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) - t} \]
      4. +-commutative94.7%

        \[\leadsto \color{blue}{\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -1 \cdot \left(y \cdot z\right)\right)} - t \]
      5. *-commutative94.7%

        \[\leadsto \left(\color{blue}{\left({y}^{2} \cdot z\right) \cdot -0.5} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      6. *-commutative94.7%

        \[\leadsto \left(\color{blue}{\left(z \cdot {y}^{2}\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      7. unpow294.7%

        \[\leadsto \left(\left(z \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      8. associate-*r*94.7%

        \[\leadsto \left(\color{blue}{\left(\left(z \cdot y\right) \cdot y\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      9. *-commutative94.7%

        \[\leadsto \left(\left(\color{blue}{\left(y \cdot z\right)} \cdot y\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
      10. associate-*r*94.7%

        \[\leadsto \left(\color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right)} + -1 \cdot \left(y \cdot z\right)\right) - t \]
      11. *-commutative94.7%

        \[\leadsto \left(\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right) + \color{blue}{\left(y \cdot z\right) \cdot -1}\right) - t \]
      12. distribute-lft-out94.7%

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right)} - t \]
      13. *-commutative94.7%

        \[\leadsto \color{blue}{\left(z \cdot y\right)} \cdot \left(y \cdot -0.5 + -1\right) - t \]
      14. *-commutative94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-84} \lor \neg \left(x \leq 9.2 \cdot 10^{-58}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t\\ \end{array} \]

Alternative 8: 99.1% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(x \cdot \log y - y \cdot z\right) - t \]

Alternative 9: 56.3% accurate, 19.2× speedup?

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

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

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

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

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

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

      \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
    4. mul-1-neg57.9%

      \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
  4. Simplified57.9%

    \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
  5. Taylor expanded in y around 0 57.6%

    \[\leadsto \color{blue}{-1 \cdot t + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right)} \]
  6. Step-by-step derivation
    1. mul-1-neg57.6%

      \[\leadsto \color{blue}{\left(-t\right)} + \left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) \]
    2. +-commutative57.6%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) + \left(-t\right)} \]
    3. unsub-neg57.6%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + -0.5 \cdot \left({y}^{2} \cdot z\right)\right) - t} \]
    4. +-commutative57.6%

      \[\leadsto \color{blue}{\left(-0.5 \cdot \left({y}^{2} \cdot z\right) + -1 \cdot \left(y \cdot z\right)\right)} - t \]
    5. *-commutative57.6%

      \[\leadsto \left(\color{blue}{\left({y}^{2} \cdot z\right) \cdot -0.5} + -1 \cdot \left(y \cdot z\right)\right) - t \]
    6. *-commutative57.6%

      \[\leadsto \left(\color{blue}{\left(z \cdot {y}^{2}\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
    7. unpow257.6%

      \[\leadsto \left(\left(z \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
    8. associate-*r*57.6%

      \[\leadsto \left(\color{blue}{\left(\left(z \cdot y\right) \cdot y\right)} \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
    9. *-commutative57.6%

      \[\leadsto \left(\left(\color{blue}{\left(y \cdot z\right)} \cdot y\right) \cdot -0.5 + -1 \cdot \left(y \cdot z\right)\right) - t \]
    10. associate-*r*57.6%

      \[\leadsto \left(\color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right)} + -1 \cdot \left(y \cdot z\right)\right) - t \]
    11. *-commutative57.6%

      \[\leadsto \left(\left(y \cdot z\right) \cdot \left(y \cdot -0.5\right) + \color{blue}{\left(y \cdot z\right) \cdot -1}\right) - t \]
    12. distribute-lft-out57.6%

      \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right)} - t \]
    13. *-commutative57.6%

      \[\leadsto \color{blue}{\left(z \cdot y\right)} \cdot \left(y \cdot -0.5 + -1\right) - t \]
    14. *-commutative57.6%

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

    \[\leadsto \color{blue}{\left(z \cdot y\right) \cdot \left(-0.5 \cdot y + -1\right) - t} \]
  8. Final simplification57.6%

    \[\leadsto \left(y \cdot z\right) \cdot \left(y \cdot -0.5 + -1\right) - t \]

Alternative 10: 42.9% accurate, 34.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 4.1 \cdot 10^{+211}:\\ \;\;\;\;-t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t) :precision binary64 (if (<= z 4.1e+211) (- t) (* z (- y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 4.1e+211) {
		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 (z <= 4.1d+211) 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 (z <= 4.1e+211) {
		tmp = -t;
	} else {
		tmp = z * -y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= 4.1e+211:
		tmp = -t
	else:
		tmp = z * -y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= 4.1e+211)
		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 (z <= 4.1e+211)
		tmp = -t;
	else
		tmp = z * -y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, 4.1e+211], (-t), N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.1 \cdot 10^{+211}:\\
\;\;\;\;-t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.0999999999999999e211

    1. Initial program 90.4%

      \[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t \]
    2. Taylor expanded in t around inf 45.2%

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

        \[\leadsto \color{blue}{-t} \]
    4. Simplified45.2%

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

    if 4.0999999999999999e211 < z

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \log y + \color{blue}{\left(-y \cdot z\right)}\right) - t \]
      3. unsub-neg96.8%

        \[\leadsto \color{blue}{\left(x \cdot \log y - y \cdot z\right)} - t \]
    6. Simplified96.8%

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative60.2%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in60.2%

        \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]
    9. Simplified60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.1 \cdot 10^{+211}:\\ \;\;\;\;-t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]

Alternative 11: 56.0% accurate, 35.2× speedup?

\[\begin{array}{l} \\ \left(-t\right) - y \cdot z \end{array} \]
(FPCore (x y z t) :precision binary64 (- (- t) (* y z)))
double code(double x, double y, double z, double t) {
	return -t - (y * z);
}
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 - (y * z)
end function
public static double code(double x, double y, double z, double t) {
	return -t - (y * z);
}
def code(x, y, z, t):
	return -t - (y * z)
function code(x, y, z, t)
	return Float64(Float64(-t) - Float64(y * z))
end
function tmp = code(x, y, z, t)
	tmp = -t - (y * z);
end
code[x_, y_, z_, t_] := N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

      \[\leadsto z \cdot \color{blue}{\mathsf{log1p}\left(-1 \cdot y\right)} - t \]
    4. mul-1-neg57.9%

      \[\leadsto z \cdot \mathsf{log1p}\left(\color{blue}{-y}\right) - t \]
  4. Simplified57.9%

    \[\leadsto \color{blue}{z \cdot \mathsf{log1p}\left(-y\right) - t} \]
  5. Taylor expanded in y around 0 57.3%

    \[\leadsto \color{blue}{-1 \cdot t + -1 \cdot \left(y \cdot z\right)} \]
  6. Step-by-step derivation
    1. distribute-lft-out57.3%

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

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

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

    \[\leadsto \left(-t\right) - y \cdot z \]

Alternative 12: 41.5% accurate, 105.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.2%

    \[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t \]
  2. Taylor expanded in t around inf 42.6%

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

      \[\leadsto \color{blue}{-t} \]
  4. Simplified42.6%

    \[\leadsto \color{blue}{-t} \]
  5. Final simplification42.6%

    \[\leadsto -t \]

Developer target: 99.6% accurate, 1.6× speedup?

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

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

Reproduce

?
herbie shell --seed 2023271 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (- (* (- z) (+ (+ (* 0.5 (* y y)) y) (* (/ 0.3333333333333333 (* 1.0 (* 1.0 1.0))) (* y (* y y))))) (- t (* x (log y))))

  (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))