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

Percentage Accurate: 76.8% → 85.7%
Time: 11.3s
Alternatives: 15
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 15 alternatives:

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

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

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

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

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

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


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

    1. Initial program 82.8%

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

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

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

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

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

    if -2.25000000000000007e-219 < a < 2.6e-18

    1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

    if 2.6e-18 < a

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 62.3% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-79}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.15000000000000009e-192 or 4.40000000000000011e-58 < a

    1. Initial program 79.7%

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

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

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

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

    if -1.15000000000000009e-192 < a < 1.00000000000000006e-279

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000006e-279 < a < 1.5e-79

    1. Initial program 59.6%

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

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

    if 1.5e-79 < a < 4.40000000000000011e-58

    1. Initial program 48.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 77.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. associate--l+77.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(a - z\right)}{t}} \]
    7. Step-by-step derivation
      1. neg-mul-177.2%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(a - z\right)}{-t}} \]
      3. distribute-rgt-out--77.2%

        \[\leadsto \frac{\color{blue}{a \cdot y - z \cdot y}}{-t} \]
      4. div-sub77.2%

        \[\leadsto \color{blue}{\frac{a \cdot y}{-t} - \frac{z \cdot y}{-t}} \]
      5. distribute-frac-neg277.2%

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

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

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

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

        \[\leadsto \left(-\frac{a \cdot y}{t}\right) - -1 \cdot \color{blue}{\left(y \cdot \frac{z}{t}\right)} \]
      10. cancel-sign-sub-inv77.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{t} - \frac{a \cdot y}{t}} \]
      16. div-sub77.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{-192}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 10^{-279}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2e138 or 1.38e125 < t

    1. Initial program 45.2%

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

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

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

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

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

      \[\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. sub-neg78.8%

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

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

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

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

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

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

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

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

    if -1.2e138 < t < 1.38e125

    1. Initial program 86.5%

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

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

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

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

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

Alternative 4: 85.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 82.8%

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

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

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

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

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

    if -4.50000000000000014e-222 < a < 8.50000000000000038e-14

    1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

    if 8.50000000000000038e-14 < a

    1. Initial program 80.8%

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

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

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

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

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

Alternative 5: 82.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1499999999999999e-54 or 13.5 < a

    1. Initial program 81.7%

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

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

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

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

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

    if -1.1499999999999999e-54 < a < 13.5

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.54999999999999995e-52 or 0.880000000000000004 < a

    1. Initial program 81.8%

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

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

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

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

    if -2.54999999999999995e-52 < a < 0.880000000000000004

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2e-51 or 0.00379999999999999999 < a

    1. Initial program 81.8%

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

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

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

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

    if -1.2e-51 < a < 0.00379999999999999999

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 82.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000003e-52 < a < 6.4000000000000004

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000004 < a

    1. Initial program 80.5%

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

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

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

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

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

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

Alternative 9: 75.5% accurate, 0.8× speedup?

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

    1. Initial program 81.4%

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

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

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

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

    if -3.5000000000000002e-46 < a < 1.60000000000000011e-16

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 61.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-190} \lor \neg \left(a \leq 8.4 \cdot 10^{-164}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.54999999999999997e-190 or 8.3999999999999996e-164 < a

    1. Initial program 79.0%

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

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

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

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

    if -1.54999999999999997e-190 < a < 8.3999999999999996e-164

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-227} \lor \neg \left(a \leq 7 \cdot 10^{-233}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.39999999999999979e-227 or 6.99999999999999982e-233 < a

    1. Initial program 79.0%

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

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

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

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

    if -3.39999999999999979e-227 < a < 6.99999999999999982e-233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-225} \lor \neg \left(a \leq 1.4 \cdot 10^{-233}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.5000000000000005e-225 or 1.4000000000000001e-233 < a

    1. Initial program 79.0%

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

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

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

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

    if -6.5000000000000005e-225 < a < 1.4000000000000001e-233

    1. Initial program 52.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 97.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. associate--l+97.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. *-commutative59.3%

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

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

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

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

Alternative 13: 61.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.50000000000000012e-223 or 5.79999999999999964e-233 < a

    1. Initial program 79.0%

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

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

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

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

    if -2.50000000000000012e-223 < a < 5.79999999999999964e-233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 63.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.6000000000000002e-79 or 2.99999999999999983e-18 < a

    1. Initial program 81.4%

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

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

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

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

    if -3.6000000000000002e-79 < a < 2.99999999999999983e-18

    1. Initial program 64.3%

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

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

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

Alternative 15: 50.3% accurate, 13.0× speedup?

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

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

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

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

Developer target: 87.7% 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 2024086 
(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))))