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

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

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

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right) + \log t} \]
    2. lift--.f64N/A

      \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right)} + \log t \]
    3. lift--.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \log y - \left(\left(y + z\right) - \log t\right)} \]
    6. sub-negN/A

      \[\leadsto \color{blue}{x \cdot \log y + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
    7. lift-*.f64N/A

      \[\leadsto \color{blue}{x \cdot \log y} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \color{blue}{\log y \cdot x} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
    9. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
    10. lower-neg.f64N/A

      \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-\left(\left(y + z\right) - \log t\right)}\right) \]
    11. associate-+r-N/A

      \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
    12. lower-+.f64N/A

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, -\left(y + \left(z - \log t\right)\right)\right)} \]
  5. Step-by-step derivation
    1. lift-fma.f64N/A

      \[\leadsto \color{blue}{\log y \cdot x + \left(-\left(y + \left(z - \log t\right)\right)\right)} \]
    2. lift-neg.f64N/A

      \[\leadsto \log y \cdot x + \color{blue}{\left(\mathsf{neg}\left(\left(y + \left(z - \log t\right)\right)\right)\right)} \]
    3. unsub-negN/A

      \[\leadsto \color{blue}{\log y \cdot x - \left(y + \left(z - \log t\right)\right)} \]
    4. lift-+.f64N/A

      \[\leadsto \log y \cdot x - \color{blue}{\left(y + \left(z - \log t\right)\right)} \]
    5. associate--r+N/A

      \[\leadsto \color{blue}{\left(\log y \cdot x - y\right) - \left(z - \log t\right)} \]
    6. *-commutativeN/A

      \[\leadsto \left(\color{blue}{x \cdot \log y} - y\right) - \left(z - \log t\right) \]
    7. lift-log.f64N/A

      \[\leadsto \left(x \cdot \color{blue}{\log y} - y\right) - \left(z - \log t\right) \]
    8. lift--.f64N/A

      \[\leadsto \left(x \cdot \log y - y\right) - \color{blue}{\left(z - \log t\right)} \]
    9. associate-+l-N/A

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

      \[\leadsto \color{blue}{\log t + \left(\left(x \cdot \log y - y\right) - z\right)} \]
    11. associate--l-N/A

      \[\leadsto \log t + \color{blue}{\left(x \cdot \log y - \left(y + z\right)\right)} \]
    12. lift-log.f64N/A

      \[\leadsto \log t + \left(x \cdot \color{blue}{\log y} - \left(y + z\right)\right) \]
    13. *-commutativeN/A

      \[\leadsto \log t + \left(\color{blue}{\log y \cdot x} - \left(y + z\right)\right) \]
    14. associate-+r-N/A

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

      \[\leadsto \color{blue}{\left(\log y \cdot x + \log t\right)} - \left(y + z\right) \]
    16. lift-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right)} - \left(y + z\right) \]
    17. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(\log y, x, \log t\right) - \color{blue}{\left(z + y\right)} \]
    18. associate--l-N/A

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \left(\log t - z\right) - y\right)} \]
  7. Add Preprocessing

Alternative 2: 87.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y - y\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+236}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, -y\right)\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+43}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* x (log y)) y)))
   (if (<= t_1 -5e+236)
     (fma (log y) x (- y))
     (if (<= t_1 -4e+43) (- (- (log t) y) z) (- (fma (log y) x (log t)) z)))))
