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

Percentage Accurate: 77.3% → 92.0%
Time: 11.9s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 77.3% 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.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+82} \lor \neg \left(t \leq 7.5 \cdot 10^{+148}\right):\\ \;\;\;\;\left(x - \frac{y}{\frac{t}{a}}\right) + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -3.2e+82) (not (<= t 7.5e+148)))
   (+ (- x (/ y (/ t a))) (/ y (/ t z)))
   (+ x (fma (/ (- t z) (- a t)) y y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.2e+82) || !(t <= 7.5e+148)) {
		tmp = (x - (y / (t / a))) + (y / (t / z));
	} else {
		tmp = x + fma(((t - z) / (a - t)), y, y);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -3.2e+82) || !(t <= 7.5e+148))
		tmp = Float64(Float64(x - Float64(y / Float64(t / a))) + Float64(y / Float64(t / z)));
	else
		tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e+82], N[Not[LessEqual[t, 7.5e+148]], $MachinePrecision]], N[(N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.19999999999999975e82 or 7.50000000000000008e148 < t

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999975e82 < t < 7.50000000000000008e148

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg94.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+82} \lor \neg \left(t \leq 7.5 \cdot 10^{+148}\right):\\ \;\;\;\;\left(x - \frac{y}{\frac{t}{a}}\right) + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \end{array} \]

Alternative 2: 75.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -8.4 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{elif}\;a \leq -1.7 \cdot 10^{-17}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-77}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.30000000000000025e173 or -8.3999999999999999e142 < a < -1.6999999999999999e-17 or -4.2999999999999998e-47 < a < -6.20000000000000016e-77 or 2.80000000000000019e43 < a

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.30000000000000025e173 < a < -8.3999999999999999e142

    1. Initial program 72.7%

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

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

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

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

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

    if -1.6999999999999999e-17 < a < -4.2999999999999998e-47

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.20000000000000016e-77 < a < 2.80000000000000019e43

    1. Initial program 72.2%

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a - t}, y, y\right) \]
      9. +-commutative86.9%

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg86.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{+173}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{+142}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-17}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-47}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-77}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+43}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 75.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -2.6 \cdot 10^{+142}:\\
\;\;\;\;y - y \cdot \frac{z}{a}\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-17}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-79}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.30000000000000025e173 or -2.60000000000000021e142 < a < -1.6000000000000001e-17 or -6.6999999999999997e-47 < a < -1.11999999999999996e-79 or 5.79999999999999961e42 < a

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.30000000000000025e173 < a < -2.60000000000000021e142

    1. Initial program 72.7%

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative72.8%

        \[\leadsto y - \color{blue}{z \cdot \frac{y}{a}} \]
    7. Simplified72.8%

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

      \[\leadsto y - \color{blue}{\frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. *-commutative64.8%

        \[\leadsto y - \frac{\color{blue}{z \cdot y}}{a} \]
      2. associate-/l*72.6%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{a}{y}}} \]
      3. associate-/r/92.0%

        \[\leadsto y - \color{blue}{\frac{z}{a} \cdot y} \]
    10. Simplified92.0%

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

    if -1.6000000000000001e-17 < a < -6.6999999999999997e-47

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999996e-79 < a < 5.79999999999999961e42

    1. Initial program 72.2%

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a - t}, y, y\right) \]
      9. +-commutative86.9%

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg86.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{+173}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+142}:\\ \;\;\;\;y - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-17}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -6.7 \cdot 10^{-47}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-79}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 91.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e85 or 8.7999999999999995e148 < t

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e85 < t < 8.7999999999999995e148

    1. Initial program 86.4%

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

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

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

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

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

Alternative 5: 59.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq -3.5 \cdot 10^{-182}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{-244}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

