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

Percentage Accurate: 76.9% → 90.0%
Time: 18.7s
Alternatives: 16
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 76.9% accurate, 1.0× speedup?

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

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

Alternative 1: 90.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{a - t}, y, x + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv73.0%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified96.2%

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

    if -6.4999999999999997e186 < t < 1.4500000000000001e76

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4500000000000001e76 < t

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 81.3% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

\mathbf{elif}\;t \leq 5.9 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -4.20000000000000009e36

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv80.9%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified92.2%

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

    if -4.20000000000000009e36 < t < -8.9999999999999995e-15 or -4.20000000000000014e-87 < t < 5.89999999999999998e-86

    1. Initial program 92.9%

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

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

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

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

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

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

    if -8.9999999999999995e-15 < t < -4.20000000000000014e-87

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.89999999999999998e-86 < t < 1.02000000000000005e-23

    1. Initial program 95.2%

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

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

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

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

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

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

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

    if 1.02000000000000005e-23 < t < 1e-3

    1. Initial program 84.8%

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

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

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

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

    if 1e-3 < t

    1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+36}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{-86}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-23}:\\ \;\;\;\;y + \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 0.001:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{a}{\frac{t}{y}}\right) + \frac{y}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 81.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.90000000000000029e39 or 3200 < t

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv77.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified89.1%

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

    if -2.90000000000000029e39 < t < -8.50000000000000007e-15 or -7.4999999999999997e-83 < t < 2.5999999999999999e-89

    1. Initial program 92.9%

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

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

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

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

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

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

    if -8.50000000000000007e-15 < t < -7.4999999999999997e-83

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999999e-89 < t < 1.7e-23

    1. Initial program 95.2%

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

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

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

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

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

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

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

    if 1.7e-23 < t < 3200

    1. Initial program 84.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-23}:\\ \;\;\;\;y + \frac{y}{a - t} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 3200:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 4.55 \cdot 10^{+80}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+182}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+206}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.80000000000000012e218

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

    if -3.80000000000000012e218 < z < 4.55000000000000007e80

    1. Initial program 79.4%

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

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

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

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

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

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

    if 4.55000000000000007e80 < z < 8.4999999999999998e144 or 9.00000000000000058e182 < z < 4.7999999999999999e206

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4999999999999998e144 < z < 9.00000000000000058e182

    1. Initial program 65.6%

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

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

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

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

    if 4.7999999999999999e206 < z

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    10. Simplified61.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+218}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 4.55 \cdot 10^{+80}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+144}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+182}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+206}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

\mathbf{elif}\;t \leq 0.008:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.39999999999999992e38 or 0.0080000000000000002 < t

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv77.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified89.1%

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

    if -5.39999999999999992e38 < t < -1.0499999999999999e-14 or -3.80000000000000011e-88 < t < 0.0080000000000000002

    1. Initial program 92.8%

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

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

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

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

    if -1.0499999999999999e-14 < t < -3.80000000000000011e-88

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 82.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -4 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.2999999999999998e40 or 0.71999999999999997 < t

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv77.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified89.1%

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

    if -3.2999999999999998e40 < t < -1.0499999999999999e-14

    1. Initial program 72.3%

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

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

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

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

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

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

    if -1.0499999999999999e-14 < t < -4.00000000000000007e-87

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000007e-87 < t < 0.71999999999999997

    1. Initial program 94.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+40}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\ \;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 0.72:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-240}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.45 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.12000000000000001e-131 or 2.4500000000000001e-64 < a

    1. Initial program 79.7%

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

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

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

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

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

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

    if -1.12000000000000001e-131 < a < 1.8500000000000001e-240 or 6.9999999999999998e-167 < a < 2.4500000000000001e-64

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{t} \cdot z - \color{blue}{a \cdot \frac{y}{t}} \]
      3. *-commutative56.2%

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

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

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

    if 1.8500000000000001e-240 < a < 6.9999999999999998e-167

    1. Initial program 78.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-131}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-240}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-167}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-64}:\\ \;\;\;\;\frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+218}:\\
\;\;\;\;\frac{y \cdot z}{t}\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+179}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.2000000000000003e218

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

    if -6.2000000000000003e218 < z < 1.85e81

    1. Initial program 79.4%

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

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

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

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

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

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

    if 1.85e81 < z < 4.7000000000000002e144

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Simplified68.0%

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

    if 4.7000000000000002e144 < z < 6.2e179

    1. Initial program 71.8%

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

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

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

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

    if 6.2e179 < z

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+218}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+144}:\\ \;\;\;\;\frac{-y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+179}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv73.0%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified96.2%

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

    if -6.4999999999999997e186 < t < 1.27999999999999994e76

    1. Initial program 90.9%

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

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

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

    if 1.27999999999999994e76 < t

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.76000000000000011e118 or 2.9e6 < a

    1. Initial program 80.6%

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

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

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

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

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

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

    if -1.76000000000000011e118 < a < 2.9e6

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a \cdot y - \color{blue}{z \cdot y}}{t} \]
      10. cancel-sign-sub-inv71.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{a - z}}} \]
    9. Simplified70.8%

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

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

Alternative 11: 76.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1999999999999999e-10 or 1.1e8 < a

    1. Initial program 80.2%

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

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

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

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

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

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

    if -2.1999999999999999e-10 < a < 1.1e8

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+218} \lor \neg \left(z \leq 2.5 \cdot 10^{+180}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.0000000000000001e218 or 2.4999999999999998e180 < z

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e218 < z < 2.4999999999999998e180

    1. Initial program 79.4%

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

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

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

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

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

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

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

Alternative 13: 60.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+218}:\\
\;\;\;\;\frac{y \cdot z}{t}\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+180}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8999999999999999e218

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

    if -2.8999999999999999e218 < z < 2.4999999999999998e180

    1. Initial program 79.4%

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

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

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

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

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

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

    if 2.4999999999999998e180 < z

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+218}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+180}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+135}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -3.8e+135) y (if (<= y 1.9e+170) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -3.8e+135) {
		tmp = y;
	} else if (y <= 1.9e+170) {
		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 <= (-3.8d+135)) then
        tmp = y
    else if (y <= 1.9d+170) 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 <= -3.8e+135) {
		tmp = y;
	} else if (y <= 1.9e+170) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -3.8e+135:
		tmp = y
	elif y <= 1.9e+170:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -3.8e+135)
		tmp = y;
	elseif (y <= 1.9e+170)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -3.8e+135)
		tmp = y;
	elseif (y <= 1.9e+170)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.8e+135], y, If[LessEqual[y, 1.9e+170], x, y]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+170}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8000000000000001e135 or 1.8999999999999999e170 < y

    1. Initial program 55.8%

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

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

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

      \[\leadsto \color{blue}{y - \frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Step-by-step derivation
      1. sub-neg54.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{1} \]
    9. Taylor expanded in y around 0 36.7%

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

    if -3.8000000000000001e135 < y < 1.8999999999999999e170

    1. Initial program 87.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+135}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 60.1% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

Alternative 16: 50.7% 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 78.9%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification45.9%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 88.0% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (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))))