double code(double x, double y, double z, double t) {
	double t_1 = (x * log(y)) - y;
	double tmp;
	if (t_1 <= -5e+236) {
		tmp = fma(log(y), x, -y);
	} else if (t_1 <= -4e+43) {
		tmp = (log(t) - y) - z;
	} else {
		tmp = fma(log(y), x, log(t)) - z;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x * log(y)) - y)
	tmp = 0.0
	if (t_1 <= -5e+236)
		tmp = fma(log(y), x, Float64(-y));
	elseif (t_1 <= -4e+43)
		tmp = Float64(Float64(log(t) - y) - z);
	else
		tmp = Float64(fma(log(y), x, log(t)) - z);
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+236], N[(N[Log[y], $MachinePrecision] * x + (-y)), $MachinePrecision], If[LessEqual[t$95$1, -4e+43], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+236}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, -y\right)\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+43}:\\
\;\;\;\;\left(\log t - y\right) - z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 x (log.f64 y)) y) < -4.9999999999999997e236

    1. Initial program 99.8%

      \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right) + \log t} \]
      2. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right)} + \log t \]
      3. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{x \cdot \log y - \left(\left(y + z\right) - \log t\right)} \]
      6. sub-negN/A

        \[\leadsto \color{blue}{x \cdot \log y + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \log y} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\log y \cdot x} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      10. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-\left(\left(y + z\right) - \log t\right)}\right) \]
      11. associate-+r-N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
      12. lower-+.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-1 \cdot y}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\mathsf{neg}\left(y\right)}\right) \]
      2. lower-neg.f6495.8

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-y}\right) \]
    7. Applied rewrites95.8%

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

    if -4.9999999999999997e236 < (-.f64 (*.f64 x (log.f64 y)) y) < -4.00000000000000006e43

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{\log t - \left(y + z\right)} \]
    4. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right)} - z \]
      4. lower-log.f6486.0

        \[\leadsto \left(\color{blue}{\log t} - y\right) - z \]
    5. Applied rewrites86.0%

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

    if -4.00000000000000006e43 < (-.f64 (*.f64 x (log.f64 y)) y)

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - z} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

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

        \[\leadsto \color{blue}{\left(x \cdot \log y + \log t\right)} - z \]
      3. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\log y \cdot x} + \log t\right) - z \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right)} - z \]
      5. lower-log.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\log y}, x, \log t\right) - z \]
      6. lower-log.f6496.8

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right) - z} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 99.9% accurate, 1.0× speedup?

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

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

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

    \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
  4. Step-by-step derivation
    1. +-commutativeN/A

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

      \[\leadsto \color{blue}{\left(\left(\log t + x \cdot \log y\right) - z\right) - y} \]
    3. associate--l+N/A

      \[\leadsto \color{blue}{\left(\log t + \left(x \cdot \log y - z\right)\right)} - y \]
    4. sub-negN/A

      \[\leadsto \left(\log t + \color{blue}{\left(x \cdot \log y + \left(\mathsf{neg}\left(z\right)\right)\right)}\right) - y \]
    5. +-commutativeN/A

      \[\leadsto \left(\log t + \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + x \cdot \log y\right)}\right) - y \]
    6. mul-1-negN/A

      \[\leadsto \left(\log t + \left(\color{blue}{-1 \cdot z} + x \cdot \log y\right)\right) - y \]
    7. lower--.f64N/A

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

      \[\leadsto \left(\log t + \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} + x \cdot \log y\right)\right) - y \]
    9. +-commutativeN/A

      \[\leadsto \left(\log t + \color{blue}{\left(x \cdot \log y + \left(\mathsf{neg}\left(z\right)\right)\right)}\right) - y \]
    10. sub-negN/A

      \[\leadsto \left(\log t + \color{blue}{\left(x \cdot \log y - z\right)}\right) - y \]
    11. associate--l+N/A

      \[\leadsto \color{blue}{\left(\left(\log t + x \cdot \log y\right) - z\right)} - y \]
    12. lower--.f64N/A

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

      \[\leadsto \left(\color{blue}{\left(x \cdot \log y + \log t\right)} - z\right) - y \]
    14. *-commutativeN/A

      \[\leadsto \left(\left(\color{blue}{\log y \cdot x} + \log t\right) - z\right) - y \]
    15. lower-fma.f64N/A

      \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\log y, x, \log t\right)} - z\right) - y \]
    16. lower-log.f64N/A

      \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\log y}, x, \log t\right) - z\right) - y \]
    17. lower-log.f6499.8

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

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

