Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B

Percentage Accurate: 77.6% → 90.5%
Time: 15.8s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 77.6% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 56.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg56.5%

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

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

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

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

        \[\leadsto x + \left(y + \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot y}\right) \]
      6. distribute-rgt1-in70.3%

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999996e142 < t

    1. Initial program 79.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.12 \cdot 10^{+142}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \end{array} \]

Alternative 2: 77.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z - a}{t} \cdot y\\ t_2 := x - \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -1.02 \cdot 10^{+139}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- z a) t) y))) (t_2 (- x (/ y (/ a z)))))
   (if (<= a -1.02e+139)
     (+ x y)
     (if (<= a -9.5e-40)
       t_2
       (if (<= a 1.55e-13)
         t_1
         (if (<= a 1.15e+54) t_2 (if (<= a 1.45e+140) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((z - a) / t) * y);
	double t_2 = x - (y / (a / z));
	double tmp;
	if (a <= -1.02e+139) {
		tmp = x + y;
	} else if (a <= -9.5e-40) {
		tmp = t_2;
	} else if (a <= 1.55e-13) {
		tmp = t_1;
	} else if (a <= 1.15e+54) {
		tmp = t_2;
	} else if (a <= 1.45e+140) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	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 + (((z - a) / t) * y)
    t_2 = x - (y / (a / z))
    if (a <= (-1.02d+139)) then
        tmp = x + y
    else if (a <= (-9.5d-40)) then
        tmp = t_2
    else if (a <= 1.55d-13) then
        tmp = t_1
    else if (a <= 1.15d+54) then
        tmp = t_2
    else if (a <= 1.45d+140) then
        tmp = t_1
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((z - a) / t) * y);
	double t_2 = x - (y / (a / z));
	double tmp;
	if (a <= -1.02e+139) {
		tmp = x + y;
	} else if (a <= -9.5e-40) {
		tmp = t_2;
	} else if (a <= 1.55e-13) {
		tmp = t_1;
	} else if (a <= 1.15e+54) {
		tmp = t_2;
	} else if (a <= 1.45e+140) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((z - a) / t) * y)
	t_2 = x - (y / (a / z))
	tmp = 0
	if a <= -1.02e+139:
		tmp = x + y
	elif a <= -9.5e-40:
		tmp = t_2
	elif a <= 1.55e-13:
		tmp = t_1
	elif a <= 1.15e+54:
		tmp = t_2
	elif a <= 1.45e+140:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(z - a) / t) * y))
	t_2 = Float64(x - Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -1.02e+139)
		tmp = Float64(x + y);
	elseif (a <= -9.5e-40)
		tmp = t_2;
	elseif (a <= 1.55e-13)
		tmp = t_1;
	elseif (a <= 1.15e+54)
		tmp = t_2;
	elseif (a <= 1.45e+140)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((z - a) / t) * y);
	t_2 = x - (y / (a / z));
	tmp = 0.0;
	if (a <= -1.02e+139)
		tmp = x + y;
	elseif (a <= -9.5e-40)
		tmp = t_2;
	elseif (a <= 1.55e-13)
		tmp = t_1;
	elseif (a <= 1.15e+54)
		tmp = t_2;
	elseif (a <= 1.45e+140)
		tmp = t_1;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.02e+139], N[(x + y), $MachinePrecision], If[LessEqual[a, -9.5e-40], t$95$2, If[LessEqual[a, 1.55e-13], t$95$1, If[LessEqual[a, 1.15e+54], t$95$2, If[LessEqual[a, 1.45e+140], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-40}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+54}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.02e139 or 1.4499999999999999e140 < a

    1. Initial program 76.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 83.6%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified83.6%

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

    if -1.02e139 < a < -9.5000000000000006e-40 or 1.55e-13 < a < 1.14999999999999997e54

    1. Initial program 85.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-z}}{\frac{a - t}{y}} \]
    6. Simplified89.2%

      \[\leadsto x + \color{blue}{\frac{-z}{\frac{a - t}{y}}} \]
    7. Taylor expanded in a around inf 78.0%

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{\frac{a}{z}}} \]
      3. neg-mul-179.6%

        \[\leadsto x + \frac{\color{blue}{-y}}{\frac{a}{z}} \]
    9. Simplified79.6%

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

    if -9.5000000000000006e-40 < a < 1.55e-13 or 1.14999999999999997e54 < a < 1.4499999999999999e140

    1. Initial program 73.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{+139}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-40}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 77.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+139}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{z - a}{t} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6500000000000001e139 or 1.4499999999999999e140 < a

    1. Initial program 76.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 83.6%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified83.6%

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

    if -1.6500000000000001e139 < a < -2.09999999999999993e-39 or 1.1999999999999999e-13 < a < 2.1000000000000001e55

    1. Initial program 85.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-z}}{\frac{a - t}{y}} \]
    6. Simplified89.2%

      \[\leadsto x + \color{blue}{\frac{-z}{\frac{a - t}{y}}} \]
    7. Taylor expanded in a around inf 78.0%

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{\frac{a}{z}}} \]
      3. neg-mul-179.6%

        \[\leadsto x + \frac{\color{blue}{-y}}{\frac{a}{z}} \]
    9. Simplified79.6%

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

    if -2.09999999999999993e-39 < a < 1.1999999999999999e-13

    1. Initial program 76.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(\frac{t - z}{a - t} + 1\right) \cdot y} \]
    4. Step-by-step derivation
      1. div-inv83.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    8. Simplified87.5%

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

    if 2.1000000000000001e55 < a < 1.4499999999999999e140

    1. Initial program 48.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+139}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-39}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+55}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 77.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+139}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ y (/ a z)))))
   (if (<= a -3.7e+139)
     (+ x y)
     (if (<= a -6.2e-40)
       t_1
       (if (<= a 9.5e-14)
         (+ x (/ y (/ t (- z a))))
         (if (<= a 2.3e+54)
           t_1
           (if (<= a 1.45e+140) (+ x (/ (- z a) (/ t y))) (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y / (a / z));
	double tmp;
	if (a <= -3.7e+139) {
		tmp = x + y;
	} else if (a <= -6.2e-40) {
		tmp = t_1;
	} else if (a <= 9.5e-14) {
		tmp = x + (y / (t / (z - a)));
	} else if (a <= 2.3e+54) {
		tmp = t_1;
	} else if (a <= 1.45e+140) {
		tmp = x + ((z - a) / (t / y));
	} else {
		tmp = x + y;
	}
	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 - (y / (a / z))
    if (a <= (-3.7d+139)) then
        tmp = x + y
    else if (a <= (-6.2d-40)) then
        tmp = t_1
    else if (a <= 9.5d-14) then
        tmp = x + (y / (t / (z - a)))
    else if (a <= 2.3d+54) then
        tmp = t_1
    else if (a <= 1.45d+140) then
        tmp = x + ((z - a) / (t / y))
    else
        tmp = x + y
    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 / (a / z));
	double tmp;
	if (a <= -3.7e+139) {
		tmp = x + y;
	} else if (a <= -6.2e-40) {
		tmp = t_1;
	} else if (a <= 9.5e-14) {
		tmp = x + (y / (t / (z - a)));
	} else if (a <= 2.3e+54) {
		tmp = t_1;
	} else if (a <= 1.45e+140) {
		tmp = x + ((z - a) / (t / y));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y / (a / z))
	tmp = 0
	if a <= -3.7e+139:
		tmp = x + y
	elif a <= -6.2e-40:
		tmp = t_1
	elif a <= 9.5e-14:
		tmp = x + (y / (t / (z - a)))
	elif a <= 2.3e+54:
		tmp = t_1
	elif a <= 1.45e+140:
		tmp = x + ((z - a) / (t / y))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -3.7e+139)
		tmp = Float64(x + y);
	elseif (a <= -6.2e-40)
		tmp = t_1;
	elseif (a <= 9.5e-14)
		tmp = Float64(x + Float64(y / Float64(t / Float64(z - a))));
	elseif (a <= 2.3e+54)
		tmp = t_1;
	elseif (a <= 1.45e+140)
		tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y / (a / z));
	tmp = 0.0;
	if (a <= -3.7e+139)
		tmp = x + y;
	elseif (a <= -6.2e-40)
		tmp = t_1;
	elseif (a <= 9.5e-14)
		tmp = x + (y / (t / (z - a)));
	elseif (a <= 2.3e+54)
		tmp = t_1;
	elseif (a <= 1.45e+140)
		tmp = x + ((z - a) / (t / y));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+139], N[(x + y), $MachinePrecision], If[LessEqual[a, -6.2e-40], t$95$1, If[LessEqual[a, 9.5e-14], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+54], t$95$1, If[LessEqual[a, 1.45e+140], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+139}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.69999999999999992e139 or 1.4499999999999999e140 < a

    1. Initial program 76.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 83.6%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified83.6%

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

    if -3.69999999999999992e139 < a < -6.20000000000000021e-40 or 9.4999999999999999e-14 < a < 2.29999999999999994e54

    1. Initial program 85.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-z}}{\frac{a - t}{y}} \]
    6. Simplified89.2%

      \[\leadsto x + \color{blue}{\frac{-z}{\frac{a - t}{y}}} \]
    7. Taylor expanded in a around inf 78.0%

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{\frac{a}{z}}} \]
      3. neg-mul-179.6%

        \[\leadsto x + \frac{\color{blue}{-y}}{\frac{a}{z}} \]
    9. Simplified79.6%

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

    if -6.20000000000000021e-40 < a < 9.4999999999999999e-14

    1. Initial program 76.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(\frac{t - z}{a - t} + 1\right) \cdot y} \]
    4. Step-by-step derivation
      1. div-inv83.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    8. Simplified87.5%

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

    if 2.29999999999999994e54 < a < 1.4499999999999999e140

    1. Initial program 48.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - a\right)}{t}} \]
    5. Step-by-step derivation
      1. *-commutative56.5%

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

        \[\leadsto x + \color{blue}{\frac{z - a}{\frac{t}{y}}} \]
    6. Simplified78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+139}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-40}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+54}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 82.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -0.0075:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+88} \lor \neg \left(a \leq 3.1 \cdot 10^{+126}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (+ x y) (/ y (/ a z)))))
   (if (<= a -0.0075)
     t_1
     (if (<= a 1.25e-13)
       (+ x (/ y (/ t (- z a))))
       (if (or (<= a 3.7e+88) (not (<= a 3.1e+126)))
         t_1
         (+ x (* (/ (- z a) t) y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x + y) - (y / (a / z));
	double tmp;
	if (a <= -0.0075) {
		tmp = t_1;
	} else if (a <= 1.25e-13) {
		tmp = x + (y / (t / (z - a)));
	} else if ((a <= 3.7e+88) || !(a <= 3.1e+126)) {
		tmp = t_1;
	} else {
		tmp = x + (((z - a) / t) * y);
	}
	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 + y) - (y / (a / z))
    if (a <= (-0.0075d0)) then
        tmp = t_1
    else if (a <= 1.25d-13) then
        tmp = x + (y / (t / (z - a)))
    else if ((a <= 3.7d+88) .or. (.not. (a <= 3.1d+126))) then
        tmp = t_1
    else
        tmp = x + (((z - a) / t) * y)
    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) - (y / (a / z));
	double tmp;
	if (a <= -0.0075) {
		tmp = t_1;
	} else if (a <= 1.25e-13) {
		tmp = x + (y / (t / (z - a)));
	} else if ((a <= 3.7e+88) || !(a <= 3.1e+126)) {
		tmp = t_1;
	} else {
		tmp = x + (((z - a) / t) * y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x + y) - (y / (a / z))
	tmp = 0
	if a <= -0.0075:
		tmp = t_1
	elif a <= 1.25e-13:
		tmp = x + (y / (t / (z - a)))
	elif (a <= 3.7e+88) or not (a <= 3.1e+126):
		tmp = t_1
	else:
		tmp = x + (((z - a) / t) * y)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x + y) - Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -0.0075)
		tmp = t_1;
	elseif (a <= 1.25e-13)
		tmp = Float64(x + Float64(y / Float64(t / Float64(z - a))));
	elseif ((a <= 3.7e+88) || !(a <= 3.1e+126))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(Float64(z - a) / t) * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x + y) - (y / (a / z));
	tmp = 0.0;
	if (a <= -0.0075)
		tmp = t_1;
	elseif (a <= 1.25e-13)
		tmp = x + (y / (t / (z - a)));
	elseif ((a <= 3.7e+88) || ~((a <= 3.1e+126)))
		tmp = t_1;
	else
		tmp = x + (((z - a) / t) * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.0075], t$95$1, If[LessEqual[a, 1.25e-13], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.7e+88], N[Not[LessEqual[a, 3.1e+126]], $MachinePrecision]], t$95$1, N[(x + N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -0.0075:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\

\mathbf{elif}\;a \leq 3.7 \cdot 10^{+88} \lor \neg \left(a \leq 3.1 \cdot 10^{+126}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.0074999999999999997 or 1.24999999999999997e-13 < a < 3.69999999999999994e88 or 3.1e126 < a

    1. Initial program 80.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in t around 0 81.9%

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot z}{a}} \]
    3. Step-by-step derivation
      1. associate-/l*89.9%

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

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

    if -0.0074999999999999997 < a < 1.24999999999999997e-13

    1. Initial program 75.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(\frac{t - z}{a - t} + 1\right) \cdot y} \]
    4. Step-by-step derivation
      1. div-inv84.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    8. Simplified86.1%

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

    if 3.69999999999999994e88 < a < 3.1e126

    1. Initial program 30.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0075:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+88} \lor \neg \left(a \leq 3.1 \cdot 10^{+126}\right):\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \end{array} \]

