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

Percentage Accurate: 85.5% → 99.8%
Time: 14.9s
Alternatives: 13
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 13 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.5% 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 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{+141} \lor \neg \left(x \leq -1.38 \cdot 10^{+103}\right) \land \left(x \leq -3.1 \cdot 10^{+34} \lor \neg \left(x \leq 7.5 \cdot 10^{-5}\right) \land \left(x \leq 1.4 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right)\right)\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -1.28e+141)
         (and (not (<= x -1.38e+103))
              (or (<= x -3.1e+34)
                  (and (not (<= x 7.5e-5))
                       (or (<= x 1.4e+31) (not (<= x 4.6e+125)))))))
   (* x (log y))
   (- (- t) (* y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.28e+141) || (!(x <= -1.38e+103) && ((x <= -3.1e+34) || (!(x <= 7.5e-5) && ((x <= 1.4e+31) || !(x <= 4.6e+125)))))) {
		tmp = x * log(y);
	} else {
		tmp = -t - (y * z);
	}
	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.28d+141)) .or. (.not. (x <= (-1.38d+103))) .and. (x <= (-3.1d+34)) .or. (.not. (x <= 7.5d-5)) .and. (x <= 1.4d+31) .or. (.not. (x <= 4.6d+125))) then
        tmp = x * log(y)
    else
        tmp = -t - (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.28e+141) || (!(x <= -1.38e+103) && ((x <= -3.1e+34) || (!(x <= 7.5e-5) && ((x <= 1.4e+31) || !(x <= 4.6e+125)))))) {
		tmp = x * Math.log(y);
	} else {
		tmp = -t - (y * z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -1.28e+141) or (not (x <= -1.38e+103) and ((x <= -3.1e+34) or (not (x <= 7.5e-5) and ((x <= 1.4e+31) or not (x <= 4.6e+125))))):
		tmp = x * math.log(y)
	else:
		tmp = -t - (y * z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -1.28e+141) || (!(x <= -1.38e+103) && ((x <= -3.1e+34) || (!(x <= 7.5e-5) && ((x <= 1.4e+31) || !(x <= 4.6e+125))))))
		tmp = Float64(x * log(y));
	else
		tmp = Float64(Float64(-t) - Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -1.28e+141) || (~((x <= -1.38e+103)) && ((x <= -3.1e+34) || (~((x <= 7.5e-5)) && ((x <= 1.4e+31) || ~((x <= 4.6e+125)))))))
		tmp = x * log(y);
	else
		tmp = -t - (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.28e+141], And[N[Not[LessEqual[x, -1.38e+103]], $MachinePrecision], Or[LessEqual[x, -3.1e+34], And[N[Not[LessEqual[x, 7.5e-5]], $MachinePrecision], Or[LessEqual[x, 1.4e+31], N[Not[LessEqual[x, 4.6e+125]], $MachinePrecision]]]]]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.28 \cdot 10^{+141} \lor \neg \left(x \leq -1.38 \cdot 10^{+103}\right) \land \left(x \leq -3.1 \cdot 10^{+34} \lor \neg \left(x \leq 7.5 \cdot 10^{-5}\right) \land \left(x \leq 1.4 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right)\right)\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.28000000000000004e141 or -1.37999999999999993e103 < x < -3.09999999999999977e34 or 7.49999999999999934e-5 < x < 1.40000000000000008e31 or 4.60000000000000026e125 < x

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot -0.5 - y\right) + \log y \cdot x\right) - t \]
      9. associate-*l*99.7%

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

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

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

    if -1.28000000000000004e141 < x < -1.37999999999999993e103 or -3.09999999999999977e34 < x < 7.49999999999999934e-5 or 1.40000000000000008e31 < x < 4.60000000000000026e125

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{+141} \lor \neg \left(x \leq -1.38 \cdot 10^{+103}\right) \land \left(x \leq -3.1 \cdot 10^{+34} \lor \neg \left(x \leq 7.5 \cdot 10^{-5}\right) \land \left(x \leq 1.4 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right)\right)\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \end{array} \]

