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

Percentage Accurate: 77.1% → 89.1%
Time: 11.9s
Alternatives: 18
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 18 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.1% 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: 89.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+16}:\\ \;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\ \mathbf{elif}\;t \leq 4.65 \cdot 10^{+201}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.45e+16)
   (+ x (- (* y (/ z t)) (* a (/ y t))))
   (if (<= t 4.65e+201)
     (fma (- z t) (/ y (- t a)) (+ x y))
     (+ x (* y (- (/ z t) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.45e+16) {
		tmp = x + ((y * (z / t)) - (a * (y / t)));
	} else if (t <= 4.65e+201) {
		tmp = fma((z - t), (y / (t - a)), (x + y));
	} else {
		tmp = x + (y * ((z / t) - (a / t)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.45e+16)
		tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t))));
	elseif (t <= 4.65e+201)
		tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y));
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+16], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.65e+201], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.65 \cdot 10^{+201}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in66.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-neg66.1%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified66.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 inf 71.7%

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

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

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

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

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

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

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

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

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

    if -1.45e16 < t < 4.64999999999999998e201

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.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-neg94.9%

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

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

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

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

    if 4.64999999999999998e201 < t

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in62.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-neg62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 74.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+77} \lor \neg \left(a \leq -2.26 \cdot 10^{-5}\right) \land \left(a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 2.9 \cdot 10^{+14}\right)\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.99999999999999993e77 or -2.26e-5 < a < -1.22e-135 or 2.9e14 < a

    1. Initial program 84.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.2%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if -3.99999999999999993e77 < a < -2.26e-5 or -1.22e-135 < a < 2.9e14

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in78.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-neg78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+77} \lor \neg \left(a \leq -2.26 \cdot 10^{-5}\right) \land \left(a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 2.9 \cdot 10^{+14}\right)\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.7% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 21500000000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.41999999999999996e76 or -2.26e-5 < a < -1.22e-135 or 2.15e13 < a

    1. Initial program 84.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.2%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if -1.41999999999999996e76 < a < -2.26e-5

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in75.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-neg75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z}{a}} \]
    13. Simplified71.1%

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

    if -1.22e-135 < a < 2.15e13

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified82.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.26 \cdot 10^{-5}:\\ \;\;\;\;x - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 21500000000000\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.5% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq -4.6 \cdot 10^{-138} \lor \neg \left(a \leq 18500000000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.65e76 or -2.26e-5 < a < -4.5999999999999998e-138 or 1.85e13 < a

    1. Initial program 84.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.2%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if -1.65e76 < a < -2.26e-5

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in75.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-neg75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999998e-138 < a < 1.85e13

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified82.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.26 \cdot 10^{-5}:\\ \;\;\;\;x - \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-138} \lor \neg \left(a \leq 18500000000000\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{t - a}\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{+143}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+63}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+222}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ y (- t a)))))
   (if (<= z -5.4e+143)
     t_1
     (if (<= z 2.4e+63)
       (+ x y)
       (if (<= z 7.2e+74)
         (* y (/ z (- t a)))
         (if (<= z 2.8e+222) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / (t - a));
	double tmp;
	if (z <= -5.4e+143) {
		tmp = t_1;
	} else if (z <= 2.4e+63) {
		tmp = x + y;
	} else if (z <= 7.2e+74) {
		tmp = y * (z / (t - a));
	} else if (z <= 2.8e+222) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (y / (t - a))
    if (z <= (-5.4d+143)) then
        tmp = t_1
    else if (z <= 2.4d+63) then
        tmp = x + y
    else if (z <= 7.2d+74) then
        tmp = y * (z / (t - a))
    else if (z <= 2.8d+222) then
        tmp = x + y
    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 = z * (y / (t - a));
	double tmp;
	if (z <= -5.4e+143) {
		tmp = t_1;
	} else if (z <= 2.4e+63) {
		tmp = x + y;
	} else if (z <= 7.2e+74) {
		tmp = y * (z / (t - a));
	} else if (z <= 2.8e+222) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (y / (t - a))
	tmp = 0
	if z <= -5.4e+143:
		tmp = t_1
	elif z <= 2.4e+63:
		tmp = x + y
	elif z <= 7.2e+74:
		tmp = y * (z / (t - a))
	elif z <= 2.8e+222:
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(y / Float64(t - a)))
	tmp = 0.0
	if (z <= -5.4e+143)
		tmp = t_1;
	elseif (z <= 2.4e+63)
		tmp = Float64(x + y);
	elseif (z <= 7.2e+74)
		tmp = Float64(y * Float64(z / Float64(t - a)));
	elseif (z <= 2.8e+222)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (y / (t - a));
	tmp = 0.0;
	if (z <= -5.4e+143)
		tmp = t_1;
	elseif (z <= 2.4e+63)
		tmp = x + y;
	elseif (z <= 7.2e+74)
		tmp = y * (z / (t - a));
	elseif (z <= 2.8e+222)
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+143], t$95$1, If[LessEqual[z, 2.4e+63], N[(x + y), $MachinePrecision], If[LessEqual[z, 7.2e+74], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+222], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t - a}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+63}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+74}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+222}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.4000000000000003e143 or 2.8000000000000001e222 < z

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in90.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-neg90.9%

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    8. Step-by-step derivation
      1. clear-num67.0%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t - a}{z}}} \]
      2. un-div-inv67.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{z}}} \]
    9. Applied egg-rr67.1%

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

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

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

    if -5.4000000000000003e143 < z < 2.4e63 or 7.19999999999999975e74 < z < 2.8000000000000001e222

    1. Initial program 81.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 70.6%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.6%

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

    if 2.4e63 < z < 7.19999999999999975e74

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in81.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-neg81.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+143}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+63}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+222}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.05e12 or 4.64999999999999998e201 < t

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in65.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-neg65.1%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified65.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 inf 69.3%

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

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

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

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

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

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

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

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

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

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

    if -3.05e12 < t < 4.64999999999999998e201

    1. Initial program 90.7%

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

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

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

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

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

