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

Percentage Accurate: 77.2% → 90.4%
Time: 10.8s
Alternatives: 18
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 77.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.4% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

    1. Initial program 98.5%

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

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

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

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

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

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

    1. Initial program 11.2%

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

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

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

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

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

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

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

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

Alternative 2: 90.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \frac{y}{\frac{t - a}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
   (if (<= t_1 (- INFINITY))
     (- x (/ y (/ (- a t) z)))
     (if (<= t_1 -2e-212)
       t_1
       (if (<= t_1 0.0)
         (+ x (/ (- (* y z) (* y a)) t))
         (+ (+ x y) (/ y (/ (- t a) z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x - (y / ((a - t) / z));
	} else if (t_1 <= -2e-212) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = x + (((y * z) - (y * a)) / t);
	} else {
		tmp = (x + y) + (y / ((t - a) / z));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x - (y / ((a - t) / z));
	} else if (t_1 <= -2e-212) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = x + (((y * z) - (y * a)) / t);
	} else {
		tmp = (x + y) + (y / ((t - a) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x + y) + ((y * (z - t)) / (t - a))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x - (y / ((a - t) / z))
	elif t_1 <= -2e-212:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = x + (((y * z) - (y * a)) / t)
	else:
		tmp = (x + y) + (y / ((t - a) / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z)));
	elseif (t_1 <= -2e-212)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t));
	else
		tmp = Float64(Float64(x + y) + Float64(y / Float64(Float64(t - a) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x + y) + ((y * (z - t)) / (t - a));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x - (y / ((a - t) / z));
	elseif (t_1 <= -2e-212)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = x + (((y * z) - (y * a)) / t);
	else
		tmp = (x + y) + (y / ((t - a) / 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[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-212], t$95$1, If[LessEqual[t$95$1, 0.0], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

    1. Initial program 98.5%

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

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

    1. Initial program 11.2%

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

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

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

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

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

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

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

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

Alternative 3: 90.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.9000000000000001e125 or 1.94999999999999992e108 < t

    1. Initial program 48.4%

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

      \[\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. sub-neg72.2%

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

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

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

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

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

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

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

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

    if -5.9000000000000001e125 < t < 1.94999999999999992e108

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

Alternative 4: 88.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.8000000000000003e-90 or 9.4999999999999999e34 < a

    1. Initial program 77.5%

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

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

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

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

    if -4.8000000000000003e-90 < a < 9.4999999999999999e34

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

Alternative 5: 88.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

    if -5.20000000000000028e-91 < a < 4.6e30

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

    if 4.6e30 < a

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

Alternative 6: 87.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{+69} \lor \neg \left(a \leq 4.5 \cdot 10^{+53}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.75000000000000001e69 or 4.5000000000000002e53 < a

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.75000000000000001e69 < a < 4.5000000000000002e53

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

Alternative 7: 84.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+140} \lor \neg \left(a \leq 3.1 \cdot 10^{+53}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2999999999999999e140 or 3.10000000000000019e53 < a

    1. Initial program 78.8%

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

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

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

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

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

        \[\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
    5. Taylor expanded in a around inf 84.6%

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

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

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

    if -2.2999999999999999e140 < a < 3.10000000000000019e53

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

Alternative 8: 84.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1500000000000001e135 or 1.04999999999999993e54 < a

    1. Initial program 78.8%

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

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

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

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

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

        \[\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
    5. Taylor expanded in a around inf 84.6%

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

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

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

    if -1.1500000000000001e135 < a < 1.04999999999999993e54

    1. Initial program 76.8%

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

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

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

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

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

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

Alternative 9: 84.7% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000001e137 < a < 9.2000000000000002e51

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

    if 9.2000000000000002e51 < a

    1. Initial program 78.5%

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

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

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

Alternative 10: 76.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-88} \lor \neg \left(a \leq 1.95 \cdot 10^{+52}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.1000000000000001e-88 or 1.95e52 < a

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1000000000000001e-88 < a < 1.95e52

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

      \[\leadsto x - \frac{y}{\frac{\color{blue}{-1 \cdot t}}{z}} \]
    10. Step-by-step derivation
      1. neg-mul-183.7%

        \[\leadsto x - \frac{y}{\frac{\color{blue}{-t}}{z}} \]
    11. Simplified83.7%

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

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

Alternative 11: 75.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-88} \lor \neg \left(a \leq 4.5 \cdot 10^{+46}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.50000000000000041e-88 or 4.5000000000000001e46 < a

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000041e-88 < a < 4.5000000000000001e46

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 2.35 \cdot 10^{+225}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.09999999999999997e130

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999997e130 < y < 2.35000000000000002e225

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.35000000000000002e225 < y

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 61.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+229}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.6e121

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6e121 < y < 5.2e229

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2e229 < y

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    11. Step-by-step derivation
      1. clear-num53.6%

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

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

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

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

Alternative 14: 53.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+123}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.32e150 or 4.49999999999999983e123 < y

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(1 - \frac{t}{t - a}\right)} \]
    9. Taylor expanded in t around 0 39.8%

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

    if -1.32e150 < y < 4.49999999999999983e123

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(y + -1 \cdot y\right)} \]
    6. Step-by-step derivation
      1. distribute-rgt1-in67.6%

        \[\leadsto x + \color{blue}{\left(-1 + 1\right) \cdot y} \]
      2. metadata-eval67.6%

        \[\leadsto x + \color{blue}{0} \cdot y \]
      3. mul0-lft67.6%

        \[\leadsto x + \color{blue}{0} \]
    7. Simplified67.6%

      \[\leadsto \color{blue}{x + 0} \]
    8. Taylor expanded in x around 0 67.6%

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

Alternative 15: 60.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{+224}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.0999999999999999e224

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0999999999999999e224 < y

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    11. Step-by-step derivation
      1. clear-num53.6%

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

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

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

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

Alternative 16: 60.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.06 \cdot 10^{+223}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.05999999999999999e223

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05999999999999999e223 < y

    1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 60.1% accurate, 4.3× speedup?

\[\begin{array}{l} \\ x + y \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
	return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + y;
}
def code(x, y, z, t, a):
	return x + y
function code(x, y, z, t, a)
	return Float64(x + y)
end
function tmp = code(x, y, z, t, a)
	tmp = x + y;
end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}

\\
x + y
\end{array}
Derivation
  1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  8. Final simplification65.7%

    \[\leadsto x + y \]
  9. Add Preprocessing

Alternative 18: 50.4% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x + \left(y + -1 \cdot y\right)} \]
  6. Step-by-step derivation
    1. distribute-rgt1-in49.6%

      \[\leadsto x + \color{blue}{\left(-1 + 1\right) \cdot y} \]
    2. metadata-eval49.6%

      \[\leadsto x + \color{blue}{0} \cdot y \]
    3. mul0-lft49.6%

      \[\leadsto x + \color{blue}{0} \]
  7. Simplified49.6%

    \[\leadsto \color{blue}{x + 0} \]
  8. Taylor expanded in x around 0 49.6%

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

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

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

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