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

Percentage Accurate: 77.2% → 90.8%
Time: 14.3s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 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.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.49999999999999985e165 or 3.80000000000000025e36 < t

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999985e165 < t < 3.80000000000000025e36

    1. Initial program 90.1%

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

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

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

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

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

Alternative 2: 92.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 84.4%

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

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

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

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

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

    1. Initial program 3.9%

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

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

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

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

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

      \[\leadsto \left(x + y\right) - \color{blue}{{\left(\sqrt[3]{z - t}\right)}^{2} \cdot \left(\sqrt[3]{z - t} \cdot \frac{y}{a - t}\right)} \]
    5. Taylor expanded in t around inf 99.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3.35 \cdot 10^{-49} \lor \neg \left(a \leq 3.5 \cdot 10^{+20}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.14999999999999997e54 or -4.19999999999999988e-12 < a < -3.35e-49 or 3.5e20 < 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 a around inf 78.6%

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

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

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

    if -1.14999999999999997e54 < a < -4.19999999999999988e-12

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.35e-49 < a < 3.5e20

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+77}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq -0.061:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+202}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9499999999999999e183 or -6.5e77 < y < -0.060999999999999999

    1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e183 < y < -6.5e77 or -0.060999999999999999 < y < 2.8999999999999999e202

    1. Initial program 83.7%

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

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

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

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

    if 2.8999999999999999e202 < y

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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+58.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+183}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+77}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq -0.061:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+202}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-49} \lor \neg \left(a \leq 4.15 \cdot 10^{-38}\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7999999999999997e-49 or 4.1499999999999998e-38 < a

    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 t around 0 76.6%

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

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

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

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

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

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

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

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

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

    if -3.7999999999999997e-49 < a < 4.1499999999999998e-38

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -620000000 \lor \neg \left(a \leq 13600000000\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.2e8 or 1.36e10 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

    if -6.2e8 < a < 1.36e10

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 60.5% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.50000000000000041e-78 or 6.00000000000000022e-202 < a

    1. Initial program 78.1%

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

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

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

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

    if -7.50000000000000041e-78 < a < -4.10000000000000021e-196

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000021e-196 < a < 6.00000000000000022e-202

    1. Initial program 73.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-78}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.2% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 7 \cdot 10^{-202}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.9999999999999999e-78 or 6.9999999999999998e-202 < a

    1. Initial program 78.1%

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

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

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

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

    if -6.9999999999999999e-78 < a < -1.2e-195

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e-195 < a < 6.9999999999999998e-202

    1. Initial program 73.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-78}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-195}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 6.8 \cdot 10^{-202}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.94999999999999983e-74 or 6.80000000000000025e-202 < a

    1. Initial program 78.1%

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

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

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

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

    if -2.94999999999999983e-74 < a < -8.0000000000000004e-196

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000004e-196 < a < 6.80000000000000025e-202

    1. Initial program 73.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.95 \cdot 10^{-74}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.9% accurate, 0.8× speedup?

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

    1. Initial program 78.9%

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

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

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

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

    if -1e4 < a < 3.5e21

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 53.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 2.6 \cdot 10^{-132}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.50000000000000024e-210 or 2.6000000000000001e-132 < x

    1. Initial program 79.2%

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

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

    if -5.50000000000000024e-210 < x < 2.6000000000000001e-132

    1. Initial program 71.6%

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified49.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-210}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-132}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.0% 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.5%

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  6. Final simplification60.2%

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

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification50.8%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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