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

Percentage Accurate: 77.3% → 91.1%
Time: 11.9s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - a}{t}\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+291}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{\left(\frac{z}{t - a} - \frac{t}{t - a}\right) + 1}{x} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z a) t))))
        (t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -4e-200)
       t_2
       (if (<= t_2 1e-245)
         t_1
         (if (<= t_2 4e+291)
           t_2
           (*
            x
            (+ (* y (/ (+ (- (/ z (- t a)) (/ t (- t a))) 1.0) x)) 1.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else if (t_2 <= 4e+291) {
		tmp = t_2;
	} else {
		tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else if (t_2 <= 4e+291) {
		tmp = t_2;
	} else {
		tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - a) / t))
	t_2 = (x + y) + ((y * (z - t)) / (t - a))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -4e-200:
		tmp = t_2
	elif t_2 <= 1e-245:
		tmp = t_1
	elif t_2 <= 4e+291:
		tmp = t_2
	else:
		tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t)))
	t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	elseif (t_2 <= 4e+291)
		tmp = t_2;
	else
		tmp = Float64(x * Float64(Float64(y * Float64(Float64(Float64(Float64(z / Float64(t - a)) - Float64(t / Float64(t - a))) + 1.0) / x)) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - a) / t));
	t_2 = (x + y) + ((y * (z - t)) / (t - a));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	elseif (t_2 <= 4e+291)
		tmp = t_2;
	else
		tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, If[LessEqual[t$95$2, 4e+291], t$95$2, N[(x * N[(N[(y * N[(N[(N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] - N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200 or 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 3.9999999999999998e291

    1. Initial program 98.2%

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

    if 3.9999999999999998e291 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - a}{t}\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(\frac{z - t}{t - a} + 1\right) + \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z a) t))))
        (t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -4e-200)
       t_2
       (if (<= t_2 1e-245)
         t_1
         (if (<= t_2 5e+304)
           t_2
           (* y (+ (+ (/ (- z t) (- t a)) 1.0) (/ x y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else if (t_2 <= 5e+304) {
		tmp = t_2;
	} else {
		tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else if (t_2 <= 5e+304) {
		tmp = t_2;
	} else {
		tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - a) / t))
	t_2 = (x + y) + ((y * (z - t)) / (t - a))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -4e-200:
		tmp = t_2
	elif t_2 <= 1e-245:
		tmp = t_1
	elif t_2 <= 5e+304:
		tmp = t_2
	else:
		tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t)))
	t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	elseif (t_2 <= 5e+304)
		tmp = t_2;
	else
		tmp = Float64(y * Float64(Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0) + Float64(x / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - a) / t));
	t_2 = (x + y) + ((y * (z - t)) / (t - a));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	elseif (t_2 <= 5e+304)
		tmp = t_2;
	else
		tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, If[LessEqual[t$95$2, 5e+304], t$95$2, N[(y * N[(N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200 or 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 4.9999999999999997e304

    1. Initial program 98.2%

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

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

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - a}{t}\\ t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z a) t))))
        (t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -4e-200)
       t_2
       (if (<= t_2 1e-245) t_1 (+ (+ x y) (* (- z t) (/ y (- t a)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - a) / t));
	double t_2 = (x + y) + ((y * (z - t)) / (t - a));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -4e-200) {
		tmp = t_2;
	} else if (t_2 <= 1e-245) {
		tmp = t_1;
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - a) / t))
	t_2 = (x + y) + ((y * (z - t)) / (t - a))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -4e-200:
		tmp = t_2
	elif t_2 <= 1e-245:
		tmp = t_1
	else:
		tmp = (x + y) + ((z - t) * (y / (t - a)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t)))
	t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	else
		tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - a) / t));
	t_2 = (x + y) + ((y * (z - t)) / (t - a));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -4e-200)
		tmp = t_2;
	elseif (t_2 <= 1e-245)
		tmp = t_1;
	else
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200

    1. Initial program 96.6%

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

    if 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 88.8%

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

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

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

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

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

Alternative 4: 89.2% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e51 < t < 5.5e-123

    1. Initial program 96.1%

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

    if 5.5e-123 < t < 1.39999999999999997e178

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

    if 1.39999999999999997e178 < t

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+152} \lor \neg \left(z \leq -2.4 \cdot 10^{+123}\right) \land \left(z \leq -2.9 \cdot 10^{+82} \lor \neg \left(z \leq 9.6 \cdot 10^{+176}\right)\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.35000000000000007e152 or -2.39999999999999989e123 < z < -2.9000000000000001e82 or 9.6000000000000005e176 < z

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000007e152 < z < -2.39999999999999989e123 or -2.9000000000000001e82 < z < 9.6000000000000005e176

    1. Initial program 77.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+152} \lor \neg \left(z \leq -2.4 \cdot 10^{+123}\right) \land \left(z \leq -2.9 \cdot 10^{+82} \lor \neg \left(z \leq 9.6 \cdot 10^{+176}\right)\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+51} \lor \neg \left(t \leq 5.6 \cdot 10^{+32}\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2000000000000002e51 or 5.6e32 < t

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000002e51 < t < 5.6e32

    1. Initial program 93.0%

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

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

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

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

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

Alternative 7: 61.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-261}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.05000000000000003e-132 or 9.49999999999999937e-120 < a

    1. Initial program 82.5%

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

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

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

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

    if -2.05000000000000003e-132 < a < 7.80000000000000035e-261

    1. Initial program 66.4%

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

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

    if 7.80000000000000035e-261 < a < 9.49999999999999937e-120

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    9. Taylor expanded in y around 0 51.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{-132}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-261}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-120}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 61.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-262}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.7999999999999997e-132 or 5.3999999999999997e-120 < a

    1. Initial program 82.5%

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

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

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

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

    if -3.7999999999999997e-132 < a < 2.49999999999999996e-262

    1. Initial program 66.4%

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

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

    if 2.49999999999999996e-262 < a < 5.3999999999999997e-120

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{-132}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-262}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-120}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 83.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 85.7%

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

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

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

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

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

    if -1.29999999999999989e-4 < a < 1.69999999999999988e42

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 78.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.012 or 5.00000000000000018e61 < a

    1. Initial program 85.4%

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

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

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

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

    if -0.012 < a < 5.00000000000000018e61

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1850 or 1.7999999999999999e59 < a

    1. Initial program 85.4%

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

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

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

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

    if -1850 < a < 1.7999999999999999e59

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    11. Simplified80.2%

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

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

Alternative 12: 63.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7999999999999997e-132 or 1.69999999999999988e42 < a

    1. Initial program 84.2%

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

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

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

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

    if -3.7999999999999997e-132 < a < 1.69999999999999988e42

    1. Initial program 72.3%

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

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

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

Alternative 13: 50.7% accurate, 13.0× speedup?

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

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

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

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

Developer target: 88.0% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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