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

Percentage Accurate: 76.6% → 91.5%
Time: 12.4s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 76.6% accurate, 1.0× speedup?

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

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

Alternative 1: 91.5% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.0000000000000002e-204 or 9.99999999999999931e-304 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 83.6%

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

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

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

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

    if -5.0000000000000002e-204 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.99999999999999931e-304

    1. Initial program 7.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-12} \lor \neg \left(a \leq 4.1 \cdot 10^{-143} \lor \neg \left(a \leq 2.9 \cdot 10^{-120}\right) \land \left(a \leq 4 \cdot 10^{+55} \lor \neg \left(a \leq 1.95 \cdot 10^{+126}\right) \land a \leq 8 \cdot 10^{+154}\right)\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.5e-12 or 4.1e-143 < a < 2.9e-120 or 4.00000000000000004e55 < a < 1.94999999999999997e126 or 8.0000000000000003e154 < a

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e-12 < a < 4.1e-143 or 2.9e-120 < a < 4.00000000000000004e55 or 1.94999999999999997e126 < a < 8.0000000000000003e154

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-12} \lor \neg \left(a \leq 4.1 \cdot 10^{-143} \lor \neg \left(a \leq 2.9 \cdot 10^{-120}\right) \land \left(a \leq 4 \cdot 10^{+55} \lor \neg \left(a \leq 1.95 \cdot 10^{+126}\right) \land a \leq 8 \cdot 10^{+154}\right)\right):\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \end{array} \]

Alternative 3: 82.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 4.1 \cdot 10^{-143}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+154}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.59999999999999983e-12 or 4.1e-143 < a < 2.3999999999999999e-120 or 1.8500000000000001e55 < a < 2.19999999999999999e126

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999983e-12 < a < 4.1e-143 or 2.3999999999999999e-120 < a < 1.8500000000000001e55 or 2.19999999999999999e126 < a < 8.0000000000000003e154

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000003e154 < a

    1. Initial program 63.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{-12}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-143}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+55}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+126}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+154}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 4: 82.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-143}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+125}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+154}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.8000000000000001e-15 or 1.8500000000000001e55 < a < 9.20000000000000051e125

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000001e-15 < a < 3.3000000000000001e-143 or 2.3999999999999999e-120 < a < 1.8500000000000001e55 or 9.20000000000000051e125 < a < 8.0000000000000003e154

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000001e-143 < a < 2.3999999999999999e-120

    1. Initial program 92.0%

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

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

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

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

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

    if 8.0000000000000003e154 < a

    1. Initial program 63.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{-15}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-143}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+55}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+125}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+154}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 5: 87.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+59} \lor \neg \left(t \leq -0.00016\right) \land t \leq 3.1 \cdot 10^{+106}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.99999999999999972e58 or -1.60000000000000013e-4 < t < 3.0999999999999999e106

    1. Initial program 80.6%

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

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

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

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

    if -9.99999999999999972e58 < t < -1.60000000000000013e-4 or 3.0999999999999999e106 < t

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-14} \lor \neg \left(a \leq 2 \cdot 10^{-159}\right) \land \left(a \leq 3.8 \cdot 10^{-117} \lor \neg \left(a \leq 1.35 \cdot 10^{+55}\right)\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1e-14 or 1.99999999999999998e-159 < a < 3.79999999999999972e-117 or 1.34999999999999988e55 < a

    1. Initial program 73.7%

      \[\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*85.6%

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

        \[\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 t around 0 75.2%

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

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

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

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

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

    if -1.1e-14 < a < 1.99999999999999998e-159 or 3.79999999999999972e-117 < a < 1.34999999999999988e55

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
    9. Simplified85.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-14} \lor \neg \left(a \leq 2 \cdot 10^{-159}\right) \land \left(a \leq 3.8 \cdot 10^{-117} \lor \neg \left(a \leq 1.35 \cdot 10^{+55}\right)\right):\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \end{array} \]

Alternative 7: 84.9% accurate, 0.8× speedup?

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

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

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

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

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

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


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

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e-12 < a < 6.9999999999999995e48

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]

    if 6.9999999999999995e48 < a < 1.94999999999999997e126

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.94999999999999997e126 < a < 1.2000000000000001e155

    1. Initial program 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2000000000000001e155 < a

    1. Initial program 63.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+48}:\\ \;\;\;\;x - \frac{y \cdot z}{a - t}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+126}:\\ \;\;\;\;\left(x + y\right) + \frac{y}{\frac{a}{t} + -1}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+155}:\\ \;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 8: 74.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 2 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e-16 < a < 1.99999999999999998e-159 or 3.4999999999999998e-117 < a < 2.8000000000000001e55

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{t} + x} \]
    9. Simplified85.1%

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

    if 1.99999999999999998e-159 < a < 3.4999999999999998e-117

    1. Initial program 80.7%

      \[\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. associate-/l*79.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{-16}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-159}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-117}:\\ \;\;\;\;y - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+55}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 9: 75.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 2 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4000000000000001e-12 or 4.49999999999999998e55 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e-12 < a < 1.99999999999999998e-159 or 2.3999999999999999e-120 < a < 4.49999999999999998e55

    1. Initial program 72.6%

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot a - y \cdot z}{t}} \]
      2. sub-neg88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999998e-159 < a < 2.3999999999999999e-120

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-\color{blue}{z \cdot y}}{a} \]
      4. distribute-rgt-neg-in60.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-12}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-159}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;x - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+55}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 10: 87.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02000000000000002e-27 or 1.25e45 < a

    1. Initial program 73.0%

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

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

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

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

    if -1.02000000000000002e-27 < a < 1.25e45

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 86.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000001e-12 < a < 2.8999999999999999e55

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8999999999999999e55 < a

    1. Initial program 63.8%

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

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

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

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

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

Alternative 12: 76.5% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1000000000000001e-12 or 2.3999999999999999e55 < a

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000001e-12 < a < 2.3999999999999999e55

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{y \cdot z}{t}} \]
    8. Step-by-step derivation
      1. sub-neg78.4%

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

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

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

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

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

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

Alternative 13: 51.8% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+100}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4e19 or 3.39999999999999994e100 < y

    1. Initial program 56.7%

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

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

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

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

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

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

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

    if -2.4e19 < y < 3.39999999999999994e100

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+19}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 14: 61.3% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.4 \cdot 10^{+64}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.40000000000000004e64

    1. Initial program 79.3%

      \[\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*87.3%

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000004e64 < t

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.4 \cdot 10^{+64}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 50.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+77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]

Developer target: 87.9% 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 2023176 
(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))))