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

Percentage Accurate: 99.9% → 99.9%
Time: 10.5s
Alternatives: 11
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 11 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, 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}
Derivation
  1. Initial program 99.8%

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

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

Alternative 2: 89.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t - \left(y + z\right)\\ t_2 := \log t + x \cdot \log y\\ t_3 := t_2 - z\\ \mathbf{if}\;y \leq 2.5 \cdot 10^{+21}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+77}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 - y\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (log t) (+ y z)))
        (t_2 (+ (log t) (* x (log y))))
        (t_3 (- t_2 z)))
   (if (<= y 2.5e+21)
     t_3
     (if (<= y 4.4e+49)
       t_1
       (if (<= y 6.5e+77) t_3 (if (<= y 2.2e+175) t_1 (- t_2 y)))))))
double code(double x, double y, double z, double t) {
	double t_1 = log(t) - (y + z);
	double t_2 = log(t) + (x * log(y));
	double t_3 = t_2 - z;
	double tmp;
	if (y <= 2.5e+21) {
		tmp = t_3;
	} else if (y <= 4.4e+49) {
		tmp = t_1;
	} else if (y <= 6.5e+77) {
		tmp = t_3;
	} else if (y <= 2.2e+175) {
		tmp = t_1;
	} else {
		tmp = t_2 - 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = log(t) - (y + z)
    t_2 = log(t) + (x * log(y))
    t_3 = t_2 - z
    if (y <= 2.5d+21) then
        tmp = t_3
    else if (y <= 4.4d+49) then
        tmp = t_1
    else if (y <= 6.5d+77) then
        tmp = t_3
    else if (y <= 2.2d+175) then
        tmp = t_1
    else
        tmp = t_2 - 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) - (y + z);
	double t_2 = Math.log(t) + (x * Math.log(y));
	double t_3 = t_2 - z;
	double tmp;
	if (y <= 2.5e+21) {
		tmp = t_3;
	} else if (y <= 4.4e+49) {
		tmp = t_1;
	} else if (y <= 6.5e+77) {
		tmp = t_3;
	} else if (y <= 2.2e+175) {
		tmp = t_1;
	} else {
		tmp = t_2 - y;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.log(t) - (y + z)
	t_2 = math.log(t) + (x * math.log(y))
	t_3 = t_2 - z
	tmp = 0
	if y <= 2.5e+21:
		tmp = t_3
	elif y <= 4.4e+49:
		tmp = t_1
	elif y <= 6.5e+77:
		tmp = t_3
	elif y <= 2.2e+175:
		tmp = t_1
	else:
		tmp = t_2 - y
	return tmp
function code(x, y, z, t)
	t_1 = Float64(log(t) - Float64(y + z))
	t_2 = Float64(log(t) + Float64(x * log(y)))
	t_3 = Float64(t_2 - z)
	tmp = 0.0
	if (y <= 2.5e+21)
		tmp = t_3;
	elseif (y <= 4.4e+49)
		tmp = t_1;
	elseif (y <= 6.5e+77)
		tmp = t_3;
	elseif (y <= 2.2e+175)
		tmp = t_1;
	else
		tmp = Float64(t_2 - y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = log(t) - (y + z);
	t_2 = log(t) + (x * log(y));
	t_3 = t_2 - z;
	tmp = 0.0;
	if (y <= 2.5e+21)
		tmp = t_3;
	elseif (y <= 4.4e+49)
		tmp = t_1;
	elseif (y <= 6.5e+77)
		tmp = t_3;
	elseif (y <= 2.2e+175)
		tmp = t_1;
	else
		tmp = t_2 - y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - z), $MachinePrecision]}, If[LessEqual[y, 2.5e+21], t$95$3, If[LessEqual[y, 4.4e+49], t$95$1, If[LessEqual[y, 6.5e+77], t$95$3, If[LessEqual[y, 2.2e+175], t$95$1, N[(t$95$2 - y), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+77}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+175}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 2.5e21 or 4.4000000000000001e49 < y < 6.5e77

    1. Initial program 99.7%

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

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

    if 2.5e21 < y < 4.4000000000000001e49 or 6.5e77 < y < 2.1999999999999999e175

    1. Initial program 100.0%

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

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

    if 2.1999999999999999e175 < y

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.5 \cdot 10^{+21}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - z\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+49}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+77}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - z\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+175}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - y\\ \end{array} \]

