Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A

Percentage Accurate: 99.9% → 99.9%
Time: 9.9s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 99.9% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+32} \lor \neg \left(z \leq 1.25 \cdot 10^{+76}\right):\\
\;\;\;\;\log t - \left(y + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4500000000000001e32 or 1.24999999999999998e76 < z

    1. Initial program 99.9%

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

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

    if -2.4500000000000001e32 < z < 1.24999999999999998e76

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+32} \lor \neg \left(z \leq 1.25 \cdot 10^{+76}\right):\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - y\\ \end{array} \]

Alternative 3: 90.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t + x \cdot \log y\\ \mathbf{if}\;x \leq -7.8 \cdot 10^{+66}:\\ \;\;\;\;t_1 - z\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+40}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 - y\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (log t) (* x (log y)))))
   (if (<= x -7.8e+66)
     (- t_1 z)
     (if (<= x 2e+40) (- (log t) (+ y z)) (- t_1 y)))))
double code(double x, double y, double z, double t) {
	double t_1 = log(t) + (x * log(y));
	double tmp;
	if (x <= -7.8e+66) {
		tmp = t_1 - z;
	} else if (x <= 2e+40) {
		tmp = log(t) - (y + z);
	} else {
		tmp = t_1 - y;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = log(t) + (x * log(y))
    if (x <= (-7.8d+66)) then
        tmp = t_1 - z
    else if (x <= 2d+40) then
        tmp = log(t) - (y + z)
    else
        tmp = t_1 - y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.log(t) + (x * Math.log(y));
	double tmp;
	if (x <= -7.8e+66) {
		tmp = t_1 - z;
	} else if (x <= 2e+40) {
		tmp = Math.log(t) - (y + z);
	} else {
		tmp = t_1 - y;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.log(t) + (x * math.log(y))
	tmp = 0
	if x <= -7.8e+66:
		tmp = t_1 - z
	elif x <= 2e+40:
		tmp = math.log(t) - (y + z)
	else:
		tmp = t_1 - y
	return tmp
function code(x, y, z, t)
	t_1 = Float64(log(t) + Float64(x * log(y)))
	tmp = 0.0
	if (x <= -7.8e+66)
		tmp = Float64(t_1 - z);
	elseif (x <= 2e+40)
		tmp = Float64(log(t) - Float64(y + z));
	else
		tmp = Float64(t_1 - y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = log(t) + (x * log(y));
	tmp = 0.0;
	if (x <= -7.8e+66)
		tmp = t_1 - z;
	elseif (x <= 2e+40)
		tmp = log(t) - (y + z);
	else
		tmp = t_1 - y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+66], N[(t$95$1 - z), $MachinePrecision], If[LessEqual[x, 2e+40], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - y), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t + x \cdot \log y\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+66}:\\
\;\;\;\;t_1 - z\\

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

\mathbf{else}:\\
\;\;\;\;t_1 - y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.8000000000000007e66

    1. Initial program 99.6%

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

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

    if -7.8000000000000007e66 < x < 2.00000000000000006e40

    1. Initial program 100.0%

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

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

    if 2.00000000000000006e40 < x

    1. Initial program 99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+66}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - z\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+40}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - y\\ \end{array} \]

Alternative 4: 99.9% accurate, 1.0× speedup?

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

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

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
  2. Final simplification99.8%

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

