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

Percentage Accurate: 76.6% → 88.5%
Time: 11.5s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 76.6% accurate, 1.0× speedup?

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

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

Alternative 1: 88.5% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\left(a - t\right) \cdot \frac{\frac{1}{y}}{z - t}}\\

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


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

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999999e-70 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235

    1. Initial program 24.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.9% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\left(a - t\right) \cdot \frac{\frac{1}{y}}{z - t}}\\

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


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

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

    if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235

    1. Initial program 17.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\

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


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

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

    if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\

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


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

    1. Initial program 78.8%

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

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

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

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

    if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302

    1. Initial program 97.5%

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

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

Alternative 5: 89.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\

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


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

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

    if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 30.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302

    1. Initial program 97.5%

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

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

Alternative 6: 60.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ \mathbf{if}\;a \leq -2.9 \cdot 10^{-68}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-286}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-186}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z t))))
   (if (<= a -2.9e-68)
     (+ x y)
     (if (<= a -3.6e-91)
       (* y (/ (- z) a))
       (if (<= a -1.7e-149)
         x
         (if (<= a -4.1e-169)
           t_1
           (if (<= a -4.2e-286) x (if (<= a 1.45e-186) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / t);
	double tmp;
	if (a <= -2.9e-68) {
		tmp = x + y;
	} else if (a <= -3.6e-91) {
		tmp = y * (-z / a);
	} else if (a <= -1.7e-149) {
		tmp = x;
	} else if (a <= -4.1e-169) {
		tmp = t_1;
	} else if (a <= -4.2e-286) {
		tmp = x;
	} else if (a <= 1.45e-186) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / t)
    if (a <= (-2.9d-68)) then
        tmp = x + y
    else if (a <= (-3.6d-91)) then
        tmp = y * (-z / a)
    else if (a <= (-1.7d-149)) then
        tmp = x
    else if (a <= (-4.1d-169)) then
        tmp = t_1
    else if (a <= (-4.2d-286)) then
        tmp = x
    else if (a <= 1.45d-186) then
        tmp = t_1
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / t);
	double tmp;
	if (a <= -2.9e-68) {
		tmp = x + y;
	} else if (a <= -3.6e-91) {
		tmp = y * (-z / a);
	} else if (a <= -1.7e-149) {
		tmp = x;
	} else if (a <= -4.1e-169) {
		tmp = t_1;
	} else if (a <= -4.2e-286) {
		tmp = x;
	} else if (a <= 1.45e-186) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / t)
	tmp = 0
	if a <= -2.9e-68:
		tmp = x + y
	elif a <= -3.6e-91:
		tmp = y * (-z / a)
	elif a <= -1.7e-149:
		tmp = x
	elif a <= -4.1e-169:
		tmp = t_1
	elif a <= -4.2e-286:
		tmp = x
	elif a <= 1.45e-186:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (a <= -2.9e-68)
		tmp = Float64(x + y);
	elseif (a <= -3.6e-91)
		tmp = Float64(y * Float64(Float64(-z) / a));
	elseif (a <= -1.7e-149)
		tmp = x;
	elseif (a <= -4.1e-169)
		tmp = t_1;
	elseif (a <= -4.2e-286)
		tmp = x;
	elseif (a <= 1.45e-186)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / t);
	tmp = 0.0;
	if (a <= -2.9e-68)
		tmp = x + y;
	elseif (a <= -3.6e-91)
		tmp = y * (-z / a);
	elseif (a <= -1.7e-149)
		tmp = x;
	elseif (a <= -4.1e-169)
		tmp = t_1;
	elseif (a <= -4.2e-286)
		tmp = x;
	elseif (a <= 1.45e-186)
		tmp = t_1;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e-68], N[(x + y), $MachinePrecision], If[LessEqual[a, -3.6e-91], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.7e-149], x, If[LessEqual[a, -4.1e-169], t$95$1, If[LessEqual[a, -4.2e-286], x, If[LessEqual[a, 1.45e-186], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.7 \cdot 10^{-149}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-286}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.9e-68 or 1.4500000000000001e-186 < a

    1. Initial program 73.7%

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

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

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

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

    if -2.9e-68 < a < -3.6e-91

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e-91 < a < -1.6999999999999999e-149 or -4.0999999999999998e-169 < a < -4.19999999999999977e-286

    1. Initial program 67.6%

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

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

    if -1.6999999999999999e-149 < a < -4.0999999999999998e-169 or -4.19999999999999977e-286 < a < 1.4500000000000001e-186

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-68}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{-z}{a}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-169}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-286}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-150}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-170}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.9 \cdot 10^{-286}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.99999999999999998e-68 or 3.60000000000000017e-189 < a

    1. Initial program 73.7%

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

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

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

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

    if -8.99999999999999998e-68 < a < -3.40000000000000027e-91

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{a} \]
      3. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{\color{blue}{y \cdot \left(-z\right)}}{a} \]
    10. Simplified72.5%

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

    if -3.40000000000000027e-91 < a < -6.0000000000000003e-150 or -5.50000000000000018e-170 < a < -4.9000000000000001e-286

    1. Initial program 67.6%

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

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

    if -6.0000000000000003e-150 < a < -5.50000000000000018e-170 or -4.9000000000000001e-286 < a < 3.60000000000000017e-189

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-68}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-150}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-170}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-286}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-189}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 61.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.7 \cdot 10^{-92}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4 \cdot 10^{-286}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.05 \cdot 10^{-184}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.2000000000000001e-67 or 2.05e-184 < a

    1. Initial program 73.7%

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

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

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

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

    if -2.2000000000000001e-67 < a < -1.7000000000000001e-92 or -4.0000000000000002e-286 < a < 2.05e-184

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-92 < a < -4.0000000000000002e-286

    1. Initial program 69.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-67}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-286}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-184}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 89.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000002e43 or 9.8e19 < t

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000002e43 < t < 9.8e19

    1. Initial program 88.4%

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

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

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

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

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

Alternative 10: 81.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.50000000000000014e42 or 4.00000000000000003e-50 < t

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000014e42 < t < 4.00000000000000003e-50

    1. Initial program 89.7%

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

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

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

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

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

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

Alternative 11: 61.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-286}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.5000000000000001e-14 or 2.8e-187 < a

    1. Initial program 73.5%

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

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

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

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

    if -6.5000000000000001e-14 < a < -5.00000000000000037e-286

    1. Initial program 72.3%

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

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

    if -5.00000000000000037e-286 < a < 2.8e-187

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{-14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-286}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-187}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 76.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.5e6 or 1.99999999999999997e73 < a

    1. Initial program 75.3%

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

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

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

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

    if -1.5e6 < a < 1.99999999999999997e73

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 82.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.7999999999999998e-11 or 8.99999999999999973e-22 < a

    1. Initial program 76.2%

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

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

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

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

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

    if -9.7999999999999998e-11 < a < 8.99999999999999973e-22

    1. Initial program 67.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      6. *-commutative78.6%

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

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

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

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

Alternative 14: 76.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+18} \lor \neg \left(a \leq 9.5 \cdot 10^{-40}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.5e18 or 9.5000000000000006e-40 < a

    1. Initial program 74.8%

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

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

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

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

    if -2.5e18 < a < 9.5000000000000006e-40

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 63.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.09999999999999998e-13 or 1.49999999999999989e-128 < a

    1. Initial program 74.1%

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

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

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

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

    if -1.09999999999999998e-13 < a < 1.49999999999999989e-128

    1. Initial program 68.9%

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

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

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

Alternative 16: 50.5% 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 71.9%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification44.2%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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