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

Percentage Accurate: 76.6% → 93.2%
Time: 9.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 76.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: 93.2% accurate, 0.1× 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 -1 \cdot 10^{-296} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y \cdot a}{t}\right) + \frac{y \cdot z}{t}\\ \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 -1e-296) (not (<= t_1 0.0)))
     (+ x (fma (/ (- t z) (- a t)) y y))
     (+ (- x (/ (* y a) t)) (/ (* y z) t)))))
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 <= -1e-296) || !(t_1 <= 0.0)) {
		tmp = x + fma(((t - z) / (a - t)), y, y);
	} else {
		tmp = (x - ((y * a) / t)) + ((y * z) / t);
	}
	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 <= -1e-296) || !(t_1 <= 0.0))
		tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y));
	else
		tmp = Float64(Float64(x - Float64(Float64(y * a) / t)) + Float64(Float64(y * z) / t));
	end
	return 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, -1e-296], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / t), $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 -1 \cdot 10^{-296} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\

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


\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))) < -1e-296 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq 10^{+291}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 83.1%

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.1%

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

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

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq 10^{+291}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 83.1%

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

    1. Initial program 97.1%

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

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

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 60.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2.65 \cdot 10^{-263}:\\
\;\;\;\;x\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3300 or 9.2e-284 < a < 7.19999999999999967e-254 or 1.0199999999999999e-50 < a

    1. Initial program 81.0%

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

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

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

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

    if -3300 < a < -2.6499999999999999e-263

    1. Initial program 62.4%

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

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

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

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

    if -2.6499999999999999e-263 < a < 9.2e-284

    1. Initial program 81.3%

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. *-commutative67.9%

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

        \[\leadsto -\color{blue}{\frac{z}{a - t} \cdot y} \]
      4. distribute-lft-neg-in63.9%

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{z}{t}} \]
    9. Taylor expanded in y around 0 67.9%

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

    if 7.19999999999999967e-254 < a < 1.0199999999999999e-50

    1. Initial program 65.0%

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

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{z - t}{a - t} \cdot y} \]
    4. Taylor expanded in t around inf 72.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-neg72.8%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot a}{t} + x\right) + \left(--1 \cdot \frac{y \cdot z}{t}\right)} \]
      2. +-commutative72.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-neg72.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-neg72.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3300:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-263}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-284}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-254}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-50}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 85.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.0999999999999998e37 or 1.64999999999999994e-147 < a

    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. associate-/l*92.5%

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

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

    if -4.0999999999999998e37 < a < 1.64999999999999994e-147

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 91.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.21999999999999992e134 or 3.1500000000000001e153 < t

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.21999999999999992e134 < t < 3.1500000000000001e153

    1. Initial program 84.4%

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

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

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

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

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

Alternative 7: 59.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.3 \cdot 10^{-267}:\\
\;\;\;\;x\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6e5 or 2.29999999999999996e-285 < a < 6.00000000000000023e-254 or 1.00000000000000001e-50 < a

    1. Initial program 81.0%

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

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

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

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

    if -1.6e5 < a < -3.30000000000000004e-267

    1. Initial program 62.4%

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

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

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

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

    if -3.30000000000000004e-267 < a < 2.29999999999999996e-285

    1. Initial program 81.3%

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. *-commutative67.9%

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

        \[\leadsto -\color{blue}{\frac{z}{a - t} \cdot y} \]
      4. distribute-lft-neg-in63.9%

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{z}{t}} \]
    9. Taylor expanded in y around 0 67.9%

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

    if 6.00000000000000023e-254 < a < 1.00000000000000001e-50

    1. Initial program 65.0%

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

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{z - t}{a - t} \cdot y} \]
    4. Taylor expanded in t around inf 72.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-neg72.8%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot a}{t} + x\right) + \left(--1 \cdot \frac{y \cdot z}{t}\right)} \]
      2. +-commutative72.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-neg72.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-neg72.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    11. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    12. Taylor expanded in z around inf 47.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -160000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-285}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-254}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 10^{-50}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 84.6% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1999999999999998e38 or 7.2e9 < a

    1. Initial program 83.2%

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

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

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

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

    if -5.1999999999999998e38 < a < 2.3999999999999998e-280

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

    if 2.3999999999999998e-280 < a < 7.2e9

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 83.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.0999999999999998e37 or 3.99999999999999974e-148 < a

    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/91.7%

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

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

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

    if -4.0999999999999998e37 < a < 3.99999999999999974e-148

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 81.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.0999999999999998e37 or 3.2000000000000001e-58 < a

    1. Initial program 83.5%

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

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

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

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

    if -4.0999999999999998e37 < a < 3.2000000000000001e-58

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 76.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55000000000000009e38 or 5.79999999999999982e-56 < a

    1. Initial program 83.5%

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

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

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

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

    if -1.55000000000000009e38 < a < 5.79999999999999982e-56

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 59.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-267}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.6e5 or 1.6e-50 < a

    1. Initial program 82.2%

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

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

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

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

    if -3.6e5 < a < -4.7999999999999996e-267

    1. Initial program 62.4%

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

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

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

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

    if -4.7999999999999996e-267 < a < 1.6e-50

    1. Initial program 70.3%

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. *-commutative52.1%

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

        \[\leadsto -\color{blue}{\frac{z}{a - t} \cdot y} \]
      4. distribute-lft-neg-in55.0%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-z}{a - t}} \]
    7. Simplified55.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -360000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 76.5% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.45e8 or 9.0000000000000002e-39 < a

    1. Initial program 82.2%

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

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

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

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

    if -2.45e8 < a < 9.0000000000000002e-39

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 75.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3700 or 4.19999999999999975e-58 < a

    1. Initial program 81.7%

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

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

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

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

    if -3700 < a < 4.19999999999999975e-58

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 62.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-165}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1850 or 2.60000000000000007e-165 < a

    1. Initial program 79.1%

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

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

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

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

    if -1850 < a < 2.60000000000000007e-165

    1. Initial program 67.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1850:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 16: 50.7% accurate, 13.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification51.9%

    \[\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 2023196 
(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))))