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

Percentage Accurate: 76.5% → 91.5%
Time: 17.0s
Alternatives: 13
Speedup: 1.2×

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 13 alternatives:

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

Initial Program: 76.5% 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: 91.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-50} \lor \neg \left(a \leq 7.2 \cdot 10^{-191}\right):\\
\;\;\;\;y \cdot \left(\frac{t - z}{a - t} + 1\right) + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.90000000000000008e-50 or 7.20000000000000038e-191 < a

    1. Initial program 81.9%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub91.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-91.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/91.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-out91.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/91.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-neg91.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+91.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.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-neg91.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. Simplified91.5%

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

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

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

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

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

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

    if -2.90000000000000008e-50 < a < 7.20000000000000038e-191

    1. Initial program 72.3%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub78.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-78.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/80.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-out80.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/78.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-neg78.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+78.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-86.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-neg86.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. Simplified87.8%

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(1 + \frac{t - z}{a - t}\right) + x} \]
    7. Step-by-step derivation
      1. add-cube-cbrt82.2%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-296}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.80000000000000012e-16 or 9.99999999999999953e-45 < a

    1. Initial program 84.2%

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

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

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

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

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

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

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

        \[\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-out93.7%

        \[\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/93.2%

        \[\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-neg93.2%

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-93.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-neg93.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. Simplified93.9%

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

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

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

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

    if -3.80000000000000012e-16 < a < -4.7e-296

    1. Initial program 67.3%

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

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

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

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

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

        \[\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.5%

        \[\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.8%

        \[\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.8%

        \[\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.5%

        \[\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.5%

        \[\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.5%

        \[\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.0%

        \[\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.0%

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

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

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

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

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

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

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

    if -4.7e-296 < a < 9.99999999999999953e-45

    1. Initial program 77.1%

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

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

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

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

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

        \[\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.3%

        \[\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.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-out86.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/86.3%

        \[\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.3%

        \[\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.3%

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-89.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-neg89.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. Simplified89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-17} \lor \neg \left(a \leq 8.2 \cdot 10^{-191}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.79999999999999997e-17 or 8.2000000000000004e-191 < a

    1. Initial program 81.9%

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

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

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

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

    if -1.79999999999999997e-17 < a < 8.2000000000000004e-191

    1. Initial program 73.4%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub79.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-79.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/80.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-out80.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/79.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-neg79.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+79.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-85.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-neg85.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. Simplified86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.4% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.6000000000000003e-16

    1. Initial program 85.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/96.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-out96.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/95.3%

        \[\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-neg95.3%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+95.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-96.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-neg96.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. Simplified96.7%

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

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

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

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

    if -5.6000000000000003e-16 < a < 1.1500000000000001e22

    1. Initial program 74.2%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub80.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-80.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/81.8%

        \[\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.8%

        \[\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/80.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-neg80.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+80.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-85.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-neg85.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. Simplified86.0%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{{\left(\sqrt[3]{1 + \frac{t - z}{a - t}}\right)}^{3}} + x \]
    8. Applied egg-rr83.4%

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

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

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

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

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

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

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

    if 1.1500000000000001e22 < a

    1. Initial program 81.8%

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

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

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

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

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

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

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

        \[\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-out92.6%

        \[\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/92.2%

        \[\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-neg92.2%

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

        \[\leadsto \color{blue}{\left(x + \left(y + \frac{z}{\frac{a - t}{-y}}\right)\right)} - \frac{-t}{\frac{a - t}{y}} \]
      12. associate-+r-92.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-neg92.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. Simplified92.3%

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

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

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

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

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

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

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

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

Alternative 5: 82.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-57} \lor \neg \left(a \leq 5.2 \cdot 10^{-51}\right):\\
\;\;\;\;x - \left(\frac{y}{\frac{a}{z}} - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.00000000000000001e-57 or 5.2e-51 < a

    1. Initial program 83.5%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub91.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-91.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/92.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-out92.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/91.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-neg91.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+91.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-92.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-neg92.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. Simplified92.5%

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

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

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

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

    if -6.00000000000000001e-57 < a < 5.2e-51

    1. Initial program 72.5%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub81.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-81.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/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.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-neg81.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+81.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-86.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-neg86.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. Simplified87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.3 \cdot 10^{-51} \lor \neg \left(a \leq 2.05 \cdot 10^{-46}\right):\\
\;\;\;\;x - \left(\frac{y}{\frac{a}{z}} - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.2999999999999997e-51 or 2.05e-46 < a

    1. Initial program 84.1%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub92.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-92.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/93.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-out93.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/92.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-neg92.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+92.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-93.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-neg93.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. Simplified93.1%

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

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

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

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

    if -4.2999999999999997e-51 < a < 2.05e-46

    1. Initial program 71.8%

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

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

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

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

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

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

        \[\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.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-out81.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/80.2%

        \[\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-neg80.2%

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

        \[\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.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-neg85.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. Simplified86.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a + -1 \cdot z}}} \]
      4. mul-1-neg90.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{-51} \lor \neg \left(a \leq 2.05 \cdot 10^{-46}\right):\\ \;\;\;\;x - \left(\frac{y}{\frac{a}{z}} - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \end{array} \]

Alternative 7: 87.5% accurate, 1.0× speedup?

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

    1. Initial program 84.3%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub94.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-94.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/94.6%

        \[\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.6%

        \[\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.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-neg94.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+94.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-94.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-neg94.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. Simplified94.8%

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

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

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

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

    if -9.8000000000000002e-18 < a < 1.85e19

    1. Initial program 73.8%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub80.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-80.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/81.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-out81.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/80.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-neg80.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+80.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-85.0%

        \[\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.0%

        \[\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.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 87.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.4999999999999995e-18

    1. Initial program 86.0%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub95.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-95.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/96.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-out96.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/95.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-neg95.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+95.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-96.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-neg96.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. Simplified96.7%

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

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

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

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

    if -8.4999999999999995e-18 < a < 1.6e22

    1. Initial program 74.0%

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

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

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

        \[\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-sub80.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-80.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/81.7%

        \[\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.7%

        \[\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/80.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-neg80.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+80.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-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.9%

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e22 < a

    1. Initial program 81.8%

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

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

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

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

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

Alternative 9: 87.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.2999999999999999e-15

    1. Initial program 85.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \frac{t}{\frac{a - t}{-y}}} \]
      7. associate-/r/96.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-out96.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/95.3%

        \[\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-neg95.3%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+95.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-96.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-neg96.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. Simplified96.7%

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

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

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

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

    if -2.2999999999999999e-15 < a < 1.8e21

    1. Initial program 74.2%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub80.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-80.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/81.8%

        \[\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.8%

        \[\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/80.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-neg80.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+80.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-85.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-neg85.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. Simplified86.0%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{{\left(\sqrt[3]{1 + \frac{t - z}{a - t}}\right)}^{3}} + x \]
    8. Applied egg-rr83.4%

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

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

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

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

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

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

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

    if 1.8e21 < a

    1. Initial program 81.8%

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

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

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

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

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

Alternative 10: 87.6% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
    5. div-sub87.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-87.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/88.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-out88.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/87.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-neg87.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+87.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-90.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-neg90.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. Simplified90.5%

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

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

Alternative 11: 77.3% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.3999999999999997e-18 or 3.80000000000000028e-8 < a

    1. Initial program 83.8%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub93.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-93.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/93.6%

        \[\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-out93.6%

        \[\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/93.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-neg93.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+93.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-93.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-neg93.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. Simplified93.8%

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

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

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

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

    if -4.3999999999999997e-18 < a < 3.80000000000000028e-8

    1. Initial program 73.6%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub80.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-80.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/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/80.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-neg80.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+80.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-85.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-neg85.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. Simplified86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 63.6% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-268}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.39999999999999992e-49 or 6.5000000000000003e-268 < a

    1. Initial program 82.2%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub91.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-91.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/91.8%

        \[\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-out91.8%

        \[\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/91.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-neg91.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+91.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-91.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-neg91.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. Simplified91.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified73.1%

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

    if -2.39999999999999992e-49 < a < 6.5000000000000003e-268

    1. Initial program 67.3%

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

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

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

        \[\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-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/74.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-out74.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.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-83.0%

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

        \[\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.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{-49}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-268}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 13: 51.2% 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 79.2%

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

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

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

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

      \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
    5. div-sub87.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-87.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/88.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-out88.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/87.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-neg87.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+87.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-90.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-neg90.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. Simplified90.5%

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification54.2%

    \[\leadsto x \]

Developer target: 87.5% 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 2023279 
(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))))