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

Percentage Accurate: 77.5% → 92.0%
Time: 16.2s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 77.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: 92.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.70000000000000007e185 or 2.99999999999999977e86 < t

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000007e185 < t < 2.5000000000000001e-210

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e-210 < t < 2.99999999999999977e86

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+185}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-210}:\\ \;\;\;\;x + \left(y - \frac{z - t}{\frac{a - t}{y}}\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+86}:\\ \;\;\;\;\left(y + \frac{y}{\frac{a - t}{t}}\right) + \left(x - \frac{y}{\frac{a - t}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\ \end{array} \]

Alternative 2: 92.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+86}:\\
\;\;\;\;x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - t_1\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.60000000000000029e185 or 2.99999999999999977e86 < t

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000029e185 < t < 1e-210

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-210 < t < 2.99999999999999977e86

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+185} \lor \neg \left(t \leq 2.6 \cdot 10^{+86}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5000000000000002e185 or 2.5999999999999998e86 < t

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e185 < t < 2.5999999999999998e86

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 91.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.59999999999999968e227

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.59999999999999968e227 < t < 2.5999999999999998e86

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999998e86 < t

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -10000000000:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

\mathbf{elif}\;a \leq -115000000:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.6e168 or -1e10 < a < -1.15e8 or 3.2e52 < a

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e168 < a < -1e10

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e8 < a < 3.2e52

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 74.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -19000000000:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.2000000000000002e168 or 3.2e52 < a

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000002e168 < a < -1.9e10

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9e10 < a < -235

    1. Initial program 100.0%

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

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

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

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

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

    if -235 < a < 3.2e52

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 74.8% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.2000000000000002e168 or 4.5e52 < a

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000002e168 < a < -5.9999999999999999e48

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{t}} \]
    9. Simplified71.3%

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

    if -5.9999999999999999e48 < a < -9.9999999999999993e-41

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999993e-41 < a < 4.5e52

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+168}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+48}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-40}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+52}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 8: 84.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2e13 or 5.3e17 < z

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.2e13 < z < 5.3e17

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 82.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -155 or 2e24 < a

    1. Initial program 75.4%

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

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

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

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

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

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in75.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 t around 0 74.8%

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

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

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

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

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

    if -155 < a < 2e24

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 82.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55000000000000004 or 6.1999999999999996e25 < a

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000004 < a < 6.1999999999999996e25

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 82.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.55e10 or 7.8999999999999996e-10 < t

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.55e10 < t < 7.8999999999999996e-10

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 82.4% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000002 < a < 7.6000000000000001e25

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

    if 7.6000000000000001e25 < a

    1. Initial program 77.7%

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

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

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

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

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

Alternative 13: 86.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9e20 < a < 6.3999999999999995e24

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.3999999999999995e24 < a

    1. Initial program 76.5%

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

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

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

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

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

Alternative 14: 82.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -15600000000:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.56e10

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.56e10 < t < 1.29999999999999991e-10

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.29999999999999991e-10 < t

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.5% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3300 or 5.8000000000000002e-163 < 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*84.9%

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

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

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

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

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

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

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

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

    if -3300 < a < 1.69999999999999991e-297

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999991e-297 < a < 5.8000000000000002e-163

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t} \]
      2. associate-*r/61.0%

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

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

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

