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

Percentage Accurate: 76.4% → 90.2%
Time: 14.1s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 76.4% 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.2% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.9%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified4.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 100.0%

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

    1. Initial program 70.8%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified82.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-/r/87.2%

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

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

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

Alternative 2: 89.1% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 87.5%

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

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

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

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

    1. Initial program 4.9%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified4.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 100.0%

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

    1. Initial program 35.2%

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

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

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

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

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

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

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

Alternative 3: 90.2% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.5%

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

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

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

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

    1. Initial program 4.9%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified4.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 100.0%

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

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

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

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

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

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

    1. Initial program 99.5%

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

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

    1. Initial program 70.8%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified82.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-/r/87.2%

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

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

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

Alternative 4: 75.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{a - z}{t}\\ \mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-125}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-83}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ (- a z) t)))))
   (if (<= a -2e+21)
     (+ x y)
     (if (<= a 3e-190)
       t_1
       (if (<= a 3.3e-125)
         (- x (/ a (/ t y)))
         (if (<= a 2e-83) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((a - z) / t));
	double tmp;
	if (a <= -2e+21) {
		tmp = x + y;
	} else if (a <= 3e-190) {
		tmp = t_1;
	} else if (a <= 3.3e-125) {
		tmp = x - (a / (t / y));
	} else if (a <= 2e-83) {
		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 = x - (y * ((a - z) / t))
    if (a <= (-2d+21)) then
        tmp = x + y
    else if (a <= 3d-190) then
        tmp = t_1
    else if (a <= 3.3d-125) then
        tmp = x - (a / (t / y))
    else if (a <= 2d-83) 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 = x - (y * ((a - z) / t));
	double tmp;
	if (a <= -2e+21) {
		tmp = x + y;
	} else if (a <= 3e-190) {
		tmp = t_1;
	} else if (a <= 3.3e-125) {
		tmp = x - (a / (t / y));
	} else if (a <= 2e-83) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((a - z) / t))
	tmp = 0
	if a <= -2e+21:
		tmp = x + y
	elif a <= 3e-190:
		tmp = t_1
	elif a <= 3.3e-125:
		tmp = x - (a / (t / y))
	elif a <= 2e-83:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(Float64(a - z) / t)))
	tmp = 0.0
	if (a <= -2e+21)
		tmp = Float64(x + y);
	elseif (a <= 3e-190)
		tmp = t_1;
	elseif (a <= 3.3e-125)
		tmp = Float64(x - Float64(a / Float64(t / y)));
	elseif (a <= 2e-83)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * ((a - z) / t));
	tmp = 0.0;
	if (a <= -2e+21)
		tmp = x + y;
	elseif (a <= 3e-190)
		tmp = t_1;
	elseif (a <= 3.3e-125)
		tmp = x - (a / (t / y));
	elseif (a <= 2e-83)
		tmp = t_1;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+21], N[(x + y), $MachinePrecision], If[LessEqual[a, 3e-190], t$95$1, If[LessEqual[a, 3.3e-125], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-83], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 85.3%

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

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

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

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

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

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

    if -2e21 < a < 2.9999999999999998e-190 or 3.3000000000000001e-125 < a < 2.0000000000000001e-83

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e-190 < a < 3.3000000000000001e-125

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    10. Simplified71.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\ \;\;\;\;x - y \cdot \frac{a - z}{t}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-125}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-83}:\\ \;\;\;\;x - y \cdot \frac{a - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2e21

    1. Initial program 91.2%

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

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

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

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

    if -2e21 < a < 2.9999999999999998e-190

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e-190 < a < 3.3000000000000001e-125

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    10. Simplified71.8%

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

    if 3.3000000000000001e-125 < a < 1.20000000000000003e-73

    1. Initial program 62.0%

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

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

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

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    7. Taylor expanded in t around inf 71.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+71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e-73 < a

    1. Initial program 82.3%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified91.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 82.5%

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

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

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

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

Alternative 6: 88.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e175 < t < 1.24999999999999997e194

    1. Initial program 88.1%

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

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

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

    if 1.24999999999999997e194 < t

    1. Initial program 63.4%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified66.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 91.4%

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity91.4%

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

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

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

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

Alternative 7: 87.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000042e173 < t < 6e192

    1. Initial program 88.1%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified90.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-/r/89.7%

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

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

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

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

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

    if 6e192 < t

    1. Initial program 63.4%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified66.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 91.4%

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity91.4%

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

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

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

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

Alternative 8: 81.5% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.09999999999999985e-19

    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/68.7%

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

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

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    7. Taylor expanded in t around inf 74.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+74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999985e-19 < t < 6e12

    1. Initial program 92.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 t around 0 83.2%

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

    if 6e12 < t

    1. Initial program 72.4%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified82.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 76.3%

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity77.7%

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

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

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

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

Alternative 9: 81.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7000000000000001e-17

    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/68.7%

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

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

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    7. Taylor expanded in t around inf 74.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+74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-17 < t < 2.6e13

    1. Initial program 92.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 t around 0 83.0%

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

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

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

    if 2.6e13 < t

    1. Initial program 72.4%

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

        \[\leadsto \left(x + y\right) - \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    3. Simplified82.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 76.3%

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity77.7%

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

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

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

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

Alternative 10: 74.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+21} \lor \neg \left(a \leq 3.5 \cdot 10^{-83}\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.05e+21) (not (<= a 3.5e-83))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.05e+21) || !(a <= 3.5e-83)) {
		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.05d+21)) .or. (.not. (a <= 3.5d-83))) 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.05e+21) || !(a <= 3.5e-83)) {
		tmp = x + y;
	} else {
		tmp = x + ((y * z) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2.05e+21) or not (a <= 3.5e-83):
		tmp = x + y
	else:
		tmp = x + ((y * z) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -2.05e+21) || !(a <= 3.5e-83))
		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.05e+21) || ~((a <= 3.5e-83)))
		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.05e+21], N[Not[LessEqual[a, 3.5e-83]], $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.05 \cdot 10^{+21} \lor \neg \left(a \leq 3.5 \cdot 10^{-83}\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.05e21 or 3.5000000000000003e-83 < a

    1. Initial program 85.3%

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

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

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

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

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

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

    if -2.05e21 < a < 3.5000000000000003e-83

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 70.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-20} \lor \neg \left(t \leq 2.05 \cdot 10^{-13}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0999999999999999e-20 or 2.0500000000000001e-13 < t

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity75.1%

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

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

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

    if -2.0999999999999999e-20 < t < 2.0500000000000001e-13

    1. Initial program 92.7%

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

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

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

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

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

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

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

Alternative 12: 62.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+176}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+143}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5e176 or 3.5999999999999999e143 < t

    1. Initial program 47.7%

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

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

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

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

    if -2.5e176 < t < 3.5999999999999999e143

    1. Initial program 88.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+176}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+143}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.3% accurate, 13.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification49.4%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 87.9% 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 2024031 
(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))))