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

Percentage Accurate: 77.3% → 88.3%
Time: 12.0s
Alternatives: 11
Speedup: 0.7×

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 11 alternatives:

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

Initial Program: 77.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\ t_2 := \frac{y \cdot \left(z - t\right)}{a - t}\\ t_3 := \left(x + y\right) - t\_2\\ t_4 := y + \left(x - t\_2\right)\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-125}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+296}:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (* y (/ z t)) (- (* a (/ y t)) x)))
        (t_2 (/ (* y (- z t)) (- a t)))
        (t_3 (- (+ x y) t_2))
        (t_4 (+ y (- x t_2))))
   (if (<= t_3 (- INFINITY))
     t_1
     (if (<= t_3 -1e-125)
       t_4
       (if (<= t_3 2e-274)
         (+ x (/ (- (* y z) (* y a)) t))
         (if (<= t_3 4e+296) t_4 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z / t)) - ((a * (y / t)) - x);
	double t_2 = (y * (z - t)) / (a - t);
	double t_3 = (x + y) - t_2;
	double t_4 = y + (x - t_2);
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_3 <= -1e-125) {
		tmp = t_4;
	} else if (t_3 <= 2e-274) {
		tmp = x + (((y * z) - (y * a)) / t);
	} else if (t_3 <= 4e+296) {
		tmp = t_4;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z / t)) - ((a * (y / t)) - x);
	double t_2 = (y * (z - t)) / (a - t);
	double t_3 = (x + y) - t_2;
	double t_4 = y + (x - t_2);
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_3 <= -1e-125) {
		tmp = t_4;
	} else if (t_3 <= 2e-274) {
		tmp = x + (((y * z) - (y * a)) / t);
	} else if (t_3 <= 4e+296) {
		tmp = t_4;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * (z / t)) - ((a * (y / t)) - x)
	t_2 = (y * (z - t)) / (a - t)
	t_3 = (x + y) - t_2
	t_4 = y + (x - t_2)
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_1
	elif t_3 <= -1e-125:
		tmp = t_4
	elif t_3 <= 2e-274:
		tmp = x + (((y * z) - (y * a)) / t)
	elif t_3 <= 4e+296:
		tmp = t_4
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z / t)) - Float64(Float64(a * Float64(y / t)) - x))
	t_2 = Float64(Float64(y * Float64(z - t)) / Float64(a - t))
	t_3 = Float64(Float64(x + y) - t_2)
	t_4 = Float64(y + Float64(x - t_2))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_3 <= -1e-125)
		tmp = t_4;
	elseif (t_3 <= 2e-274)
		tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t));
	elseif (t_3 <= 4e+296)
		tmp = t_4;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * (z / t)) - ((a * (y / t)) - x);
	t_2 = (y * (z - t)) / (a - t);
	t_3 = (x + y) - t_2;
	t_4 = y + (x - t_2);
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_1;
	elseif (t_3 <= -1e-125)
		tmp = t_4;
	elseif (t_3 <= 2e-274)
		tmp = x + (((y * z) - (y * a)) / t);
	elseif (t_3 <= 4e+296)
		tmp = t_4;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + y), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(x - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$1, If[LessEqual[t$95$3, -1e-125], t$95$4, If[LessEqual[t$95$3, 2e-274], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+296], t$95$4, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\
t_2 := \frac{y \cdot \left(z - t\right)}{a - t}\\
t_3 := \left(x + y\right) - t\_2\\
t_4 := y + \left(x - t\_2\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-125}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-274}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+296}:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or 3.99999999999999993e296 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000001e-125 or 1.99999999999999993e-274 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 3.99999999999999993e296

    1. Initial program 98.6%

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

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

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

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

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

    if -1.00000000000000001e-125 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999993e-274

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-125}:\\ \;\;\;\;y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 2 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+296}:\\ \;\;\;\;y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\ t_2 := \left(x + y\right) - t\_1\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-125}:\\ \;\;\;\;y + \left(x - t\_1\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- a t))) (t_2 (- (+ x y) t_1)))
   (if (<= t_2 (- INFINITY))
     (- (* y (/ z t)) (- (* a (/ y t)) x))
     (if (<= t_2 -1e-125)
       (+ y (- x t_1))
       (if (<= t_2 2e-274)
         (+ x (/ (- (* y z) (* y a)) t))
         (fma (- z t) (/ y (- t a)) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (a - t);
	double t_2 = (x + y) - t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (y * (z / t)) - ((a * (y / t)) - x);
	} else if (t_2 <= -1e-125) {
		tmp = y + (x - t_1);
	} else if (t_2 <= 2e-274) {
		tmp = x + (((y * z) - (y * a)) / t);
	} else {
		tmp = fma((z - t), (y / (t - a)), (x + y));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(a - t))
	t_2 = Float64(Float64(x + y) - t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(y * Float64(z / t)) - Float64(Float64(a * Float64(y / t)) - x));
	elseif (t_2 <= -1e-125)
		tmp = Float64(y + Float64(x - t_1));
	elseif (t_2 <= 2e-274)
		tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t));
	else
		tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-125], N[(y + N[(x - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-274], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\
t_2 := \left(x + y\right) - t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-125}:\\
\;\;\;\;y + \left(x - t\_1\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-274}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\

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


\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))) < -inf.0

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000001e-125

    1. Initial program 99.3%

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

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

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

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

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

    if -1.00000000000000001e-125 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999993e-274

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999993e-274 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;y \cdot \frac{z}{t} - \left(a \cdot \frac{y}{t} - x\right)\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-125}:\\ \;\;\;\;y + \left(x - \frac{y \cdot \left(z - t\right)}{a - t}\right)\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 2 \cdot 10^{-274}:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-268}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 10^{-276}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.1 \cdot 10^{-241}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -37000 or 9.50000000000000051e-158 < a

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative69.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified69.3%

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

    if -37000 < a < -5.4999999999999997e-268 or 1e-276 < a < 5.0999999999999998e-241

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999997e-268 < a < 1e-276 or 5.0999999999999998e-241 < a < 9.50000000000000051e-158

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -37000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-268}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{-276}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-158}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.1% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4999999999999999e-71 or 2.7000000000000001e-39 < a

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative72.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified72.3%

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

    if -3.4999999999999999e-71 < a < 1.64999999999999995e-96

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999995e-96 < a < 2.7000000000000001e-39

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity82.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-71}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-96}:\\ \;\;\;\;z \cdot \left(\frac{y}{t} + \frac{x}{z}\right)\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-39}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+184} \lor \neg \left(t \leq 6.5 \cdot 10^{+206}\right):\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.59999999999999991e184 or 6.4999999999999995e206 < t

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.59999999999999991e184 < t < 6.4999999999999995e206

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+184} \lor \neg \left(t \leq 6.5 \cdot 10^{+206}\right):\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x + y \cdot \frac{z}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.8e-71 or 3.00000000000000018e-140 < a

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e-71 < a < 3.00000000000000018e-140

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{-71} \lor \neg \left(a \leq 3 \cdot 10^{-140}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{y}{t} + \frac{x}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 63.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000041e42 or 1.85000000000000012e133 < z

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{1} \cdot \frac{y}{t - a}} \]
      4. /-rgt-identity63.3%

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

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

    if -7.50000000000000041e42 < z < 1.85000000000000012e133

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative69.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+42} \lor \neg \left(z \leq 1.85 \cdot 10^{+133}\right):\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+42} \lor \neg \left(z \leq 1.2 \cdot 10^{+131}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.00000000000000058e42 or 1.2e131 < z

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num90.4%

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{{\left(\frac{t - a}{y}\right)}^{-1}}, x + y\right) \]
    6. Applied egg-rr90.4%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    11. Simplified61.1%

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

    if -6.00000000000000058e42 < z < 1.2e131

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative69.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+42} \lor \neg \left(z \leq 1.2 \cdot 10^{+131}\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4400 \lor \neg \left(a \leq 1.5 \cdot 10^{-187}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4400 or 1.50000000000000002e-187 < a

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative67.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified67.3%

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

    if -4400 < a < 1.50000000000000002e-187

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4400 \lor \neg \left(a \leq 1.5 \cdot 10^{-187}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+80}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.19999999999999996e96 or 2.4499999999999998e80 < y

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified38.6%

      \[\leadsto \color{blue}{y + x} \]
    8. Taylor expanded in y around inf 31.9%

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

    if -1.19999999999999996e96 < y < 2.4499999999999998e80

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 51.6% 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 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 87.7% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024165 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))

  (- (+ x y) (/ (* (- z t) y) (- a t))))