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

Percentage Accurate: 77.0% → 86.4%
Time: 10.0s
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: 77.0% 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: 86.4% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.2e142

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e142 < t

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-+r+59.3%

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

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

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

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

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

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

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

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

Alternative 2: 89.6% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{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))) < -4.0000000000000002e-250 or 1.99999999999999992e-233 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 83.0%

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

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

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

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

    if -4.0000000000000002e-250 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999992e-233

    1. Initial program 16.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 60.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t - a}\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+35}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-218}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-141}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- t a)))))
   (if (<= a -3.8e+35)
     (+ y x)
     (if (<= a -2.4e-40)
       t_1
       (if (<= a -9e-98)
         x
         (if (<= a -9e-127)
           t_1
           (if (<= a -7.2e-218)
             (- x (* y (/ a t)))
             (if (<= a 3.4e-141) (* z (/ y (- t a))) (+ y x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (t - a));
	double tmp;
	if (a <= -3.8e+35) {
		tmp = y + x;
	} else if (a <= -2.4e-40) {
		tmp = t_1;
	} else if (a <= -9e-98) {
		tmp = x;
	} else if (a <= -9e-127) {
		tmp = t_1;
	} else if (a <= -7.2e-218) {
		tmp = x - (y * (a / t));
	} else if (a <= 3.4e-141) {
		tmp = z * (y / (t - a));
	} else {
		tmp = y + 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) :: t_1
    real(8) :: tmp
    t_1 = y * (z / (t - a))
    if (a <= (-3.8d+35)) then
        tmp = y + x
    else if (a <= (-2.4d-40)) then
        tmp = t_1
    else if (a <= (-9d-98)) then
        tmp = x
    else if (a <= (-9d-127)) then
        tmp = t_1
    else if (a <= (-7.2d-218)) then
        tmp = x - (y * (a / t))
    else if (a <= 3.4d-141) then
        tmp = z * (y / (t - a))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (t - a));
	double tmp;
	if (a <= -3.8e+35) {
		tmp = y + x;
	} else if (a <= -2.4e-40) {
		tmp = t_1;
	} else if (a <= -9e-98) {
		tmp = x;
	} else if (a <= -9e-127) {
		tmp = t_1;
	} else if (a <= -7.2e-218) {
		tmp = x - (y * (a / t));
	} else if (a <= 3.4e-141) {
		tmp = z * (y / (t - a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (t - a))
	tmp = 0
	if a <= -3.8e+35:
		tmp = y + x
	elif a <= -2.4e-40:
		tmp = t_1
	elif a <= -9e-98:
		tmp = x
	elif a <= -9e-127:
		tmp = t_1
	elif a <= -7.2e-218:
		tmp = x - (y * (a / t))
	elif a <= 3.4e-141:
		tmp = z * (y / (t - a))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(t - a)))
	tmp = 0.0
	if (a <= -3.8e+35)
		tmp = Float64(y + x);
	elseif (a <= -2.4e-40)
		tmp = t_1;
	elseif (a <= -9e-98)
		tmp = x;
	elseif (a <= -9e-127)
		tmp = t_1;
	elseif (a <= -7.2e-218)
		tmp = Float64(x - Float64(y * Float64(a / t)));
	elseif (a <= 3.4e-141)
		tmp = Float64(z * Float64(y / Float64(t - a)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (t - a));
	tmp = 0.0;
	if (a <= -3.8e+35)
		tmp = y + x;
	elseif (a <= -2.4e-40)
		tmp = t_1;
	elseif (a <= -9e-98)
		tmp = x;
	elseif (a <= -9e-127)
		tmp = t_1;
	elseif (a <= -7.2e-218)
		tmp = x - (y * (a / t));
	elseif (a <= 3.4e-141)
		tmp = z * (y / (t - a));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+35], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.4e-40], t$95$1, If[LessEqual[a, -9e-98], x, If[LessEqual[a, -9e-127], t$95$1, If[LessEqual[a, -7.2e-218], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-141], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -9 \cdot 10^{-98}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -9 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.8e35 or 3.3999999999999998e-141 < a

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e35 < a < -2.39999999999999991e-40 or -8.99999999999999994e-98 < a < -8.9999999999999998e-127

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.39999999999999991e-40 < a < -8.99999999999999994e-98

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999998e-127 < a < -7.20000000000000023e-218

    1. Initial program 75.9%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{a \cdot y - y \cdot z}{t}} \]
    4. Taylor expanded in a around inf 92.2%

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

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

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

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

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

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

    if -7.20000000000000023e-218 < a < 3.3999999999999998e-141

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{z}}} \]
    9. Applied egg-rr56.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{z}}} \]
    10. Step-by-step derivation
      1. associate-/r/59.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+35}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-40}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-218}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-141}:\\ \;\;\;\;z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-217}:\\
