Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A

Percentage Accurate: 98.1% → 98.1%
Time: 9.1s
Alternatives: 13
Speedup: 1.0×

Specification

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 98.1% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Alternative 1: 98.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(z - a)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative98.4%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a} + x} \]
    2. fma-define98.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  3. Simplified98.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  4. Add Preprocessing
  5. Final simplification98.4%

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

Alternative 2: 83.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t}{a - z}\\ t_2 := x + y \cdot \frac{z - t}{z}\\ \mathbf{if}\;z \leq -9.2 \cdot 10^{+69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-109}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-151}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-89}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ t (- a z))))) (t_2 (+ x (* y (/ (- z t) z)))))
   (if (<= z -9.2e+69)
     t_2
     (if (<= z -2.2e-63)
       t_1
       (if (<= z -2.9e-109)
         t_2
         (if (<= z -1.95e-151)
           (- x (* t (/ y z)))
           (if (<= z 1.52e-89) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / (a - z)));
	double t_2 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -9.2e+69) {
		tmp = t_2;
	} else if (z <= -2.2e-63) {
		tmp = t_1;
	} else if (z <= -2.9e-109) {
		tmp = t_2;
	} else if (z <= -1.95e-151) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.52e-89) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (t / (a - z)))
    t_2 = x + (y * ((z - t) / z))
    if (z <= (-9.2d+69)) then
        tmp = t_2
    else if (z <= (-2.2d-63)) then
        tmp = t_1
    else if (z <= (-2.9d-109)) then
        tmp = t_2
    else if (z <= (-1.95d-151)) then
        tmp = x - (t * (y / z))
    else if (z <= 1.52d-89) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (t / (a - z)));
	double t_2 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -9.2e+69) {
		tmp = t_2;
	} else if (z <= -2.2e-63) {
		tmp = t_1;
	} else if (z <= -2.9e-109) {
		tmp = t_2;
	} else if (z <= -1.95e-151) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.52e-89) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (t / (a - z)))
	t_2 = x + (y * ((z - t) / z))
	tmp = 0
	if z <= -9.2e+69:
		tmp = t_2
	elif z <= -2.2e-63:
		tmp = t_1
	elif z <= -2.9e-109:
		tmp = t_2
	elif z <= -1.95e-151:
		tmp = x - (t * (y / z))
	elif z <= 1.52e-89:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(t / Float64(a - z))))
	t_2 = Float64(x + Float64(y * Float64(Float64(z - t) / z)))
	tmp = 0.0
	if (z <= -9.2e+69)
		tmp = t_2;
	elseif (z <= -2.2e-63)
		tmp = t_1;
	elseif (z <= -2.9e-109)
		tmp = t_2;
	elseif (z <= -1.95e-151)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 1.52e-89)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (t / (a - z)));
	t_2 = x + (y * ((z - t) / z));
	tmp = 0.0;
	if (z <= -9.2e+69)
		tmp = t_2;
	elseif (z <= -2.2e-63)
		tmp = t_1;
	elseif (z <= -2.9e-109)
		tmp = t_2;
	elseif (z <= -1.95e-151)
		tmp = x - (t * (y / z));
	elseif (z <= 1.52e-89)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+69], t$95$2, If[LessEqual[z, -2.2e-63], t$95$1, If[LessEqual[z, -2.9e-109], t$95$2, If[LessEqual[z, -1.95e-151], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-89], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a - z}\\
t_2 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+69}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-109}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.52 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.20000000000000067e69 or -2.2e-63 < z < -2.9e-109 or 1.52e-89 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 91.9%

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

    if -9.20000000000000067e69 < z < -2.2e-63 or -1.95000000000000003e-151 < z < 1.52e-89

    1. Initial program 97.7%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 86.6%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/86.6%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg86.6%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out86.6%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative86.6%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*87.6%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac87.6%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac287.6%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg87.6%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in87.6%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg87.6%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified87.6%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in t around 0 87.6%

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

    if -2.9e-109 < z < -1.95000000000000003e-151

    1. Initial program 82.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 83.3%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/83.3%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg83.3%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out83.3%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative83.3%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*74.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac74.8%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac274.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg74.8%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in74.8%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg74.8%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified74.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in z around inf 83.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg83.3%

        \[\leadsto x + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg83.3%

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*83.3%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified83.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+69}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-63}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-109}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-151}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-89}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 64.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \frac{y}{z}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+20}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+207}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+291}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* t (/ y z)))))
   (if (<= t -2.9e+53)
     t_1
     (if (<= t 3.8e+20)
       (+ y x)
       (if (<= t 7e+207)
         (+ x (/ y (/ a t)))
         (if (<= t 1.02e+291) t_1 (+ x (/ (* y t) a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t * (y / z));
	double tmp;
	if (t <= -2.9e+53) {
		tmp = t_1;
	} else if (t <= 3.8e+20) {
		tmp = y + x;
	} else if (t <= 7e+207) {
		tmp = x + (y / (a / t));
	} else if (t <= 1.02e+291) {
		tmp = t_1;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (t * (y / z))
    if (t <= (-2.9d+53)) then
        tmp = t_1
    else if (t <= 3.8d+20) then
        tmp = y + x
    else if (t <= 7d+207) then
        tmp = x + (y / (a / t))
    else if (t <= 1.02d+291) then
        tmp = t_1
    else
        tmp = x + ((y * t) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t * (y / z));
	double tmp;
	if (t <= -2.9e+53) {
		tmp = t_1;
	} else if (t <= 3.8e+20) {
		tmp = y + x;
	} else if (t <= 7e+207) {
		tmp = x + (y / (a / t));
	} else if (t <= 1.02e+291) {
		tmp = t_1;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t * (y / z))
	tmp = 0
	if t <= -2.9e+53:
		tmp = t_1
	elif t <= 3.8e+20:
		tmp = y + x
	elif t <= 7e+207:
		tmp = x + (y / (a / t))
	elif t <= 1.02e+291:
		tmp = t_1
	else:
		tmp = x + ((y * t) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (t <= -2.9e+53)
		tmp = t_1;
	elseif (t <= 3.8e+20)
		tmp = Float64(y + x);
	elseif (t <= 7e+207)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (t <= 1.02e+291)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y * t) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (t * (y / z));
	tmp = 0.0;
	if (t <= -2.9e+53)
		tmp = t_1;
	elseif (t <= 3.8e+20)
		tmp = y + x;
	elseif (t <= 7e+207)
		tmp = x + (y / (a / t));
	elseif (t <= 1.02e+291)
		tmp = t_1;
	else
		tmp = x + ((y * t) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+53], t$95$1, If[LessEqual[t, 3.8e+20], N[(y + x), $MachinePrecision], If[LessEqual[t, 7e+207], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+291], t$95$1, N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 7 \cdot 10^{+207}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{+291}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9000000000000002e53 or 7.00000000000000056e207 < t < 1.02000000000000005e291

    1. Initial program 97.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.8%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/82.8%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg82.8%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out82.8%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative82.8%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*90.7%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac90.7%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac290.7%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg90.7%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in90.7%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg90.7%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified90.7%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in z around inf 68.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg68.1%

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*73.4%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified73.4%

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

    if -2.9000000000000002e53 < t < 3.8e20

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if 3.8e20 < t < 7.00000000000000056e207

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      2. un-div-inv99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr99.9%

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

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]

    if 1.02000000000000005e291 < t

    1. Initial program 76.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 100.0%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+53}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+20}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+207}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+291}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 64.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+53}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\

\mathbf{elif}\;t \leq 9 \cdot 10^{+17}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 5 \cdot 10^{+205}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 6.7 \cdot 10^{+280}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2e53

    1. Initial program 98.1%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 83.9%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/83.9%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg83.9%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out83.9%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative83.9%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*91.0%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac91.0%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac291.0%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg91.0%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in91.0%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg91.0%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified91.0%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in z around inf 72.8%

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \]
    7. Step-by-step derivation
      1. associate-*r/72.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-172.8%

        \[\leadsto x + y \cdot \frac{\color{blue}{-t}}{z} \]
    8. Simplified72.8%

      \[\leadsto x + y \cdot \color{blue}{\frac{-t}{z}} \]
    9. Step-by-step derivation
      1. *-commutative72.8%

        \[\leadsto x + \color{blue}{\frac{-t}{z} \cdot y} \]
      2. add-sqr-sqrt72.8%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z} \cdot y \]
      3. sqrt-unprod39.9%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z} \cdot y \]
      4. sqr-neg39.9%

        \[\leadsto x + \frac{\sqrt{\color{blue}{t \cdot t}}}{z} \cdot y \]
      5. sqrt-unprod0.0%

        \[\leadsto x + \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z} \cdot y \]
      6. add-sqr-sqrt31.9%

        \[\leadsto x + \frac{\color{blue}{t}}{z} \cdot y \]
      7. cancel-sign-sub31.9%

        \[\leadsto \color{blue}{x - \left(-\frac{t}{z}\right) \cdot y} \]
      8. distribute-frac-neg31.9%

        \[\leadsto x - \color{blue}{\frac{-t}{z}} \cdot y \]
      9. *-commutative31.9%

        \[\leadsto x - \color{blue}{y \cdot \frac{-t}{z}} \]
      10. add-sqr-sqrt31.9%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z} \]
      11. sqrt-unprod13.4%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z} \]
      12. sqr-neg13.4%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z} \]
      13. sqrt-unprod0.0%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z} \]
      14. add-sqr-sqrt72.8%

        \[\leadsto x - y \cdot \frac{\color{blue}{t}}{z} \]
    10. Applied egg-rr72.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{t}{z}} \]
    11. Step-by-step derivation
      1. clear-num72.7%

        \[\leadsto x - y \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      2. un-div-inv72.8%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    12. Applied egg-rr72.8%

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

    if -2e53 < t < 9e17

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if 9e17 < t < 5.0000000000000002e205

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      2. un-div-inv99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr99.9%

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

      \[\leadsto x + \frac{y}{\color{blue}{\frac{a}{t}}} \]

    if 5.0000000000000002e205 < t < 6.6999999999999999e280

    1. Initial program 94.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 79.8%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/79.8%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg79.8%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out79.8%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative79.8%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*90.1%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac90.1%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac290.1%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg90.1%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in90.1%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg90.1%

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

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in z around inf 64.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg64.9%

        \[\leadsto x + \color{blue}{\left(-\frac{t \cdot y}{z}\right)} \]
      2. unsub-neg64.9%

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*74.9%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified74.9%

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

    if 6.6999999999999999e280 < t

    1. Initial program 76.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+53}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+17}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+205}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 6.7 \cdot 10^{+280}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+116} \lor \neg \left(z \leq 8.7 \cdot 10^{+102}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.55e+116) (not (<= z 8.7e+102)))
   (+ y x)
   (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.55e+116) || !(z <= 8.7e+102)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / (a - z)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.55d+116)) .or. (.not. (z <= 8.7d+102))) then
        tmp = y + x
    else
        tmp = x + (y * (t / (a - z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.55e+116) || !(z <= 8.7e+102)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.55e+116) or not (z <= 8.7e+102):
		tmp = y + x
	else:
		tmp = x + (y * (t / (a - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.55e+116) || !(z <= 8.7e+102))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.55e+116) || ~((z <= 8.7e+102)))
		tmp = y + x;
	else
		tmp = x + (y * (t / (a - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+116], N[Not[LessEqual[z, 8.7e+102]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+116} \lor \neg \left(z \leq 8.7 \cdot 10^{+102}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999998e116 or 8.69999999999999974e102 < z

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 91.7%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified91.7%

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

    if -1.54999999999999998e116 < z < 8.69999999999999974e102

    1. Initial program 97.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 80.4%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/80.4%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg80.4%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out80.4%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative80.4%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*80.9%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac80.9%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac280.9%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg80.9%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in80.9%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg80.9%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified80.9%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in t around 0 80.9%

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

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

Alternative 6: 85.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+28} \lor \neg \left(t \leq 3.4 \cdot 10^{+84}\right):\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.05e+28) (not (<= t 3.4e+84)))
   (+ x (* y (/ t (- a z))))
   (+ x (* z (/ y (- z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.05e+28) || !(t <= 3.4e+84)) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (z * (y / (z - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-2.05d+28)) .or. (.not. (t <= 3.4d+84))) then
        tmp = x + (y * (t / (a - z)))
    else
        tmp = x + (z * (y / (z - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.05e+28) || !(t <= 3.4e+84)) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (z * (y / (z - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.05e+28) or not (t <= 3.4e+84):
		tmp = x + (y * (t / (a - z)))
	else:
		tmp = x + (z * (y / (z - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.05e+28) || !(t <= 3.4e+84))
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	else
		tmp = Float64(x + Float64(z * Float64(y / Float64(z - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2.05e+28) || ~((t <= 3.4e+84)))
		tmp = x + (y * (t / (a - z)));
	else
		tmp = x + (z * (y / (z - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.05e+28], N[Not[LessEqual[t, 3.4e+84]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+28} \lor \neg \left(t \leq 3.4 \cdot 10^{+84}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0499999999999999e28 or 3.3999999999999998e84 < t

    1. Initial program 97.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 85.4%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/85.4%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg85.4%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out85.4%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative85.4%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*90.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac90.4%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac290.4%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg90.4%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in90.4%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg90.4%

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

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in t around 0 90.4%

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

    if -2.0499999999999999e28 < t < 3.3999999999999998e84

    1. Initial program 99.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num98.6%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      2. un-div-inv98.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr98.7%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{z - a}} \]
    6. Step-by-step derivation
      1. associate-*l/87.4%

        \[\leadsto x + \color{blue}{\frac{y}{z - a} \cdot z} \]
      2. *-commutative87.4%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{z - a}} \]
    7. Simplified87.4%

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

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

Alternative 7: 87.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{+22} \lor \neg \left(t \leq 2.8 \cdot 10^{+75}\right):\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.06e+22) (not (<= t 2.8e+75)))
   (+ x (* y (/ t (- a z))))
   (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.06e+22) || !(t <= 2.8e+75)) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (y * (z / (z - a)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-1.06d+22)) .or. (.not. (t <= 2.8d+75))) then
        tmp = x + (y * (t / (a - z)))
    else
        tmp = x + (y * (z / (z - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.06e+22) || !(t <= 2.8e+75)) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (y * (z / (z - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -1.06e+22) or not (t <= 2.8e+75):
		tmp = x + (y * (t / (a - z)))
	else:
		tmp = x + (y * (z / (z - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.06e+22) || !(t <= 2.8e+75))
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	else
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -1.06e+22) || ~((t <= 2.8e+75)))
		tmp = x + (y * (t / (a - z)));
	else
		tmp = x + (y * (z / (z - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.06e+22], N[Not[LessEqual[t, 2.8e+75]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+22} \lor \neg \left(t \leq 2.8 \cdot 10^{+75}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.06e22 or 2.80000000000000012e75 < t

    1. Initial program 97.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 85.2%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/85.2%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{z - a}} \]
      2. mul-1-neg85.2%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out85.2%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{z - a} \]
      4. *-commutative85.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{z - a} \]
      5. associate-/l*90.0%

        \[\leadsto x + \color{blue}{y \cdot \frac{-t}{z - a}} \]
      6. distribute-neg-frac90.0%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      7. distribute-neg-frac290.0%

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-\left(z - a\right)}} \]
      8. sub-neg90.0%

        \[\leadsto x + y \cdot \frac{t}{-\color{blue}{\left(z + \left(-a\right)\right)}} \]
      9. distribute-neg-in90.0%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-a\right)\right)}} \]
      10. remove-double-neg90.0%

        \[\leadsto x + y \cdot \frac{t}{\left(-z\right) + \color{blue}{a}} \]
    5. Simplified90.0%

      \[\leadsto x + \color{blue}{y \cdot \frac{t}{\left(-z\right) + a}} \]
    6. Taylor expanded in t around 0 90.0%

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

    if -1.06e22 < t < 2.80000000000000012e75

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 80.8%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    4. Step-by-step derivation
      1. +-commutative80.8%

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-/l*92.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{z - a}} + x \]
    5. Simplified92.2%

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

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

