Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 68.4% → 92.0%
Time: 26.6s
Alternatives: 22
Speedup: 1.0×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{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 22 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: 68.4% accurate, 1.0× speedup?

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

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

Alternative 1: 92.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-295}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 39.4%

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.00000000000000024e-295 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5e307

    1. Initial program 96.7%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e307 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 43.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -4 \cdot 10^{-295}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t} - x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 0:\\ \;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t} - x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 2: 92.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-295}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 41.1%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.00000000000000024e-295 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5e307

    1. Initial program 96.7%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-295}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 41.1%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.00000000000000024e-295 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5e307

    1. Initial program 96.7%

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{t}{z - a}}\\ t_2 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;y \leq -2.9 \cdot 10^{-21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-210}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-141}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-92}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ x (/ t (- z a)))) (t_2 (* y (/ (- z t) (- a t)))))
   (if (<= y -2.9e-21)
     t_2
     (if (<= y -1.4e-143)
       t_1
       (if (<= y -2.05e-210)
         (- x (/ x (/ a z)))
         (if (<= y 1.25e-141)
           (* x (/ (- z) (- a t)))
           (if (<= y 6.6e-92) (+ x y) (if (<= y 1.42e-83) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x / (t / (z - a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -2.9e-21) {
		tmp = t_2;
	} else if (y <= -1.4e-143) {
		tmp = t_1;
	} else if (y <= -2.05e-210) {
		tmp = x - (x / (a / z));
	} else if (y <= 1.25e-141) {
		tmp = x * (-z / (a - t));
	} else if (y <= 6.6e-92) {
		tmp = x + y;
	} else if (y <= 1.42e-83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (t / (z - a))
    t_2 = y * ((z - t) / (a - t))
    if (y <= (-2.9d-21)) then
        tmp = t_2
    else if (y <= (-1.4d-143)) then
        tmp = t_1
    else if (y <= (-2.05d-210)) then
        tmp = x - (x / (a / z))
    else if (y <= 1.25d-141) then
        tmp = x * (-z / (a - t))
    else if (y <= 6.6d-92) then
        tmp = x + y
    else if (y <= 1.42d-83) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x / (t / (z - a));
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -2.9e-21) {
		tmp = t_2;
	} else if (y <= -1.4e-143) {
		tmp = t_1;
	} else if (y <= -2.05e-210) {
		tmp = x - (x / (a / z));
	} else if (y <= 1.25e-141) {
		tmp = x * (-z / (a - t));
	} else if (y <= 6.6e-92) {
		tmp = x + y;
	} else if (y <= 1.42e-83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x / (t / (z - a))
	t_2 = y * ((z - t) / (a - t))
	tmp = 0
	if y <= -2.9e-21:
		tmp = t_2
	elif y <= -1.4e-143:
		tmp = t_1
	elif y <= -2.05e-210:
		tmp = x - (x / (a / z))
	elif y <= 1.25e-141:
		tmp = x * (-z / (a - t))
	elif y <= 6.6e-92:
		tmp = x + y
	elif y <= 1.42e-83:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x / Float64(t / Float64(z - a)))
	t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (y <= -2.9e-21)
		tmp = t_2;
	elseif (y <= -1.4e-143)
		tmp = t_1;
	elseif (y <= -2.05e-210)
		tmp = Float64(x - Float64(x / Float64(a / z)));
	elseif (y <= 1.25e-141)
		tmp = Float64(x * Float64(Float64(-z) / Float64(a - t)));
	elseif (y <= 6.6e-92)
		tmp = Float64(x + y);
	elseif (y <= 1.42e-83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x / (t / (z - a));
	t_2 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (y <= -2.9e-21)
		tmp = t_2;
	elseif (y <= -1.4e-143)
		tmp = t_1;
	elseif (y <= -2.05e-210)
		tmp = x - (x / (a / z));
	elseif (y <= 1.25e-141)
		tmp = x * (-z / (a - t));
	elseif (y <= 6.6e-92)
		tmp = x + y;
	elseif (y <= 1.42e-83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-21], t$95$2, If[LessEqual[y, -1.4e-143], t$95$1, If[LessEqual[y, -2.05e-210], N[(x - N[(x / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-141], N[(x * N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e-92], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.42e-83], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.4 \cdot 10^{-143}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.05 \cdot 10^{-210}:\\
\;\;\;\;x - \frac{x}{\frac{a}{z}}\\

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

\mathbf{elif}\;y \leq 6.6 \cdot 10^{-92}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 1.42 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.9e-21 or 1.4199999999999999e-83 < y

    1. Initial program 72.7%

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

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

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

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

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

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

    if -2.9e-21 < y < -1.3999999999999999e-143 or 6.59999999999999996e-92 < y < 1.4199999999999999e-83

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

    if -1.3999999999999999e-143 < y < -2.04999999999999995e-210

    1. Initial program 81.9%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    6. Simplified68.3%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    7. Taylor expanded in t around 0 67.9%

      \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*67.9%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{z}}} \]
    9. Simplified67.9%

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

    if -2.04999999999999995e-210 < y < 1.25e-141

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

    if 1.25e-141 < y < 6.59999999999999996e-92

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-143}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-210}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-141}:\\ \;\;\;\;x \cdot \frac{-z}{a - t}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-92}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{-83}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 5: 58.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -8.6 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-130}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+69}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* z (/ (- y x) (- a t)))))
   (if (<= z -8.6e+45)
     t_2
     (if (<= z 3.6e-271)
       t_1
       (if (<= z 3.8e-130)
         (+ x y)
         (if (<= z 2.5e-105)
           t_1
           (if (<= z 1.15e+69) (+ x (/ z (/ a (- y x)))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8.6e+45) {
		tmp = t_2;
	} else if (z <= 3.6e-271) {
		tmp = t_1;
	} else if (z <= 3.8e-130) {
		tmp = x + y;
	} else if (z <= 2.5e-105) {
		tmp = t_1;
	} else if (z <= 1.15e+69) {
		tmp = x + (z / (a / (y - x)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = z * ((y - x) / (a - t))
    if (z <= (-8.6d+45)) then
        tmp = t_2
    else if (z <= 3.6d-271) then
        tmp = t_1
    else if (z <= 3.8d-130) then
        tmp = x + y
    else if (z <= 2.5d-105) then
        tmp = t_1
    else if (z <= 1.15d+69) then
        tmp = x + (z / (a / (y - x)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8.6e+45) {
		tmp = t_2;
	} else if (z <= 3.6e-271) {
		tmp = t_1;
	} else if (z <= 3.8e-130) {
		tmp = x + y;
	} else if (z <= 2.5e-105) {
		tmp = t_1;
	} else if (z <= 1.15e+69) {
		tmp = x + (z / (a / (y - x)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -8.6e+45:
		tmp = t_2
	elif z <= 3.6e-271:
		tmp = t_1
	elif z <= 3.8e-130:
		tmp = x + y
	elif z <= 2.5e-105:
		tmp = t_1
	elif z <= 1.15e+69:
		tmp = x + (z / (a / (y - x)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -8.6e+45)
		tmp = t_2;
	elseif (z <= 3.6e-271)
		tmp = t_1;
	elseif (z <= 3.8e-130)
		tmp = Float64(x + y);
	elseif (z <= 2.5e-105)
		tmp = t_1;
	elseif (z <= 1.15e+69)
		tmp = Float64(x + Float64(z / Float64(a / Float64(y - x))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -8.6e+45)
		tmp = t_2;
	elseif (z <= 3.6e-271)
		tmp = t_1;
	elseif (z <= 3.8e-130)
		tmp = x + y;
	elseif (z <= 2.5e-105)
		tmp = t_1;
	elseif (z <= 1.15e+69)
		tmp = x + (z / (a / (y - x)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+45], t$95$2, If[LessEqual[z, 3.6e-271], t$95$1, If[LessEqual[z, 3.8e-130], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.5e-105], t$95$1, If[LessEqual[z, 1.15e+69], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+69}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.6000000000000006e45 or 1.15000000000000008e69 < z

    1. Initial program 63.4%

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

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

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

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

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

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

    if -8.6000000000000006e45 < z < 3.5999999999999998e-271 or 3.7999999999999998e-130 < z < 2.49999999999999982e-105

    1. Initial program 70.9%

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

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

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

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

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

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

    if 3.5999999999999998e-271 < z < 3.7999999999999998e-130

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

    if 2.49999999999999982e-105 < z < 1.15000000000000008e69

    1. Initial program 79.3%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified62.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+45}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-130}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+69}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 6: 58.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{-269}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.32 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.19999999999999975e45 or 5.00000000000000036e69 < z

    1. Initial program 63.4%

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

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

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

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

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

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

    if -6.19999999999999975e45 < z < 7.00000000000000038e-269 or 2.5000000000000002e-131 < z < 1.32000000000000006e-105

    1. Initial program 70.9%

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

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

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

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

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

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

    if 7.00000000000000038e-269 < z < 2.5000000000000002e-131

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

    if 1.32000000000000006e-105 < z < 5.00000000000000036e69

    1. Initial program 79.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+45}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-269}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-131}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+69}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 7: 58.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-133}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* z (/ (- y x) (- a t)))))
   (if (<= z -8.5e+45)
     t_2
     (if (<= z 4.3e-267)
       t_1
       (if (<= z 4.2e-133)
         (+ x y)
         (if (<= z 2.4e-106)
           t_1
           (if (<= z 2.7e+49) (+ x (/ y (/ a (- z t)))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8.5e+45) {
		tmp = t_2;
	} else if (z <= 4.3e-267) {
		tmp = t_1;
	} else if (z <= 4.2e-133) {
		tmp = x + y;
	} else if (z <= 2.4e-106) {
		tmp = t_1;
	} else if (z <= 2.7e+49) {
		tmp = x + (y / (a / (z - t)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = z * ((y - x) / (a - t))
    if (z <= (-8.5d+45)) then
        tmp = t_2
    else if (z <= 4.3d-267) then
        tmp = t_1
    else if (z <= 4.2d-133) then
        tmp = x + y
    else if (z <= 2.4d-106) then
        tmp = t_1
    else if (z <= 2.7d+49) then
        tmp = x + (y / (a / (z - t)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double tmp;
	if (z <= -8.5e+45) {
		tmp = t_2;
	} else if (z <= 4.3e-267) {
		tmp = t_1;
	} else if (z <= 4.2e-133) {
		tmp = x + y;
	} else if (z <= 2.4e-106) {
		tmp = t_1;
	} else if (z <= 2.7e+49) {
		tmp = x + (y / (a / (z - t)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = z * ((y - x) / (a - t))
	tmp = 0
	if z <= -8.5e+45:
		tmp = t_2
	elif z <= 4.3e-267:
		tmp = t_1
	elif z <= 4.2e-133:
		tmp = x + y
	elif z <= 2.4e-106:
		tmp = t_1
	elif z <= 2.7e+49:
		tmp = x + (y / (a / (z - t)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (z <= -8.5e+45)
		tmp = t_2;
	elseif (z <= 4.3e-267)
		tmp = t_1;
	elseif (z <= 4.2e-133)
		tmp = Float64(x + y);
	elseif (z <= 2.4e-106)
		tmp = t_1;
	elseif (z <= 2.7e+49)
		tmp = Float64(x + Float64(y / Float64(a / Float64(z - t))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (z <= -8.5e+45)
		tmp = t_2;
	elseif (z <= 4.3e-267)
		tmp = t_1;
	elseif (z <= 4.2e-133)
		tmp = x + y;
	elseif (z <= 2.4e-106)
		tmp = t_1;
	elseif (z <= 2.7e+49)
		tmp = x + (y / (a / (z - t)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+45], t$95$2, If[LessEqual[z, 4.3e-267], t$95$1, If[LessEqual[z, 4.2e-133], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.4e-106], t$95$1, If[LessEqual[z, 2.7e+49], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4.3 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.4999999999999996e45 or 2.7000000000000001e49 < z

    1. Initial program 65.1%

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

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

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

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

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

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

    if -8.4999999999999996e45 < z < 4.2999999999999996e-267 or 4.2000000000000002e-133 < z < 2.3999999999999998e-106

    1. Initial program 70.9%

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

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

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

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

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

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

    if 4.2999999999999996e-267 < z < 4.2000000000000002e-133

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

    if 2.3999999999999998e-106 < z < 2.7000000000000001e49

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+45}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-267}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-133}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-106}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 8: 40.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 0.0018:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+31}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+76}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.1999999999999999e54 or 1.79999999999999998e31 < z < 4e46

    1. Initial program 63.3%

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

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

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

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

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

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

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

    if -2.1999999999999999e54 < z < 0.0018 or 4e46 < z < 3.3000000000000001e76

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

    if 0.0018 < z < 2.34999999999999983e28

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
    10. Step-by-step derivation
      1. div-inv55.2%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t}{z - a}}} \]
      2. clear-num55.2%

        \[\leadsto x \cdot \color{blue}{\frac{z - a}{t}} \]
    11. Applied egg-rr55.2%

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

    if 2.34999999999999983e28 < z < 1.79999999999999998e31

    1. Initial program 100.0%

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

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

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

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

    if 3.3000000000000001e76 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified45.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification49.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+54}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 0.0018:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+31}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+46}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 9: 84.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+197} \lor \neg \left(t \leq 2.55 \cdot 10^{+107}\right):\\
\;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.59999999999999987e197 or 2.5500000000000001e107 < t

    1. Initial program 31.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999987e197 < t < 2.5500000000000001e107

    1. Initial program 80.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+197} \lor \neg \left(t \leq 2.55 \cdot 10^{+107}\right):\\ \;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\ \end{array} \]

Alternative 10: 49.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -6.1 \cdot 10^{+35}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+60}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 3.7 \cdot 10^{+228}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.0000000000000006e244 or 1.90000000000000005e60 < t < 3.6999999999999998e228

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
    10. Step-by-step derivation
      1. div-inv52.7%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t}{z - a}}} \]
      2. clear-num52.7%

        \[\leadsto x \cdot \color{blue}{\frac{z - a}{t}} \]
    11. Applied egg-rr52.7%

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

    if -8.0000000000000006e244 < t < -6.09999999999999977e35

    1. Initial program 57.5%

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

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

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

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

    if -6.09999999999999977e35 < t < 1.90000000000000005e60

    1. Initial program 87.6%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified55.7%

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

    if 3.6999999999999998e228 < t

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+244}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{+35}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+60}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+228}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 49.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -6.1 \cdot 10^{+35}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+229}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.0000000000000006e244 or 7.4999999999999996e59 < t < 5.5000000000000002e229

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000006e244 < t < -6.09999999999999977e35

    1. Initial program 57.5%

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

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

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

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

    if -6.09999999999999977e35 < t < 7.4999999999999996e59

    1. Initial program 87.6%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified55.7%

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

    if 5.5000000000000002e229 < t

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{+35}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+229}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 50.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{+35}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -8.0000000000000006e244

    1. Initial program 23.9%

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000006e244 < t < -5.79999999999999989e35

    1. Initial program 57.5%

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

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

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

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

    if -5.79999999999999989e35 < t < 1.3e41

    1. Initial program 87.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified56.8%

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

    if 1.3e41 < t < 1.6000000000000001e109

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    12. Simplified55.9%

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

    if 1.6000000000000001e109 < t

    1. Initial program 24.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+35}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+41}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+109}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 72.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.30000000000000005e-6 or 1.46e29 < a

    1. Initial program 71.5%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z - t}}} \]
    6. Simplified76.9%

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

    if -1.30000000000000005e-6 < a < 1.46e29

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{-6} \lor \neg \left(a \leq 1.46 \cdot 10^{+29}\right):\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \end{array} \]