Alternative 3: 89.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+14} \lor \neg \left(x \leq 6.5 \cdot 10^{+69}\right):\\
\;\;\;\;\left(\log t + x \cdot \log y\right) - y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.5e14 or 6.5000000000000001e69 < x

    1. Initial program 99.7%

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

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

    if -1.5e14 < x < 6.5000000000000001e69

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+14} \lor \neg \left(x \leq 6.5 \cdot 10^{+69}\right):\\ \;\;\;\;\left(\log t + x \cdot \log y\right) - y\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot -2 + \left(y + \log t\right)\right) - z\\ \end{array} \]

Alternative 4: 48.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.22 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-104}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-226}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq 3.05 \cdot 10^{-260}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+99}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -1.22e+26)
     t_1
     (if (<= x -1.8e-104)
       (- z)
       (if (<= x -1.8e-226)
         (- y)
         (if (<= x 3.05e-260) (- z) (if (<= x 3e+99) (- y) t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -1.22e+26) {
		tmp = t_1;
	} else if (x <= -1.8e-104) {
		tmp = -z;
	} else if (x <= -1.8e-226) {
		tmp = -y;
	} else if (x <= 3.05e-260) {
		tmp = -z;
	} else if (x <= 3e+99) {
		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 <= (-1.22d+26)) then
        tmp = t_1
    else if (x <= (-1.8d-104)) then
        tmp = -z
    else if (x <= (-1.8d-226)) then
        tmp = -y
    else if (x <= 3.05d-260) then
        tmp = -z
    else if (x <= 3d+99) 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 <= -1.22e+26) {
		tmp = t_1;
	} else if (x <= -1.8e-104) {
		tmp = -z;
	} else if (x <= -1.8e-226) {
		tmp = -y;
	} else if (x <= 3.05e-260) {
		tmp = -z;
	} else if (x <= 3e+99) {
		tmp = -y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -1.22e+26:
		tmp = t_1
	elif x <= -1.8e-104:
		tmp = -z
	elif x <= -1.8e-226:
		tmp = -y
	elif x <= 3.05e-260:
		tmp = -z
	elif x <= 3e+99:
		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 <= -1.22e+26)
		tmp = t_1;
	elseif (x <= -1.8e-104)
		tmp = Float64(-z);
	elseif (x <= -1.8e-226)
		tmp = Float64(-y);
	elseif (x <= 3.05e-260)
		tmp = Float64(-z);
	elseif (x <= 3e+99)
		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 <= -1.22e+26)
		tmp = t_1;
	elseif (x <= -1.8e-104)
		tmp = -z;
	elseif (x <= -1.8e-226)
		tmp = -y;
	elseif (x <= 3.05e-260)
		tmp = -z;
	elseif (x <= 3e+99)
		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, -1.22e+26], t$95$1, If[LessEqual[x, -1.8e-104], (-z), If[LessEqual[x, -1.8e-226], (-y), If[LessEqual[x, 3.05e-260], (-z), If[LessEqual[x, 3e+99], (-y), t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-104}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-226}:\\
\;\;\;\;-y\\

\mathbf{elif}\;x \leq 3.05 \cdot 10^{-260}:\\
\;\;\;\;-z\\

\mathbf{elif}\;x \leq 3 \cdot 10^{+99}:\\
\;\;\;\;-y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.2200000000000001e26 or 3.00000000000000014e99 < x

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot \log y - y\right) \cdot \left(x \cdot \log y - y\right) - z \cdot z}{\left(x \cdot \log y - y\right) + z}} + \log t \]
      2. clear-num18.5%

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

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

        \[\leadsto \frac{1}{\frac{x \cdot \log y - \left(y - z\right)}{\color{blue}{{\left(x \cdot \log y - y\right)}^{2}} - z \cdot z}} + \log t \]
    3. Applied egg-rr18.5%

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

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

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

    if -1.2200000000000001e26 < x < -1.7999999999999999e-104 or -1.79999999999999997e-226 < x < 3.0500000000000001e-260

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{-z} \]
    4. Simplified50.3%

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

    if -1.7999999999999999e-104 < x < -1.79999999999999997e-226 or 3.0500000000000001e-260 < x < 3.00000000000000014e99

    1. Initial program 100.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    6. Step-by-step derivation
      1. mul-1-neg49.7%

        \[\leadsto \color{blue}{-y} \]
    7. Simplified49.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{+26}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-104}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-226}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq 3.05 \cdot 10^{-260}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+99}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 5: 60.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t - y\\ t_2 := x \cdot \log y\\ t_3 := \log t - z\\ \mathbf{if}\;x \leq -9 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-104}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{-262}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+99}:\\ \;\;\;\;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))) (t_3 (- (log t) z)))
   (if (<= x -9e+25)
     t_2
     (if (<= x -7.5e-104)
       t_3
       (if (<= x -1.8e-226)
         t_1
         (if (<= x 9.8e-262) t_3 (if (<= x 6.5e+99) 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 t_3 = log(t) - z;
	double tmp;
	if (x <= -9e+25) {
		tmp = t_2;
	} else if (x <= -7.5e-104) {
		tmp = t_3;
	} else if (x <= -1.8e-226) {
		tmp = t_1;
	} else if (x <= 9.8e-262) {
		tmp = t_3;
	} else if (x <= 6.5e+99) {
		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) :: t_3
    real(8) :: tmp
    t_1 = log(t) - y
    t_2 = x * log(y)
    t_3 = log(t) - z
    if (x <= (-9d+25)) then
        tmp = t_2
    else if (x <= (-7.5d-104)) then
        tmp = t_3
    else if (x <= (-1.8d-226)) then
        tmp = t_1
    else if (x <= 9.8d-262) then
        tmp = t_3
    else if (x <= 6.5d+99) 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 t_3 = Math.log(t) - z;
	double tmp;
	if (x <= -9e+25) {
		tmp = t_2;
	} else if (x <= -7.5e-104) {
		tmp = t_3;
	} else if (x <= -1.8e-226) {
		tmp = t_1;
	} else if (x <= 9.8e-262) {
		tmp = t_3;
	} else if (x <= 6.5e+99) {
		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)
	t_3 = math.log(t) - z
	tmp = 0
	if x <= -9e+25:
		tmp = t_2
	elif x <= -7.5e-104:
		tmp = t_3
	elif x <= -1.8e-226:
		tmp = t_1
	elif x <= 9.8e-262:
		tmp = t_3
	elif x <= 6.5e+99:
		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))
	t_3 = Float64(log(t) - z)
	tmp = 0.0
	if (x <= -9e+25)
		tmp = t_2;
	elseif (x <= -7.5e-104)
		tmp = t_3;
	elseif (x <= -1.8e-226)
		tmp = t_1;
	elseif (x <= 9.8e-262)
		tmp = t_3;
	elseif (x <= 6.5e+99)
		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);
	t_3 = log(t) - z;
	tmp = 0.0;
	if (x <= -9e+25)
		tmp = t_2;
	elseif (x <= -7.5e-104)
		tmp = t_3;
	elseif (x <= -1.8e-226)
		tmp = t_1;
	elseif (x <= 9.8e-262)
		tmp = t_3;
	elseif (x <= 6.5e+99)
		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]}, Block[{t$95$3 = N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[x, -9e+25], t$95$2, If[LessEqual[x, -7.5e-104], t$95$3, If[LessEqual[x, -1.8e-226], t$95$1, If[LessEqual[x, 9.8e-262], t$95$3, If[LessEqual[x, 6.5e+99], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log t - y\\
t_2 := x \cdot \log y\\
t_3 := \log t - z\\
\mathbf{if}\;x \leq -9 \cdot 10^{+25}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-104}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;x \leq 9.8 \cdot 10^{-262}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{+99}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.0000000000000006e25 or 6.5000000000000004e99 < x

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot \log y - y\right) \cdot \left(x \cdot \log y - y\right) - z \cdot z}{\left(x \cdot \log y - y\right) + z}} + \log t \]
      2. clear-num18.5%

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

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

        \[\leadsto \frac{1}{\frac{x \cdot \log y - \left(y - z\right)}{\color{blue}{{\left(x \cdot \log y - y\right)}^{2}} - z \cdot z}} + \log t \]
    3. Applied egg-rr18.5%

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

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

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

    if -9.0000000000000006e25 < x < -7.5e-104 or -1.79999999999999997e-226 < x < 9.8000000000000005e-262

    1. Initial program 100.0%

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

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

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

    if -7.5e-104 < x < -1.79999999999999997e-226 or 9.8000000000000005e-262 < x < 6.5000000000000004e99

    1. Initial program 100.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y} + \log t \]
    6. Step-by-step derivation
      1. neg-mul-172.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9 \cdot 10^{+25}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-104}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-226}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{-262}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+99}:\\ \;\;\;\;\log t - y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 6: 83.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.72 \cdot 10^{+186} \lor \neg \left(x \leq 3.3 \cdot 10^{+169}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.72e186 or 3.2999999999999997e169 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -1.72e186 < x < 3.2999999999999997e169

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.72 \cdot 10^{+186} \lor \neg \left(x \leq 3.3 \cdot 10^{+169}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot -2 + \left(y + \log t\right)\right) - z\\ \end{array} \]

