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

Percentage Accurate: 76.5% → 93.4%
Time: 17.3s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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: 93.4% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.00000000000000011e-279

    1. Initial program 74.8%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub86.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-86.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/87.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-out87.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/86.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-neg86.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+86.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-89.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-neg89.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. Simplified90.0%

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

    if -2.00000000000000011e-279 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.58000000000000006e-142 or 3.00000000000000028e-39 < a

    1. Initial program 78.2%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub89.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-89.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/90.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-out90.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/89.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-neg89.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+89.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.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-neg91.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. Simplified91.9%

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

    if -1.58000000000000006e-142 < a < 3.00000000000000028e-39

    1. Initial program 68.4%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub65.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-65.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/68.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-out68.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/65.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-neg65.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+65.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-73.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-neg73.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. Simplified75.4%

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

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

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

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

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

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

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

Alternative 4: 87.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000041e-6 < a < 3.1e-6

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub70.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-70.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/72.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-out72.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/70.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-neg70.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+70.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-77.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-neg77.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. Simplified80.1%

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

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

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

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

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

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

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

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

    if 3.1e-6 < a

    1. Initial program 79.6%

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

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

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

        \[\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/95.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-out95.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/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-95.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-neg95.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. Simplified95.4%

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

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

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

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

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

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

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

Alternative 5: 88.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e-5 < a < 1.30000000000000005e-6

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub70.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-70.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/72.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-out72.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/70.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-neg70.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+70.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-77.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-neg77.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. Simplified80.1%

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

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

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

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

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

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

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

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

    if 1.30000000000000005e-6 < a

    1. Initial program 79.6%

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

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

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

        \[\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/95.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-out95.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/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-95.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-neg95.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. Simplified95.4%

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

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

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

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

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

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

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

Alternative 6: 60.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq -4 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.85 \cdot 10^{-298}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-241}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.49999999999999981e-153 or 2.5999999999999999e-241 < a

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999981e-153 < a < -3.9999999999999998e-234 or -1.8499999999999999e-298 < a < 2.5999999999999999e-241

    1. Initial program 67.6%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub60.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-60.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/64.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-out64.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/60.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-neg60.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+60.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-68.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-neg68.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. Simplified71.9%

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    6. Taylor expanded in x around 0 63.0%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. associate-*r/63.7%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified63.7%

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

    if -3.9999999999999998e-234 < a < -1.8499999999999999e-298

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-153}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-234}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-298}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-241}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 60.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-234}:\\
\;\;\;\;\frac{y \cdot z}{t}\\

\mathbf{elif}\;a \leq -1.35 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-232}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.7000000000000001e-151 or 3.60000000000000016e-232 < a

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-151 < a < -4.19999999999999982e-234

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    6. Taylor expanded in x around 0 56.6%

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

    if -4.19999999999999982e-234 < a < -1.3500000000000001e-297

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3500000000000001e-297 < a < 3.60000000000000016e-232

    1. Initial program 65.8%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub64.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-64.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/65.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-out65.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/64.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-neg64.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+64.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-73.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-neg73.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. Simplified74.9%

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    6. Taylor expanded in x around 0 73.6%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. associate-*r/75.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-151}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-234}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-232}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 87.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.00000000000000023e-6 or 9.9999999999999999e45 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.00000000000000023e-6 < a < 9.9999999999999999e45

    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*74.7%

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub72.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-72.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/74.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-out74.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/72.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-neg72.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+72.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-79.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-neg79.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. Simplified81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - z \cdot \frac{y}{a - t}} \]
    14. Simplified88.2%

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

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

Alternative 9: 86.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.0000000000000002e-6 or 1.06e45 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000002e-6 < a < 1.06e45

    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*74.7%

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub72.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-72.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/74.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-out74.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/72.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-neg72.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+72.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-79.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-neg79.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. Simplified81.5%

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

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

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

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

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

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

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

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

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

Alternative 10: 83.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7600000000:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.6e9 or 3.20000000000000016e118 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6e9 < a < 3.20000000000000016e118

    1. Initial program 74.1%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub75.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-75.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/77.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-out77.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/75.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-neg75.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+75.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-81.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-neg81.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. Simplified83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - z \cdot \frac{y}{a - t}} \]
    14. Simplified86.3%

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

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

Alternative 11: 76.0% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.6999999999999996e-6 or 9.5000000000000005e-6 < a

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6999999999999996e-6 < a < 9.5000000000000005e-6

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub70.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-70.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/72.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-out72.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/70.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-neg70.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+70.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-77.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-neg77.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. Simplified80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.99999999999999964e-6 or 1.0200000000000001e-5 < a

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999964e-6 < a < 1.0200000000000001e-5

    1. Initial program 70.7%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub70.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-70.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/72.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-out72.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/70.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-neg70.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+70.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-77.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-neg77.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. Simplified80.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Simplified75.4%

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

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

Alternative 13: 51.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;x \leq 1.1 \cdot 10^{-235}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.8000000000000004e-37 or 1.09999999999999992e-235 < x

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000004e-37 < x < 1.09999999999999992e-235

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{a}\right)} \]
    8. Taylor expanded in z around 0 32.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-235}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 59.7% accurate, 4.3× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  7. Final simplification57.9%

    \[\leadsto x + y \]

Alternative 15: 2.7% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y + -1 \cdot y} \]
  8. Step-by-step derivation
    1. distribute-rgt1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot y} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot y \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  9. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  10. Final simplification2.7%

    \[\leadsto 0 \]

Alternative 16: 50.1% 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 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification47.7%

    \[\leadsto x \]

Developer target: 87.7% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023275 
(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))))