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

Percentage Accurate: 99.9% → 99.9%
Time: 13.2s
Alternatives: 15
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 15 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} \\ \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}
Derivation
  1. Initial program 99.8%

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

Alternative 2: 68.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \log y - y\right) - z\\ \mathbf{if}\;t\_1 \leq -500:\\ \;\;\;\;\left(-y\right) - z\\ \mathbf{elif}\;t\_1 \leq 40000000:\\ \;\;\;\;\log t\\ \mathbf{else}:\\ \;\;\;\;y - z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (- (* x (log y)) y) z)))
   (if (<= t_1 -500.0) (- (- y) z) (if (<= t_1 40000000.0) (log t) (- y z)))))
double code(double x, double y, double z, double t) {
	double t_1 = ((x * log(y)) - y) - z;
	double tmp;
	if (t_1 <= -500.0) {
		tmp = -y - z;
	} else if (t_1 <= 40000000.0) {
		tmp = log(t);
	} else {
		tmp = y - z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((x * log(y)) - y) - z
    if (t_1 <= (-500.0d0)) then
        tmp = -y - z
    else if (t_1 <= 40000000.0d0) then
        tmp = log(t)
    else
        tmp = y - z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = ((x * Math.log(y)) - y) - z;
	double tmp;
	if (t_1 <= -500.0) {
		tmp = -y - z;
	} else if (t_1 <= 40000000.0) {
		tmp = Math.log(t);
	} else {
		tmp = y - z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = ((x * math.log(y)) - y) - z
	tmp = 0
	if t_1 <= -500.0:
		tmp = -y - z
	elif t_1 <= 40000000.0:
		tmp = math.log(t)
	else:
		tmp = y - z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(x * log(y)) - y) - z)
	tmp = 0.0
	if (t_1 <= -500.0)
		tmp = Float64(Float64(-y) - z);
	elseif (t_1 <= 40000000.0)
		tmp = log(t);
	else
		tmp = Float64(y - z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = ((x * log(y)) - y) - z;
	tmp = 0.0;
	if (t_1 <= -500.0)
		tmp = -y - z;
	elseif (t_1 <= 40000000.0)
		tmp = log(t);
	else
		tmp = y - z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$1, -500.0], N[((-y) - z), $MachinePrecision], If[LessEqual[t$95$1, 40000000.0], N[Log[t], $MachinePrecision], N[(y - z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \log y - y\right) - z\\
\mathbf{if}\;t\_1 \leq -500:\\
\;\;\;\;\left(-y\right) - z\\

\mathbf{elif}\;t\_1 \leq 40000000:\\
\;\;\;\;\log t\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6498.1

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified98.1%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
      2. mul-1-negN/A

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

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
      6. neg-lowering-neg.f6471.8

        \[\leadsto \color{blue}{\left(-y\right)} - z \]
    10. Simplified71.8%

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

    if -500 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 4e7

    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} + \log t \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} + \log t \]
      2. neg-lowering-neg.f6492.0

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

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

      \[\leadsto \color{blue}{\log t} \]
    7. Step-by-step derivation
      1. log-lowering-log.f6489.6

        \[\leadsto \color{blue}{\log t} \]
    8. Simplified89.6%

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

    if 4e7 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6499.2

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified99.2%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
      2. mul-1-negN/A

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

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
      6. neg-lowering-neg.f6450.9

        \[\leadsto \color{blue}{\left(-y\right)} - z \]
    10. Simplified50.9%

      \[\leadsto \color{blue}{\left(-y\right) - z} \]
    11. Step-by-step derivation
      1. neg-sub0N/A

        \[\leadsto \color{blue}{\left(0 - y\right)} - z \]
      2. flip3--N/A

        \[\leadsto \color{blue}{\frac{{0}^{3} - {y}^{3}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)}} - z \]
      3. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{0} - {y}^{3}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      4. cube-unmultN/A

        \[\leadsto \frac{0 - \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      5. neg-sub0N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(y \cdot \left(y \cdot y\right)\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      6. cube-unmultN/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{{y}^{3}}\right)}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      7. cube-negN/A

        \[\leadsto \frac{\color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{3}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      8. sqr-powN/A

        \[\leadsto \frac{\color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      9. unpow-prod-downN/A

        \[\leadsto \frac{\color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      10. sqr-negN/A

        \[\leadsto \frac{{\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      11. unpow-prod-downN/A

        \[\leadsto \frac{\color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      12. sqr-powN/A

        \[\leadsto \frac{\color{blue}{{y}^{3}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      13. metadata-evalN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{0} + \left(y \cdot y + 0 \cdot y\right)} - z \]
      14. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \color{blue}{0}\right)} - z \]
      15. metadata-evalN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \color{blue}{\left(\mathsf{neg}\left(0\right)\right)}\right)} - z \]
      16. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \left(\mathsf{neg}\left(\color{blue}{0 \cdot \left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)} - z \]
      17. sub-negN/A

        \[\leadsto \frac{{y}^{3}}{0 + \color{blue}{\left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} - z \]
      18. +-lft-identityN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)}} - z \]
      19. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{y \cdot y - \color{blue}{0}} - z \]
      20. --rgt-identityN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y}} - z \]
      21. pow2N/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{{y}^{2}}} - z \]
      22. pow-divN/A

        \[\leadsto \color{blue}{{y}^{\left(3 - 2\right)}} - z \]
      23. metadata-evalN/A

        \[\leadsto {y}^{\color{blue}{1}} - z \]
      24. unpow1N/A

        \[\leadsto \color{blue}{y} - z \]
    12. Applied egg-rr51.8%

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

