Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.3% → 96.8%
Time: 10.7s
Alternatives: 11
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - 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 = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\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 11 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: 84.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - 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 = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{t - z} \cdot x\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-146}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-123}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ (- y z) (- t z)) x)))
   (if (<= z -1.35e-146)
     t_1
     (if (<= z 2.1e-123) (/ (* (- y z) x) (- t z)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = ((y - z) / (t - z)) * x;
	double tmp;
	if (z <= -1.35e-146) {
		tmp = t_1;
	} else if (z <= 2.1e-123) {
		tmp = ((y - z) * x) / (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) :: tmp
    t_1 = ((y - z) / (t - z)) * x
    if (z <= (-1.35d-146)) then
        tmp = t_1
    else if (z <= 2.1d-123) then
        tmp = ((y - z) * x) / (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 = ((y - z) / (t - z)) * x;
	double tmp;
	if (z <= -1.35e-146) {
		tmp = t_1;
	} else if (z <= 2.1e-123) {
		tmp = ((y - z) * x) / (t - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = ((y - z) / (t - z)) * x
	tmp = 0
	if z <= -1.35e-146:
		tmp = t_1
	elif z <= 2.1e-123:
		tmp = ((y - z) * x) / (t - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(y - z) / Float64(t - z)) * x)
	tmp = 0.0
	if (z <= -1.35e-146)
		tmp = t_1;
	elseif (z <= 2.1e-123)
		tmp = Float64(Float64(Float64(y - z) * x) / Float64(t - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = ((y - z) / (t - z)) * x;
	tmp = 0.0;
	if (z <= -1.35e-146)
		tmp = t_1;
	elseif (z <= 2.1e-123)
		tmp = ((y - z) * x) / (t - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.35e-146], t$95$1, If[LessEqual[z, 2.1e-123], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y - z}{t - z} \cdot x\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.34999999999999997e-146 or 2.0999999999999999e-123 < z

    1. Initial program 79.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{t - z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{y - z}{t - z} \cdot \color{blue}{x} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(t - z\right)\right), x\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(t - z\right)\right), x\right) \]
      6. --lowering--.f6499.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(t, z\right)\right), x\right) \]
    4. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]

    if -1.34999999999999997e-146 < z < 2.0999999999999999e-123

    1. Initial program 98.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-146}:\\ \;\;\;\;\frac{y - z}{t - z} \cdot x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-123}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - z}{t - z} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 74.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(0 - \frac{y}{z}, x, x\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-169}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 350:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -4.5e-12)
   (fma (- 0.0 (/ y z)) x x)
   (if (<= z 5.2e-169)
     (/ (* (- y z) x) t)
     (if (<= z 350.0) (* y (/ x (- t z))) (* x (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.5e-12) {
		tmp = fma((0.0 - (y / z)), x, x);
	} else if (z <= 5.2e-169) {
		tmp = ((y - z) * x) / t;
	} else if (z <= 350.0) {
		tmp = y * (x / (t - z));
	} else {
		tmp = x * (1.0 - (y / z));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4.5e-12)
		tmp = fma(Float64(0.0 - Float64(y / z)), x, x);
	elseif (z <= 5.2e-169)
		tmp = Float64(Float64(Float64(y - z) * x) / t);
	elseif (z <= 350.0)
		tmp = Float64(y * Float64(x / Float64(t - z)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.5e-12], N[(N[(0.0 - N[(y / z), $MachinePrecision]), $MachinePrecision] * x + x), $MachinePrecision], If[LessEqual[z, 5.2e-169], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 350.0], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(0 - \frac{y}{z}, x, x\right)\\

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

\mathbf{elif}\;z \leq 350:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.49999999999999981e-12

    1. Initial program 80.5%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6480.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified80.1%

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\frac{y}{z}\right)\right) \cdot x + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right), \color{blue}{x}, x\right) \]
      6. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\frac{y}{\mathsf{neg}\left(z\right)}\right), x, x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(y, \left(\mathsf{neg}\left(z\right)\right)\right), x, x\right) \]
      8. neg-sub0N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(y, \left(0 - z\right)\right), x, x\right) \]
      9. --lowering--.f6480.1%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(0, z\right)\right), x, x\right) \]
    7. Applied egg-rr80.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{0 - z}, x, x\right)} \]
    8. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(y, \left(\mathsf{neg}\left(z\right)\right)\right), x, x\right) \]
      2. neg-lowering-neg.f6480.1%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(y, \mathsf{neg.f64}\left(z\right)\right), x, x\right) \]
    9. Applied egg-rr80.1%

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

    if -4.49999999999999981e-12 < z < 5.20000000000000028e-169

    1. Initial program 98.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \left(y - z\right)\right), \color{blue}{t}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(y - z\right)\right), t\right) \]
      3. --lowering--.f6486.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
    5. Simplified86.7%

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

    if 5.20000000000000028e-169 < z < 350

    1. Initial program 88.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{t - z}\right), \left(x \cdot \left(y - z\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(t - z\right)\right), \left(\color{blue}{x} \cdot \left(y - z\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \left(x \cdot \left(y - z\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(x, \color{blue}{\left(y - z\right)}\right)\right) \]
      11. --lowering--.f6488.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    4. Applied egg-rr88.2%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \color{blue}{\left(x \cdot y\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \left(y \cdot \color{blue}{x}\right)\right) \]
      2. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(y, \color{blue}{x}\right)\right) \]
    7. Simplified70.0%

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

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

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

        \[\leadsto \frac{1}{\frac{t - z}{x}} \cdot y \]
      4. clear-numN/A

        \[\leadsto \frac{x}{t - z} \cdot y \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{y}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), y\right) \]
      7. --lowering--.f6474.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), y\right) \]
    9. Applied egg-rr74.5%

      \[\leadsto \color{blue}{\frac{x}{t - z} \cdot y} \]

    if 350 < z

    1. Initial program 68.7%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6490.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified90.3%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(0 - \frac{y}{z}, x, x\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-169}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 350:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-167}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 390:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -4.8e-13)
     t_1
     (if (<= z 1.2e-167)
       (/ (* (- y z) x) t)
       (if (<= z 390.0) (* y (/ x (- t z))) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -4.8e-13) {
		tmp = t_1;
	} else if (z <= 1.2e-167) {
		tmp = ((y - z) * x) / t;
	} else if (z <= 390.0) {
		tmp = y * (x / (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) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    if (z <= (-4.8d-13)) then
        tmp = t_1
    else if (z <= 1.2d-167) then
        tmp = ((y - z) * x) / t
    else if (z <= 390.0d0) then
        tmp = y * (x / (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 * (1.0 - (y / z));
	double tmp;
	if (z <= -4.8e-13) {
		tmp = t_1;
	} else if (z <= 1.2e-167) {
		tmp = ((y - z) * x) / t;
	} else if (z <= 390.0) {
		tmp = y * (x / (t - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -4.8e-13:
		tmp = t_1
	elif z <= 1.2e-167:
		tmp = ((y - z) * x) / t
	elif z <= 390.0:
		tmp = y * (x / (t - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -4.8e-13)
		tmp = t_1;
	elseif (z <= 1.2e-167)
		tmp = Float64(Float64(Float64(y - z) * x) / t);
	elseif (z <= 390.0)
		tmp = Float64(y * Float64(x / Float64(t - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -4.8e-13)
		tmp = t_1;
	elseif (z <= 1.2e-167)
		tmp = ((y - z) * x) / t;
	elseif (z <= 390.0)
		tmp = y * (x / (t - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-13], t$95$1, If[LessEqual[z, 1.2e-167], N[(N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 390.0], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-167}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\

\mathbf{elif}\;z \leq 390:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.7999999999999997e-13 or 390 < z

    1. Initial program 74.4%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6485.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified85.4%

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

    if -4.7999999999999997e-13 < z < 1.19999999999999997e-167

    1. Initial program 98.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \left(y - z\right)\right), \color{blue}{t}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(y - z\right)\right), t\right) \]
      3. --lowering--.f6486.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
    5. Simplified86.7%

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

    if 1.19999999999999997e-167 < z < 390

    1. Initial program 88.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{t - z}\right), \left(x \cdot \left(y - z\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(t - z\right)\right), \left(\color{blue}{x} \cdot \left(y - z\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \left(x \cdot \left(y - z\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(x, \color{blue}{\left(y - z\right)}\right)\right) \]
      11. --lowering--.f6488.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    4. Applied egg-rr88.2%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \color{blue}{\left(x \cdot y\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \left(y \cdot \color{blue}{x}\right)\right) \]
      2. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{*.f64}\left(y, \color{blue}{x}\right)\right) \]
    7. Simplified70.0%

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

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

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

        \[\leadsto \frac{1}{\frac{t - z}{x}} \cdot y \]
      4. clear-numN/A

        \[\leadsto \frac{x}{t - z} \cdot y \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{y}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), y\right) \]
      7. --lowering--.f6474.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), y\right) \]
    9. Applied egg-rr74.5%

      \[\leadsto \color{blue}{\frac{x}{t - z} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-167}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t}\\ \mathbf{elif}\;z \leq 390:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \left(1 + \frac{t - y}{z}\right)\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+88}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -4.2e+121)
   (* x (+ 1.0 (/ (- t y) z)))
   (if (<= z 1.18e+88) (* (- y z) (/ x (- t z))) (* x (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.2e+121) {
		tmp = x * (1.0 + ((t - y) / z));
	} else if (z <= 1.18e+88) {
		tmp = (y - z) * (x / (t - z));
	} else {
		tmp = x * (1.0 - (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) :: tmp
    if (z <= (-4.2d+121)) then
        tmp = x * (1.0d0 + ((t - y) / z))
    else if (z <= 1.18d+88) then
        tmp = (y - z) * (x / (t - z))
    else
        tmp = x * (1.0d0 - (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.2e+121) {
		tmp = x * (1.0 + ((t - y) / z));
	} else if (z <= 1.18e+88) {
		tmp = (y - z) * (x / (t - z));
	} else {
		tmp = x * (1.0 - (y / z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -4.2e+121:
		tmp = x * (1.0 + ((t - y) / z))
	elif z <= 1.18e+88:
		tmp = (y - z) * (x / (t - z))
	else:
		tmp = x * (1.0 - (y / z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4.2e+121)
		tmp = Float64(x * Float64(1.0 + Float64(Float64(t - y) / z)));
	elseif (z <= 1.18e+88)
		tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -4.2e+121)
		tmp = x * (1.0 + ((t - y) / z));
	elseif (z <= 1.18e+88)
		tmp = (y - z) * (x / (t - z));
	else
		tmp = x * (1.0 - (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.2e+121], N[(x * N[(1.0 + N[(N[(t - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.18e+88], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+121}:\\
\;\;\;\;x \cdot \left(1 + \frac{t - y}{z}\right)\\

\mathbf{elif}\;z \leq 1.18 \cdot 10^{+88}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000003e121

    1. Initial program 64.6%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{t - z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{y - z}{t - z} \cdot \color{blue}{x} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(t - z\right)\right), x\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(t - z\right)\right), x\right) \]
      6. --lowering--.f6499.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(t, z\right)\right), x\right) \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
    5. Taylor expanded in z around inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\left(1 + -1 \cdot \frac{y}{z}\right) - -1 \cdot \frac{t}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) - -1 \cdot \frac{t}{z}\right), x\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(1 - \frac{y}{z}\right) - -1 \cdot \frac{t}{z}\right), x\right) \]
      3. associate--l-N/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 - \left(\frac{y}{z} + -1 \cdot \frac{t}{z}\right)\right), x\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 - \left(\frac{y}{z} + \left(\mathsf{neg}\left(\frac{t}{z}\right)\right)\right)\right), x\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 - \left(\frac{y}{z} - \frac{t}{z}\right)\right), x\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 - \frac{y - t}{z}\right), x\right) \]
      7. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 + \left(\mathsf{neg}\left(\frac{y - t}{z}\right)\right)\right), x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(1 + -1 \cdot \frac{y - t}{z}\right), x\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(-1 \cdot \frac{y - t}{z}\right)\right), x\right) \]
      10. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1 \cdot \left(y - t\right)}{z}\right)\right), x\right) \]
      11. distribute-lft-out--N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1 \cdot y - -1 \cdot t}{z}\right)\right), x\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 \cdot y - -1 \cdot t\right), z\right)\right), x\right) \]
      13. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 \cdot y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t\right), z\right)\right), x\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 \cdot y + 1 \cdot t\right), z\right)\right), x\right) \]
      15. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 \cdot y + t\right), z\right)\right), x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(t + -1 \cdot y\right), z\right)\right), x\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(t + \left(\mathsf{neg}\left(y\right)\right)\right), z\right)\right), x\right) \]
      18. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(t - y\right), z\right)\right), x\right) \]
      19. --lowering--.f6495.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, y\right), z\right)\right), x\right) \]
    7. Simplified95.8%

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

    if -4.2000000000000003e121 < z < 1.1799999999999999e88

    1. Initial program 95.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \left(y - z\right)\right) \]
      7. --lowering--.f6492.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
    4. Applied egg-rr92.1%

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

    if 1.1799999999999999e88 < z

    1. Initial program 56.7%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6491.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified91.5%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \left(1 + \frac{t - y}{z}\right)\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+88}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 360:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -7.5e-9) t_1 (if (<= z 360.0) (/ (* y x) (- t z)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -7.5e-9) {
		tmp = t_1;
	} else if (z <= 360.0) {
		tmp = (y * x) / (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) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    if (z <= (-7.5d-9)) then
        tmp = t_1
    else if (z <= 360.0d0) then
        tmp = (y * x) / (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 * (1.0 - (y / z));
	double tmp;
	if (z <= -7.5e-9) {
		tmp = t_1;
	} else if (z <= 360.0) {
		tmp = (y * x) / (t - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -7.5e-9:
		tmp = t_1
	elif z <= 360.0:
		tmp = (y * x) / (t - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -7.5e-9)
		tmp = t_1;
	elseif (z <= 360.0)
		tmp = Float64(Float64(y * x) / Float64(t - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -7.5e-9)
		tmp = t_1;
	elseif (z <= 360.0)
		tmp = (y * x) / (t - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-9], t$95$1, If[LessEqual[z, 360.0], N[(N[(y * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 360:\\
\;\;\;\;\frac{y \cdot x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.49999999999999933e-9 or 360 < z

    1. Initial program 74.0%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6486.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified86.0%

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

    if -7.49999999999999933e-9 < z < 360

    1. Initial program 95.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(t - z\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{t} - z\right)\right) \]
      3. --lowering--.f6477.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
    5. Simplified77.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{t - z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 360:\\ \;\;\;\;\frac{y \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 280:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -4.8e-12) t_1 (if (<= z 280.0) (* (- y z) (/ x t)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -4.8e-12) {
		tmp = t_1;
	} else if (z <= 280.0) {
		tmp = (y - z) * (x / t);
	} 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 * (1.0d0 - (y / z))
    if (z <= (-4.8d-12)) then
        tmp = t_1
    else if (z <= 280.0d0) then
        tmp = (y - z) * (x / t)
    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 * (1.0 - (y / z));
	double tmp;
	if (z <= -4.8e-12) {
		tmp = t_1;
	} else if (z <= 280.0) {
		tmp = (y - z) * (x / t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -4.8e-12:
		tmp = t_1
	elif z <= 280.0:
		tmp = (y - z) * (x / t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -4.8e-12)
		tmp = t_1;
	elseif (z <= 280.0)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -4.8e-12)
		tmp = t_1;
	elseif (z <= 280.0)
		tmp = (y - z) * (x / t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-12], t$95$1, If[LessEqual[z, 280.0], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 280:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999974e-12 or 280 < z

    1. Initial program 74.4%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6485.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified85.4%

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

    if -4.79999999999999974e-12 < z < 280

    1. Initial program 95.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \left(y - z\right)\right), \color{blue}{t}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(y - z\right)\right), t\right) \]
      3. --lowering--.f6479.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
    5. Simplified79.3%

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

        \[\leadsto \frac{\left(y - z\right) \cdot x}{t} \]
      2. associate-/l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\frac{\color{blue}{x}}{t}\right)\right) \]
      5. /-lowering-/.f6476.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \color{blue}{t}\right)\right) \]
    7. Applied egg-rr76.3%

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

Alternative 7: 69.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -6.3 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-66}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -6.3e-21) t_1 (if (<= z 1.12e-66) (/ (* y x) t) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -6.3e-21) {
		tmp = t_1;
	} else if (z <= 1.12e-66) {
		tmp = (y * x) / t;
	} 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 * (1.0d0 - (y / z))
    if (z <= (-6.3d-21)) then
        tmp = t_1
    else if (z <= 1.12d-66) then
        tmp = (y * x) / t
    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 * (1.0 - (y / z));
	double tmp;
	if (z <= -6.3e-21) {
		tmp = t_1;
	} else if (z <= 1.12e-66) {
		tmp = (y * x) / t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -6.3e-21:
		tmp = t_1
	elif z <= 1.12e-66:
		tmp = (y * x) / t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -6.3e-21)
		tmp = t_1;
	elseif (z <= 1.12e-66)
		tmp = Float64(Float64(y * x) / t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -6.3e-21)
		tmp = t_1;
	elseif (z <= 1.12e-66)
		tmp = (y * x) / t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.3e-21], t$95$1, If[LessEqual[z, 1.12e-66], N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -6.3 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-66}:\\
\;\;\;\;\frac{y \cdot x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.3e-21 or 1.12000000000000004e-66 < z

    1. Initial program 77.0%

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

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

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(x \cdot \frac{y - z}{z}\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{\frac{y - z}{z}}\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right)\right)\right) \]
      7. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \left(\frac{y}{z} - 1\right)\right)\right) \]
      8. associate-+l-N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(0 - \frac{y}{z}\right) + \color{blue}{1}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\mathsf{neg}\left(\frac{y}{z}\right)\right) + 1\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \frac{y}{z} + 1\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \color{blue}{-1 \cdot \frac{y}{z}}\right)\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\frac{y}{z}}\right)\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. /-lowering-/.f6481.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified81.2%

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

    if -6.3e-21 < z < 1.12000000000000004e-66

    1. Initial program 95.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{t}\right) \]
      2. *-lowering-*.f6470.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), t\right) \]
    5. Simplified70.6%

      \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-66}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-8}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-9}:\\
