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

Percentage Accurate: 76.4% → 90.2%
Time: 12.5s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 76.4% 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: 90.2% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-271}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{a - t}, y, x + y\right)\\

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

\mathbf{elif}\;t\_1 \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

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

    if 1.5e172 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 70.8%

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

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{z - t}{a - t} \cdot y} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r/87.2%

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

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

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

Alternative 2: 89.1% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 87.5%

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

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

    if 1.9999999999999999e304 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 35.2%

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

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{z - t}{a - t} \cdot y} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r/72.0%

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

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

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

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

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

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

Alternative 3: 90.2% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.5%

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

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

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

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

    1. Initial program 4.9%

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

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

    if 1.5e172 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 70.8%

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

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{z - t}{a - t} \cdot y} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r/87.2%

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

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

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

Alternative 4: 72.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-125}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-15} \lor \neg \left(a \leq 2.5 \cdot 10^{+47}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.05e21 or 8.5000000000000002e-125 < a < 8.20000000000000072e-15 or 2.50000000000000011e47 < a

    1. Initial program 85.4%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified80.1%

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

    if -2.05e21 < a < 2.9999999999999998e-190

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e-190 < a < 8.5000000000000002e-125

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(0 + \color{blue}{{\left(\frac{\frac{t}{z - a}}{y}\right)}^{-1}}\right) \]
    9. Applied egg-rr36.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    12. Simplified71.8%

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

    if 8.20000000000000072e-15 < a < 2.50000000000000011e47

    1. Initial program 74.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+21}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-125}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-15} \lor \neg \left(a \leq 2.5 \cdot 10^{+47}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 80.5% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.05e21

    1. Initial program 91.2%

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

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

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

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

    if -2.05e21 < a < -1.59999999999999993e-267

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(0 + \frac{y}{\frac{t}{z - a}}\right)} \]
    8. Step-by-step derivation
      1. associate-/r/83.5%

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

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

    if -1.59999999999999993e-267 < a < 2.9999999999999998e-190

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e-190 < a < 1.20000000000000003e-73

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(0 + \color{blue}{{\left(\frac{\frac{t}{z - a}}{y}\right)}^{-1}}\right) \]
    9. Applied egg-rr56.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    12. Simplified67.0%

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

    if 1.20000000000000003e-73 < a

    1. Initial program 82.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+21}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-267}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-125}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\

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

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


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

    1. Initial program 91.2%

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

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

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

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

    if -2e21 < a < 2.9999999999999998e-190

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e-190 < a < 3.3000000000000001e-125

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(0 + \color{blue}{{\left(\frac{\frac{t}{z - a}}{y}\right)}^{-1}}\right) \]
    9. Applied egg-rr36.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    12. Simplified71.8%

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

    if 3.3000000000000001e-125 < a < 1.20000000000000003e-73

    1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(0 + \frac{y}{\frac{t}{z - a}}\right)} \]
    8. Step-by-step derivation
      1. associate-/r/81.0%

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

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

    if 1.20000000000000003e-73 < a

    1. Initial program 82.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-125}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\ \;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 88.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e175 < t < 1.24999999999999997e194

    1. Initial program 88.1%

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

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

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

    if 1.24999999999999997e194 < t

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 81.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.1999999999999999e-62 or 1.25e-73 < a

    1. Initial program 83.1%

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

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

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

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

    if -6.1999999999999999e-62 < a < 1.25e-73

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 81.4% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 83.9%

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

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

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

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

    if -3e-68 < a < 1.25e-73

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-73 < a

    1. Initial program 82.3%

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

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

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

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

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

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

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

Alternative 10: 73.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21} \lor \neg \left(a \leq 2.8 \cdot 10^{-170}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2e21 or 2.79999999999999995e-170 < a

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified75.2%

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

    if -2e21 < a < 2.79999999999999995e-170

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 75.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21} \lor \neg \left(a \leq 8.5 \cdot 10^{-83}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2e21 or 8.49999999999999938e-83 < a

    1. Initial program 85.3%

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

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

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

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

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

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

    if -2e21 < a < 8.49999999999999938e-83

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.25 \cdot 10^{+152}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8000000000000002e176 or 1.25e152 < t

    1. Initial program 47.7%

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

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

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

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

    if -2.8000000000000002e176 < t < 1.25e152

    1. Initial program 88.7%

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

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

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

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

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

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

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

Alternative 13: 50.3% 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.1%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification49.4%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 87.9% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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