Alternative 14: 37.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;z \leq 10^{+77}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.25e175

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{t} \]
      3. distribute-rgt-neg-out54.3%

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

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

    if -1.25e175 < z < 6.99999999999999993e-4 or 3.20000000000000015e27 < z < 9.99999999999999983e76

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

    if 6.99999999999999993e-4 < z < 3.20000000000000015e27

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
    10. Step-by-step derivation
      1. div-inv55.2%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t}{z - a}}} \]
      2. clear-num55.2%

        \[\leadsto x \cdot \color{blue}{\frac{z - a}{t}} \]
    11. Applied egg-rr55.2%

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

    if 9.99999999999999983e76 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified45.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+175}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\ \mathbf{elif}\;z \leq 0.0007:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;z \leq 10^{+77}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 15: 56.9% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;x \leq 3.2 \cdot 10^{+244}:\\
\;\;\;\;\frac{x}{\frac{t}{z - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.9e-19

    1. Initial program 67.7%

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

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

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

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

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

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

    if -1.9e-19 < x < 2.1999999999999999e96

    1. Initial program 76.4%

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

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

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

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

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

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

    if 2.1999999999999999e96 < x < 3.2000000000000002e244

    1. Initial program 34.8%

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000002e244 < x

    1. Initial program 63.5%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a - t}{z - t}}} \]
    6. Simplified75.5%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{a - t}{z - t}}} \]
    7. Taylor expanded in t around 0 69.3%

      \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*75.6%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{z}}} \]
    9. Simplified75.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{-19}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+96}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{z}}\\ \end{array} \]