\;\;\;\;\frac{y \cdot x}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7999999999999999e-8 or 1.15e-9 < z

    1. Initial program 74.4%

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

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Simplified61.9%

        \[\leadsto \color{blue}{x} \]

      if -2.7999999999999999e-8 < z < 1.15e-9

      1. Initial program 95.3%

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{t}\right) \]
        2. *-lowering-*.f6468.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), t\right) \]
      5. Simplified68.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification65.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
    7. Add Preprocessing

    Alternative 9: 59.8% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -130000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 340:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= z -130000000.0) x (if (<= z 340.0) (* y (/ x t)) x)))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -130000000.0) {
    		tmp = x;
    	} else if (z <= 340.0) {
    		tmp = y * (x / t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if (z <= (-130000000.0d0)) then
            tmp = x
        else if (z <= 340.0d0) then
            tmp = y * (x / t)
        else
            tmp = x
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -130000000.0) {
    		tmp = x;
    	} else if (z <= 340.0) {
    		tmp = y * (x / t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if z <= -130000000.0:
    		tmp = x
    	elif z <= 340.0:
    		tmp = y * (x / t)
    	else:
    		tmp = x
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (z <= -130000000.0)
    		tmp = x;
    	elseif (z <= 340.0)
    		tmp = Float64(y * Float64(x / t));
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (z <= -130000000.0)
    		tmp = x;
    	elseif (z <= 340.0)
    		tmp = y * (x / t);
    	else
    		tmp = x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[z, -130000000.0], x, If[LessEqual[z, 340.0], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -130000000:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;z \leq 340:\\
    \;\;\;\;y \cdot \frac{x}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.3e8 or 340 < z

      1. Initial program 73.7%

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

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified63.7%

          \[\leadsto \color{blue}{x} \]

        if -1.3e8 < z < 340

        1. Initial program 94.8%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{t - z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y - z}{t - z} \cdot \color{blue}{x} \]
          3. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(t - z\right)\right), x\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(t - z\right)\right), x\right) \]
          6. --lowering--.f6489.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(t, z\right)\right), x\right) \]
        4. Applied egg-rr89.8%

          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
        5. Taylor expanded in z around 0

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{y}{t}\right)}, x\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6462.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right) \]
        7. Simplified62.0%

          \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
        8. Step-by-step derivation
          1. associate-*l/N/A

            \[\leadsto \frac{y \cdot x}{\color{blue}{t}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{x \cdot y}{t} \]
          3. associate-*l/N/A

            \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
          5. /-lowering-/.f6463.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
        9. Applied egg-rr63.2%

          \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification63.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -130000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 340:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
      7. Add Preprocessing

      Alternative 10: 96.5% accurate, 0.8× speedup?

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

        1. Initial program 88.1%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{t - z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y - z}{t - z} \cdot \color{blue}{x} \]
          3. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), \left(t - z\right)\right), x\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(t - z\right)\right), x\right) \]
          6. --lowering--.f6495.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{\_.f64}\left(t, z\right)\right), x\right) \]
        4. Applied egg-rr95.6%

          \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]

        if 1e17 < x

        1. Initial program 77.2%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \left(y - z\right)\right) \]
          7. --lowering--.f6497.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        4. Applied egg-rr97.0%

          \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification96.0%

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

      Alternative 11: 34.3% accurate, 23.0× speedup?

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

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

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified35.6%

          \[\leadsto \color{blue}{x} \]
        2. Add Preprocessing

        Developer Target 1: 96.5% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \frac{x}{\frac{t - z}{y - z}} \end{array} \]
        (FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
        double code(double x, double y, double z, double t) {
        	return x / ((t - z) / (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 = x / ((t - z) / (y - z))
        end function
        
        public static double code(double x, double y, double z, double t) {
        	return x / ((t - z) / (y - z));
        }
        
        def code(x, y, z, t):
        	return x / ((t - z) / (y - z))
        
        function code(x, y, z, t)
        	return Float64(x / Float64(Float64(t - z) / Float64(y - z)))
        end
        
        function tmp = code(x, y, z, t)
        	tmp = x / ((t - z) / (y - z));
        end
        
        code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{x}{\frac{t - z}{y - z}}
        \end{array}
        

        Reproduce

        ?
        herbie shell --seed 2024193 
        (FPCore (x y z t)
          :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
          :precision binary64
        
          :alt
          (! :herbie-platform default (/ x (/ (- t z) (- y z))))
        
          (/ (* x (- y z)) (- t z)))