Alternative 4: 89.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log y, x, -y\right)\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+70}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fma (log y) x (- y))))
   (if (<= x -2.3e+134) t_1 (if (<= x 5.2e+70) (- (- (log t) y) z) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = fma(log(y), x, -y);
	double tmp;
	if (x <= -2.3e+134) {
		tmp = t_1;
	} else if (x <= 5.2e+70) {
		tmp = (log(t) - y) - z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = fma(log(y), x, Float64(-y))
	tmp = 0.0
	if (x <= -2.3e+134)
		tmp = t_1;
	elseif (x <= 5.2e+70)
		tmp = Float64(Float64(log(t) - y) - z);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + (-y)), $MachinePrecision]}, If[LessEqual[x, -2.3e+134], t$95$1, If[LessEqual[x, 5.2e+70], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, x, -y\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2999999999999998e134 or 5.2000000000000001e70 < x

    1. Initial program 99.5%

      \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right) + \log t} \]
      2. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right)} + \log t \]
      3. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{x \cdot \log y - \left(\left(y + z\right) - \log t\right)} \]
      6. sub-negN/A

        \[\leadsto \color{blue}{x \cdot \log y + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \log y} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\log y \cdot x} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      10. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-\left(\left(y + z\right) - \log t\right)}\right) \]
      11. associate-+r-N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
      12. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
      13. lower--.f6499.6

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

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

      \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-1 \cdot y}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\mathsf{neg}\left(y\right)}\right) \]
      2. lower-neg.f6487.1

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-y}\right) \]
    7. Applied rewrites87.1%

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

    if -2.2999999999999998e134 < x < 5.2000000000000001e70

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{\log t - \left(y + z\right)} \]
    4. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right)} - z \]
      4. lower-log.f6494.7

        \[\leadsto \left(\color{blue}{\log t} - y\right) - z \]
    5. Applied rewrites94.7%

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

Alternative 5: 84.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+123}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -2.8e+134) t_1 (if (<= x 7.5e+123) (- (- (log t) y) z) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -2.8e+134) {
		tmp = t_1;
	} else if (x <= 7.5e+123) {
		tmp = (log(t) - y) - z;
	} 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 <= (-2.8d+134)) then
        tmp = t_1
    else if (x <= 7.5d+123) then
        tmp = (log(t) - y) - z
    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 <= -2.8e+134) {
		tmp = t_1;
	} else if (x <= 7.5e+123) {
		tmp = (Math.log(t) - y) - z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -2.8e+134:
		tmp = t_1
	elif x <= 7.5e+123:
		tmp = (math.log(t) - y) - z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -2.8e+134)
		tmp = t_1;
	elseif (x <= 7.5e+123)
		tmp = Float64(Float64(log(t) - y) - z);
	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 <= -2.8e+134)
		tmp = t_1;
	elseif (x <= 7.5e+123)
		tmp = (log(t) - y) - z;
	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, -2.8e+134], t$95$1, If[LessEqual[x, 7.5e+123], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.7999999999999999e134 or 7.4999999999999999e123 < x

    1. Initial program 99.5%

      \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right) + \log t} \]
      2. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \log y - y\right) - z\right)} + \log t \]
      3. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{x \cdot \log y - \left(\left(y + z\right) - \log t\right)} \]
      6. sub-negN/A

        \[\leadsto \color{blue}{x \cdot \log y + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \log y} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\log y \cdot x} + \left(\mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \mathsf{neg}\left(\left(\left(y + z\right) - \log t\right)\right)\right)} \]
      10. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{-\left(\left(y + z\right) - \log t\right)}\right) \]
      11. associate-+r-N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
      12. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\log y, x, -\color{blue}{\left(y + \left(z - \log t\right)\right)}\right) \]
      13. lower--.f6499.6

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

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\log y \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\log y \cdot x} \]
      3. lower-log.f6479.7

        \[\leadsto \color{blue}{\log y} \cdot x \]
    7. Applied rewrites79.7%

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

    if -2.7999999999999999e134 < x < 7.4999999999999999e123

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{\log t - \left(y + z\right)} \]
    4. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right) - z} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t - y\right)} - z \]
      4. lower-log.f6493.4

        \[\leadsto \left(\color{blue}{\log t} - y\right) - z \]
    5. Applied rewrites93.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+134}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+123}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+51}:\\
