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

Percentage Accurate: 77.2% → 93.8%
Time: 10.6s
Alternatives: 14
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 14 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.2% 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: 93.8% accurate, 0.8× speedup?

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

\\
x - y \cdot \left(\frac{z}{a - t} - \left(\frac{t}{a - t} + 1\right)\right)
\end{array}
Derivation
  1. Initial program 76.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
    7. associate-/r/81.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
    12. associate-+r-86.1%

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

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

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

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

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

Alternative 2: 76.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - a}{t}\\ \mathbf{if}\;a \leq -4.8 \cdot 10^{+193}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -780000000:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-83}:\\ \;\;\;\;y - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-262}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z a) t)))))
   (if (<= a -4.8e+193)
     (+ x y)
     (if (<= a -780000000.0)
       (- x (* y (/ z a)))
       (if (<= a -1.9e-58)
         t_1
         (if (<= a -2.8e-83)
           (- y (/ (* y z) a))
           (if (<= a 4e-262)
             (+ x (* z (/ y t)))
             (if (<= a 3.1e+16) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double tmp;
	if (a <= -4.8e+193) {
		tmp = x + y;
	} else if (a <= -780000000.0) {
		tmp = x - (y * (z / a));
	} else if (a <= -1.9e-58) {
		tmp = t_1;
	} else if (a <= -2.8e-83) {
		tmp = y - ((y * z) / a);
	} else if (a <= 4e-262) {
		tmp = x + (z * (y / t));
	} else if (a <= 3.1e+16) {
		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) :: tmp
    t_1 = x + (y * ((z - a) / t))
    if (a <= (-4.8d+193)) then
        tmp = x + y
    else if (a <= (-780000000.0d0)) then
        tmp = x - (y * (z / a))
    else if (a <= (-1.9d-58)) then
        tmp = t_1
    else if (a <= (-2.8d-83)) then
        tmp = y - ((y * z) / a)
    else if (a <= 4d-262) then
        tmp = x + (z * (y / t))
    else if (a <= 3.1d+16) 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 + (y * ((z - a) / t));
	double tmp;
	if (a <= -4.8e+193) {
		tmp = x + y;
	} else if (a <= -780000000.0) {
		tmp = x - (y * (z / a));
	} else if (a <= -1.9e-58) {
		tmp = t_1;
	} else if (a <= -2.8e-83) {
		tmp = y - ((y * z) / a);
	} else if (a <= 4e-262) {
		tmp = x + (z * (y / t));
	} else if (a <= 3.1e+16) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - a) / t))
	tmp = 0
	if a <= -4.8e+193:
		tmp = x + y
	elif a <= -780000000.0:
		tmp = x - (y * (z / a))
	elif a <= -1.9e-58:
		tmp = t_1
	elif a <= -2.8e-83:
		tmp = y - ((y * z) / a)
	elif a <= 4e-262:
		tmp = x + (z * (y / t))
	elif a <= 3.1e+16:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t)))
	tmp = 0.0
	if (a <= -4.8e+193)
		tmp = Float64(x + y);
	elseif (a <= -780000000.0)
		tmp = Float64(x - Float64(y * Float64(z / a)));
	elseif (a <= -1.9e-58)
		tmp = t_1;
	elseif (a <= -2.8e-83)
		tmp = Float64(y - Float64(Float64(y * z) / a));
	elseif (a <= 4e-262)
		tmp = Float64(x + Float64(z * Float64(y / t)));
	elseif (a <= 3.1e+16)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - a) / t));
	tmp = 0.0;
	if (a <= -4.8e+193)
		tmp = x + y;
	elseif (a <= -780000000.0)
		tmp = x - (y * (z / a));
	elseif (a <= -1.9e-58)
		tmp = t_1;
	elseif (a <= -2.8e-83)
		tmp = y - ((y * z) / a);
	elseif (a <= 4e-262)
		tmp = x + (z * (y / t));
	elseif (a <= 3.1e+16)
		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[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.8e+193], N[(x + y), $MachinePrecision], If[LessEqual[a, -780000000.0], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-58], t$95$1, If[LessEqual[a, -2.8e-83], N[(y - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-262], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e+16], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -780000000:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-83}:\\