Alternative 5: 48.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-306}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-261}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{+71}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -8.5e+115)
     t_1
     (if (<= x -1.85e+83)
       (- z)
       (if (<= x -2.4e+62)
         t_1
         (if (<= x -8.5e-306)
           (- y)
           (if (<= x 1.4e-261) (- z) (if (<= x 7.4e+71) (- y) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -8.5e+115) {
		tmp = t_1;
	} else if (x <= -1.85e+83) {
		tmp = -z;
	} else if (x <= -2.4e+62) {
		tmp = t_1;
	} else if (x <= -8.5e-306) {
		tmp = -y;
	} else if (x <= 1.4e-261) {
		tmp = -z;
	} else if (x <= 7.4e+71) {
		tmp = -y;
	} else {
		tmp = t_1;
	}
	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 <= (-8.5d+115)) then
        tmp = t_1
    else if (x <= (-1.85d+83)) then
        tmp = -z
    else if (x <= (-2.4d+62)) then
        tmp = t_1
    else if (x <= (-8.5d-306)) then
        tmp = -y
    else if (x <= 1.4d-261) then
        tmp = -z
    else if (x <= 7.4d+71) then
        tmp = -y
    else
        tmp = t_1
    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 <= -8.5e+115) {
		tmp = t_1;
	} else if (x <= -1.85e+83) {
		tmp = -z;
	} else if (x <= -2.4e+62) {
		tmp = t_1;
	} else if (x <= -8.5e-306) {
		tmp = -y;
	} else if (x <= 1.4e-261) {
		tmp = -z;
	} else if (x <= 7.4e+71) {
		tmp = -y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -8.5e+115:
		tmp = t_1
	elif x <= -1.85e+83:
		tmp = -z
	elif x <= -2.4e+62:
		tmp = t_1
	elif x <= -8.5e-306:
		tmp = -y
	elif x <= 1.4e-261:
		tmp = -z
	elif x <= 7.4e+71:
		tmp = -y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -8.5e+115)
		tmp = t_1;
	elseif (x <= -1.85e+83)
		tmp = Float64(-z);
	elseif (x <= -2.4e+62)
		tmp = t_1;
	elseif (x <= -8.5e-306)
		tmp = Float64(-y);
	elseif (x <= 1.4e-261)
		tmp = Float64(-z);
	elseif (x <= 7.4e+71)
		tmp = Float64(-y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * log(y);
	tmp = 0.0;
	if (x <= -8.5e+115)
		tmp = t_1;
	elseif (x <= -1.85e+83)
		tmp = -z;
	elseif (x <= -2.4e+62)
		tmp = t_1;
	elseif (x <= -8.5e-306)
		tmp = -y;
	elseif (x <= 1.4e-261)
		tmp = -z;
	elseif (x <= 7.4e+71)
		tmp = -y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+115], t$95$1, If[LessEqual[x, -1.85e+83], (-z), If[LessEqual[x, -2.4e+62], t$95$1, If[LessEqual[x, -8.5e-306], (-y), If[LessEqual[x, 1.4e-261], (-z), If[LessEqual[x, 7.4e+71], (-y), t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq -2.4 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -8.5 \cdot 10^{-306}:\\
\;\;\;\;-y\\

\mathbf{elif}\;x \leq 1.4 \cdot 10^{-261}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq 7.4 \cdot 10^{+71}:\\
\;\;\;\;-y\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.50000000000000057e115 or -1.8500000000000001e83 < x < -2.4e62 or 7.4e71 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{\log y}\right)}^{2}}, \sqrt[3]{\log y} \cdot x, -\left(\left(y + z\right) - \log t\right)\right) \]
    3. Applied egg-rr98.6%

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(\log y \cdot x\right)} \]
    5. Step-by-step derivation
      1. pow-base-176.5%

        \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) \]
      2. *-lft-identity76.5%

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

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

    if -8.50000000000000057e115 < x < -1.8500000000000001e83 or -8.5000000000000002e-306 < x < 1.40000000000000005e-261

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. neg-mul-173.2%

        \[\leadsto \color{blue}{-z} \]
    4. Simplified73.2%

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

    if -2.4e62 < x < -8.5000000000000002e-306 or 1.40000000000000005e-261 < x < 7.4e71

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    3. Step-by-step derivation
      1. neg-mul-145.3%

        \[\leadsto \color{blue}{-y} \]
    4. Simplified45.3%

      \[\leadsto \color{blue}{-y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-306}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-261}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{+71}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 6: 59.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t - y\\ t_2 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{+116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-262}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (log t) y)) (t_2 (* x (log y))))
   (if (<= x -1.3e+116)
     t_2
     (if (<= x -1.4e+83)
       (- z)
       (if (<= x -1.6e+62)
         t_2
         (if (<= x -5.3e-306)
           t_1
           (if (<= x 1.5e-262) (- z) (if (<= x 9.5e+70) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = log(t) - y;
	double t_2 = x * log(y);
	double tmp;
	if (x <= -1.3e+116) {
		tmp = t_2;
	} else if (x <= -1.4e+83) {
		tmp = -z;
	} else if (x <= -1.6e+62) {
		tmp = t_2;
	} else if (x <= -5.3e-306) {
		tmp = t_1;
	} else if (x <= 1.5e-262) {
		tmp = -z;
	} else if (x <= 9.5e+70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = log(t) - y
    t_2 = x * log(y)
    if (x <= (-1.3d+116)) then
        tmp = t_2
    else if (x <= (-1.4d+83)) then
        tmp = -z
    else if (x <= (-1.6d+62)) then
        tmp = t_2
    else if (x <= (-5.3d-306)) then
        tmp = t_1
    else if (x <= 1.5d-262) then
        tmp = -z
    else if (x <= 9.5d+70) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.log(t) - y;
	double t_2 = x * Math.log(y);
	double tmp;
	if (x <= -1.3e+116) {
		tmp = t_2;
	} else if (x <= -1.4e+83) {
		tmp = -z;
	} else if (x <= -1.6e+62) {
		tmp = t_2;
	} else if (x <= -5.3e-306) {
		tmp = t_1;
	} else if (x <= 1.5e-262) {
		tmp = -z;
	} else if (x <= 9.5e+70) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.log(t) - y
	t_2 = x * math.log(y)
	tmp = 0
	if x <= -1.3e+116:
		tmp = t_2
	elif x <= -1.4e+83:
		tmp = -z
	elif x <= -1.6e+62:
		tmp = t_2
	elif x <= -5.3e-306:
		tmp = t_1
	elif x <= 1.5e-262:
		tmp = -z
	elif x <= 9.5e+70:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(log(t) - y)
	t_2 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -1.3e+116)
		tmp = t_2;
	elseif (x <= -1.4e+83)
		tmp = Float64(-z);
	elseif (x <= -1.6e+62)
		tmp = t_2;
	elseif (x <= -5.3e-306)
		tmp = t_1;
	elseif (x <= 1.5e-262)
		tmp = Float64(-z);
	elseif (x <= 9.5e+70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = log(t) - y;
	t_2 = x * log(y);
	tmp = 0.0;
	if (x <= -1.3e+116)
		tmp = t_2;
	elseif (x <= -1.4e+83)
		tmp = -z;
	elseif (x <= -1.6e+62)
		tmp = t_2;
	elseif (x <= -5.3e-306)
		tmp = t_1;
	elseif (x <= 1.5e-262)
		tmp = -z;
	elseif (x <= 9.5e+70)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e+116], t$95$2, If[LessEqual[x, -1.4e+83], (-z), If[LessEqual[x, -1.6e+62], t$95$2, If[LessEqual[x, -5.3e-306], t$95$1, If[LessEqual[x, 1.5e-262], (-z), If[LessEqual[x, 9.5e+70], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t - y\\
t_2 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+116}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{+83}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq -1.6 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -5.3 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{-262}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.29999999999999993e116 or -1.4e83 < x < -1.59999999999999992e62 or 9.5000000000000002e70 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{\log y}\right)}^{2}}, \sqrt[3]{\log y} \cdot x, -\left(\left(y + z\right) - \log t\right)\right) \]
    3. Applied egg-rr98.6%

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(\log y \cdot x\right)} \]
    5. Step-by-step derivation
      1. pow-base-176.5%

        \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) \]
      2. *-lft-identity76.5%

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

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

    if -1.29999999999999993e116 < x < -1.4e83 or -5.2999999999999998e-306 < x < 1.50000000000000009e-262

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. neg-mul-173.2%

        \[\leadsto \color{blue}{-z} \]
    4. Simplified73.2%

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

    if -1.59999999999999992e62 < x < -5.2999999999999998e-306 or 1.50000000000000009e-262 < x < 9.5000000000000002e70

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{\log t} - y \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+116}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-306}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-262}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+70}:\\ \;\;\;\;\log t - y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 7: 60.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t - y\\ t_2 := x \cdot \log y\\ \mathbf{if}\;x \leq -8.2 \cdot 10^{+115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-258}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (log t) y)) (t_2 (* x (log y))))
   (if (<= x -8.2e+115)
     t_2
     (if (<= x -1.85e+83)
       (- z)
       (if (<= x -3.7e+62)
         t_2
         (if (<= x -6.5e-306)
           t_1
           (if (<= x 7e-258) (- (log t) z) (if (<= x 1.1e+71) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = log(t) - y;
	double t_2 = x * log(y);
	double tmp;
	if (x <= -8.2e+115) {
		tmp = t_2;
	} else if (x <= -1.85e+83) {
		tmp = -z;
	} else if (x <= -3.7e+62) {
		tmp = t_2;
	} else if (x <= -6.5e-306) {
		tmp = t_1;
	} else if (x <= 7e-258) {
		tmp = log(t) - z;
	} else if (x <= 1.1e+71) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = log(t) - y
    t_2 = x * log(y)
    if (x <= (-8.2d+115)) then
        tmp = t_2
    else if (x <= (-1.85d+83)) then
        tmp = -z
    else if (x <= (-3.7d+62)) then
        tmp = t_2
    else if (x <= (-6.5d-306)) then
        tmp = t_1
    else if (x <= 7d-258) then
        tmp = log(t) - z
    else if (x <= 1.1d+71) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.log(t) - y;
	double t_2 = x * Math.log(y);
	double tmp;
	if (x <= -8.2e+115) {
		tmp = t_2;
	} else if (x <= -1.85e+83) {
		tmp = -z;
	} else if (x <= -3.7e+62) {
		tmp = t_2;
	} else if (x <= -6.5e-306) {
		tmp = t_1;
	} else if (x <= 7e-258) {
		tmp = Math.log(t) - z;
	} else if (x <= 1.1e+71) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.log(t) - y
	t_2 = x * math.log(y)
	tmp = 0
	if x <= -8.2e+115:
		tmp = t_2
	elif x <= -1.85e+83:
		tmp = -z
	elif x <= -3.7e+62:
		tmp = t_2
	elif x <= -6.5e-306:
		tmp = t_1
	elif x <= 7e-258:
		tmp = math.log(t) - z
	elif x <= 1.1e+71:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(log(t) - y)
	t_2 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -8.2e+115)
		tmp = t_2;
	elseif (x <= -1.85e+83)
		tmp = Float64(-z);
	elseif (x <= -3.7e+62)
		tmp = t_2;
	elseif (x <= -6.5e-306)
		tmp = t_1;
	elseif (x <= 7e-258)
		tmp = Float64(log(t) - z);
	elseif (x <= 1.1e+71)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = log(t) - y;
	t_2 = x * log(y);
	tmp = 0.0;
	if (x <= -8.2e+115)
		tmp = t_2;
	elseif (x <= -1.85e+83)
		tmp = -z;
	elseif (x <= -3.7e+62)
		tmp = t_2;
	elseif (x <= -6.5e-306)
		tmp = t_1;
	elseif (x <= 7e-258)
		tmp = log(t) - z;
	elseif (x <= 1.1e+71)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+115], t$95$2, If[LessEqual[x, -1.85e+83], (-z), If[LessEqual[x, -3.7e+62], t$95$2, If[LessEqual[x, -6.5e-306], t$95$1, If[LessEqual[x, 7e-258], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], If[LessEqual[x, 1.1e+71], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t - y\\
t_2 := x \cdot \log y\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq -3.7 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 7 \cdot 10^{-258}:\\
\;\;\;\;\log t - z\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.19999999999999925e115 or -1.8500000000000001e83 < x < -3.70000000000000014e62 or 1.09999999999999997e71 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{\log y}\right)}^{2}}, \sqrt[3]{\log y} \cdot x, -\left(\left(y + z\right) - \log t\right)\right) \]
    3. Applied egg-rr98.6%

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(\log y \cdot x\right)} \]
    5. Step-by-step derivation
      1. pow-base-176.5%

        \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) \]
      2. *-lft-identity76.5%

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

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

    if -8.19999999999999925e115 < x < -1.8500000000000001e83

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. neg-mul-167.8%

        \[\leadsto \color{blue}{-z} \]
    4. Simplified67.8%

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

    if -3.70000000000000014e62 < x < -6.5000000000000004e-306 or 7.00000000000000003e-258 < x < 1.09999999999999997e71

    1. Initial program 100.0%

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

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

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

    if -6.5000000000000004e-306 < x < 7.00000000000000003e-258

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log t - z} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification73.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+83}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-306}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-258}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+71}:\\ \;\;\;\;\log t - y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 8: 84.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+125} \lor \neg \left(x \leq 4.2 \cdot 10^{+135}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.49999999999999981e125 or 4.20000000000000019e135 < x

    1. Initial program 99.6%

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

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

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

        \[\leadsto \color{blue}{\log y \cdot x} - \left(\left(y + z\right) - \log t\right) \]
      4. add-cube-cbrt98.4%

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

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

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

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

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(\log y \cdot x\right)} \]
    5. Step-by-step derivation
      1. pow-base-182.5%

        \[\leadsto \color{blue}{1} \cdot \left(\log y \cdot x\right) \]
      2. *-lft-identity82.5%

        \[\leadsto \color{blue}{\log y \cdot x} \]
    6. Simplified82.5%

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

    if -2.49999999999999981e125 < x < 4.20000000000000019e135

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+125} \lor \neg \left(x \leq 4.2 \cdot 10^{+135}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \end{array} \]

