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

Percentage Accurate: 99.9% → 99.9%
Time: 13.2s
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 - z\right) - y \end{array} \]
(FPCore (x y z t) :precision binary64 (- (fma x (log y) (- (log t) z)) y))
double code(double x, double y, double z, double t) {
	return fma(x, log(y), (log(t) - z)) - y;
}
function code(x, y, z, t)
	return Float64(fma(x, log(y), Float64(log(t) - z)) - y)
end
code[x_, y_, z_, t_] := N[(N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\log t + \left(-z\right)}\right) - y \]
    13. unsub-neg99.9%

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

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

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

Alternative 2: 99.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.00000000000000008e-5

    1. Initial program 99.8%

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

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

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

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

    if 3.00000000000000008e-5 < y

    1. Initial program 99.9%

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

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

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

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

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

Alternative 3: 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.9%

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

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

Alternative 4: 69.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log t - y\\ t_2 := x \cdot \log y\\ t_3 := \left(-y\right) - z\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.18 \cdot 10^{-32}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-205}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-117}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+101}:\\ \;\;\;\;t_3\\ \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 (- (- y) z)))
   (if (<= x -3.5e+68)
     t_2
     (if (<= x -1.18e-32)
       t_3
       (if (<= x -1.3e-152)
         t_1
         (if (<= x 6.2e-205)
           t_3
           (if (<= x 5.8e-117) t_1 (if (<= x 6.5e+101) t_3 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 = -y - z;
	double tmp;
	if (x <= -3.5e+68) {
		tmp = t_2;
	} else if (x <= -1.18e-32) {
		tmp = t_3;
	} else if (x <= -1.3e-152) {
		tmp = t_1;
	} else if (x <= 6.2e-205) {
		tmp = t_3;
	} else if (x <= 5.8e-117) {
		tmp = t_1;
	} else if (x <= 6.5e+101) {
		tmp = t_3;
	} 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 = -y - z
    if (x <= (-3.5d+68)) then
        tmp = t_2
    else if (x <= (-1.18d-32)) then
        tmp = t_3
    else if (x <= (-1.3d-152)) then
        tmp = t_1
    else if (x <= 6.2d-205) then
        tmp = t_3
    else if (x <= 5.8d-117) then
        tmp = t_1
    else if (x <= 6.5d+101) then
        tmp = t_3
    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 = -y - z;
	double tmp;
	if (x <= -3.5e+68) {
		tmp = t_2;
	} else if (x <= -1.18e-32) {
		tmp = t_3;
	} else if (x <= -1.3e-152) {
		tmp = t_1;
	} else if (x <= 6.2e-205) {
		tmp = t_3;
	} else if (x <= 5.8e-117) {
		tmp = t_1;
	} else if (x <= 6.5e+101) {
		tmp = t_3;
	} 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 = -y - z
	tmp = 0
	if x <= -3.5e+68:
		tmp = t_2
	elif x <= -1.18e-32:
		tmp = t_3
	elif x <= -1.3e-152:
		tmp = t_1
	elif x <= 6.2e-205:
		tmp = t_3
	elif x <= 5.8e-117:
		tmp = t_1
	elif x <= 6.5e+101:
		tmp = t_3
	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(Float64(-y) - z)
	tmp = 0.0
	if (x <= -3.5e+68)
		tmp = t_2;
	elseif (x <= -1.18e-32)
		tmp = t_3;
	elseif (x <= -1.3e-152)
		tmp = t_1;
	elseif (x <= 6.2e-205)
		tmp = t_3;
	elseif (x <= 5.8e-117)
		tmp = t_1;
	elseif (x <= 6.5e+101)
		tmp = t_3;
	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 = -y - z;
	tmp = 0.0;
	if (x <= -3.5e+68)
		tmp = t_2;
	elseif (x <= -1.18e-32)
		tmp = t_3;
	elseif (x <= -1.3e-152)
		tmp = t_1;
	elseif (x <= 6.2e-205)
		tmp = t_3;
	elseif (x <= 5.8e-117)
		tmp = t_1;
	elseif (x <= 6.5e+101)
		tmp = t_3;
	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[((-y) - z), $MachinePrecision]}, If[LessEqual[x, -3.5e+68], t$95$2, If[LessEqual[x, -1.18e-32], t$95$3, If[LessEqual[x, -1.3e-152], t$95$1, If[LessEqual[x, 6.2e-205], t$95$3, If[LessEqual[x, 5.8e-117], t$95$1, If[LessEqual[x, 6.5e+101], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.18 \cdot 10^{-32}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq -1.3 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-205}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{-117}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{+101}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.49999999999999977e68 or 6.50000000000000016e101 < x

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{\left(x \cdot \log y - y\right) - \left(z - \log t\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cube12.2%

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

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

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

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

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

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

    if -3.49999999999999977e68 < x < -1.17999999999999997e-32 or -1.30000000000000006e-152 < x < 6.19999999999999965e-205 or 5.8000000000000001e-117 < x < 6.50000000000000016e101

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -1.17999999999999997e-32 < x < -1.30000000000000006e-152 or 6.19999999999999965e-205 < x < 5.8000000000000001e-117

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.18 \cdot 10^{-32}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{-152}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-205}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-117}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+101}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 5: 68.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \left(-y\right) - z\\ \mathbf{if}\;x \leq -2.2 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-153}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-119}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))) (t_2 (- (- y) z)))
   (if (<= x -2.2e+68)
     t_1
     (if (<= x -1.35e-32)
       t_2
       (if (<= x -6e-153)
         (- (log t) y)
         (if (<= x 9.5e-248)
           t_2
           (if (<= x 2.2e-119)
             (- (log t) z)
             (if (<= x 1.1e+103) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double t_2 = -y - z;
	double tmp;
	if (x <= -2.2e+68) {
		tmp = t_1;
	} else if (x <= -1.35e-32) {
		tmp = t_2;
	} else if (x <= -6e-153) {
		tmp = log(t) - y;
	} else if (x <= 9.5e-248) {
		tmp = t_2;
	} else if (x <= 2.2e-119) {
		tmp = log(t) - z;
	} else if (x <= 1.1e+103) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * log(y)
    t_2 = -y - z
    if (x <= (-2.2d+68)) then
        tmp = t_1
    else if (x <= (-1.35d-32)) then
        tmp = t_2
    else if (x <= (-6d-153)) then
        tmp = log(t) - y
    else if (x <= 9.5d-248) then
        tmp = t_2
    else if (x <= 2.2d-119) then
        tmp = log(t) - z
    else if (x <= 1.1d+103) then
        tmp = t_2
    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 t_2 = -y - z;
	double tmp;
	if (x <= -2.2e+68) {
		tmp = t_1;
	} else if (x <= -1.35e-32) {
		tmp = t_2;
	} else if (x <= -6e-153) {
		tmp = Math.log(t) - y;
	} else if (x <= 9.5e-248) {
		tmp = t_2;
	} else if (x <= 2.2e-119) {
		tmp = Math.log(t) - z;
	} else if (x <= 1.1e+103) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * math.log(y)
	t_2 = -y - z
	tmp = 0
	if x <= -2.2e+68:
		tmp = t_1
	elif x <= -1.35e-32:
		tmp = t_2
	elif x <= -6e-153:
		tmp = math.log(t) - y
	elif x <= 9.5e-248:
		tmp = t_2
	elif x <= 2.2e-119:
		tmp = math.log(t) - z
	elif x <= 1.1e+103:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	t_2 = Float64(Float64(-y) - z)
	tmp = 0.0
	if (x <= -2.2e+68)
		tmp = t_1;
	elseif (x <= -1.35e-32)
		tmp = t_2;
	elseif (x <= -6e-153)
		tmp = Float64(log(t) - y);
	elseif (x <= 9.5e-248)
		tmp = t_2;
	elseif (x <= 2.2e-119)
		tmp = Float64(log(t) - z);
	elseif (x <= 1.1e+103)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * log(y);
	t_2 = -y - z;
	tmp = 0.0;
	if (x <= -2.2e+68)
		tmp = t_1;
	elseif (x <= -1.35e-32)
		tmp = t_2;
	elseif (x <= -6e-153)
		tmp = log(t) - y;
	elseif (x <= 9.5e-248)
		tmp = t_2;
	elseif (x <= 2.2e-119)
		tmp = log(t) - z;
	elseif (x <= 1.1e+103)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[((-y) - z), $MachinePrecision]}, If[LessEqual[x, -2.2e+68], t$95$1, If[LessEqual[x, -1.35e-32], t$95$2, If[LessEqual[x, -6e-153], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 9.5e-248], t$95$2, If[LessEqual[x, 2.2e-119], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], If[LessEqual[x, 1.1e+103], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.35 \cdot 10^{-32}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -6 \cdot 10^{-153}:\\
\;\;\;\;\log t - y\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-248}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+103}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.19999999999999987e68 or 1.09999999999999996e103 < x

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{\left(x \cdot \log y - y\right) - \left(z - \log t\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cube12.2%

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

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

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

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

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

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

    if -2.19999999999999987e68 < x < -1.3499999999999999e-32 or -6e-153 < x < 9.49999999999999971e-248 or 2.2000000000000001e-119 < x < 1.09999999999999996e103

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -1.3499999999999999e-32 < x < -6e-153

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999971e-248 < x < 2.2000000000000001e-119

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-32}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-153}:\\ \;\;\;\;\log t - y\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-248}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-119}:\\ \;\;\;\;\log t - z\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+103}:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]

Alternative 6: 99.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.76 \lor \neg \left(x \leq 2.1 \cdot 10^{-16}\right):\\
\;\;\;\;\left(x \cdot \log y - y\right) - z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -0.76000000000000001 or 2.1000000000000001e-16 < x

    1. Initial program 99.7%

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

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

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

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

    if -0.76000000000000001 < x < 2.1000000000000001e-16

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.76 \lor \neg \left(x \leq 2.1 \cdot 10^{-16}\right):\\ \;\;\;\;\left(x \cdot \log y - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;\left(\log t - z\right) - y\\ \end{array} \]

Alternative 7: 89.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+53} \lor \neg \left(x \leq 6.9 \cdot 10^{+40}\right):\\
\;\;\;\;x \cdot \log y - z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.5000000000000002e53 or 6.9000000000000003e40 < x

    1. Initial program 99.7%

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

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

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

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

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

    if -8.5000000000000002e53 < x < 6.9000000000000003e40

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 71.5% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.52 \cdot 10^{+68} \lor \neg \left(x \leq 1.35 \cdot 10^{+101}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.52000000000000008e68 or 1.35000000000000003e101 < x

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{\left(x \cdot \log y - y\right) - \left(z - \log t\right)} \]
    4. Step-by-step derivation
      1. add-cbrt-cube12.2%

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

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

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

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

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

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

    if -1.52000000000000008e68 < x < 1.35000000000000003e101

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.52 \cdot 10^{+68} \lor \neg \left(x \leq 1.35 \cdot 10^{+101}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) - z\\ \end{array} \]

Alternative 9: 77.5% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.15 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \log y - z\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

    if 2.15000000000000007e73 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.15 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \log y - z\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) - z\\ \end{array} \]

Alternative 10: 48.5% accurate, 51.4× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{-z} \]
    6. Simplified35.9%

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

    if 4.4999999999999997e76 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\log t + \left(-z\right)}\right) - y \]
      13. unsub-neg99.9%

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

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

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

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

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

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

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

Alternative 11: 58.6% accurate, 52.3× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 12: 30.1% 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.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\log t + \left(-z\right)}\right) - y \]
    13. unsub-neg99.9%

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

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

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

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

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

    \[\leadsto \color{blue}{-y} \]
  8. Final simplification32.6%

    \[\leadsto -y \]

Reproduce

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