\;\;\;\;x\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.4000000000000001e42 or 1.7499999999999999e-144 < a

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000001e42 < a < -1.12000000000000004e-217 or 2e-281 < a < 6.7999999999999997e-172

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12000000000000004e-217 < a < 2e-281

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

    if 6.7999999999999997e-172 < a < 1.7499999999999999e-144

    1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-commutative68.0%

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    10. Applied egg-rr83.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.4 \cdot 10^{+42}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-217}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-281}:\\ \;\;\;\;\frac{z \cdot y}{t}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-172}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-144}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{y}{t}\\ \mathbf{if}\;a \leq -1.3 \cdot 10^{+42}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{-217}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-281}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-172}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-143}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ y t))))
   (if (<= a -1.3e+42)
     (+ y x)
     (if (<= a -2.95e-217)
       x
       (if (<= a 1.65e-281)
         t_1
         (if (<= a 6.8e-172) x (if (<= a 1.25e-143) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / t);
	double tmp;
	if (a <= -1.3e+42) {
		tmp = y + x;
	} else if (a <= -2.95e-217) {
		tmp = x;
	} else if (a <= 1.65e-281) {
		tmp = t_1;
	} else if (a <= 6.8e-172) {
		tmp = x;
	} else if (a <= 1.25e-143) {
		tmp = t_1;
	} else {
		tmp = y + 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) :: t_1
    real(8) :: tmp
    t_1 = z * (y / t)
    if (a <= (-1.3d+42)) then
        tmp = y + x
    else if (a <= (-2.95d-217)) then
        tmp = x
    else if (a <= 1.65d-281) then
        tmp = t_1
    else if (a <= 6.8d-172) then
        tmp = x
    else if (a <= 1.25d-143) then
        tmp = t_1
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (y / t);
	double tmp;
	if (a <= -1.3e+42) {
		tmp = y + x;
	} else if (a <= -2.95e-217) {
		tmp = x;
	} else if (a <= 1.65e-281) {
		tmp = t_1;
	} else if (a <= 6.8e-172) {
		tmp = x;
	} else if (a <= 1.25e-143) {
		tmp = t_1;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (y / t)
	tmp = 0
	if a <= -1.3e+42:
		tmp = y + x
	elif a <= -2.95e-217:
		tmp = x
	elif a <= 1.65e-281:
		tmp = t_1
	elif a <= 6.8e-172:
		tmp = x
	elif a <= 1.25e-143:
		tmp = t_1
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(y / t))
	tmp = 0.0
	if (a <= -1.3e+42)
		tmp = Float64(y + x);
	elseif (a <= -2.95e-217)
		tmp = x;
	elseif (a <= 1.65e-281)
		tmp = t_1;
	elseif (a <= 6.8e-172)
		tmp = x;
	elseif (a <= 1.25e-143)
		tmp = t_1;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (y / t);
	tmp = 0.0;
	if (a <= -1.3e+42)
		tmp = y + x;
	elseif (a <= -2.95e-217)
		tmp = x;
	elseif (a <= 1.65e-281)
		tmp = t_1;
	elseif (a <= 6.8e-172)
		tmp = x;
	elseif (a <= 1.25e-143)
		tmp = t_1;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e+42], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.95e-217], x, If[LessEqual[a, 1.65e-281], t$95$1, If[LessEqual[a, 6.8e-172], x, If[LessEqual[a, 1.25e-143], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.95 \cdot 10^{-217}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.29999999999999995e42 or 1.2500000000000001e-143 < a

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999995e42 < a < -2.9499999999999999e-217 or 1.65e-281 < a < 6.7999999999999997e-172

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9499999999999999e-217 < a < 1.65e-281 or 6.7999999999999997e-172 < a < 1.2500000000000001e-143

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    10. Applied egg-rr71.1%

      \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 82.5% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-83 < a < 2.7000000000000001e-70

    1. Initial program 76.0%

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

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

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

Alternative 7: 82.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.15 \cdot 10^{-81} \lor \neg \left(a \leq 7.8 \cdot 10^{-70}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.15000000000000011e-81 or 7.80000000000000038e-70 < a

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.15000000000000011e-81 < a < 7.80000000000000038e-70

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.0% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000015e25 < a < 1e-13

    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 t around inf 78.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+78.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--78.9%

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

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

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

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

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

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

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

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

Alternative 9: 64.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-175}:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.79999999999999997e-175

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.79999999999999997e-175 < x < 2.2e5

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2e5 < x

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 86.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.0000000000000001e142

    1. Initial program 84.5%

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

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

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

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

    if 2.0000000000000001e142 < t

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-+r+59.3%

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

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

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

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

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

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

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

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

Alternative 11: 63.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+42} \lor \neg \left(a \leq 4.6 \cdot 10^{+56}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.29999999999999995e42 or 4.60000000000000029e56 < a

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999995e42 < a < 4.60000000000000029e56

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.5 \cdot 10^{+235}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.5e235

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5e235 < z

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 53.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.20000000000000043e74 or 4.70000000000000004e225 < y

    1. Initial program 59.1%

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

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

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

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

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

    if -6.20000000000000043e74 < y < 4.70000000000000004e225

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 61.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.45 \cdot 10^{+237}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.45000000000000005e237

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45000000000000005e237 < z

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 51.2% 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 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 88.4% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024111 
(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))))