\;\;\;\;\log t - y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.00000000000000014e62 or 1.6499999999999999e51 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
      2. lower-neg.f6465.8

        \[\leadsto \color{blue}{-z} \]
    5. Applied rewrites65.8%

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

    if -4.00000000000000014e62 < z < 1.6499999999999999e51

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - y} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - y} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot \log y + \log t\right)} - y \]
      3. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\log y \cdot x} + \log t\right) - y \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right)} - y \]
      5. lower-log.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\log y}, x, \log t\right) - y \]
      6. lower-log.f6498.5

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log t}\right) - y \]
    5. Applied rewrites98.5%

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

      \[\leadsto \log t - y \]
    7. Step-by-step derivation
      1. Applied rewrites65.7%

        \[\leadsto \log t - y \]
    8. Recombined 2 regimes into one program.
    9. Add Preprocessing

    Alternative 7: 48.5% accurate, 11.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+62}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;-1 \cdot y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= z -4e+62) (- z) (if (<= z 1.3e+51) (* -1.0 y) (- z))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -4e+62) {
    		tmp = -z;
    	} else if (z <= 1.3e+51) {
    		tmp = -1.0 * y;
    	} else {
    		tmp = -z;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if (z <= (-4d+62)) then
            tmp = -z
        else if (z <= 1.3d+51) then
            tmp = (-1.0d0) * y
        else
            tmp = -z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -4e+62) {
    		tmp = -z;
    	} else if (z <= 1.3e+51) {
    		tmp = -1.0 * y;
    	} else {
    		tmp = -z;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if z <= -4e+62:
    		tmp = -z
    	elif z <= 1.3e+51:
    		tmp = -1.0 * y
    	else:
    		tmp = -z
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (z <= -4e+62)
    		tmp = Float64(-z);
    	elseif (z <= 1.3e+51)
    		tmp = Float64(-1.0 * y);
    	else
    		tmp = Float64(-z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (z <= -4e+62)
    		tmp = -z;
    	elseif (z <= 1.3e+51)
    		tmp = -1.0 * y;
    	else
    		tmp = -z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[z, -4e+62], (-z), If[LessEqual[z, 1.3e+51], N[(-1.0 * y), $MachinePrecision], (-z)]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -4 \cdot 10^{+62}:\\
    \;\;\;\;-z\\
    
    \mathbf{elif}\;z \leq 1.3 \cdot 10^{+51}:\\
    \;\;\;\;-1 \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;-z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -4.00000000000000014e62 or 1.3000000000000001e51 < z

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{-1 \cdot z} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
        2. lower-neg.f6465.8

          \[\leadsto \color{blue}{-z} \]
      5. Applied rewrites65.8%

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

      if -4.00000000000000014e62 < z < 1.3000000000000001e51

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - y} \]
      4. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto \color{blue}{\left(\log t + x \cdot \log y\right) - y} \]
        2. +-commutativeN/A

          \[\leadsto \color{blue}{\left(x \cdot \log y + \log t\right)} - y \]
        3. *-commutativeN/A

          \[\leadsto \left(\color{blue}{\log y \cdot x} + \log t\right) - y \]
        4. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right)} - y \]
        5. lower-log.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\log y}, x, \log t\right) - y \]
        6. lower-log.f6498.5

          \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log t}\right) - y \]
      5. Applied rewrites98.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right) - y} \]
      6. Taylor expanded in y around inf

        \[\leadsto y \cdot \color{blue}{\left(\left(-1 \cdot \frac{x \cdot \log \left(\frac{1}{y}\right)}{y} + \frac{\log t}{y}\right) - 1\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites85.5%

          \[\leadsto \left(\frac{\mathsf{fma}\left(\log y, x, \log t\right)}{y} - 1\right) \cdot \color{blue}{y} \]
        2. Taylor expanded in y around inf

          \[\leadsto -1 \cdot y \]
        3. Step-by-step derivation
          1. Applied rewrites41.3%

            \[\leadsto -1 \cdot y \]
        4. Recombined 2 regimes into one program.
        5. Add Preprocessing

        Alternative 8: 29.6% accurate, 71.7× speedup?

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

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

          \[\leadsto \color{blue}{-1 \cdot z} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
          2. lower-neg.f6429.4

            \[\leadsto \color{blue}{-z} \]
        5. Applied rewrites29.4%

          \[\leadsto \color{blue}{-z} \]
        6. Add Preprocessing

        Reproduce

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