Alternative 7: 89.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in66.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-neg66.1%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified66.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 inf 71.7%

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

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

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

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

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

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

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

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

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

    if -1.05e16 < t < 4.64999999999999998e201

    1. Initial program 90.7%

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

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

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

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

    if 4.64999999999999998e201 < t

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in62.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-neg62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+16}:\\ \;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\ \mathbf{elif}\;t \leq 4.65 \cdot 10^{+201}:\\ \;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 87.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000019e-9 or 4.64999999999999998e201 < t

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in67.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-neg67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000019e-9 < t < 4.64999999999999998e201

    1. Initial program 90.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 90.5%

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

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

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

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

Alternative 9: 84.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+78} \lor \neg \left(a \leq 1.05 \cdot 10^{+32}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.90000000000000017e78 or 1.05e32 < a

    1. Initial program 83.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 83.6%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.6%

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

    if -2.90000000000000017e78 < a < 1.05e32

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in80.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-neg80.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t - a}} \]
    13. Simplified86.9%

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

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

Alternative 10: 81.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2e-72 or 2.99999999999999983e-141 < t

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in79.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-neg79.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t - a}} \]
    13. Simplified81.0%

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

    if -4.2e-72 < t < 2.99999999999999983e-141

    1. Initial program 96.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 88.8%

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

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

Alternative 11: 81.4% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in69.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-neg69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e-12 < t < 2.7999999999999999e-137

    1. Initial program 95.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 86.4%

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

    if 2.7999999999999999e-137 < t

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+169} \lor \neg \left(y \leq 6.8 \cdot 10^{+141}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4999999999999995e169 or 6.7999999999999996e141 < y

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in64.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-neg64.2%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified64.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 41.9%

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

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

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

    if -9.4999999999999995e169 < y < 6.7999999999999996e141

    1. Initial program 88.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 71.3%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.3%

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

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

Alternative 13: 60.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+254}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.9999999999999995e164

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    9. Step-by-step derivation
      1. clear-num54.8%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv54.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    10. Applied egg-rr54.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/59.0%

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

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

    if -8.9999999999999995e164 < z < 4.59999999999999997e254

    1. Initial program 80.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 67.8%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified67.8%

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

    if 4.59999999999999997e254 < z

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    7. Step-by-step derivation
      1. mul-1-neg56.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+164}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+254}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{-205}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{-212}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.5999999999999998e-205 or 4.29999999999999974e-212 < x

    1. Initial program 82.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 62.2%

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

    if -6.5999999999999998e-205 < x < 4.29999999999999974e-212

    1. Initial program 73.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 67.2%

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

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

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

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

        \[\leadsto y - y \cdot \color{blue}{\frac{-1 \cdot t}{a - t}} \]
      2. neg-mul-147.4%

        \[\leadsto y - y \cdot \frac{\color{blue}{-t}}{a - t} \]
    8. Simplified47.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.6 \cdot 10^{-205}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-212}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 59.3% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999993e168

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in72.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-neg72.1%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified72.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 45.5%

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

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

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

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

    if -6.19999999999999993e168 < y

    1. Initial program 83.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 66.4%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+168}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.2% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1999999999999999e175

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in72.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-neg72.1%

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified72.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 45.5%

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    9. Step-by-step derivation
      1. clear-num43.3%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv43.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    10. Applied egg-rr43.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/43.5%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
    12. Simplified43.5%

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

    if -2.1999999999999999e175 < y

    1. Initial program 83.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 66.4%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+175}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 60.8% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 63.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 64.7%

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

    if -9.8000000000000006e47 < t

    1. Initial program 84.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 64.1%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified64.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.8 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 50.4% 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 80.6%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 52.5%

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 87.8% 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 2024084 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :alt
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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