\mathbf{elif}\;x \leq 7 \cdot 10^{-110}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.50000000000000004e121

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg94.3%

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

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

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

    if -2.50000000000000004e121 < x < -3.49999999999999983e-182 or 6.99999999999999947e-110 < x

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999983e-182 < x < 1.5000000000000001e-244

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative51.0%

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

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

    if 1.5000000000000001e-244 < x < 6.99999999999999947e-110

    1. Initial program 67.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-182}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-244}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 60.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+121}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -4.7 \cdot 10^{-182}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;x \leq 8 \cdot 10^{-110}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.49999999999999965e121

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg94.3%

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

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

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

    if -7.49999999999999965e121 < x < -4.7e-182 or 8.0000000000000004e-110 < x

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7e-182 < x < 2.5e-243

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5e-243 < x < 8.0000000000000004e-110

    1. Initial program 67.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-182}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-243}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 87.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+85} \lor \neg \left(t \leq 2.2 \cdot 10^{+119}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1000000000000001e85 or 2.2000000000000001e119 < t

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg77.9%

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

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

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

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

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

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

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

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

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

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

    if -1.1000000000000001e85 < t < 2.2000000000000001e119

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

Alternative 8: 88.4% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.95000000000000011e77 < t

    1. Initial program 79.4%

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

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

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

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

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

Alternative 9: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{-137} \lor \neg \left(a \leq 1.7 \cdot 10^{-35}\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 -1.5e-137) (not (<= a 1.7e-35)))
   (+ 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 <= -1.5e-137) || !(a <= 1.7e-35)) {
		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 <= (-1.5d-137)) .or. (.not. (a <= 1.7d-35))) 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 <= -1.5e-137) || !(a <= 1.7e-35)) {
		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 <= -1.5e-137) or not (a <= 1.7e-35):
		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 <= -1.5e-137) || !(a <= 1.7e-35))
		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 <= -1.5e-137) || ~((a <= 1.7e-35)))
		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, -1.5e-137], N[Not[LessEqual[a, 1.7e-35]], $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 -1.5 \cdot 10^{-137} \lor \neg \left(a \leq 1.7 \cdot 10^{-35}\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 < -1.4999999999999999e-137 or 1.7000000000000001e-35 < 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. associate--l+75.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg90.7%

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

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

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

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

        \[\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 -1.4999999999999999e-137 < a < 1.7000000000000001e-35

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg86.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 86.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 74.8%

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

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

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

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

    if -1.94999999999999995e-17 < a < 1.80000000000000005e43

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000005e43 < 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. associate--l+75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 59.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq -3.8 \cdot 10^{-182}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x \leq 5.1 \cdot 10^{-197}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.9999999999999999e121

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg94.3%

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

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

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

    if -6.9999999999999999e121 < x < -3.8000000000000003e-182 or 5.1000000000000003e-197 < x

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg91.8%

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

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

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

    if -3.8000000000000003e-182 < x < 5.1000000000000003e-197

    1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative47.3%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    13. Simplified47.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-182}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-197}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 63.4% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+95}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.02000000000000002e52 or 2.90000000000000013e95 < t

    1. Initial program 47.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a - t}, y, y\right) \]
      9. +-commutative78.9%

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg78.9%

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

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

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

    if -1.02000000000000002e52 < t < 2.90000000000000013e95

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg95.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+95}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 50.7% accurate, 4.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.6 \cdot 10^{+261}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.5999999999999996e261

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
      12. remove-double-neg88.2%

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

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

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

    if 5.5999999999999996e261 < a

    1. Initial program 72.9%

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

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

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

        \[\leadsto y - \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative70.6%

        \[\leadsto y - \color{blue}{z \cdot \frac{y}{a}} \]
    7. Simplified70.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 5.6 \cdot 10^{+261}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 14: 51.0% 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 73.4%

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

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

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

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

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

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

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

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

      \[\leadsto x + \mathsf{fma}\left(\frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a - t}, y, y\right) \]
    9. +-commutative89.0%

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

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

      \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) - z}}{a - t}, y, y\right) \]
    12. remove-double-neg89.0%

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

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

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

    \[\leadsto x \]

Developer target: 88.7% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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