Alternative 9: 89.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+127} \lor \neg \left(x \leq 4.3 \cdot 10^{+36}\right):\\
\;\;\;\;x \cdot \log y - y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.2000000000000007e127 or 4.30000000000000005e36 < x

    1. Initial program 99.6%

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

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

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

    if -9.2000000000000007e127 < x < 4.30000000000000005e36

    1. Initial program 100.0%

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

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

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

Alternative 10: 46.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+34}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-24}:\\ \;\;\;\;-y\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-254}:\\ \;\;\;\;\log t\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+74}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.7e+34)
   (- z)
   (if (<= z -9.6e-24)
     (- y)
     (if (<= z -1.52e-254) (log t) (if (<= z 7.8e+74) (- y) (- z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.7e+34) {
		tmp = -z;
	} else if (z <= -9.6e-24) {
		tmp = -y;
	} else if (z <= -1.52e-254) {
		tmp = log(t);
	} else if (z <= 7.8e+74) {
		tmp = -y;
	} else {
		tmp = -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 (z <= (-2.7d+34)) then
        tmp = -z
    else if (z <= (-9.6d-24)) then
        tmp = -y
    else if (z <= (-1.52d-254)) then
        tmp = log(t)
    else if (z <= 7.8d+74) then
        tmp = -y
    else
        tmp = -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.7e+34) {
		tmp = -z;
	} else if (z <= -9.6e-24) {
		tmp = -y;
	} else if (z <= -1.52e-254) {
		tmp = Math.log(t);
	} else if (z <= 7.8e+74) {
		tmp = -y;
	} else {
		tmp = -z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.7e+34:
		tmp = -z
	elif z <= -9.6e-24:
		tmp = -y
	elif z <= -1.52e-254:
		tmp = math.log(t)
	elif z <= 7.8e+74:
		tmp = -y
	else:
		tmp = -z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.7e+34)
		tmp = Float64(-z);
	elseif (z <= -9.6e-24)
		tmp = Float64(-y);
	elseif (z <= -1.52e-254)
		tmp = log(t);
	elseif (z <= 7.8e+74)
		tmp = Float64(-y);
	else
		tmp = Float64(-z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.7e+34)
		tmp = -z;
	elseif (z <= -9.6e-24)
		tmp = -y;
	elseif (z <= -1.52e-254)
		tmp = log(t);
	elseif (z <= 7.8e+74)
		tmp = -y;
	else
		tmp = -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.7e+34], (-z), If[LessEqual[z, -9.6e-24], (-y), If[LessEqual[z, -1.52e-254], N[Log[t], $MachinePrecision], If[LessEqual[z, 7.8e+74], (-y), (-z)]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+34}:\\
\;\;\;\;-z\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-24}:\\
\;\;\;\;-y\\

\mathbf{elif}\;z \leq -1.52 \cdot 10^{-254}:\\
\;\;\;\;\log t\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+74}:\\
\;\;\;\;-y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7e34 or 7.80000000000000015e74 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. neg-mul-164.7%

        \[\leadsto \color{blue}{-z} \]
    4. Simplified64.7%

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

    if -2.7e34 < z < -9.5999999999999993e-24 or -1.52e-254 < z < 7.80000000000000015e74

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    3. Step-by-step derivation
      1. neg-mul-139.3%

        \[\leadsto \color{blue}{-y} \]
    4. Simplified39.3%

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

    if -9.5999999999999993e-24 < z < -1.52e-254

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log y \cdot x + \log t} \]
    6. Taylor expanded in x around 0 38.4%

      \[\leadsto \color{blue}{\log t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+34}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-24}:\\ \;\;\;\;-y\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-254}:\\ \;\;\;\;\log t\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+74}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]

Alternative 11: 49.0% accurate, 34.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+34}:\\
\;\;\;\;-z\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+74}:\\
\;\;\;\;-y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.8000000000000005e34 or 4.99999999999999963e74 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. neg-mul-164.7%

        \[\leadsto \color{blue}{-z} \]
    4. Simplified64.7%

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

    if -9.8000000000000005e34 < z < 4.99999999999999963e74

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    3. Step-by-step derivation
      1. neg-mul-135.8%

        \[\leadsto \color{blue}{-y} \]
    4. Simplified35.8%

      \[\leadsto \color{blue}{-y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+34}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+74}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]

Alternative 12: 30.3% accurate, 104.5× speedup?

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

\\
-y
\end{array}
Derivation
  1. Initial program 99.8%

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

    \[\leadsto \color{blue}{-1 \cdot y} \]
  3. Step-by-step derivation
    1. neg-mul-130.1%

      \[\leadsto \color{blue}{-y} \]
  4. Simplified30.1%

    \[\leadsto \color{blue}{-y} \]
  5. Final simplification30.1%

    \[\leadsto -y \]

Reproduce

?
herbie shell --seed 2023238 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (- (* x (log y)) y) z) (log t)))