Alternative 8: 74.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+26} \lor \neg \left(z \leq 3.1 \cdot 10^{-144}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -4.8e+26) (not (<= z 3.1e-144))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -4.8e+26) || !(z <= 3.1e-144)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-4.8d+26)) .or. (.not. (z <= 3.1d-144))) then
        tmp = y + x
    else
        tmp = x + (y * (t / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -4.8e+26) || !(z <= 3.1e-144)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -4.8e+26) or not (z <= 3.1e-144):
		tmp = y + x
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -4.8e+26) || !(z <= 3.1e-144))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(y * Float64(t / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -4.8e+26) || ~((z <= 3.1e-144)))
		tmp = y + x;
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e+26], N[Not[LessEqual[z, 3.1e-144]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+26} \lor \neg \left(z \leq 3.1 \cdot 10^{-144}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.80000000000000009e26 or 3.1000000000000001e-144 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.5%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative78.5%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.5%

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

    if -4.80000000000000009e26 < z < 3.1000000000000001e-144

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 73.3%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    4. Step-by-step derivation
      1. *-commutative73.3%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
      2. associate-/l*73.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    5. Simplified73.2%

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

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

Alternative 9: 74.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+23} \lor \neg \left(z \leq 4.2 \cdot 10^{-144}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -8.5e+23) (not (<= z 4.2e-144))) (+ y x) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -8.5e+23) || !(z <= 4.2e-144)) {
		tmp = y + x;
	} else {
		tmp = x + (y / (a / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-8.5d+23)) .or. (.not. (z <= 4.2d-144))) then
        tmp = y + x
    else
        tmp = x + (y / (a / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -8.5e+23) || !(z <= 4.2e-144)) {
		tmp = y + x;
	} else {
		tmp = x + (y / (a / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -8.5e+23) or not (z <= 4.2e-144):
		tmp = y + x
	else:
		tmp = x + (y / (a / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -8.5e+23) || !(z <= 4.2e-144))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(y / Float64(a / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -8.5e+23) || ~((z <= 4.2e-144)))
		tmp = y + x;
	else
		tmp = x + (y / (a / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+23], N[Not[LessEqual[z, 4.2e-144]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+23} \lor \neg \left(z \leq 4.2 \cdot 10^{-144}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000001e23 or 4.2000000000000002e-144 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.5%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative78.5%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.5%

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

    if -8.5000000000000001e23 < z < 4.2000000000000002e-144

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num96.0%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      2. un-div-inv96.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr96.0%

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

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

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

Alternative 10: 73.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+25} \lor \neg \left(z \leq 3.2 \cdot 10^{-168}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.9e+25) (not (<= z 3.2e-168))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.9e+25) || !(z <= 3.2e-168)) {
		tmp = y + x;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.9d+25)) .or. (.not. (z <= 3.2d-168))) then
        tmp = y + x
    else
        tmp = x + ((y * t) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.9e+25) || !(z <= 3.2e-168)) {
		tmp = y + x;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.9e+25) or not (z <= 3.2e-168):
		tmp = y + x
	else:
		tmp = x + ((y * t) / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.9e+25) || !(z <= 3.2e-168))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(Float64(y * t) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.9e+25) || ~((z <= 3.2e-168)))
		tmp = y + x;
	else
		tmp = x + ((y * t) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+25], N[Not[LessEqual[z, 3.2e-168]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+25} \lor \neg \left(z \leq 3.2 \cdot 10^{-168}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e25 or 3.20000000000000006e-168 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.3%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative78.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.3%

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

    if -1.9e25 < z < 3.20000000000000006e-168

    1. Initial program 95.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 74.5%

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

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

Alternative 11: 98.1% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Derivation
  1. Initial program 98.4%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Final simplification98.4%

    \[\leadsto x + y \cdot \frac{z - t}{z - a} \]
  4. Add Preprocessing

Alternative 12: 61.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+162}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.90000000000000006e162

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.1%

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

    if -2.90000000000000006e162 < a

    1. Initial program 98.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.6%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified67.6%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+162}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.7% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 98.4%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 49.5%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification49.5%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.2% accurate, 1.0× speedup?

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

\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2024095 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (+ x (/ y (/ (- z a) (- z t))))

  (+ x (* y (/ (- z t) (- z a)))))