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

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

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

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
  2. 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 \color{blue}{\left(x \cdot \log y + \log t\right)} - \left(y + z\right) \]
    2. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+84}:\\
\;\;\;\;-y\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+93}:\\
\;\;\;\;\log t - z\\

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


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

    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}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{neg}\left(y\right)} \]
      2. lower-neg.f6449.7

        \[\leadsto \color{blue}{-y} \]
    8. Applied rewrites49.7%

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

    if -1.00000000000000006e84 < (-.f64 (*.f64 x (log.f64 y)) y) < 5.0000000000000001e93

    1. Initial program 99.9%

      \[\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.f6493.0

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

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

      \[\leadsto \log t - z \]
    7. Step-by-step derivation
      1. Applied rewrites81.5%

        \[\leadsto \log t - z \]

      if 5.0000000000000001e93 < (-.f64 (*.f64 x (log.f64 y)) y)

      1. Initial program 99.6%

        \[\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. flip3-+N/A

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

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

          \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(x \cdot \log y - y\right) - z\right) \cdot \left(\left(x \cdot \log y - y\right) - z\right) + \left(\log t \cdot \log t - \left(\left(x \cdot \log y - y\right) - z\right) \cdot \log t\right)}{{\left(\left(x \cdot \log y - y\right) - z\right)}^{3} + {\log t}^{3}}}} \]
        5. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{{\left(\left(x \cdot \log y - y\right) - z\right)}^{3} + {\log t}^{3}}{\left(\left(x \cdot \log y - y\right) - z\right) \cdot \left(\left(x \cdot \log y - y\right) - z\right) + \left(\log t \cdot \log t - \left(\left(x \cdot \log y - y\right) - z\right) \cdot \log t\right)}}}} \]
        6. flip3-+N/A

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\left(\mathsf{fma}\left(\log y, x, \log t\right) - z\right) - y}}} \]
      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.f6466.4

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

        \[\leadsto \color{blue}{\log y \cdot x} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification65.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\log y \cdot x - y \leq -1 \cdot 10^{+84}:\\ \;\;\;\;-y\\ \mathbf{elif}\;\log y \cdot x - y \leq 5 \cdot 10^{+93}:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 89.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\log t - y\right) - z\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (- (- (log t) y) z)))
       (if (<= z -1.12e+74)
         t_1
         (if (<= z 1.65e+23) (- (fma (log y) x (log t)) y) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (log(t) - y) - z;
    	double tmp;
    	if (z <= -1.12e+74) {
    		tmp = t_1;
    	} else if (z <= 1.65e+23) {
    		tmp = fma(log(y), x, log(t)) - y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(log(t) - y) - z)
    	tmp = 0.0
    	if (z <= -1.12e+74)
    		tmp = t_1;
    	elseif (z <= 1.65e+23)
    		tmp = Float64(fma(log(y), x, log(t)) - y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[z, -1.12e+74], t$95$1, If[LessEqual[z, 1.65e+23], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(\log t - y\right) - z\\
    \mathbf{if}\;z \leq -1.12 \cdot 10^{+74}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.65 \cdot 10^{+23}:\\
    \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.12000000000000003e74 or 1.65000000000000015e23 < 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 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.f6483.3

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

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

      if -1.12000000000000003e74 < z < 1.65000000000000015e23

      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.f6497.2

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

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

    Alternative 4: 89.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= y 6.6e+59)
       (fma (log y) x (- (log t) z))
       (fma (log y) x (- (log t) y))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (y <= 6.6e+59) {
    		tmp = fma(log(y), x, (log(t) - z));
    	} else {
    		tmp = fma(log(y), x, (log(t) - y));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (y <= 6.6e+59)
    		tmp = fma(log(y), x, Float64(log(t) - z));
    	else
    		tmp = fma(log(y), x, Float64(log(t) - y));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
    \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - z\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < 6.5999999999999999e59

      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 \color{blue}{\left(x \cdot \log y + \log t\right)} - \left(y + z\right) \]
        2. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.5999999999999999e59 < y

      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}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\log y, x, \log t - y\right) \]
      7. Step-by-step derivation
        1. Applied rewrites82.8%

          \[\leadsto \mathsf{fma}\left(\log y, x, \log t - y\right) \]
      8. Recombined 2 regimes into one program.
      9. Add Preprocessing

      Alternative 5: 89.5% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= y 6.6e+59)
         (- (fma (log y) x (log t)) z)
         (fma (log y) x (- (log t) y))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= 6.6e+59) {
      		tmp = fma(log(y), x, log(t)) - z;
      	} else {
      		tmp = fma(log(y), x, (log(t) - y));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (y <= 6.6e+59)
      		tmp = Float64(fma(log(y), x, log(t)) - z);
      	else
      		tmp = fma(log(y), x, Float64(log(t) - y));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
      \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < 6.5999999999999999e59

        1. Initial program 99.8%

          \[\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.2

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

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

        if 6.5999999999999999e59 < y

        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}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\log y, x, \log t - y\right) \]
        7. Step-by-step derivation
          1. Applied rewrites82.8%

            \[\leadsto \mathsf{fma}\left(\log y, x, \log t - y\right) \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 6: 89.5% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log y, x, \log t\right)\\ \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\ \;\;\;\;t\_1 - z\\ \mathbf{else}:\\ \;\;\;\;t\_1 - y\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (fma (log y) x (log t))))
           (if (<= y 6.6e+59) (- t_1 z) (- t_1 y))))
        double code(double x, double y, double z, double t) {
        	double t_1 = fma(log(y), x, log(t));
        	double tmp;
        	if (y <= 6.6e+59) {
        		tmp = t_1 - z;
        	} else {
        		tmp = t_1 - y;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	t_1 = fma(log(y), x, log(t))
        	tmp = 0.0
        	if (y <= 6.6e+59)
        		tmp = Float64(t_1 - z);
        	else
        		tmp = Float64(t_1 - y);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 6.6e+59], N[(t$95$1 - z), $MachinePrecision], N[(t$95$1 - y), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(\log y, x, \log t\right)\\
        \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
        \;\;\;\;t\_1 - z\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1 - y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 6.5999999999999999e59

          1. Initial program 99.8%

            \[\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.2

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

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

          if 6.5999999999999999e59 < y

          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 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.f6482.8

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

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

        Alternative 7: 83.4% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -6.2 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+96}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* (log y) x)))
           (if (<= x -6.2e+115) t_1 (if (<= x 4.4e+96) (- (- (log t) y) z) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = log(y) * x;
        	double tmp;
        	if (x <= -6.2e+115) {
        		tmp = t_1;
        	} else if (x <= 4.4e+96) {
        		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 = log(y) * x
            if (x <= (-6.2d+115)) then
                tmp = t_1
            else if (x <= 4.4d+96) 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 = Math.log(y) * x;
        	double tmp;
        	if (x <= -6.2e+115) {
        		tmp = t_1;
        	} else if (x <= 4.4e+96) {
        		tmp = (Math.log(t) - y) - z;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = math.log(y) * x
        	tmp = 0
        	if x <= -6.2e+115:
        		tmp = t_1
        	elif x <= 4.4e+96:
        		tmp = (math.log(t) - y) - z
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(log(y) * x)
        	tmp = 0.0
        	if (x <= -6.2e+115)
        		tmp = t_1;
        	elseif (x <= 4.4e+96)
        		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 = log(y) * x;
        	tmp = 0.0;
        	if (x <= -6.2e+115)
        		tmp = t_1;
        	elseif (x <= 4.4e+96)
        		tmp = (log(t) - y) - z;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.2e+115], t$95$1, If[LessEqual[x, 4.4e+96], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \log y \cdot x\\
        \mathbf{if}\;x \leq -6.2 \cdot 10^{+115}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 4.4 \cdot 10^{+96}:\\
        \;\;\;\;\left(\log t - y\right) - z\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -6.2000000000000001e115 or 4.3999999999999998e96 < x

          1. Initial program 99.7%

            \[\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. flip3-+N/A

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

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

              \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(x \cdot \log y - y\right) - z\right) \cdot \left(\left(x \cdot \log y - y\right) - z\right) + \left(\log t \cdot \log t - \left(\left(x \cdot \log y - y\right) - z\right) \cdot \log t\right)}{{\left(\left(x \cdot \log y - y\right) - z\right)}^{3} + {\log t}^{3}}}} \]
            5. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{{\left(\left(x \cdot \log y - y\right) - z\right)}^{3} + {\log t}^{3}}{\left(\left(x \cdot \log y - y\right) - z\right) \cdot \left(\left(x \cdot \log y - y\right) - z\right) + \left(\log t \cdot \log t - \left(\left(x \cdot \log y - y\right) - z\right) \cdot \log t\right)}}}} \]
            6. flip3-+N/A

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

            \[\leadsto \color{blue}{\frac{1}{\frac{1}{\left(\mathsf{fma}\left(\log y, x, \log t\right) - z\right) - y}}} \]
          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.f6468.2

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

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

          if -6.2000000000000001e115 < x < 4.3999999999999998e96

          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.f6491.8

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

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

        Alternative 8: 60.7% accurate, 2.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \end{array} \]
        (FPCore (x y z t) :precision binary64 (if (<= y 6.6e+59) (- (log t) z) (- y)))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= 6.6e+59) {
        		tmp = log(t) - 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 <= 6.6d+59) then
                tmp = log(t) - 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 <= 6.6e+59) {
        		tmp = Math.log(t) - z;
        	} else {
        		tmp = -y;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if y <= 6.6e+59:
        		tmp = math.log(t) - z
        	else:
        		tmp = -y
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (y <= 6.6e+59)
        		tmp = Float64(log(t) - z);
        	else
        		tmp = Float64(-y);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (y <= 6.6e+59)
        		tmp = log(t) - z;
        	else
        		tmp = -y;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], (-y)]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
        \;\;\;\;\log t - z\\
        
        \mathbf{else}:\\
        \;\;\;\;-y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 6.5999999999999999e59

          1. Initial program 99.8%

            \[\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.2

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

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

            \[\leadsto \log t - z \]
          7. Step-by-step derivation
            1. Applied rewrites63.6%

              \[\leadsto \log t - z \]

            if 6.5999999999999999e59 < y

            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}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{neg}\left(y\right)} \]
              2. lower-neg.f6460.3

                \[\leadsto \color{blue}{-y} \]
            8. Applied rewrites60.3%

              \[\leadsto \color{blue}{-y} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 9: 47.8% accurate, 23.8× speedup?

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

            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.f6443.0

                \[\leadsto \color{blue}{-z} \]
            5. Applied rewrites43.0%

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

            if 6.0000000000000001e59 < y

            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}{\left(\log t + x \cdot \log y\right) - \left(y + z\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{neg}\left(y\right)} \]
              2. lower-neg.f6460.3

                \[\leadsto \color{blue}{-y} \]
            8. Applied rewrites60.3%

              \[\leadsto \color{blue}{-y} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 10: 29.9% accurate, 71.7× speedup?

          \[\begin{array}{l} \\ -y \end{array} \]
          (FPCore (x y z t) :precision binary64 (- y))
          double code(double x, double y, double z, double t) {
          	return -y;
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              code = -y
          end function
          
          public static double code(double x, double y, double z, double t) {
          	return -y;
          }
          
          def code(x, y, z, t):
          	return -y
          
          function code(x, y, z, t)
          	return Float64(-y)
          end
          
          function tmp = code(x, y, z, t)
          	tmp = -y;
          end
          
          code[x_, y_, z_, t_] := (-y)
          
          \begin{array}{l}
          
          \\
          -y
          \end{array}
          
          Derivation
          1. Initial program 99.8%

            \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
          2. 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 \color{blue}{\left(x \cdot \log y + \log t\right)} - \left(y + z\right) \]
            2. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{neg}\left(y\right)} \]
            2. lower-neg.f6427.0

              \[\leadsto \color{blue}{-y} \]
          8. Applied rewrites27.0%

            \[\leadsto \color{blue}{-y} \]
          9. Add Preprocessing

          Reproduce

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