Alternative 7: 59.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \log t - z\\
\mathbf{if}\;y \leq 1.15 \cdot 10^{-275}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5 \cdot 10^{-229}:\\
\;\;\;\;x \cdot \log y\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 1.14999999999999995e-275 or 5.00000000000000016e-229 < y < 1.19999999999999999e27

    1. Initial program 99.8%

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

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

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

    if 1.14999999999999995e-275 < y < 5.00000000000000016e-229

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if 1.19999999999999999e27 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    6. Step-by-step derivation
      1. mul-1-neg66.4%

        \[\leadsto \color{blue}{-y} \]
    7. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.15 \cdot 10^{-275}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+27}:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \]

Alternative 8: 83.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.3 \cdot 10^{+186} \lor \neg \left(x \leq 6.2 \cdot 10^{+168}\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 -8.3e+186) (not (<= x 6.2e+168)))
   (* x (log y))
   (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -8.3e+186) || !(x <= 6.2e+168)) {
		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 <= (-8.3d+186)) .or. (.not. (x <= 6.2d+168))) 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 <= -8.3e+186) || !(x <= 6.2e+168)) {
		tmp = x * Math.log(y);
	} else {
		tmp = Math.log(t) - (y + z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -8.3e+186) or not (x <= 6.2e+168):
		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 <= -8.3e+186) || !(x <= 6.2e+168))
		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 <= -8.3e+186) || ~((x <= 6.2e+168)))
		tmp = x * log(y);
	else
		tmp = log(t) - (y + z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.3e+186], N[Not[LessEqual[x, 6.2e+168]], $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 -8.3 \cdot 10^{+186} \lor \neg \left(x \leq 6.2 \cdot 10^{+168}\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 < -8.3000000000000003e186 or 6.19999999999999993e168 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -8.3000000000000003e186 < x < 6.19999999999999993e168

    1. Initial program 99.9%

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

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

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

Alternative 9: 46.1% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3 \cdot 10^{-175}:\\
\;\;\;\;-z\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-38}:\\
\;\;\;\;\log t\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+27}:\\
\;\;\;\;-z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 3e-175 or 1.49999999999999994e-38 < y < 1.4e27

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{-z} \]
    4. Simplified43.0%

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

    if 3e-175 < y < 1.49999999999999994e-38

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{\log t - z} \]
    4. Taylor expanded in z around 0 38.6%

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

    if 1.4e27 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    6. Step-by-step derivation
      1. mul-1-neg66.4%

        \[\leadsto \color{blue}{-y} \]
    7. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3 \cdot 10^{-175}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-38}:\\ \;\;\;\;\log t\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+27}:\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \]

Alternative 10: 48.8% accurate, 51.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{+27}:\\
\;\;\;\;-z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.30000000000000004e27

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{-z} \]
    4. Simplified33.9%

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

    if 1.30000000000000004e27 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y} \]
    6. Step-by-step derivation
      1. mul-1-neg66.4%

        \[\leadsto \color{blue}{-y} \]
    7. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.3 \cdot 10^{+27}:\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \]

Alternative 11: 30.4% 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. Step-by-step derivation
    1. flip--42.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-y} \]
  7. Simplified31.2%

    \[\leadsto \color{blue}{-y} \]
  8. Final simplification31.2%

    \[\leadsto -y \]

Reproduce

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