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

Percentage Accurate: 99.9% → 99.9%
Time: 9.2s
Alternatives: 13
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 13 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: 64.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := t\_1 - y\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+187}:\\ \;\;\;\;\left(-y\right) + \log t\\ \mathbf{elif}\;t\_2 \leq -3 \cdot 10^{+163}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+104}:\\ \;\;\;\;\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 -5e+187)
     (+ (- y) (log t))
     (if (<= t_2 -3e+163) t_1 (if (<= t_2 2e+104) (- (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 <= -5e+187) {
		tmp = -y + log(t);
	} else if (t_2 <= -3e+163) {
		tmp = t_1;
	} else if (t_2 <= 2e+104) {
		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 <= (-5d+187)) then
        tmp = -y + log(t)
    else if (t_2 <= (-3d+163)) then
        tmp = t_1
    else if (t_2 <= 2d+104) 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 <= -5e+187) {
		tmp = -y + Math.log(t);
	} else if (t_2 <= -3e+163) {
		tmp = t_1;
	} else if (t_2 <= 2e+104) {
		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 <= -5e+187:
		tmp = -y + math.log(t)
	elif t_2 <= -3e+163:
		tmp = t_1
	elif t_2 <= 2e+104:
		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 <= -5e+187)
		tmp = Float64(Float64(-y) + log(t));
	elseif (t_2 <= -3e+163)
		tmp = t_1;
	elseif (t_2 <= 2e+104)
		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 <= -5e+187)
		tmp = -y + log(t);
	elseif (t_2 <= -3e+163)
		tmp = t_1;
	elseif (t_2 <= 2e+104)
		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, -5e+187], N[((-y) + N[Log[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -3e+163], t$95$1, If[LessEqual[t$95$2, 2e+104], 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 -5 \cdot 10^{+187}:\\
\;\;\;\;\left(-y\right) + \log t\\

\mathbf{elif}\;t\_2 \leq -3 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+104}:\\
\;\;\;\;\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) < -5.0000000000000001e187

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)} + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right)} + \log t \]
      4. *-commutativeN/A

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

        \[\leadsto \left(\color{blue}{\frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)}} \cdot x + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right) + \log t \]
      6. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left({\log y}^{2}, \color{blue}{\left(\frac{1}{\mathsf{fma}\left(\log y, x, y\right)} \cdot x\right)} \cdot x, \mathsf{fma}\left(\frac{-y}{\mathsf{fma}\left(\log y, x, y\right)}, y, -z\right)\right) + \log t \]
      5. inv-powN/A

        \[\leadsto \mathsf{fma}\left({\log y}^{2}, \left(\color{blue}{{\left(\mathsf{fma}\left(\log y, x, y\right)\right)}^{-1}} \cdot x\right) \cdot x, \mathsf{fma}\left(\frac{-y}{\mathsf{fma}\left(\log y, x, y\right)}, y, -z\right)\right) + \log t \]
      6. lower-pow.f6499.8

        \[\leadsto \mathsf{fma}\left({\log y}^{2}, \left(\color{blue}{{\left(\mathsf{fma}\left(\log y, x, y\right)\right)}^{-1}} \cdot x\right) \cdot x, \mathsf{fma}\left(\frac{-y}{\mathsf{fma}\left(\log y, x, y\right)}, y, -z\right)\right) + \log t \]
      7. lift-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left({\log y}^{2}, \left({\left(\color{blue}{x \cdot \log y} + y\right)}^{-1} \cdot x\right) \cdot x, \mathsf{fma}\left(\frac{-y}{\mathsf{fma}\left(\log y, x, y\right)}, y, -z\right)\right) + \log t \]
      9. lower-fma.f6499.8

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

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

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

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

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

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

    if -5.0000000000000001e187 < (-.f64 (*.f64 x (log.f64 y)) y) < -3.00000000000000013e163 or 2e104 < (-.f64 (*.f64 x (log.f64 y)) y)

    1. Initial program 99.5%

      \[\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.5%

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
    7. 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.f6472.3

        \[\leadsto \color{blue}{\log y} \cdot x \]
    8. Applied rewrites72.3%

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

    if -3.00000000000000013e163 < (-.f64 (*.f64 x (log.f64 y)) y) < 2e104

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

        \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log t}\right) - z \]
    5. Applied rewrites81.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 rewrites71.7%

        \[\leadsto \log t - z \]
    8. Recombined 3 regimes into one program.
    9. Final simplification71.6%

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

    Alternative 3: 64.5% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := t\_1 - y\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+187}:\\ \;\;\;\;-y\\ \mathbf{elif}\;t\_2 \leq -3 \cdot 10^{+163}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+104}:\\ \;\;\;\;\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 -5e+187)
         (- y)
         (if (<= t_2 -3e+163) t_1 (if (<= t_2 2e+104) (- (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 <= -5e+187) {
    		tmp = -y;
    	} else if (t_2 <= -3e+163) {
    		tmp = t_1;
    	} else if (t_2 <= 2e+104) {
    		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 <= (-5d+187)) then
            tmp = -y
        else if (t_2 <= (-3d+163)) then
            tmp = t_1
        else if (t_2 <= 2d+104) 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 <= -5e+187) {
    		tmp = -y;
    	} else if (t_2 <= -3e+163) {
    		tmp = t_1;
    	} else if (t_2 <= 2e+104) {
    		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 <= -5e+187:
    		tmp = -y
    	elif t_2 <= -3e+163:
    		tmp = t_1
    	elif t_2 <= 2e+104:
    		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 <= -5e+187)
    		tmp = Float64(-y);
    	elseif (t_2 <= -3e+163)
    		tmp = t_1;
    	elseif (t_2 <= 2e+104)
    		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 <= -5e+187)
    		tmp = -y;
    	elseif (t_2 <= -3e+163)
    		tmp = t_1;
    	elseif (t_2 <= 2e+104)
    		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, -5e+187], (-y), If[LessEqual[t$95$2, -3e+163], t$95$1, If[LessEqual[t$95$2, 2e+104], 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 -5 \cdot 10^{+187}:\\
    \;\;\;\;-y\\
    
    \mathbf{elif}\;t\_2 \leq -3 \cdot 10^{+163}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+104}:\\
    \;\;\;\;\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) < -5.0000000000000001e187

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(x \cdot \frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)} + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right)} + \log t \]
        4. *-commutativeN/A

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

          \[\leadsto \left(\color{blue}{\frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)}} \cdot x + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right) + \log t \]
        6. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-y} \]
      9. Applied rewrites70.9%

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

      if -5.0000000000000001e187 < (-.f64 (*.f64 x (log.f64 y)) y) < -3.00000000000000013e163 or 2e104 < (-.f64 (*.f64 x (log.f64 y)) y)

      1. Initial program 99.5%

        \[\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.5%

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

        \[\leadsto \color{blue}{x \cdot \log y} \]
      7. 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.f6472.3

          \[\leadsto \color{blue}{\log y} \cdot x \]
      8. Applied rewrites72.3%

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

      if -3.00000000000000013e163 < (-.f64 (*.f64 x (log.f64 y)) y) < 2e104

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

          \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log t}\right) - z \]
      5. Applied rewrites81.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 rewrites71.7%

          \[\leadsto \log t - z \]
      8. Recombined 3 regimes into one program.
      9. Final simplification71.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\log y \cdot x - y \leq -5 \cdot 10^{+187}:\\ \;\;\;\;-y\\ \mathbf{elif}\;\log y \cdot x - y \leq -3 \cdot 10^{+163}:\\ \;\;\;\;\log y \cdot x\\ \mathbf{elif}\;\log y \cdot x - y \leq 2 \cdot 10^{+104}:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;\log y \cdot x\\ \end{array} \]
      10. Add Preprocessing

      Alternative 4: 90.2% accurate, 0.5× speedup?

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

        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 rewrites92.0%

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

          if -3.00000000000000013e163 < (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e-7

          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.f6488.3

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

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

          if -1.9999999999999999e-7 < (-.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.f6498.9

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right) - z} \]
          6. Step-by-step derivation
            1. Applied rewrites98.9%

              \[\leadsto \mathsf{fma}\left(\log y, \color{blue}{x}, \log t - z\right) \]
          7. Recombined 3 regimes into one program.
          8. Final simplification94.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\log y \cdot x - y \leq -3 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\ \mathbf{elif}\;\log y \cdot x - y \leq -2 \cdot 10^{-7}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - z\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 5: 90.2% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x - y\\ t_2 := \log t - y\\ \mathbf{if}\;t\_1 \leq -3 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, t\_2\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-7}:\\ \;\;\;\;t\_2 - 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 (- (* (log y) x) y)) (t_2 (- (log t) y)))
             (if (<= t_1 -3e+163)
               (fma (log y) x t_2)
               (if (<= t_1 -2e-7) (- t_2 z) (- (fma (log y) x (log t)) z)))))
          double code(double x, double y, double z, double t) {
          	double t_1 = (log(y) * x) - y;
          	double t_2 = log(t) - y;
          	double tmp;
          	if (t_1 <= -3e+163) {
          		tmp = fma(log(y), x, t_2);
          	} else if (t_1 <= -2e-7) {
          		tmp = t_2 - z;
          	} else {
          		tmp = fma(log(y), x, log(t)) - z;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(log(y) * x) - y)
          	t_2 = Float64(log(t) - y)
          	tmp = 0.0
          	if (t_1 <= -3e+163)
          		tmp = fma(log(y), x, t_2);
          	elseif (t_1 <= -2e-7)
          		tmp = Float64(t_2 - 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[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -3e+163], N[(N[Log[y], $MachinePrecision] * x + t$95$2), $MachinePrecision], If[LessEqual[t$95$1, -2e-7], N[(t$95$2 - z), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \log y \cdot x - y\\
          t_2 := \log t - y\\
          \mathbf{if}\;t\_1 \leq -3 \cdot 10^{+163}:\\
          \;\;\;\;\mathsf{fma}\left(\log y, x, t\_2\right)\\
          
          \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-7}:\\
          \;\;\;\;t\_2 - 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) < -3.00000000000000013e163

            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 rewrites92.0%

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

              if -3.00000000000000013e163 < (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e-7

              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.f6488.3

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

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

              if -1.9999999999999999e-7 < (-.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.f6498.9

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t\right) - z} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification94.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\log y \cdot x - y \leq -3 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\ \mathbf{elif}\;\log y \cdot x - y \leq -2 \cdot 10^{-7}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\ \end{array} \]
            10. Add Preprocessing

            Alternative 6: 90.2% accurate, 0.5× speedup?

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

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

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

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

              if -3.00000000000000013e163 < (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e-7

              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.f6488.3

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

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

              if -1.9999999999999999e-7 < (-.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.f6498.9

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\log y \cdot x - y \leq -3 \cdot 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - y\\ \mathbf{elif}\;\log y \cdot x - y \leq -2 \cdot 10^{-7}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\ \end{array} \]
            5. Add Preprocessing

            Alternative 7: 89.4% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{z}, z, -z\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+45}:\\ \;\;\;\;\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 (fma (/ (* (log y) x) z) z (- z))))
               (if (<= z -1.3e+75)
                 t_1
                 (if (<= z 8.4e+45) (- (fma (log y) x (log t)) y) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = fma(((log(y) * x) / z), z, -z);
            	double tmp;
            	if (z <= -1.3e+75) {
            		tmp = t_1;
            	} else if (z <= 8.4e+45) {
            		tmp = fma(log(y), x, log(t)) - y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	t_1 = fma(Float64(Float64(log(y) * x) / z), z, Float64(-z))
            	tmp = 0.0
            	if (z <= -1.3e+75)
            		tmp = t_1;
            	elseif (z <= 8.4e+45)
            		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[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision] * z + (-z)), $MachinePrecision]}, If[LessEqual[z, -1.3e+75], t$95$1, If[LessEqual[z, 8.4e+45], 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 := \mathsf{fma}\left(\frac{\log y \cdot x}{z}, z, -z\right)\\
            \mathbf{if}\;z \leq -1.3 \cdot 10^{+75}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 8.4 \cdot 10^{+45}:\\
            \;\;\;\;\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.29999999999999992e75 or 8.39999999999999979e45 < 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 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.f6486.5

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{x \cdot \log y}{z}, z, -z\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites86.5%

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

                  if -1.29999999999999992e75 < z < 8.39999999999999979e45

                  1. Initial program 99.7%

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

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

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

                Alternative 8: 80.4% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{z}, z, -z\right)\\ \mathbf{if}\;x \leq -1.7 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+62}:\\ \;\;\;\;\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) z) z (- z))))
                   (if (<= x -1.7e+106) t_1 (if (<= x 1.75e+62) (- (- (log t) y) z) t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = fma(((log(y) * x) / z), z, -z);
                	double tmp;
                	if (x <= -1.7e+106) {
                		tmp = t_1;
                	} else if (x <= 1.75e+62) {
                		tmp = (log(t) - y) - z;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t)
                	t_1 = fma(Float64(Float64(log(y) * x) / z), z, Float64(-z))
                	tmp = 0.0
                	if (x <= -1.7e+106)
                		tmp = t_1;
                	elseif (x <= 1.75e+62)
                		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[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision] * z + (-z)), $MachinePrecision]}, If[LessEqual[x, -1.7e+106], t$95$1, If[LessEqual[x, 1.75e+62], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \mathsf{fma}\left(\frac{\log y \cdot x}{z}, z, -z\right)\\
                \mathbf{if}\;x \leq -1.7 \cdot 10^{+106}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;x \leq 1.75 \cdot 10^{+62}:\\
                \;\;\;\;\left(\log t - y\right) - z\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -1.69999999999999997e106 or 1.74999999999999992e62 < x

                  1. Initial program 99.6%

                    \[\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.f6484.6

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{x \cdot \log y}{z}, z, -z\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites68.3%

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

                      if -1.69999999999999997e106 < x < 1.74999999999999992e62

                      1. Initial program 100.0%

                        \[\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.f6497.9

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

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

                    Alternative 9: 84.3% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -9.2 \cdot 10^{+117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{+157}:\\ \;\;\;\;\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 -9.2e+117) t_1 (if (<= x 2.65e+157) (- (- (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 <= -9.2e+117) {
                    		tmp = t_1;
                    	} else if (x <= 2.65e+157) {
                    		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 <= (-9.2d+117)) then
                            tmp = t_1
                        else if (x <= 2.65d+157) 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 <= -9.2e+117) {
                    		tmp = t_1;
                    	} else if (x <= 2.65e+157) {
                    		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 <= -9.2e+117:
                    		tmp = t_1
                    	elif x <= 2.65e+157:
                    		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 <= -9.2e+117)
                    		tmp = t_1;
                    	elseif (x <= 2.65e+157)
                    		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 <= -9.2e+117)
                    		tmp = t_1;
                    	elseif (x <= 2.65e+157)
                    		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, -9.2e+117], t$95$1, If[LessEqual[x, 2.65e+157], 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 -9.2 \cdot 10^{+117}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;x \leq 2.65 \cdot 10^{+157}:\\
                    \;\;\;\;\left(\log t - y\right) - z\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -9.19999999999999951e117 or 2.6499999999999999e157 < x

                      1. Initial program 99.6%

                        \[\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.6%

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

                        \[\leadsto \color{blue}{x \cdot \log y} \]
                      7. 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.f6469.4

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

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

                      if -9.19999999999999951e117 < x < 2.6499999999999999e157

                      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.4

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

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

                    Alternative 10: 59.9% accurate, 2.0× speedup?

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

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

                          \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log t}\right) - z \]
                      5. Applied rewrites90.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 rewrites58.7%

                          \[\leadsto \log t - z \]

                        if 9.50000000000000097e108 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\left(x \cdot \frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)} + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right)} + \log t \]
                          4. *-commutativeN/A

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

                            \[\leadsto \left(\color{blue}{\frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)}} \cdot x + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right) + \log t \]
                          6. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-y} \]
                        9. Applied rewrites71.2%

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

                      Alternative 11: 48.2% accurate, 23.8× speedup?

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

                        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.f6444.9

                            \[\leadsto \color{blue}{-z} \]
                        5. Applied rewrites44.9%

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

                        if 9.50000000000000097e108 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\left(x \cdot \frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)} + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right)} + \log t \]
                          4. *-commutativeN/A

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

                            \[\leadsto \left(\color{blue}{\frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)}} \cdot x + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right) + \log t \]
                          6. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-y} \]
                        9. Applied rewrites71.2%

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

                      Alternative 12: 30.5% 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. Step-by-step derivation
                        1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(x \cdot \frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)} + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right)} + \log t \]
                        4. *-commutativeN/A

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

                          \[\leadsto \left(\color{blue}{\frac{{\log y}^{2} \cdot x}{\mathsf{fma}\left(\log y, x, y\right)}} \cdot x + \left(\left(-y \cdot \frac{y}{\mathsf{fma}\left(\log y, x, y\right)}\right) - z\right)\right) + \log t \]
                        6. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{-y} \]
                      9. Applied rewrites29.2%

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

                      Alternative 13: 2.2% accurate, 215.0× 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 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.f6435.0

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

                        \[\leadsto \color{blue}{-z} \]
                      6. Step-by-step derivation
                        1. Applied rewrites16.5%

                          \[\leadsto \frac{0 - z \cdot z}{\color{blue}{0 + z}} \]
                        2. Step-by-step derivation
                          1. Applied rewrites2.1%

                            \[\leadsto z \]
                          2. Add Preprocessing

                          Reproduce

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