Alternative 4: 75.7% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \left(-t\right) - y \cdot z\\ \mathbf{if}\;x \leq -1.28 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{+101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-5}:\\ \;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))) (t_2 (- (- t) (* y z))))
   (if (<= x -1.28e+141)
     t_1
     (if (<= x -5.5e+101)
       t_2
       (if (<= x -1.8e+36)
         t_1
         (if (<= x 4e-5)
           (- (fma y z t))
           (if (or (<= x 1.3e+31) (not (<= x 4.6e+125))) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double t_2 = -t - (y * z);
	double tmp;
	if (x <= -1.28e+141) {
		tmp = t_1;
	} else if (x <= -5.5e+101) {
		tmp = t_2;
	} else if (x <= -1.8e+36) {
		tmp = t_1;
	} else if (x <= 4e-5) {
		tmp = -fma(y, z, t);
	} else if ((x <= 1.3e+31) || !(x <= 4.6e+125)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	t_2 = Float64(Float64(-t) - Float64(y * z))
	tmp = 0.0
	if (x <= -1.28e+141)
		tmp = t_1;
	elseif (x <= -5.5e+101)
		tmp = t_2;
	elseif (x <= -1.8e+36)
		tmp = t_1;
	elseif (x <= 4e-5)
		tmp = Float64(-fma(y, z, t));
	elseif ((x <= 1.3e+31) || !(x <= 4.6e+125))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.28e+141], t$95$1, If[LessEqual[x, -5.5e+101], t$95$2, If[LessEqual[x, -1.8e+36], t$95$1, If[LessEqual[x, 4e-5], (-N[(y * z + t), $MachinePrecision]), If[Or[LessEqual[x, 1.3e+31], N[Not[LessEqual[x, 4.6e+125]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(-t\right) - y \cdot z\\
\mathbf{if}\;x \leq -1.28 \cdot 10^{+141}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -5.5 \cdot 10^{+101}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{+36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.28000000000000004e141 or -5.50000000000000018e101 < x < -1.7999999999999999e36 or 4.00000000000000033e-5 < x < 1.3e31 or 4.60000000000000026e125 < x

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot -0.5 - y\right) + \log y \cdot x\right) - t \]
      9. associate-*l*99.7%

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

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

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

    if -1.28000000000000004e141 < x < -5.50000000000000018e101 or 1.3e31 < x < 4.60000000000000026e125

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e36 < x < 4.00000000000000033e-5

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\mathsf{fma}\left(y, z, t\right)} \]
    10. Simplified83.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{+141}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{+101}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-5}:\\ \;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+31} \lor \neg \left(x \leq 4.6 \cdot 10^{+125}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) - y \cdot z\\ \end{array} \]

Alternative 5: 99.5% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot -0.5 - y\right) + \log y \cdot x\right) - t \]
    9. associate-*l*99.3%

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

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

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

Alternative 6: 90.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-76} \lor \neg \left(x \leq 1.3 \cdot 10^{-43}\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 -3.5e-76) (not (<= x 1.3e-43)))
   (- (* x (log y)) t)
   (- (* z (log1p (- y))) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.5e-76) || !(x <= 1.3e-43)) {
		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 <= -3.5e-76) || !(x <= 1.3e-43)) {
		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 <= -3.5e-76) or not (x <= 1.3e-43):
		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 <= -3.5e-76) || !(x <= 1.3e-43))
		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, -3.5e-76], N[Not[LessEqual[x, 1.3e-43]], $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 -3.5 \cdot 10^{-76} \lor \neg \left(x \leq 1.3 \cdot 10^{-43}\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 < -3.49999999999999997e-76 or 1.3e-43 < x

    1. Initial program 93.8%

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

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

    if -3.49999999999999997e-76 < x < 1.3e-43

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

Alternative 7: 90.0% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{-43}:\\
\;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\

\mathbf{else}:\\
\;\;\;\;x \cdot \log y - t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.99999999999999927e-77

    1. Initial program 94.2%

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

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

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

    if -9.99999999999999927e-77 < x < 1.2000000000000001e-43

    1. Initial program 70.4%

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

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

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

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

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

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

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

    if 1.2000000000000001e-43 < x

    1. Initial program 93.4%

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

      \[\leadsto \color{blue}{\log y \cdot x - t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-76}:\\ \;\;\;\;\left(-t\right) - x \cdot \log \left(\frac{1}{y}\right)\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-43}:\\ \;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y - t\\ \end{array} \]

Alternative 8: 89.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{-77} \lor \neg \left(x \leq 1.2 \cdot 10^{-43}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -6.5e-77) (not (<= x 1.2e-43)))
   (- (* x (log y)) t)
   (- (fma y z t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -6.5e-77) || !(x <= 1.2e-43)) {
		tmp = (x * log(y)) - t;
	} else {
		tmp = -fma(y, z, t);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -6.5e-77) || !(x <= 1.2e-43))
		tmp = Float64(Float64(x * log(y)) - t);
	else
		tmp = Float64(-fma(y, z, t));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -6.5e-77], N[Not[LessEqual[x, 1.2e-43]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], (-N[(y * z + t), $MachinePrecision])]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-77} \lor \neg \left(x \leq 1.2 \cdot 10^{-43}\right):\\