Alternative 3: 79.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -500:\\
\;\;\;\;\left(-y\right) - z\\

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6498.0

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified98.0%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
      2. mul-1-negN/A

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

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
      6. neg-lowering-neg.f6469.8

        \[\leadsto \color{blue}{\left(-y\right)} - z \]
    10. Simplified69.8%

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

    if -500 < (-.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 z around inf

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} + \log t \]
      2. neg-lowering-neg.f6494.6

        \[\leadsto \color{blue}{\left(-z\right)} + \log t \]
    5. Simplified94.6%

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

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

        \[\leadsto \color{blue}{\log t - z} \]
      3. --lowering--.f64N/A

        \[\leadsto \color{blue}{\log t - z} \]
      4. log-lowering-log.f6494.6

        \[\leadsto \color{blue}{\log t} - z \]
    7. Applied egg-rr94.6%

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

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

    1. Initial program 99.5%

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

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

        \[\leadsto \color{blue}{x \cdot \log y} \]
      2. log-lowering-log.f6486.2

        \[\leadsto x \cdot \color{blue}{\log y} \]
    5. Simplified86.2%

      \[\leadsto \color{blue}{x \cdot \log y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 99.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{1}{\frac{1}{x \cdot \log y - \left(y + z\right)}}\\
\mathbf{if}\;z \leq -6500000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5e6 or 120 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6499.6

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified99.6%

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

    if -6.5e6 < z < 120

    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. +-commutativeN/A

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

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

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

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

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

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

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

Alternative 5: 69.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot \log y - y \leq -500:\\
\;\;\;\;\left(-y\right) - z\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6498.0

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified98.0%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
      2. mul-1-negN/A

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

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
      6. neg-lowering-neg.f6469.8

        \[\leadsto \color{blue}{\left(-y\right)} - z \]
    10. Simplified69.8%

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

    if -500 < (-.f64 (*.f64 x (log.f64 y)) y)

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} + \log t \]
      2. neg-lowering-neg.f6468.4

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

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

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

        \[\leadsto \color{blue}{\log t - z} \]
      3. --lowering--.f64N/A

        \[\leadsto \color{blue}{\log t - z} \]
      4. log-lowering-log.f6468.4

        \[\leadsto \color{blue}{\log t} - z \]
    7. Applied egg-rr68.4%

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

Alternative 6: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.2:\\ \;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(x, \frac{\log y}{y}, -1 - \frac{z}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 2.2)
   (fma x (log y) (- (log t) z))
   (* y (fma x (/ (log y) y) (- -1.0 (/ z y))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 2.2) {
		tmp = fma(x, log(y), (log(t) - z));
	} else {
		tmp = y * fma(x, (log(y) / y), (-1.0 - (z / y)));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 2.2)
		tmp = fma(x, log(y), Float64(log(t) - z));
	else
		tmp = Float64(y * fma(x, Float64(log(y) / y), Float64(-1.0 - Float64(z / y))));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.2], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(N[Log[y], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000002 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6498.3

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified98.3%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{x \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right)}{y} + \left(-1 - \frac{z}{y}\right)\right) \]
      12. remove-double-negN/A

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

        \[\leadsto y \cdot \left(\color{blue}{x \cdot \frac{\log y}{y}} + \left(-1 - \frac{z}{y}\right)\right) \]
      14. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(x, \frac{\log y}{y}, -1 - \frac{z}{y}\right)} \]
      15. /-lowering-/.f64N/A

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

        \[\leadsto y \cdot \mathsf{fma}\left(x, \frac{\color{blue}{\log y}}{y}, -1 - \frac{z}{y}\right) \]
      17. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(x, \frac{\log y}{y}, \color{blue}{-1 - \frac{z}{y}}\right) \]
    10. Simplified98.4%

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

