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

Percentage Accurate: 68.0% → 90.3%
Time: 16.1s
Alternatives: 19
Speedup: 0.6×

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 19 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.0% 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: 90.3% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 74.6%

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in t around inf 99.8%

      \[\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}} \]
    7. Step-by-step derivation
      1. associate--l+99.8%

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(\frac{z - t}{a - t} \cdot \left(1 - \frac{x}{y}\right)\right)\\ 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 -1 \cdot 10^{-283}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+274}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (* (/ (- z t) (- a t)) (- 1.0 (/ x y))))))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-283)
       t_2
       (if (<= t_2 0.0)
         (+ y (/ (* (- y x) (- a z)) t))
         (if (<= t_2 4e+274) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (((z - t) / (a - t)) * (1.0 - (x / y))));
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-283) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_2 <= 4e+274) {
		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 + (y * (((z - t) / (a - t)) * (1.0 - (x / y))));
	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 <= -1e-283) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_2 <= 4e+274) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (((z - t) / (a - t)) * (1.0 - (x / y))))
	t_2 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-283:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = y + (((y - x) * (a - z)) / t)
	elif t_2 <= 4e+274:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(1.0 - Float64(x / y)))))
	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 <= -1e-283)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	elseif (t_2 <= 4e+274)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (((z - t) / (a - t)) * (1.0 - (x / y))));
	t_2 = x + (((y - x) * (z - t)) / (a - t));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-283)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = y + (((y - x) * (a - z)) / t);
	elseif (t_2 <= 4e+274)
		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[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(x / y), $MachinePrecision]), $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, -1e-283], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+274], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \left(\frac{z - t}{a - t} \cdot \left(1 - \frac{x}{y}\right)\right)\\
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 -1 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+274}:\\
\;\;\;\;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 3.99999999999999969e274 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999947e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.99999999999999969e274

    1. Initial program 98.8%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in t around inf 99.8%

      \[\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}} \]
    7. Step-by-step derivation
      1. associate--l+99.8%

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;x + y \cdot \left(\frac{z - t}{a - t} \cdot \left(1 - \frac{x}{y}\right)\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-283}:\\ \;\;\;\;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{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+274}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\frac{z - t}{a - t} \cdot \left(1 - \frac{x}{y}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.3% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := y - \frac{x - y}{t} \cdot \left(a - z\right)\\
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 -1 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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 5.00000000000000009e305 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 36.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 53.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}} \]
    4. Step-by-step derivation
      1. associate--l+53.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--53.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-sub54.3%

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999947e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.00000000000000009e305

    1. Initial program 98.8%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in t around inf 99.8%

      \[\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}} \]
    7. Step-by-step derivation
      1. associate--l+99.8%

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;y - \frac{x - y}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-283}:\\ \;\;\;\;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{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{x - y}{t} \cdot \left(a - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 87.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\

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


\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 38.3%

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999947e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.00000000000000009e305

    1. Initial program 98.8%

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in t around inf 99.8%

      \[\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}} \]
    7. Step-by-step derivation
      1. associate--l+99.8%

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000009e305 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 34.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 63.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}} \]
    4. Step-by-step derivation
      1. associate--l+63.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--63.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-sub63.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;x + x \cdot \left(\frac{z - t}{a - t} \cdot \left(-1 + \frac{y}{x}\right)\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-283}:\\ \;\;\;\;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{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{x - y}{t} \cdot \left(a - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{if}\;t \leq -4 \cdot 10^{+30}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-97}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-168}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (+ (/ t a) 1.0))))
   (if (<= t -4e+30)
     y
     (if (<= t -6.5e-28)
       t_1
       (if (<= t -5e-97)
         (* x (/ (- z a) t))
         (if (<= t -1.8e-242)
           t_1
           (if (<= t 1.75e-168) (* y (/ z a)) (if (<= t 7.8e-28) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((t / a) + 1.0);
	double tmp;
	if (t <= -4e+30) {
		tmp = y;
	} else if (t <= -6.5e-28) {
		tmp = t_1;
	} else if (t <= -5e-97) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.8e-242) {
		tmp = t_1;
	} else if (t <= 1.75e-168) {
		tmp = y * (z / a);
	} else if (t <= 7.8e-28) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((t / a) + 1.0d0)
    if (t <= (-4d+30)) then
        tmp = y
    else if (t <= (-6.5d-28)) then
        tmp = t_1
    else if (t <= (-5d-97)) then
        tmp = x * ((z - a) / t)
    else if (t <= (-1.8d-242)) then
        tmp = t_1
    else if (t <= 1.75d-168) then
        tmp = y * (z / a)
    else if (t <= 7.8d-28) then
        tmp = t_1
    else
        tmp = 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 / a) + 1.0);
	double tmp;
	if (t <= -4e+30) {
		tmp = y;
	} else if (t <= -6.5e-28) {
		tmp = t_1;
	} else if (t <= -5e-97) {
		tmp = x * ((z - a) / t);
	} else if (t <= -1.8e-242) {
		tmp = t_1;
	} else if (t <= 1.75e-168) {
		tmp = y * (z / a);
	} else if (t <= 7.8e-28) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((t / a) + 1.0)
	tmp = 0
	if t <= -4e+30:
		tmp = y
	elif t <= -6.5e-28:
		tmp = t_1
	elif t <= -5e-97:
		tmp = x * ((z - a) / t)
	elif t <= -1.8e-242:
		tmp = t_1
	elif t <= 1.75e-168:
		tmp = y * (z / a)
	elif t <= 7.8e-28:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(t / a) + 1.0))
	tmp = 0.0
	if (t <= -4e+30)
		tmp = y;
	elseif (t <= -6.5e-28)
		tmp = t_1;
	elseif (t <= -5e-97)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (t <= -1.8e-242)
		tmp = t_1;
	elseif (t <= 1.75e-168)
		tmp = Float64(y * Float64(z / a));
	elseif (t <= 7.8e-28)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((t / a) + 1.0);
	tmp = 0.0;
	if (t <= -4e+30)
		tmp = y;
	elseif (t <= -6.5e-28)
		tmp = t_1;
	elseif (t <= -5e-97)
		tmp = x * ((z - a) / t);
	elseif (t <= -1.8e-242)
		tmp = t_1;
	elseif (t <= 1.75e-168)
		tmp = y * (z / a);
	elseif (t <= 7.8e-28)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(t / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+30], y, If[LessEqual[t, -6.5e-28], t$95$1, If[LessEqual[t, -5e-97], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-242], t$95$1, If[LessEqual[t, 1.75e-168], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-28], t$95$1, y]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-97}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.0000000000000001e30 or 7.79999999999999998e-28 < t

    1. Initial program 52.9%

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

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

    if -4.0000000000000001e30 < t < -6.50000000000000043e-28 or -4.9999999999999995e-97 < t < -1.80000000000000007e-242 or 1.74999999999999991e-168 < t < 7.79999999999999998e-28

    1. Initial program 84.2%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*58.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-158.7%

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

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

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

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

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

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

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

    if -6.50000000000000043e-28 < t < -4.9999999999999995e-97

    1. Initial program 90.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*58.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-158.7%

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

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

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

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

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

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

    if -1.80000000000000007e-242 < t < 1.74999999999999991e-168

    1. Initial program 91.3%

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    5. Taylor expanded in x around 0 45.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+30}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-97}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-242}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-168}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := z \cdot \frac{x - y}{t - a}\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+58}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-265}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-277}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+83}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* z (/ (- x y) (- t a)))))
   (if (<= a -1.4e+58)
     (+ x (* y (/ z a)))
     (if (<= a -3.2e-265)
       t_1
       (if (<= a 1.08e-277)
         t_2
         (if (<= a 1.1e-58)
           t_1
           (if (<= a 4.7e+83) t_2 (+ x (* z (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((x - y) / (t - a));
	double tmp;
	if (a <= -1.4e+58) {
		tmp = x + (y * (z / a));
	} else if (a <= -3.2e-265) {
		tmp = t_1;
	} else if (a <= 1.08e-277) {
		tmp = t_2;
	} else if (a <= 1.1e-58) {
		tmp = t_1;
	} else if (a <= 4.7e+83) {
		tmp = t_2;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = z * ((x - y) / (t - a))
    if (a <= (-1.4d+58)) then
        tmp = x + (y * (z / a))
    else if (a <= (-3.2d-265)) then
        tmp = t_1
    else if (a <= 1.08d-277) then
        tmp = t_2
    else if (a <= 1.1d-58) then
        tmp = t_1
    else if (a <= 4.7d+83) then
        tmp = t_2
    else
        tmp = x + (z * (y / a))
    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 * ((x - y) / (t - a));
	double tmp;
	if (a <= -1.4e+58) {
		tmp = x + (y * (z / a));
	} else if (a <= -3.2e-265) {
		tmp = t_1;
	} else if (a <= 1.08e-277) {
		tmp = t_2;
	} else if (a <= 1.1e-58) {
		tmp = t_1;
	} else if (a <= 4.7e+83) {
		tmp = t_2;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = z * ((x - y) / (t - a))
	tmp = 0
	if a <= -1.4e+58:
		tmp = x + (y * (z / a))
	elif a <= -3.2e-265:
		tmp = t_1
	elif a <= 1.08e-277:
		tmp = t_2
	elif a <= 1.1e-58:
		tmp = t_1
	elif a <= 4.7e+83:
		tmp = t_2
	else:
		tmp = x + (z * (y / a))
	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(x - y) / Float64(t - a)))
	tmp = 0.0
	if (a <= -1.4e+58)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (a <= -3.2e-265)
		tmp = t_1;
	elseif (a <= 1.08e-277)
		tmp = t_2;
	elseif (a <= 1.1e-58)
		tmp = t_1;
	elseif (a <= 4.7e+83)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(z * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = z * ((x - y) / (t - a));
	tmp = 0.0;
	if (a <= -1.4e+58)
		tmp = x + (y * (z / a));
	elseif (a <= -3.2e-265)
		tmp = t_1;
	elseif (a <= 1.08e-277)
		tmp = t_2;
	elseif (a <= 1.1e-58)
		tmp = t_1;
	elseif (a <= 4.7e+83)
		tmp = t_2;
	else
		tmp = x + (z * (y / a));
	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[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+58], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e-265], t$95$1, If[LessEqual[a, 1.08e-277], t$95$2, If[LessEqual[a, 1.1e-58], t$95$1, If[LessEqual[a, 4.7e+83], t$95$2, N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-277}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.7 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.3999999999999999e58

    1. Initial program 79.5%

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

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

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

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

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

    if -1.3999999999999999e58 < a < -3.2e-265 or 1.0800000000000001e-277 < a < 1.10000000000000003e-58

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2e-265 < a < 1.0800000000000001e-277 or 1.10000000000000003e-58 < a < 4.6999999999999999e83

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in z around inf 75.6%

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

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

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

    if 4.6999999999999999e83 < a

    1. Initial program 60.6%

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+58}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-265}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-277}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+79}:\\
\;\;\;\;y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.6000000000000005e176 or 4.09999999999999985e-19 < t < 8.4999999999999998e79 or 6.1999999999999997e183 < t

    1. Initial program 48.0%

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

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

    if -5.6000000000000005e176 < t < 4.09999999999999985e-19

    1. Initial program 83.0%

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

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

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

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

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

    if 8.4999999999999998e79 < t < 5.49999999999999966e162

    1. Initial program 58.2%

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

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

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

    if 5.49999999999999966e162 < t < 6.1999999999999997e183

    1. Initial program 28.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+176}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-19}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+79}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+162}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 50.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -6.4 \cdot 10^{+39}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-65}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.6000000000000005e176 or -8.50000000000000025e96 < t < -6.39999999999999986e39 or 4.09999999999999985e-19 < t

    1. Initial program 49.9%

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

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

    if -5.6000000000000005e176 < t < -8.50000000000000025e96 or -1.30000000000000005e-65 < t < 4.09999999999999985e-19

    1. Initial program 88.6%

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

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

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

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

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

    if -6.39999999999999986e39 < t < -1.30000000000000005e-65

    1. Initial program 74.7%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.5%

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

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      3. associate-/l*57.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+176}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{+96}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{+39}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-65}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-19}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 46.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4.4 \cdot 10^{-264}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \frac{z}{t - a}\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-69}:\\
\;\;\;\;y\\

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

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


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

    1. Initial program 77.7%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified59.9%

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

    if -7.99999999999999996e-55 < a < -4.39999999999999988e-264 or 8.1999999999999998e-93 < a < 1.4499999999999999e-69

    1. Initial program 60.5%

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

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

    if -4.39999999999999988e-264 < a < 8.1999999999999998e-93

    1. Initial program 72.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a - t}} \]
    7. Step-by-step derivation
      1. mul-1-neg48.5%

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

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

        \[\leadsto -\color{blue}{\frac{z}{a - t} \cdot x} \]
      4. distribute-lft-neg-in48.4%

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

        \[\leadsto \color{blue}{\frac{-z}{a - t}} \cdot x \]
    8. Simplified48.4%

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

    if 1.4499999999999999e-69 < a < 4.39999999999999997e83

    1. Initial program 81.8%

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

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

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

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

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

    if 4.39999999999999997e83 < a

    1. Initial program 60.6%

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-55}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-264}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-93}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-69}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 37.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.95 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.04999999999999989e35 or 7.59999999999999951e-29 < t

    1. Initial program 52.9%

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

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

    if -3.04999999999999989e35 < t < -1.95000000000000009e-59 or 3.49999999999999985e-170 < t < 7.59999999999999951e-29

    1. Initial program 79.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{t}{a - t}\right)} \]
    7. Step-by-step derivation
      1. +-commutative40.3%

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

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

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

    if -1.95000000000000009e-59 < t < 3.49999999999999985e-170

    1. Initial program 92.5%

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    5. Taylor expanded in x around 0 36.4%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified40.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.05 \cdot 10^{+35}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-59}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-170}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 41.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+30}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.5000000000000003e30 or 1.1e49 < t

    1. Initial program 50.8%

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

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

    if -9.5000000000000003e30 < t < 1.1000000000000001e-127

    1. Initial program 86.6%

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

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

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

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

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

    if 1.1000000000000001e-127 < t < 1.3000000000000001e-29

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

    if 1.3000000000000001e-29 < t < 1.1e49

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+30}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 76.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.80000000000000012e-79

    1. Initial program 78.9%

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

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

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

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

    if -2.80000000000000012e-79 < a < 6.00000000000000038e-60

    1. Initial program 63.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.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}} \]
    4. Step-by-step derivation
      1. associate--l+76.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--76.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-sub77.4%

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

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

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

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

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

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

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

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

    if 6.00000000000000038e-60 < a < 6.4999999999999998e93

    1. Initial program 81.8%

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

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

    if 6.4999999999999998e93 < a

    1. Initial program 60.6%

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

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

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

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

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

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

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