Alternative 16: 61.5% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.599999999999999978 or 4.6000000000000001e-165 < 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*84.9%

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

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

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

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

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

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

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

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

    if -0.599999999999999978 < a < 1.69999999999999991e-297

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999991e-297 < a < 4.6000000000000001e-165

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Simplified62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.6:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-165}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 17: 61.4% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -12.5 or 1.12e-164 < 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*84.9%

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

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

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

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

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

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

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

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

    if -12.5 < a < 1.69999999999999991e-297

    1. Initial program 75.9%

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

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+75.9%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg75.9%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg75.9%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative75.9%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in75.9%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*76.0%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg76.0%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in76.0%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg76.0%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative76.0%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg76.0%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified76.0%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in y around 0 65.1%

      \[\leadsto \color{blue}{x} \]

    if 1.69999999999999991e-297 < a < 1.12e-164

    1. Initial program 90.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative90.8%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+90.8%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg90.8%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg90.8%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative90.8%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in90.8%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*85.2%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg85.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in85.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg85.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative85.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg85.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified85.2%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in y around 0 93.9%

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + x} \]
    5. Taylor expanded in a around 0 90.1%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} + x \]
    6. Taylor expanded in y around inf 66.7%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -12.5:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-164}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 18: 76.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+90}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+52}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -4.2e+90) (+ y x) (if (<= a 3.6e+52) (+ x (* y (/ z t))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -4.2e+90) {
		tmp = y + x;
	} else if (a <= 3.6e+52) {
		tmp = x + (y * (z / t));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-4.2d+90)) then
        tmp = y + x
    else if (a <= 3.6d+52) then
        tmp = x + (y * (z / t))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -4.2e+90) {
		tmp = y + x;
	} else if (a <= 3.6e+52) {
		tmp = x + (y * (z / t));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -4.2e+90:
		tmp = y + x
	elif a <= 3.6e+52:
		tmp = x + (y * (z / t))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -4.2e+90)
		tmp = Float64(y + x);
	elseif (a <= 3.6e+52)
		tmp = Float64(x + Float64(y * Float64(z / t)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -4.2e+90)
		tmp = y + x;
	elseif (a <= 3.6e+52)
		tmp = x + (y * (z / t));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e+90], N[(y + x), $MachinePrecision], If[LessEqual[a, 3.6e+52], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+90}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.19999999999999961e90 or 3.6e52 < a

    1. Initial program 79.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+79.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg79.7%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg79.7%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative79.7%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in79.7%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*90.2%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in a around inf 79.5%

      \[\leadsto \color{blue}{y + x} \]

    if -4.19999999999999961e90 < a < 3.6e52

    1. Initial program 75.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative75.8%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+75.8%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg75.8%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg75.8%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative75.8%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in75.8%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*78.4%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified78.4%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in y around 0 91.1%

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + x} \]
    5. Taylor expanded in z around inf 84.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a - t}} + x \]
    6. Step-by-step derivation
      1. mul-1-neg84.5%

        \[\leadsto \color{blue}{\left(-\frac{y \cdot z}{a - t}\right)} + x \]
      2. associate-*l/86.5%

        \[\leadsto \left(-\color{blue}{\frac{y}{a - t} \cdot z}\right) + x \]
      3. *-commutative86.5%

        \[\leadsto \left(-\color{blue}{z \cdot \frac{y}{a - t}}\right) + x \]
      4. distribute-lft-neg-in86.5%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{y}{a - t}} + x \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{y}{a - t}} + x \]
    8. Taylor expanded in a around 0 73.5%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} + x \]
    9. Step-by-step derivation
      1. associate-*r/74.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} + x \]
    10. Simplified74.2%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+90}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+52}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 19: 76.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+90}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.8e+90) (+ y x) (if (<= a 4.6e+52) (+ x (/ y (/ t z))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.8e+90) {
		tmp = y + x;
	} else if (a <= 4.6e+52) {
		tmp = x + (y / (t / z));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-5.8d+90)) then
        tmp = y + x
    else if (a <= 4.6d+52) then
        tmp = x + (y / (t / z))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.8e+90) {
		tmp = y + x;
	} else if (a <= 4.6e+52) {
		tmp = x + (y / (t / z));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.8e+90:
		tmp = y + x
	elif a <= 4.6e+52:
		tmp = x + (y / (t / z))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.8e+90)
		tmp = Float64(y + x);
	elseif (a <= 4.6e+52)
		tmp = Float64(x + Float64(y / Float64(t / z)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.8e+90)
		tmp = y + x;
	elseif (a <= 4.6e+52)
		tmp = x + (y / (t / z));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+90], N[(y + x), $MachinePrecision], If[LessEqual[a, 4.6e+52], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+90}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.8000000000000003e90 or 4.6e52 < a

    1. Initial program 79.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative79.7%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+79.7%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg79.7%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg79.7%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative79.7%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in79.7%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*90.2%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg90.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in a around inf 79.5%

      \[\leadsto \color{blue}{y + x} \]

    if -5.8000000000000003e90 < a < 4.6e52

    1. Initial program 75.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative75.8%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+75.8%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg75.8%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg75.8%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative75.8%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in75.8%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*78.4%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg78.4%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified78.4%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in y around 0 91.1%

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + x} \]
    5. Taylor expanded in a around 0 73.5%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} + x \]
    6. Step-by-step derivation
      1. associate-/l*74.5%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    7. Simplified74.5%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+90}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+52}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 20: 63.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+179}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -5.7e+156) x (if (<= t 1.65e+179) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -5.7e+156) {
		tmp = x;
	} else if (t <= 1.65e+179) {
		tmp = y + x;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-5.7d+156)) then
        tmp = x
    else if (t <= 1.65d+179) then
        tmp = y + x
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -5.7e+156) {
		tmp = x;
	} else if (t <= 1.65e+179) {
		tmp = y + x;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -5.7e+156:
		tmp = x
	elif t <= 1.65e+179:
		tmp = y + x
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -5.7e+156)
		tmp = x;
	elseif (t <= 1.65e+179)
		tmp = Float64(y + x);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -5.7e+156)
		tmp = x;
	elseif (t <= 1.65e+179)
		tmp = y + x;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.7e+156], x, If[LessEqual[t, 1.65e+179], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{+156}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+179}:\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.69999999999999998e156 or 1.64999999999999989e179 < t

    1. Initial program 54.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative54.2%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+54.2%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg54.2%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg54.2%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative54.2%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in54.2%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*61.2%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg61.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in61.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg61.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative61.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg61.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified61.2%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in y around 0 71.7%

      \[\leadsto \color{blue}{x} \]

    if -5.69999999999999998e156 < t < 1.64999999999999989e179

    1. Initial program 85.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative85.5%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
      2. associate--l+85.5%

        \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      3. sub-neg85.5%

        \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
      4. distribute-frac-neg85.5%

        \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
      5. *-commutative85.5%

        \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
      6. distribute-rgt-neg-in85.5%

        \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
      7. associate-/l*90.8%

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg90.8%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in90.8%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg90.8%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
      11. +-commutative90.8%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg90.8%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
    4. Taylor expanded in a around inf 61.2%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+179}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 50.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 77.4%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative77.4%

      \[\leadsto \color{blue}{\left(y + x\right)} - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. associate--l+77.4%

      \[\leadsto \color{blue}{y + \left(x - \frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
    3. sub-neg77.4%

      \[\leadsto y + \color{blue}{\left(x + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)\right)} \]
    4. distribute-frac-neg77.4%

      \[\leadsto y + \left(x + \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}}\right) \]
    5. *-commutative77.4%

      \[\leadsto y + \left(x + \frac{-\color{blue}{y \cdot \left(z - t\right)}}{a - t}\right) \]
    6. distribute-rgt-neg-in77.4%

      \[\leadsto y + \left(x + \frac{\color{blue}{y \cdot \left(-\left(z - t\right)\right)}}{a - t}\right) \]
    7. associate-/l*83.2%

      \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
    8. sub-neg83.2%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
    9. distribute-neg-in83.2%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
    10. remove-double-neg83.2%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\left(-z\right) + \color{blue}{t}}}\right) \]
    11. +-commutative83.2%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
    12. sub-neg83.2%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t - z}}}\right) \]
  3. Simplified83.2%

    \[\leadsto \color{blue}{y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)} \]
  4. Taylor expanded in y around 0 53.1%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification53.1%

    \[\leadsto x \]