Alternative 6: 82.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+126}:\\
\;\;\;\;x + \frac{z - a}{t} \cdot y\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.45e-5 or 3.1e126 < a

    1. Initial program 79.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in t around 0 81.0%

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot z}{a}} \]
    3. Step-by-step derivation
      1. associate-/l*90.8%

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

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

    if -1.45e-5 < a < 1.35000000000000005e-13

    1. Initial program 75.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(\frac{t - z}{a - t} + 1\right) \cdot y} \]
    4. Step-by-step derivation
      1. div-inv84.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    8. Simplified86.1%

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

    if 1.35000000000000005e-13 < a < 3.99999999999999984e88

    1. Initial program 86.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in t around 0 85.8%

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot z}{a}} \]
    3. Step-by-step derivation
      1. *-commutative85.8%

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

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

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

    if 3.99999999999999984e88 < a < 3.1e126

    1. Initial program 30.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-5}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+88}:\\ \;\;\;\;\left(x + y\right) - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+126}:\\ \;\;\;\;x + \frac{z - a}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \end{array} \]

Alternative 7: 75.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+136}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq -7 \cdot 10^{-40}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.00000000000000002e136 or 1.4499999999999999e140 < a

    1. Initial program 76.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 83.6%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified83.6%

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

    if -7.00000000000000002e136 < a < -7.0000000000000003e-40

    1. Initial program 83.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot z}{\frac{a - t}{y}}} \]
      7. mul-1-neg91.6%

        \[\leadsto x + \frac{\color{blue}{-z}}{\frac{a - t}{y}} \]
    6. Simplified91.6%

      \[\leadsto x + \color{blue}{\frac{-z}{\frac{a - t}{y}}} \]
    7. Taylor expanded in a around inf 80.5%

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{\frac{a}{z}}} \]
      3. neg-mul-182.9%

        \[\leadsto x + \frac{\color{blue}{-y}}{\frac{a}{z}} \]
    9. Simplified82.9%

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

    if -7.0000000000000003e-40 < a < 1.4499999999999999e140

    1. Initial program 75.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+136}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-40}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 86.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+137} \lor \neg \left(a \leq 1.68 \cdot 10^{+128}\right):\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{a - t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -2.4e+137) (not (<= a 1.68e+128)))
   (- (+ x y) (/ y (/ a z)))
   (- x (/ z (/ (- a t) y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.4e+137) || !(a <= 1.68e+128)) {
		tmp = (x + y) - (y / (a / z));
	} else {
		tmp = x - (z / ((a - t) / y));
	}
	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.4d+137)) .or. (.not. (a <= 1.68d+128))) then
        tmp = (x + y) - (y / (a / z))
    else
        tmp = x - (z / ((a - t) / y))
    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.4e+137) || !(a <= 1.68e+128)) {
		tmp = (x + y) - (y / (a / z));
	} else {
		tmp = x - (z / ((a - t) / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2.4e+137) or not (a <= 1.68e+128):
		tmp = (x + y) - (y / (a / z))
	else:
		tmp = x - (z / ((a - t) / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -2.4e+137) || !(a <= 1.68e+128))
		tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z)));
	else
		tmp = Float64(x - Float64(z / Float64(Float64(a - t) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -2.4e+137) || ~((a <= 1.68e+128)))
		tmp = (x + y) - (y / (a / z));
	else
		tmp = x - (z / ((a - t) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.4e+137], N[Not[LessEqual[a, 1.68e+128]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+137} \lor \neg \left(a \leq 1.68 \cdot 10^{+128}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.39999999999999983e137 or 1.67999999999999993e128 < a

    1. Initial program 76.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in t around 0 80.1%

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot z}{a}} \]
    3. Step-by-step derivation
      1. associate-/l*92.2%

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

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

    if -2.39999999999999983e137 < a < 1.67999999999999993e128

    1. Initial program 76.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot z}{\frac{a - t}{y}}} \]
      7. mul-1-neg87.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+137} \lor \neg \left(a \leq 1.68 \cdot 10^{+128}\right):\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 9: 74.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{+96} \lor \neg \left(a \leq 5.4 \cdot 10^{+142}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.6000000000000003e96 or 5.39999999999999965e142 < a

    1. Initial program 76.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 82.9%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified82.9%

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

    if -7.6000000000000003e96 < a < 5.39999999999999965e142

    1. Initial program 76.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.6 \cdot 10^{+96} \lor \neg \left(a \leq 5.4 \cdot 10^{+142}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 10: 61.9% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.1 \cdot 10^{+174}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.10000000000000017e174

    1. Initial program 82.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Taylor expanded in a around inf 62.7%

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified62.7%

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

    if 2.10000000000000017e174 < t

    1. Initial program 32.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.1 \cdot 10^{+174}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.8% accurate, 13.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 76.7%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Taylor expanded in x around inf 53.7%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification53.7%

    \[\leadsto x \]

Developer target: 87.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
        (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
   (if (< t_2 -1.3664970889390727e-7)
     t_1
     (if (< t_2 1.4754293444577233e-239)
       (/ (- (* y (- a z)) (* x t)) (- a t))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	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 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
    t_2 = (x + y) - (((z - t) * y) / (a - t))
    if (t_2 < (-1.3664970889390727d-7)) then
        tmp = t_1
    else if (t_2 < 1.4754293444577233d-239) then
        tmp = ((y * (a - z)) - (x * t)) / (a - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y)
	t_2 = (x + y) - (((z - t) * y) / (a - t))
	tmp = 0
	if t_2 < -1.3664970889390727e-7:
		tmp = t_1
	elif t_2 < 1.4754293444577233e-239:
		tmp = ((y * (a - z)) - (x * t)) / (a - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y))
	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
	tmp = 0.0
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	t_2 = (x + y) - (((z - t) * y) / (a - t));
	tmp = 0.0;
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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