\;\;\;\;x \cdot \log y - t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4999999999999999e-77 or 1.2000000000000001e-43 < x

    1. Initial program 93.8%

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

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

    if -6.4999999999999999e-77 < x < 1.2000000000000001e-43

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{-77} \lor \neg \left(x \leq 1.2 \cdot 10^{-43}\right):\\ \;\;\;\;x \cdot \log y - t\\ \mathbf{else}:\\ \;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\ \end{array} \]

Alternative 9: 99.2% 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 84.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot \log y - y \cdot z\right)} - t \]
    5. *-commutative99.0%

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

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

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

Alternative 10: 48.7% accurate, 26.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-20}:\\
\;\;\;\;-t\\

\mathbf{elif}\;t \leq 1.26 \cdot 10^{-34}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{else}:\\
\;\;\;\;-t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.99999999999999956e-20 or 1.26000000000000009e-34 < t

    1. Initial program 94.9%

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

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

        \[\leadsto \color{blue}{-t} \]
    4. Simplified72.5%

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

    if -7.99999999999999956e-20 < t < 1.26000000000000009e-34

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-20}:\\ \;\;\;\;-t\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;-t\\ \end{array} \]

Alternative 11: 57.1% 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 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 43.0% 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 84.2%

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

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

      \[\leadsto \color{blue}{-t} \]
  4. Simplified44.3%

    \[\leadsto \color{blue}{-t} \]
  5. Final simplification44.3%

    \[\leadsto -t \]

Alternative 13: 2.3% accurate, 211.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 84.2%

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

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

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

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

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

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

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

      \[\leadsto \log y \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} + \mathsf{fma}\left(z, \mathsf{log1p}\left(-y\right), -t\right) \]
    8. associate-*r*51.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(-y\right), -t\right)\right)} \]
    10. add-sqr-sqrt0.0%

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

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

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

      \[\leadsto \mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(\color{blue}{\sqrt{y} \cdot \sqrt{y}}\right), -t\right)\right) \]
    14. add-sqr-sqrt42.2%

      \[\leadsto \mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(\color{blue}{y}\right), -t\right)\right) \]
    15. add-sqr-sqrt20.7%

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

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

      \[\leadsto \mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(y\right), \sqrt{\color{blue}{t \cdot t}}\right)\right) \]
    18. sqrt-unprod10.6%

      \[\leadsto \mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(y\right), \color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)\right) \]
    19. add-sqr-sqrt19.7%

      \[\leadsto \mathsf{fma}\left(\log y \cdot \sqrt{x}, \sqrt{x}, \mathsf{fma}\left(z, \mathsf{log1p}\left(y\right), \color{blue}{t}\right)\right) \]
  3. Applied egg-rr19.7%

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification2.2%

    \[\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 2023200 
(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))