Alternative 7: 99.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\log y - \frac{y + z}{x}\right)\\ \mathbf{if}\;x \leq -1.2:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 0.0085:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- (log y) (/ (+ y z) x)))))
   (if (<= x -1.2) t_1 (if (<= x 0.0085) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (log(y) - ((y + z) / x));
	double tmp;
	if (x <= -1.2) {
		tmp = t_1;
	} else if (x <= 0.0085) {
		tmp = log(t) - (y + z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (log(y) - ((y + z) / x))
    if (x <= (-1.2d0)) then
        tmp = t_1
    else if (x <= 0.0085d0) then
        tmp = log(t) - (y + z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (Math.log(y) - ((y + z) / x));
	double tmp;
	if (x <= -1.2) {
		tmp = t_1;
	} else if (x <= 0.0085) {
		tmp = Math.log(t) - (y + z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (math.log(y) - ((y + z) / x))
	tmp = 0
	if x <= -1.2:
		tmp = t_1
	elif x <= 0.0085:
		tmp = math.log(t) - (y + z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(log(y) - Float64(Float64(y + z) / x)))
	tmp = 0.0
	if (x <= -1.2)
		tmp = t_1;
	elseif (x <= 0.0085)
		tmp = Float64(log(t) - Float64(y + z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (log(y) - ((y + z) / x));
	tmp = 0.0;
	if (x <= -1.2)
		tmp = t_1;
	elseif (x <= 0.0085)
		tmp = log(t) - (y + z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[Log[y], $MachinePrecision] - N[(N[(y + z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2], t$95$1, If[LessEqual[x, 0.0085], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(\log y - \frac{y + z}{x}\right)\\
\mathbf{if}\;x \leq -1.2:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 0.0085:\\
\;\;\;\;\log t - \left(y + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.19999999999999996 or 0.0085000000000000006 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6498.4

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

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around inf

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

        \[\leadsto x \cdot \left(\log y + \color{blue}{\frac{-1 \cdot \left(y + z\right)}{x}}\right) \]
      2. distribute-lft-inN/A

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\left(\log y + -1 \cdot \frac{y}{x}\right) - \frac{z}{x}\right)} \]
      8. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\log y - \frac{y + z}{x}\right)} \]
      18. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\log y - \frac{y + z}{x}\right)} \]
      19. log-lowering-log.f64N/A

        \[\leadsto x \cdot \left(\color{blue}{\log y} - \frac{y + z}{x}\right) \]
    10. Simplified98.5%

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

    if -1.19999999999999996 < x < 0.0085000000000000006

    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. --lowering--.f64N/A

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

        \[\leadsto \color{blue}{\log t} - \left(y + z\right) \]
      3. +-lowering-+.f6499.1

        \[\leadsto \log t - \color{blue}{\left(y + z\right)} \]
    5. Simplified99.1%

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

Alternative 8: 90.0% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, -y\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.7e27

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6499.6

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified99.6%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x \cdot \log y - y} \]
    9. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto x \cdot \log y + \color{blue}{-1 \cdot y} \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log y, -1 \cdot y\right)} \]
      4. log-lowering-log.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\mathsf{neg}\left(y\right)}\right) \]
      6. neg-lowering-neg.f6489.8

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

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

    if -1.7e27 < x < 6.1999999999999999e36

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{\log t} - \left(y + z\right) \]
      3. +-lowering-+.f6496.3

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

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

    if 6.1999999999999999e36 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{-z}\right) \]
    8. Simplified88.1%

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

Alternative 9: 90.0% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.00000000000000011e32 or 2.3000000000000001e38 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6499.5

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

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x \cdot \log y - y} \]
    9. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto x \cdot \log y + \color{blue}{-1 \cdot y} \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log y, -1 \cdot y\right)} \]
      4. log-lowering-log.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{\mathsf{neg}\left(y\right)}\right) \]
      6. neg-lowering-neg.f6485.2

        \[\leadsto \mathsf{fma}\left(x, \log y, \color{blue}{-y}\right) \]
    10. Simplified85.2%

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

    if -2.00000000000000011e32 < x < 2.3000000000000001e38

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{\log t} - \left(y + z\right) \]
      3. +-lowering-+.f6496.4

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

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