\;\;\;\;y - \frac{y \cdot z}{a}\\

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.8e193 or 3.1e16 < a

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified87.3%

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

    if -4.8e193 < a < -7.8e8

    1. Initial program 70.9%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-74.8%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/75.0%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
      5. associate-*r/79.4%

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified79.4%

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

    if -7.8e8 < a < -1.8999999999999999e-58 or 4.00000000000000005e-262 < a < 3.1e16

    1. Initial program 68.5%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-69.8%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/71.1%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-58 < a < -2.8000000000000001e-83

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-83 < a < 4.00000000000000005e-262

    1. Initial program 73.9%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.9%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/77.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-78.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/90.8%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{y \cdot z}{t}} \]
    12. Step-by-step derivation
      1. cancel-sign-sub-inv80.6%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{y \cdot z}{t} \]
      3. *-lft-identity80.6%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
      6. associate-/r/82.7%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + x \]
    13. Simplified82.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+193}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -780000000:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-58}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-83}:\\ \;\;\;\;y - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-262}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 77.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -750000000:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.5000000000000001e191 or 1.6e16 < a

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified87.3%

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

    if -2.5000000000000001e191 < a < -7.5e8

    1. Initial program 70.9%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-74.8%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/75.0%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
      5. associate-*r/79.4%

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified79.4%

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

    if -7.5e8 < a < -9.99999999999999953e-45

    1. Initial program 55.6%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-56.1%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/56.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999953e-45 < a < 1.6e16

    1. Initial program 72.6%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-74.0%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/74.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-78.2%

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -750000000:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-44}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+16}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 89.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-201} \lor \neg \left(a \leq 2.7 \cdot 10^{-54}\right):\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.25e-201 or 2.70000000000000026e-54 < a

    1. Initial program 79.5%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-86.0%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/86.5%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-91.6%

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

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

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

    if -1.25e-201 < a < 2.70000000000000026e-54

    1. Initial program 70.1%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-71.9%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/72.4%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-74.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-y}{\frac{a - t}{z}}} \]
    7. Simplified93.0%

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/90.7%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{z}}} \]
    10. Simplified93.0%

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

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

Alternative 5: 87.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e142

    1. Initial program 83.4%

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

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

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

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

    if -1.4e142 < a < 1.15e16

    1. Initial program 70.8%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-72.7%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/85.8%

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

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

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

    if 1.15e16 < a

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 87.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\
\;\;\;\;x - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e142

    1. Initial program 83.4%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-94.4%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/94.4%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-94.4%

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

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

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

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

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

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

    if -1.4e142 < a < 3.1e16

    1. Initial program 70.8%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-72.7%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/85.8%

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

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

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

    if 3.1e16 < a

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.1% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.1999999999999997e191 or 5.8e16 < a

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified87.3%

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

    if -9.1999999999999997e191 < a < -1.99999999999999991e-6

    1. Initial program 67.6%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-71.4%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/71.5%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-85.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{\frac{y}{\frac{a}{z}}}\right) \]
      3. unsub-neg75.6%

        \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z}}} \]
      4. associate-/l*70.2%

        \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
      5. associate-*r/75.6%

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified75.6%

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

    if -1.99999999999999991e-6 < a < 5.8e16

    1. Initial program 72.1%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-73.4%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/74.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-78.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{+191}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-6}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 84.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+192} \lor \neg \left(a \leq 1.2 \cdot 10^{+102}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7999999999999999e192 or 1.19999999999999997e102 < a

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified91.0%

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

    if -3.7999999999999999e192 < a < 1.19999999999999997e102

    1. Initial program 72.4%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-74.6%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/75.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-81.2%

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg81.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/84.4%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{z}}} \]
    10. Simplified86.9%

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

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

Alternative 9: 87.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+142} \lor \neg \left(a \leq 2.7 \cdot 10^{+16}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4e142 or 2.7e16 < a

    1. Initial program 86.5%

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

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

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

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

    if -1.4e142 < a < 2.7e16

    1. Initial program 70.8%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-72.7%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/85.8%

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

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

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

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

Alternative 10: 84.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.40000000000000007e163 or 7.9999999999999998e101 < a

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified90.0%

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

    if -1.40000000000000007e163 < a < 7.9999999999999998e101

    1. Initial program 72.1%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-74.8%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/75.5%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-81.5%

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg81.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{a - t}} \]
      4. associate-*r/84.2%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{z}}} \]
    10. Simplified86.7%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a - t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/86.3%

        \[\leadsto x - \color{blue}{\frac{y}{a - t} \cdot z} \]
    12. Applied egg-rr86.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+163}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+101}:\\ \;\;\;\;x - z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 76.7% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.99999999999999977e59 or 4.1e15 < a

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999977e59 < a < 4.1e15

    1. Initial program 70.4%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-72.4%

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/73.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-79.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+59}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+15}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 63.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+167}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{+189}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1999999999999998e167 or 1.2500000000000001e189 < t

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg63.2%

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

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

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

    if -4.1999999999999998e167 < t < 1.2500000000000001e189

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified61.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+167}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+189}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 51.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-95}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-48}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -5.5e-95) x (if (<= x 2.3e-48) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -5.5e-95) {
		tmp = x;
	} else if (x <= 2.3e-48) {
		tmp = 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 (x <= (-5.5d-95)) then
        tmp = x
    else if (x <= 2.3d-48) then
        tmp = 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 (x <= -5.5e-95) {
		tmp = x;
	} else if (x <= 2.3e-48) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -5.5e-95:
		tmp = x
	elif x <= 2.3e-48:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -5.5e-95)
		tmp = x;
	elseif (x <= 2.3e-48)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -5.5e-95)
		tmp = x;
	elseif (x <= 2.3e-48)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.5e-95], x, If[LessEqual[x, 2.3e-48], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-95}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{-48}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.50000000000000003e-95 or 2.3000000000000001e-48 < x

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000003e-95 < x < 2.3000000000000001e-48

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg73.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y - \frac{y \cdot z}{a}} \]
    8. Taylor expanded in z around 0 36.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-95}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-48}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 50.7% 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.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification51.0%

    \[\leadsto x \]

Developer target: 88.1% 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 2023271 
(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))))