Developer target: 88.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
        (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
   (if (< t_2 -1.3664970889390727e-7)
     t_1
     (if (< t_2 1.4754293444577233e-239)
       (/ (- (* y (- a z)) (* x t)) (- a t))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
    t_2 = (x + y) - (((z - t) * y) / (a - t))
    if (t_2 < (-1.3664970889390727d-7)) then
        tmp = t_1
    else if (t_2 < 1.4754293444577233d-239) then
        tmp = ((y * (a - z)) - (x * t)) / (a - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	double t_2 = (x + y) - (((z - t) * y) / (a - t));
	double tmp;
	if (t_2 < -1.3664970889390727e-7) {
		tmp = t_1;
	} else if (t_2 < 1.4754293444577233e-239) {
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y)
	t_2 = (x + y) - (((z - t) * y) / (a - t))
	tmp = 0
	if t_2 < -1.3664970889390727e-7:
		tmp = t_1
	elif t_2 < 1.4754293444577233e-239:
		tmp = ((y * (a - z)) - (x * t)) / (a - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y))
	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
	tmp = 0.0
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
	t_2 = (x + y) - (((z - t) * y) / (a - t));
	tmp = 0.0;
	if (t_2 < -1.3664970889390727e-7)
		tmp = t_1;
	elseif (t_2 < 1.4754293444577233e-239)
		tmp = ((y * (a - z)) - (x * t)) / (a - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023274 
(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))))