Alternative 10: 83.0% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.94999999999999996e123 or 8.4999999999999997e38 < x

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{x \cdot \log y} \]
      2. log-lowering-log.f6475.1

        \[\leadsto x \cdot \color{blue}{\log y} \]
    5. Simplified75.1%

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

    if -1.94999999999999996e123 < x < 8.4999999999999997e38

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{\log t} - \left(y + z\right) \]
      3. +-lowering-+.f6494.0

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

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

Alternative 11: 48.5% accurate, 21.5× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
      2. log-lowering-log.f6479.2

        \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
    7. Simplified79.2%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
    9. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
      2. mul-1-negN/A

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

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      4. --lowering--.f64N/A

        \[\leadsto \color{blue}{-1 \cdot y - z} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
      6. neg-lowering-neg.f6441.3

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

      \[\leadsto \color{blue}{\left(-y\right) - z} \]
    11. Step-by-step derivation
      1. neg-sub0N/A

        \[\leadsto \color{blue}{\left(0 - y\right)} - z \]
      2. flip3--N/A

        \[\leadsto \color{blue}{\frac{{0}^{3} - {y}^{3}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)}} - z \]
      3. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{0} - {y}^{3}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      4. cube-unmultN/A

        \[\leadsto \frac{0 - \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      5. neg-sub0N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(y \cdot \left(y \cdot y\right)\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      6. cube-unmultN/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{{y}^{3}}\right)}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      7. cube-negN/A

        \[\leadsto \frac{\color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{3}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      8. sqr-powN/A

        \[\leadsto \frac{\color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      9. unpow-prod-downN/A

        \[\leadsto \frac{\color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      10. sqr-negN/A

        \[\leadsto \frac{{\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      11. unpow-prod-downN/A

        \[\leadsto \frac{\color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      12. sqr-powN/A

        \[\leadsto \frac{\color{blue}{{y}^{3}}}{0 \cdot 0 + \left(y \cdot y + 0 \cdot y\right)} - z \]
      13. metadata-evalN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{0} + \left(y \cdot y + 0 \cdot y\right)} - z \]
      14. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \color{blue}{0}\right)} - z \]
      15. metadata-evalN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \color{blue}{\left(\mathsf{neg}\left(0\right)\right)}\right)} - z \]
      16. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{0 + \left(y \cdot y + \left(\mathsf{neg}\left(\color{blue}{0 \cdot \left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)} - z \]
      17. sub-negN/A

        \[\leadsto \frac{{y}^{3}}{0 + \color{blue}{\left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} - z \]
      18. +-lft-identityN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)}} - z \]
      19. mul0-lftN/A

        \[\leadsto \frac{{y}^{3}}{y \cdot y - \color{blue}{0}} - z \]
      20. --rgt-identityN/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y}} - z \]
      21. pow2N/A

        \[\leadsto \frac{{y}^{3}}{\color{blue}{{y}^{2}}} - z \]
      22. pow-divN/A

        \[\leadsto \color{blue}{{y}^{\left(3 - 2\right)}} - z \]
      23. metadata-evalN/A

        \[\leadsto {y}^{\color{blue}{1}} - z \]
      24. unpow1N/A

        \[\leadsto \color{blue}{y} - z \]
    12. Applied egg-rr39.3%

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

    if 5.1000000000000001e51 < 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 y around inf

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

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

        \[\leadsto \color{blue}{-y} \]
    5. Simplified74.0%

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

Alternative 12: 48.6% accurate, 23.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 3.6 \cdot 10^{+49}:\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \end{array} \]
(FPCore (x y z t) :precision binary64 (if (<= y 3.6e+49) (- z) (- y)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 3.6e+49) {
		tmp = -z;
	} else {
		tmp = -y;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 3.6d+49) then
        tmp = -z
    else
        tmp = -y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 3.6e+49) {
		tmp = -z;
	} else {
		tmp = -y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 3.6e+49:
		tmp = -z
	else:
		tmp = -y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 3.6e+49)
		tmp = Float64(-z);
	else
		tmp = Float64(-y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 3.6e+49)
		tmp = -z;
	else
		tmp = -y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 3.6e+49], (-z), (-y)]
\begin{array}{l}

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

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


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

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
      2. neg-lowering-neg.f6439.2

        \[\leadsto \color{blue}{-z} \]
    5. Simplified39.2%

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

    if 3.59999999999999996e49 < 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 y around inf

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

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

        \[\leadsto \color{blue}{-y} \]
    5. Simplified74.0%

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