Alternative 16: 68.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 71.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    6. Simplified70.4%

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

    if -7.49999999999999934e-5 < a < 2.3000000000000001e38

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000001e38 < a

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+38}:\\ \;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \end{array} \]

Alternative 17: 38.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+122} \lor \neg \left(z \leq 2.15 \cdot 10^{+77}\right):\\
\;\;\;\;z \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3499999999999999e122 or 2.14999999999999996e77 < z

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
    10. Taylor expanded in z around inf 30.1%

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot z} \]
      2. *-commutative39.8%

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    12. Simplified39.8%

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

    if -1.3499999999999999e122 < z < 2.14999999999999996e77

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+122} \lor \neg \left(z \leq 2.15 \cdot 10^{+77}\right):\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 18: 39.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+113}:\\
\;\;\;\;z \cdot \frac{x}{t}\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+76}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z - a}}} \]
    10. Taylor expanded in z around inf 32.7%

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    12. Simplified36.6%

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

    if -5e113 < z < 1.34999999999999995e76

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

    if 1.34999999999999995e76 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified45.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+113}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 19: 38.1% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+77}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{t} \]
      3. distribute-rgt-neg-out54.3%

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

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

    if -1.4000000000000001e175 < z < 1.6000000000000001e77

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

    if 1.6000000000000001e77 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    9. Simplified45.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+175}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+77}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 20: 38.4% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+64}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+72}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.10000000000000001e64 or 7.99999999999999955e72 < a

    1. Initial program 70.1%

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

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

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

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

    if -1.10000000000000001e64 < a < 7.99999999999999955e72

    1. Initial program 68.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+72}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 33.7% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  8. Final simplification34.1%

    \[\leadsto x + y \]

Alternative 22: 25.5% 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 68.8%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification21.0%

    \[\leadsto x \]

Developer target: 86.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023340 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

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