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

Percentage Accurate: 99.9% → 99.9%
Time: 9.1s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(x \cdot \log y - y\right) - z\right) + \log t \end{array} \]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
	return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
	return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t):
	return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t))
end
function tmp = code(x, y, z, t)
	tmp = (((x * log(y)) - y) - z) + log(t);
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot \log y - y\right) - z\right) + \log t \end{array} \]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
	return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
	return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t):
	return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t))
end
function tmp = code(x, y, z, t)
	tmp = (((x * log(y)) - y) - z) + log(t);
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}

Alternative 1: 99.9% accurate, 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.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. Add Preprocessing

Alternative 2: 67.3% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y} \]
    8. Applied rewrites52.4%

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

    if -1.99999999999999992e28 < (-.f64 (*.f64 x (log.f64 y)) y) < 5e113

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

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

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

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

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

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

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

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

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

      \[\leadsto \log t - \color{blue}{z} \]
    10. Step-by-step derivation
      1. Applied rewrites90.2%

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

      if 5e113 < (-.f64 (*.f64 x (log.f64 y)) y)

      1. Initial program 99.6%

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

          \[\leadsto \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. associate-/l*N/A

          \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot \log y\right) \cdot \log y\right) \cdot \frac{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 \]
        9. lower-fma.f64N/A

          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(x \cdot \log y\right) \cdot \log y, \frac{x}{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 rewrites97.5%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left({\log y}^{2} \cdot x, \frac{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. Taylor expanded in x around inf

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

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

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

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

        \[\leadsto \color{blue}{\log y \cdot x} \]
    11. Recombined 3 regimes into one program.
    12. Final simplification71.0%

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

    Alternative 3: 89.6% accurate, 1.0× speedup?

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

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

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

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

      if -4.5e88 < z < 3.3e-10

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

        if 3.3e-10 < z

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 89.6% accurate, 1.0× speedup?

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

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

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

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

        if -4.5e88 < z < 3.3e-10

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          if 3.3e-10 < 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.f6488.2

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

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

        Alternative 5: 89.6% accurate, 1.0× speedup?

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

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

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

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

          if -4.5e88 < z < 3.3e-10

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

          if 3.3e-10 < 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.f6488.2

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

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

        Alternative 6: 88.9% accurate, 1.0× speedup?

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

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

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

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

          if -4.1000000000000001e114 < x < 7.4e15

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

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

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

        Alternative 7: 83.3% accurate, 1.0× speedup?

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

          1. Initial program 99.6%

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

              \[\leadsto \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. associate-/l*N/A

              \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot \log y\right) \cdot \log y\right) \cdot \frac{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 \]
            9. lower-fma.f64N/A

              \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(x \cdot \log y\right) \cdot \log y, \frac{x}{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 rewrites96.5%

            \[\leadsto \left(\color{blue}{\mathsf{fma}\left({\log y}^{2} \cdot x, \frac{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. Taylor expanded in x around inf

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

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

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

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

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

          if -6.49999999999999999e168 < x < 1.74999999999999992e109

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

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

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

          if 1.74999999999999992e109 < x

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

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

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

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

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

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

            Alternative 8: 83.3% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -6.5 \cdot 10^{+168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+109}:\\ \;\;\;\;\left(\log t - y\right) - z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* (log y) x)))
               (if (<= x -6.5e+168) t_1 (if (<= x 1.75e+109) (- (- (log t) y) z) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = log(y) * x;
            	double tmp;
            	if (x <= -6.5e+168) {
            		tmp = t_1;
            	} else if (x <= 1.75e+109) {
            		tmp = (log(t) - y) - z;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = log(y) * x
                if (x <= (-6.5d+168)) then
                    tmp = t_1
                else if (x <= 1.75d+109) then
                    tmp = (log(t) - y) - z
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = Math.log(y) * x;
            	double tmp;
            	if (x <= -6.5e+168) {
            		tmp = t_1;
            	} else if (x <= 1.75e+109) {
            		tmp = (Math.log(t) - y) - z;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = math.log(y) * x
            	tmp = 0
            	if x <= -6.5e+168:
            		tmp = t_1
            	elif x <= 1.75e+109:
            		tmp = (math.log(t) - y) - z
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(log(y) * x)
            	tmp = 0.0
            	if (x <= -6.5e+168)
            		tmp = t_1;
            	elseif (x <= 1.75e+109)
            		tmp = Float64(Float64(log(t) - y) - z);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = log(y) * x;
            	tmp = 0.0;
            	if (x <= -6.5e+168)
            		tmp = t_1;
            	elseif (x <= 1.75e+109)
            		tmp = (log(t) - y) - z;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.5e+168], t$95$1, If[LessEqual[x, 1.75e+109], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \log y \cdot x\\
            \mathbf{if}\;x \leq -6.5 \cdot 10^{+168}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;x \leq 1.75 \cdot 10^{+109}:\\
            \;\;\;\;\left(\log t - y\right) - z\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -6.49999999999999999e168 or 1.74999999999999992e109 < x

              1. Initial program 99.6%

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

                  \[\leadsto \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. associate-/l*N/A

                  \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot \log y\right) \cdot \log y\right) \cdot \frac{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 \]
                9. lower-fma.f64N/A

                  \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\left(x \cdot \log y\right) \cdot \log y, \frac{x}{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 rewrites97.2%

                \[\leadsto \left(\color{blue}{\mathsf{fma}\left({\log y}^{2} \cdot x, \frac{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. Taylor expanded in x around inf

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

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

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

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

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

              if -6.49999999999999999e168 < x < 1.74999999999999992e109

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

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

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

            Alternative 9: 60.3% accurate, 1.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+90}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq 0.0132:\\ \;\;\;\;\log t - y\\ \mathbf{else}:\\ \;\;\;\;\log t - z\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -1.35e+90) (- z) (if (<= z 0.0132) (- (log t) y) (- (log t) z))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -1.35e+90) {
            		tmp = -z;
            	} else if (z <= 0.0132) {
            		tmp = log(t) - y;
            	} else {
            		tmp = log(t) - z;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: tmp
                if (z <= (-1.35d+90)) then
                    tmp = -z
                else if (z <= 0.0132d0) then
                    tmp = log(t) - y
                else
                    tmp = log(t) - z
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -1.35e+90) {
            		tmp = -z;
            	} else if (z <= 0.0132) {
            		tmp = Math.log(t) - y;
            	} else {
            		tmp = Math.log(t) - z;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -1.35e+90:
            		tmp = -z
            	elif z <= 0.0132:
            		tmp = math.log(t) - y
            	else:
            		tmp = math.log(t) - z
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -1.35e+90)
            		tmp = Float64(-z);
            	elseif (z <= 0.0132)
            		tmp = Float64(log(t) - y);
            	else
            		tmp = Float64(log(t) - z);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -1.35e+90)
            		tmp = -z;
            	elseif (z <= 0.0132)
            		tmp = log(t) - y;
            	else
            		tmp = log(t) - z;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -1.35e+90], (-z), If[LessEqual[z, 0.0132], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.35 \cdot 10^{+90}:\\
            \;\;\;\;-z\\
            
            \mathbf{elif}\;z \leq 0.0132:\\
            \;\;\;\;\log t - y\\
            
            \mathbf{else}:\\
            \;\;\;\;\log t - z\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.35e90

              1. Initial program 100.0%

                \[\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.f6476.3

                  \[\leadsto \color{blue}{-z} \]
              5. Applied rewrites76.3%

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

              if -1.35e90 < z < 0.0132

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \log t - y \]

                if 0.0132 < z

                1. Initial program 99.9%

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

                  \[\leadsto \color{blue}{\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 x around 0

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

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

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

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

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

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

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

                  \[\leadsto \log t - \color{blue}{z} \]
                10. Step-by-step derivation
                  1. Applied rewrites65.3%

                    \[\leadsto \log t - \color{blue}{z} \]
                11. Recombined 3 regimes into one program.
                12. Add Preprocessing

                Alternative 10: 60.2% accurate, 2.0× speedup?

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

                  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 x around 0

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

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

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

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

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

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

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

                    \[\leadsto \log t - \color{blue}{z} \]
                  10. Step-by-step derivation
                    1. Applied rewrites62.6%

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

                    if 2.8000000000000001e28 < y

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 47.8% accurate, 14.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+90}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq 1150000:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= z -1.35e+90) (- z) (if (<= z 1150000.0) (- y) (- z))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.35e+90) {
                  		tmp = -z;
                  	} else if (z <= 1150000.0) {
                  		tmp = -y;
                  	} else {
                  		tmp = -z;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8) :: tmp
                      if (z <= (-1.35d+90)) then
                          tmp = -z
                      else if (z <= 1150000.0d0) then
                          tmp = -y
                      else
                          tmp = -z
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.35e+90) {
                  		tmp = -z;
                  	} else if (z <= 1150000.0) {
                  		tmp = -y;
                  	} else {
                  		tmp = -z;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if z <= -1.35e+90:
                  		tmp = -z
                  	elif z <= 1150000.0:
                  		tmp = -y
                  	else:
                  		tmp = -z
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (z <= -1.35e+90)
                  		tmp = Float64(-z);
                  	elseif (z <= 1150000.0)
                  		tmp = Float64(-y);
                  	else
                  		tmp = Float64(-z);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (z <= -1.35e+90)
                  		tmp = -z;
                  	elseif (z <= 1150000.0)
                  		tmp = -y;
                  	else
                  		tmp = -z;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[z, -1.35e+90], (-z), If[LessEqual[z, 1150000.0], (-y), (-z)]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -1.35 \cdot 10^{+90}:\\
                  \;\;\;\;-z\\
                  
                  \mathbf{elif}\;z \leq 1150000:\\
                  \;\;\;\;-y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-z\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.35e90 or 1.15e6 < z

                    1. Initial program 99.9%

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

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

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

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

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

                    if -1.35e90 < z < 1.15e6

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Reproduce

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