Alternative 13: 37.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+33}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -2.05 \cdot 10^{-60}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 3.7 \cdot 10^{-19}:\\
\;\;\;\;x\\

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


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

    1. Initial program 52.9%

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

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

    if -3.6000000000000003e33 < t < -2.05000000000000006e-60 or 2.10000000000000017e-167 < t < 3.70000000000000005e-19

    1. Initial program 78.1%

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

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

    if -2.05000000000000006e-60 < t < 2.10000000000000017e-167

    1. Initial program 92.5%

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    5. Taylor expanded in x around 0 36.4%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified40.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+33}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-167}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 72.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59} \lor \neg \left(z \leq 1.15 \cdot 10^{+119}\right):\\
\;\;\;\;z \cdot \frac{x - y}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999999e59 or 1.15e119 < z

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    6. Taylor expanded in z around inf 77.0%

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

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

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

    if -1.84999999999999999e59 < z < 1.15e119

    1. Initial program 70.0%

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

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

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

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

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

Alternative 15: 65.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{+35} \lor \neg \left(t \leq 4.05 \cdot 10^{-19}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.75e35 or 4.05000000000000012e-19 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e35 < t < 4.05000000000000012e-19

    1. Initial program 86.5%

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified74.6%

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

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

Alternative 16: 61.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.99999999999999999e56

    1. Initial program 79.5%

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

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

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

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

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

    if -6.99999999999999999e56 < a < 6.2e139

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.2e139 < a

    1. Initial program 59.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+56}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+139}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+187}:\\
\;\;\;\;y\\

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

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


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

    1. Initial program 48.9%

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

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

    if -5.40000000000000016e187 < t < 4.09999999999999985e-19

    1. Initial program 83.0%

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

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

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

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

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

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

Alternative 18: 38.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{+29}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-20}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.6999999999999999e29 or 1.12000000000000002e-20 < t

    1. Initial program 52.9%

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

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

    if -5.6999999999999999e29 < t < 1.12000000000000002e-20

    1. Initial program 86.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+29}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 24.8% 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 70.5%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.3%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 87.0% accurate, 0.5× 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 2024082 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))