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

Percentage Accurate: 68.2% → 91.5%
Time: 16.7s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 68.2% 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: 91.5% 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 -4 \cdot 10^{-304} \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(z - a\right) \cdot \left(x - y\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 -4e-304) (not (<= t_1 0.0)))
     (fma (- y x) (/ (- z t) (- a t)) x)
     (+ y (/ (* (- z a) (- x y)) 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 <= -4e-304) || !(t_1 <= 0.0)) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y + (((z - a) * (x - y)) / 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 <= -4e-304) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / 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, -4e-304], 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[(z - a), $MachinePrecision] * N[(x - y), $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 -4 \cdot 10^{-304} \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(z - a\right) \cdot \left(x - y\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))) < -3.99999999999999988e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 78.0%

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

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

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

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

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

    if -3.99999999999999988e-304 < (+.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. Step-by-step derivation
      1. +-commutative4.7%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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.8%

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

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

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

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

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

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

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

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

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

Alternative 2: 83.7% 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 \frac{y}{x} + \frac{z - t}{t - a}\right)\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-304}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+286}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right) + x \cdot \left(t - z\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \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)) (/ y x)) (/ (- z t) (- t a)))))
     (if (<= t_1 -4e-304)
       t_1
       (if (<= t_1 0.0)
         (+ y (/ (* (- z a) (- x y)) t))
         (if (<= t_1 5e+286)
           (+ x (/ (+ (* y (- z t)) (* x (- t z))) (- a t)))
           (+ x (* z (/ (- y x) (- a 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 <= -((double) INFINITY)) {
		tmp = x + (x * ((((z - t) / (a - t)) * (y / x)) + ((z - t) / (t - a))));
	} else if (t_1 <= -4e-304) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((z - a) * (x - y)) / t);
	} else if (t_1 <= 5e+286) {
		tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
	} else {
		tmp = x + (z * ((y - x) / (a - t)));
	}
	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)) * (y / x)) + ((z - t) / (t - a))));
	} else if (t_1 <= -4e-304) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((z - a) * (x - y)) / t);
	} else if (t_1 <= 5e+286) {
		tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
	} else {
		tmp = x + (z * ((y - x) / (a - t)));
	}
	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)) * (y / x)) + ((z - t) / (t - a))))
	elif t_1 <= -4e-304:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = y + (((z - a) * (x - y)) / t)
	elif t_1 <= 5e+286:
		tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t))
	else:
		tmp = x + (z * ((y - x) / (a - 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 <= Float64(-Inf))
		tmp = Float64(x + Float64(x * Float64(Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(y / x)) + Float64(Float64(z - t) / Float64(t - a)))));
	elseif (t_1 <= -4e-304)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t));
	elseif (t_1 <= 5e+286)
		tmp = Float64(x + Float64(Float64(Float64(y * Float64(z - t)) + Float64(x * Float64(t - z))) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t))));
	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)) * (y / x)) + ((z - t) / (t - a))));
	elseif (t_1 <= -4e-304)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = y + (((z - a) * (x - y)) / t);
	elseif (t_1 <= 5e+286)
		tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
	else
		tmp = x + (z * ((y - x) / (a - t)));
	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[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-304], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], N[(x + N[(N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $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 \frac{y}{x} + \frac{z - t}{t - a}\right)\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 98.6%

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

    if -3.99999999999999988e-304 < (+.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. Step-by-step derivation
      1. +-commutative4.7%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 98.4%

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

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

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

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

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

    if 5.0000000000000004e286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 36.4%

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

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

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

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

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

Alternative 3: 82.9% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 39.7%

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

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

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

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

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

    1. Initial program 98.6%

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

    if -3.99999999999999988e-304 < (+.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. Step-by-step derivation
      1. +-commutative4.7%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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.8%

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

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

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

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

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

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

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

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

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

    1. Initial program 98.4%

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

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

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

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

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

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

Alternative 4: 82.9% accurate, 0.2× speedup?

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

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

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

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

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

    1. Initial program 39.7%

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999988e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000004e286

    1. Initial program 98.5%

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

    if -3.99999999999999988e-304 < (+.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. Step-by-step derivation
      1. +-commutative4.7%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. 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}} \]
    6. 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.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 71.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.00000000000000016e95 or 1.3000000000000001e-8 < t

    1. Initial program 42.7%

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

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

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

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

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

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

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

        \[\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/69.5%

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

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

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

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

        \[\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/69.5%

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

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

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

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

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

    if -8.00000000000000016e95 < t < 4.40000000000000011e-75

    1. Initial program 87.8%

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

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

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

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

    if 4.40000000000000011e-75 < t < 1.3000000000000001e-8

    1. Initial program 93.9%

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

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

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

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

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

Alternative 6: 59.5% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+52}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\

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


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

    1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e97 < t < 2.4999999999999999e-70

    1. Initial program 87.9%

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

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

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

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

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

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

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

    if 2.4999999999999999e-70 < t < 8.9999999999999999e52

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

    if 8.9999999999999999e52 < t

    1. Initial program 38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    11. Simplified46.3%

      \[\leadsto \color{blue}{y - y \cdot \frac{z}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 69.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.1999999999999996e-35 or 7.0000000000000002e33 < z

    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 z around inf 70.1%

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

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

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

    if -9.1999999999999996e-35 < z < 7.0000000000000002e33

    1. Initial program 71.5%

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

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

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

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

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

Alternative 8: 69.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{-60} \lor \neg \left(z \leq 4.2 \cdot 10^{-11}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.09999999999999988e-60 or 4.1999999999999997e-11 < z

    1. Initial program 73.0%

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

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

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

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

    if -3.09999999999999988e-60 < z < 4.1999999999999997e-11

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45e31 or 2e13 < a

    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 t around 0 67.3%

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

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

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

    if -1.45e31 < a < 2e13

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 59.0% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999978e95 < t < 7.1999999999999999e-17

    1. Initial program 88.1%

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

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

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

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

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

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

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

    if 7.1999999999999999e-17 < t

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    11. Simplified45.6%

      \[\leadsto \color{blue}{y - y \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 11: 57.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.4e29 or 2.2e13 < a

    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 y around inf 72.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    7. Step-by-step derivation
      1. +-commutative66.7%

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

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

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

    if -5.4e29 < a < 2.2e13

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.8%

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    11. Simplified53.2%

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

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

Alternative 12: 57.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0499999999999999e29 or 2e13 < a

    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 y around inf 72.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    7. Step-by-step derivation
      1. +-commutative66.7%

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

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

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

    if -3.0499999999999999e29 < a < 2e13

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 49.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 1100000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.69999999999999997e106 or 1.1e6 < a

    1. Initial program 69.7%

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

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

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

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

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

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

    if -1.69999999999999997e106 < a < 1.1e6

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{t}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 37.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 32000000000000:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.0499999999999999e29 or 3.2e13 < a

    1. Initial program 70.5%

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

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

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

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

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

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

    if -3.0499999999999999e29 < a < 3.3e-294

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    10. Simplified37.1%

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

    if 3.3e-294 < a < 3.2e13

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 38.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9000000000000001e96 or 7.49999999999999984e-17 < t

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e96 < t < 7.49999999999999984e-17

    1. Initial program 88.1%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 26.0% 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 72.0%

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

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

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

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

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

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

Developer Target 1: 86.9% 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 2024145 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

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