Alternative 13: 57.5% accurate, 35.8× speedup?

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
    2. log-lowering-log.f6486.6

      \[\leadsto \frac{1}{\frac{1}{x \cdot \color{blue}{\log y} - \left(y + z\right)}} \]
  7. Simplified86.6%

    \[\leadsto \frac{1}{\frac{1}{\color{blue}{x \cdot \log y} - \left(y + z\right)}} \]
  8. Taylor expanded in x around 0

    \[\leadsto \color{blue}{-1 \cdot \left(y + z\right)} \]
  9. Step-by-step derivation
    1. distribute-lft-inN/A

      \[\leadsto \color{blue}{-1 \cdot y + -1 \cdot z} \]
    2. mul-1-negN/A

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

      \[\leadsto \color{blue}{-1 \cdot y - z} \]
    4. --lowering--.f64N/A

      \[\leadsto \color{blue}{-1 \cdot y - z} \]
    5. mul-1-negN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - z \]
    6. neg-lowering-neg.f6457.7

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

    \[\leadsto \color{blue}{\left(-y\right) - z} \]
  11. Add Preprocessing

Alternative 14: 30.1% accurate, 71.7× speedup?

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

\\
-y
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{-y} \]
  5. Simplified29.6%

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

Alternative 15: 2.2% accurate, 215.0× 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 y
end
function tmp = code(x, y, z, t)
	tmp = y;
end
code[x_, y_, z_, t_] := y
\begin{array}{l}

\\
y
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{-y} \]
  5. Simplified29.6%

    \[\leadsto \color{blue}{-y} \]
  6. Step-by-step derivation
    1. neg-sub0N/A

      \[\leadsto \color{blue}{0 - y} \]
    2. sub-negN/A

      \[\leadsto \color{blue}{0 + \left(\mathsf{neg}\left(y\right)\right)} \]
    3. flip3-+N/A

      \[\leadsto \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} \]
    5. metadata-evalN/A

      \[\leadsto \frac{\color{blue}{0} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    6. sqr-powN/A

      \[\leadsto \frac{0 + \color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    7. pow-prod-downN/A

      \[\leadsto \frac{0 + \color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    8. sqr-negN/A

      \[\leadsto \frac{0 + {\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    9. pow-prod-downN/A

      \[\leadsto \frac{0 + \color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    10. sqr-powN/A

      \[\leadsto \frac{0 + \color{blue}{{y}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    11. +-lowering-+.f64N/A

      \[\leadsto \frac{\color{blue}{0 + {y}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    12. cube-multN/A

      \[\leadsto \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    13. *-lowering-*.f64N/A

      \[\leadsto \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    14. *-lowering-*.f64N/A

      \[\leadsto \frac{0 + y \cdot \color{blue}{\left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    15. metadata-evalN/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0} + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    16. +-lowering-+.f64N/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} \]
    17. sqr-negN/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    18. --lowering--.f64N/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \color{blue}{\left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}} \]
    19. *-lowering-*.f64N/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    20. *-lowering-*.f64N/A

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - \color{blue}{0 \cdot \left(\mathsf{neg}\left(y\right)\right)}\right)} \]
    21. neg-lowering-neg.f641.5

      \[\leadsto \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \color{blue}{\left(-y\right)}\right)} \]
  7. Applied egg-rr1.5%

    \[\leadsto \color{blue}{\frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(-y\right)\right)}} \]
  8. Step-by-step derivation
    1. +-lft-identityN/A

      \[\leadsto \frac{\color{blue}{y \cdot \left(y \cdot y\right)}}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    2. cube-unmultN/A

      \[\leadsto \frac{\color{blue}{{y}^{3}}}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
    3. +-lft-identityN/A

      \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)}} \]
    4. mul0-lftN/A

      \[\leadsto \frac{{y}^{3}}{y \cdot y - \color{blue}{0}} \]
    5. --rgt-identityN/A

      \[\leadsto \frac{{y}^{3}}{\color{blue}{y \cdot y}} \]
    6. pow2N/A

      \[\leadsto \frac{{y}^{3}}{\color{blue}{{y}^{2}}} \]
    7. pow-divN/A

      \[\leadsto \color{blue}{{y}^{\left(3 - 2\right)}} \]
    8. metadata-evalN/A

      \[\leadsto {y}^{\color{blue}{1}} \]
    9. unpow12.3

      \[\leadsto \color{blue}{y} \]
  9. Applied egg-rr2.3%

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

Reproduce

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