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

Percentage Accurate: 68.2% → 90.9%
Time: 28.5s
Alternatives: 23
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 23 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: 90.9% accurate, 0.2× speedup?

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

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

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

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

    1. Initial program 42.1%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e-290 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.9999999999999998e290

    1. Initial program 96.8%

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

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

    1. Initial program 3.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\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. div-sub99.8%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. 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} \]
      6. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.3% accurate, 0.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 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))) < -2.0000000000000001e-290

    1. Initial program 74.4%

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} + x \]
      4. associate-/r/89.1%

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

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

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

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

    1. Initial program 3.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\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. div-sub99.8%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. 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} \]
      6. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 73.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef88.3%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv93.0%

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

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

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

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

Alternative 3: 57.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := z \cdot \frac{y - x}{a - t}\\ t_3 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -8 \cdot 10^{+36}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-169}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 3.95 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.56 \cdot 10^{-253}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t))))
        (t_2 (* z (/ (- y x) (- a t))))
        (t_3 (+ x (/ y (/ a z)))))
   (if (<= z -8e+36)
     t_2
     (if (<= z -3.5e-44)
       t_1
       (if (<= z -3.6e-169)
         t_3
         (if (<= z 3.95e-296)
           t_1
           (if (<= z 2.56e-253)
             t_3
             (if (<= z 1.9e-209)
               (* y (/ t (- t a)))
               (if (<= z 1.7e-81)
                 (+ x (/ z (/ a y)))
                 (if (<= z 4.1e+68) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double t_3 = x + (y / (a / z));
	double tmp;
	if (z <= -8e+36) {
		tmp = t_2;
	} else if (z <= -3.5e-44) {
		tmp = t_1;
	} else if (z <= -3.6e-169) {
		tmp = t_3;
	} else if (z <= 3.95e-296) {
		tmp = t_1;
	} else if (z <= 2.56e-253) {
		tmp = t_3;
	} else if (z <= 1.9e-209) {
		tmp = y * (t / (t - a));
	} else if (z <= 1.7e-81) {
		tmp = x + (z / (a / y));
	} else if (z <= 4.1e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = z * ((y - x) / (a - t))
    t_3 = x + (y / (a / z))
    if (z <= (-8d+36)) then
        tmp = t_2
    else if (z <= (-3.5d-44)) then
        tmp = t_1
    else if (z <= (-3.6d-169)) then
        tmp = t_3
    else if (z <= 3.95d-296) then
        tmp = t_1
    else if (z <= 2.56d-253) then
        tmp = t_3
    else if (z <= 1.9d-209) then
        tmp = y * (t / (t - a))
    else if (z <= 1.7d-81) then
        tmp = x + (z / (a / y))
    else if (z <= 4.1d+68) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = z * ((y - x) / (a - t));
	double t_3 = x + (y / (a / z));
	double tmp;
	if (z <= -8e+36) {
		tmp = t_2;
	} else if (z <= -3.5e-44) {
		tmp = t_1;
	} else if (z <= -3.6e-169) {
		tmp = t_3;
	} else if (z <= 3.95e-296) {
		tmp = t_1;
	} else if (z <= 2.56e-253) {
		tmp = t_3;
	} else if (z <= 1.9e-209) {
		tmp = y * (t / (t - a));
	} else if (z <= 1.7e-81) {
		tmp = x + (z / (a / y));
	} else if (z <= 4.1e+68) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = z * ((y - x) / (a - t))
	t_3 = x + (y / (a / z))
	tmp = 0
	if z <= -8e+36:
		tmp = t_2
	elif z <= -3.5e-44:
		tmp = t_1
	elif z <= -3.6e-169:
		tmp = t_3
	elif z <= 3.95e-296:
		tmp = t_1
	elif z <= 2.56e-253:
		tmp = t_3
	elif z <= 1.9e-209:
		tmp = y * (t / (t - a))
	elif z <= 1.7e-81:
		tmp = x + (z / (a / y))
	elif z <= 4.1e+68:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	t_3 = Float64(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (z <= -8e+36)
		tmp = t_2;
	elseif (z <= -3.5e-44)
		tmp = t_1;
	elseif (z <= -3.6e-169)
		tmp = t_3;
	elseif (z <= 3.95e-296)
		tmp = t_1;
	elseif (z <= 2.56e-253)
		tmp = t_3;
	elseif (z <= 1.9e-209)
		tmp = Float64(y * Float64(t / Float64(t - a)));
	elseif (z <= 1.7e-81)
		tmp = Float64(x + Float64(z / Float64(a / y)));
	elseif (z <= 4.1e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = z * ((y - x) / (a - t));
	t_3 = x + (y / (a / z));
	tmp = 0.0;
	if (z <= -8e+36)
		tmp = t_2;
	elseif (z <= -3.5e-44)
		tmp = t_1;
	elseif (z <= -3.6e-169)
		tmp = t_3;
	elseif (z <= 3.95e-296)
		tmp = t_1;
	elseif (z <= 2.56e-253)
		tmp = t_3;
	elseif (z <= 1.9e-209)
		tmp = y * (t / (t - a));
	elseif (z <= 1.7e-81)
		tmp = x + (z / (a / y));
	elseif (z <= 4.1e+68)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+36], t$95$2, If[LessEqual[z, -3.5e-44], t$95$1, If[LessEqual[z, -3.6e-169], t$95$3, If[LessEqual[z, 3.95e-296], t$95$1, If[LessEqual[z, 2.56e-253], t$95$3, If[LessEqual[z, 1.9e-209], N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-81], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+68], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-169}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 3.95 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.56 \cdot 10^{-253}:\\
\;\;\;\;t\_3\\

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

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

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.00000000000000034e36 or 4.0999999999999999e68 < z

    1. Initial program 72.8%

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

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

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

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

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

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

    if -8.00000000000000034e36 < z < -3.4999999999999998e-44 or -3.60000000000000001e-169 < z < 3.94999999999999979e-296 or 1.6999999999999999e-81 < z < 4.0999999999999999e68

    1. Initial program 59.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef72.1%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.4%

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

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

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

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

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

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

    if -3.4999999999999998e-44 < z < -3.60000000000000001e-169 or 3.94999999999999979e-296 < z < 2.56e-253

    1. Initial program 83.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Simplified65.4%

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

    if 2.56e-253 < z < 1.8999999999999999e-209

    1. Initial program 57.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef56.8%

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-167.7%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a - t}\right)} \]
      2. distribute-neg-frac67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified67.7%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv67.3%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg67.3%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg67.3%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg67.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t \cdot 1}{\left(-a\right) + t}} \]
      2. *-rgt-identity67.7%

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified67.7%

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

    if 1.8999999999999999e-209 < z < 1.6999999999999999e-81

    1. Initial program 69.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+36}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 3.95 \cdot 10^{-296}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 2.56 \cdot 10^{-253}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+68}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 57.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -2.7 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-169}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{-298}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-254}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-207}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (/ y (/ a z)))))
   (if (<= z -2.7e+28)
     (* z (/ (- y x) (- a t)))
     (if (<= z -7.2e-44)
       t_1
       (if (<= z -3.7e-169)
         t_2
         (if (<= z 7.3e-298)
           t_1
           (if (<= z 7.5e-254)
             t_2
             (if (<= z 2.4e-207)
               (* y (/ t (- t a)))
               (if (<= z 3.6e-83)
                 (+ x (/ z (/ a y)))
                 (if (<= z 3.2e+67) t_1 (* (- y x) (/ z (- a t)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (z <= -2.7e+28) {
		tmp = z * ((y - x) / (a - t));
	} else if (z <= -7.2e-44) {
		tmp = t_1;
	} else if (z <= -3.7e-169) {
		tmp = t_2;
	} else if (z <= 7.3e-298) {
		tmp = t_1;
	} else if (z <= 7.5e-254) {
		tmp = t_2;
	} else if (z <= 2.4e-207) {
		tmp = y * (t / (t - a));
	} else if (z <= 3.6e-83) {
		tmp = x + (z / (a / y));
	} else if (z <= 3.2e+67) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    t_2 = x + (y / (a / z))
    if (z <= (-2.7d+28)) then
        tmp = z * ((y - x) / (a - t))
    else if (z <= (-7.2d-44)) then
        tmp = t_1
    else if (z <= (-3.7d-169)) then
        tmp = t_2
    else if (z <= 7.3d-298) then
        tmp = t_1
    else if (z <= 7.5d-254) then
        tmp = t_2
    else if (z <= 2.4d-207) then
        tmp = y * (t / (t - a))
    else if (z <= 3.6d-83) then
        tmp = x + (z / (a / y))
    else if (z <= 3.2d+67) then
        tmp = t_1
    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 t_1 = y * ((z - t) / (a - t));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (z <= -2.7e+28) {
		tmp = z * ((y - x) / (a - t));
	} else if (z <= -7.2e-44) {
		tmp = t_1;
	} else if (z <= -3.7e-169) {
		tmp = t_2;
	} else if (z <= 7.3e-298) {
		tmp = t_1;
	} else if (z <= 7.5e-254) {
		tmp = t_2;
	} else if (z <= 2.4e-207) {
		tmp = y * (t / (t - a));
	} else if (z <= 3.6e-83) {
		tmp = x + (z / (a / y));
	} else if (z <= 3.2e+67) {
		tmp = t_1;
	} else {
		tmp = (y - x) * (z / (a - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x + (y / (a / z))
	tmp = 0
	if z <= -2.7e+28:
		tmp = z * ((y - x) / (a - t))
	elif z <= -7.2e-44:
		tmp = t_1
	elif z <= -3.7e-169:
		tmp = t_2
	elif z <= 7.3e-298:
		tmp = t_1
	elif z <= 7.5e-254:
		tmp = t_2
	elif z <= 2.4e-207:
		tmp = y * (t / (t - a))
	elif z <= 3.6e-83:
		tmp = x + (z / (a / y))
	elif z <= 3.2e+67:
		tmp = t_1
	else:
		tmp = (y - x) * (z / (a - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	t_2 = Float64(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (z <= -2.7e+28)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (z <= -7.2e-44)
		tmp = t_1;
	elseif (z <= -3.7e-169)
		tmp = t_2;
	elseif (z <= 7.3e-298)
		tmp = t_1;
	elseif (z <= 7.5e-254)
		tmp = t_2;
	elseif (z <= 2.4e-207)
		tmp = Float64(y * Float64(t / Float64(t - a)));
	elseif (z <= 3.6e-83)
		tmp = Float64(x + Float64(z / Float64(a / y)));
	elseif (z <= 3.2e+67)
		tmp = t_1;
	else
		tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	t_2 = x + (y / (a / z));
	tmp = 0.0;
	if (z <= -2.7e+28)
		tmp = z * ((y - x) / (a - t));
	elseif (z <= -7.2e-44)
		tmp = t_1;
	elseif (z <= -3.7e-169)
		tmp = t_2;
	elseif (z <= 7.3e-298)
		tmp = t_1;
	elseif (z <= 7.5e-254)
		tmp = t_2;
	elseif (z <= 2.4e-207)
		tmp = y * (t / (t - a));
	elseif (z <= 3.6e-83)
		tmp = x + (z / (a / y));
	elseif (z <= 3.2e+67)
		tmp = t_1;
	else
		tmp = (y - x) * (z / (a - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+28], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-44], t$95$1, If[LessEqual[z, -3.7e-169], t$95$2, If[LessEqual[z, 7.3e-298], t$95$1, If[LessEqual[z, 7.5e-254], t$95$2, If[LessEqual[z, 2.4e-207], N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-83], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+67], t$95$1, N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-169}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 7.3 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-254}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.7000000000000002e28

    1. Initial program 68.6%

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

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

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

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

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

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

    if -2.7000000000000002e28 < z < -7.1999999999999998e-44 or -3.6999999999999997e-169 < z < 7.3000000000000003e-298 or 3.60000000000000012e-83 < z < 3.19999999999999983e67

    1. Initial program 59.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef72.1%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.4%

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

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

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

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

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

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

    if -7.1999999999999998e-44 < z < -3.6999999999999997e-169 or 7.3000000000000003e-298 < z < 7.5000000000000005e-254

    1. Initial program 83.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Simplified65.4%

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

    if 7.5000000000000005e-254 < z < 2.39999999999999989e-207

    1. Initial program 57.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef56.8%

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-167.7%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a - t}\right)} \]
      2. distribute-neg-frac67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified67.7%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv67.3%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg67.3%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg67.3%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg67.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t \cdot 1}{\left(-a\right) + t}} \]
      2. *-rgt-identity67.7%

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified67.7%

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

    if 2.39999999999999989e-207 < z < 3.60000000000000012e-83

    1. Initial program 69.6%

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

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

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

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

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

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

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

    if 3.19999999999999983e67 < z

    1. Initial program 76.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef89.2%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv92.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    10. Step-by-step derivation
      1. associate-/r/82.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{-298}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-254}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-207}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 58.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y \cdot \left(t - z\right)}{a}\\ t_2 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-32}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;z \leq 10^{-294}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-253}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+67}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* y (- t z)) a))) (t_2 (* y (/ (- z t) (- a t)))))
   (if (<= z -7.5e+26)
     (* z (/ (- y x) (- a t)))
     (if (<= z -1.25e-32)
       t_2
       (if (<= z -1.7e-169)
         (+ x (/ (* (- y x) z) a))
         (if (<= z 1e-294)
           t_2
           (if (<= z 1.06e-253)
             t_1
             (if (<= z 1.45e-209)
               (* y (/ t (- t a)))
               (if (<= z 9.2e-80)
                 t_1
                 (if (<= z 1.95e+67) t_2 (* (- y x) (/ z (- a t)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((y * (t - z)) / a);
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (z <= -7.5e+26) {
		tmp = z * ((y - x) / (a - t));
	} else if (z <= -1.25e-32) {
		tmp = t_2;
	} else if (z <= -1.7e-169) {
		tmp = x + (((y - x) * z) / a);
	} else if (z <= 1e-294) {
		tmp = t_2;
	} else if (z <= 1.06e-253) {
		tmp = t_1;
	} else if (z <= 1.45e-209) {
		tmp = y * (t / (t - a));
	} else if (z <= 9.2e-80) {
		tmp = t_1;
	} else if (z <= 1.95e+67) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - ((y * (t - z)) / a)
    t_2 = y * ((z - t) / (a - t))
    if (z <= (-7.5d+26)) then
        tmp = z * ((y - x) / (a - t))
    else if (z <= (-1.25d-32)) then
        tmp = t_2
    else if (z <= (-1.7d-169)) then
        tmp = x + (((y - x) * z) / a)
    else if (z <= 1d-294) then
        tmp = t_2
    else if (z <= 1.06d-253) then
        tmp = t_1
    else if (z <= 1.45d-209) then
        tmp = y * (t / (t - a))
    else if (z <= 9.2d-80) then
        tmp = t_1
    else if (z <= 1.95d+67) then
        tmp = t_2
    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 t_1 = x - ((y * (t - z)) / a);
	double t_2 = y * ((z - t) / (a - t));
	double tmp;
	if (z <= -7.5e+26) {
		tmp = z * ((y - x) / (a - t));
	} else if (z <= -1.25e-32) {
		tmp = t_2;
	} else if (z <= -1.7e-169) {
		tmp = x + (((y - x) * z) / a);
	} else if (z <= 1e-294) {
		tmp = t_2;
	} else if (z <= 1.06e-253) {
		tmp = t_1;
	} else if (z <= 1.45e-209) {
		tmp = y * (t / (t - a));
	} else if (z <= 9.2e-80) {
		tmp = t_1;
	} else if (z <= 1.95e+67) {
		tmp = t_2;
	} else {
		tmp = (y - x) * (z / (a - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((y * (t - z)) / a)
	t_2 = y * ((z - t) / (a - t))
	tmp = 0
	if z <= -7.5e+26:
		tmp = z * ((y - x) / (a - t))
	elif z <= -1.25e-32:
		tmp = t_2
	elif z <= -1.7e-169:
		tmp = x + (((y - x) * z) / a)
	elif z <= 1e-294:
		tmp = t_2
	elif z <= 1.06e-253:
		tmp = t_1
	elif z <= 1.45e-209:
		tmp = y * (t / (t - a))
	elif z <= 9.2e-80:
		tmp = t_1
	elif z <= 1.95e+67:
		tmp = t_2
	else:
		tmp = (y - x) * (z / (a - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(y * Float64(t - z)) / a))
	t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (z <= -7.5e+26)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (z <= -1.25e-32)
		tmp = t_2;
	elseif (z <= -1.7e-169)
		tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a));
	elseif (z <= 1e-294)
		tmp = t_2;
	elseif (z <= 1.06e-253)
		tmp = t_1;
	elseif (z <= 1.45e-209)
		tmp = Float64(y * Float64(t / Float64(t - a)));
	elseif (z <= 9.2e-80)
		tmp = t_1;
	elseif (z <= 1.95e+67)
		tmp = t_2;
	else
		tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((y * (t - z)) / a);
	t_2 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (z <= -7.5e+26)
		tmp = z * ((y - x) / (a - t));
	elseif (z <= -1.25e-32)
		tmp = t_2;
	elseif (z <= -1.7e-169)
		tmp = x + (((y - x) * z) / a);
	elseif (z <= 1e-294)
		tmp = t_2;
	elseif (z <= 1.06e-253)
		tmp = t_1;
	elseif (z <= 1.45e-209)
		tmp = y * (t / (t - a));
	elseif (z <= 9.2e-80)
		tmp = t_1;
	elseif (z <= 1.95e+67)
		tmp = t_2;
	else
		tmp = (y - x) * (z / (a - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+26], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-32], t$95$2, If[LessEqual[z, -1.7e-169], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-294], t$95$2, If[LessEqual[z, 1.06e-253], t$95$1, If[LessEqual[z, 1.45e-209], N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-80], t$95$1, If[LessEqual[z, 1.95e+67], t$95$2, N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-32}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 10^{-294}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-253}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -7.49999999999999941e26

    1. Initial program 68.6%

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

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

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

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

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

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

    if -7.49999999999999941e26 < z < -1.25e-32 or -1.7e-169 < z < 1.00000000000000002e-294 or 9.1999999999999993e-80 < z < 1.95000000000000003e67

    1. Initial program 59.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef72.3%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.8%

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

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

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

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

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

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

    if -1.25e-32 < z < -1.7e-169

    1. Initial program 84.1%

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

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

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

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

    if 1.00000000000000002e-294 < z < 1.06000000000000007e-253 or 1.45000000000000013e-209 < z < 9.1999999999999993e-80

    1. Initial program 71.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef79.6%

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

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

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

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

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

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

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

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

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

    if 1.06000000000000007e-253 < z < 1.45000000000000013e-209

    1. Initial program 57.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef56.8%

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-167.7%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a - t}\right)} \]
      2. distribute-neg-frac67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified67.7%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg67.7%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv67.3%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg67.3%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg67.3%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg67.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t \cdot 1}{\left(-a\right) + t}} \]
      2. *-rgt-identity67.7%

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified67.7%

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

    if 1.95000000000000003e67 < z

    1. Initial program 76.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef89.2%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv92.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    10. Step-by-step derivation
      1. associate-/r/82.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-32}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-169}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;z \leq 10^{-294}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-253}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-80}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.3% accurate, 0.3× 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 -2 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - x \cdot \frac{a - z}{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 -2e-290) (not (<= t_1 0.0)))
     (+ x (* (- y x) (/ (- z t) (- a t))))
     (- y (* x (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if ((t_1 <= -2e-290) || !(t_1 <= 0.0)) {
		tmp = x + ((y - x) * ((z - t) / (a - t)));
	} else {
		tmp = y - (x * ((a - z) / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) * (z - t)) / (a - t))
    if ((t_1 <= (-2d-290)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((y - x) * ((z - t) / (a - t)))
    else
        tmp = y - (x * ((a - z) / t))
    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) * (z - t)) / (a - t));
	double tmp;
	if ((t_1 <= -2e-290) || !(t_1 <= 0.0)) {
		tmp = x + ((y - x) * ((z - t) / (a - t)));
	} else {
		tmp = y - (x * ((a - z) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) * (z - t)) / (a - t))
	tmp = 0
	if (t_1 <= -2e-290) or not (t_1 <= 0.0):
		tmp = x + ((y - x) * ((z - t) / (a - t)))
	else:
		tmp = y - (x * ((a - z) / t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
	tmp = 0.0
	if ((t_1 <= -2e-290) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / Float64(a - t))));
	else
		tmp = Float64(y - Float64(x * Float64(Float64(a - z) / 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 <= -2e-290) || ~((t_1 <= 0.0)))
		tmp = x + ((y - x) * ((z - t) / (a - t)));
	else
		tmp = y - (x * ((a - z) / 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[Or[LessEqual[t$95$1, -2e-290], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(x * N[(N[(a - z), $MachinePrecision] / t), $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 -2 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;y - x \cdot \frac{a - z}{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))) < -2.0000000000000001e-290 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 74.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef85.2%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv91.0%

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

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

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

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

    1. Initial program 3.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\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. div-sub99.8%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{t}} \]
      5. 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} \]
      6. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 73.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a}{z - t}}\\
t_2 := y + \frac{x - y}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -4100000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -3.15 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-86}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 4.7 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.1e9 or -8.5000000000000005e-20 < a < -3.1500000000000002e-72 or 4.69999999999999972e-5 < a

    1. Initial program 72.6%

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

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

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

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

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

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

    if -4.1e9 < a < -8.5000000000000005e-20

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1500000000000002e-72 < a < 4.4999999999999998e-86 or 2.44999999999999988e-68 < a < 4.69999999999999972e-5

    1. Initial program 65.4%

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

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

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

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

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

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

        \[\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. div-sub79.0%

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

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

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

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

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

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

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

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

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

    if 4.4999999999999998e-86 < a < 2.44999999999999988e-68

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef70.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4100000000:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-20}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -3.15 \cdot 10^{-72}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-86}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-68}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-5}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq -6.6 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-98}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.5999999999999996e22 or -6.6e-72 < t < -1.25000000000000005e-98 or 1.19999999999999996e145 < t

    1. Initial program 44.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef69.9%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv74.8%

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

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

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

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

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

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

    if -6.5999999999999996e22 < t < -6.6e-72 or -3.49999999999999995e-151 < t < 2.9000000000000001e-79

    1. Initial program 89.4%

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

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

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

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

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

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

    if -1.25000000000000005e-98 < t < -3.49999999999999995e-151

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    10. Simplified70.9%

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

    if 2.9000000000000001e-79 < t < 1.19999999999999996e145

    1. Initial program 71.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+22}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-72}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-98}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-79}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -1.76 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8 \cdot 10^{-170}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-295}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.9 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 68.6%

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

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

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

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

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

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

    if -7.40000000000000004e27 < z < -1.76000000000000004e-32 or -7.99999999999999987e-170 < z < 5.1999999999999997e-295 or 4.9e-89 < z < 1.4e68

    1. Initial program 58.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef71.4%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv76.8%

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

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

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

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

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

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

    if -1.76000000000000004e-32 < z < -7.99999999999999987e-170 or 5.1999999999999997e-295 < z < 4.9e-89

    1. Initial program 75.9%

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

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

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

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

    if 1.4e68 < z

    1. Initial program 76.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef89.2%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv92.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    10. Step-by-step derivation
      1. associate-/r/82.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.4 \cdot 10^{+27}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;z \leq -1.76 \cdot 10^{-32}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-170}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-295}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+68}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y + \frac{x - y}{\frac{t}{z}}\\
t_2 := x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{if}\;a \leq -46000000000:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 0.0086:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.6e10 or 0.0086 < a

    1. Initial program 71.7%

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

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

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

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

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

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

    if -4.6e10 < a < -8.5000000000000005e-20

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000005e-20 < a < -6.00000000000000007e-43

    1. Initial program 100.0%

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

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

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

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

    if -6.00000000000000007e-43 < a < 4.4999999999999998e-86 or 4.2e-74 < a < 0.0086

    1. Initial program 65.9%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 75.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+75.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/75.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/75.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. div-sub76.7%

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

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

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

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

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

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

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

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

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

    if 4.4999999999999998e-86 < a < 4.2e-74

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef70.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -46000000000:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-20}:\\ \;\;\;\;y + x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-86}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-74}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\ \mathbf{elif}\;a \leq 0.0086:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 0.00112:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.1e20 or 0.0011199999999999999 < a

    1. Initial program 71.3%

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

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

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

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

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

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

    if -2.1e20 < a < 2.49999999999999983e-103 or 1.7e-74 < a < 0.0011199999999999999

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999983e-103 < a < 1.7e-74

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef69.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+20}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-103}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-74}:\\ \;\;\;\;x - \frac{y \cdot \left(t - z\right)}{a}\\ \mathbf{elif}\;a \leq 0.00112:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 36.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+50}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-222}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.7e+50)
   y
   (if (<= t -1.5e-184)
     x
     (if (<= t 2.9e-222)
       (* y (/ z a))
       (if (<= t 3.5e-89) x (if (<= t 1.35e+145) (/ x (/ t z)) y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.7e+50) {
		tmp = y;
	} else if (t <= -1.5e-184) {
		tmp = x;
	} else if (t <= 2.9e-222) {
		tmp = y * (z / a);
	} else if (t <= 3.5e-89) {
		tmp = x;
	} else if (t <= 1.35e+145) {
		tmp = x / (t / z);
	} 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.7d+50)) then
        tmp = y
    else if (t <= (-1.5d-184)) then
        tmp = x
    else if (t <= 2.9d-222) then
        tmp = y * (z / a)
    else if (t <= 3.5d-89) then
        tmp = x
    else if (t <= 1.35d+145) then
        tmp = x / (t / z)
    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.7e+50) {
		tmp = y;
	} else if (t <= -1.5e-184) {
		tmp = x;
	} else if (t <= 2.9e-222) {
		tmp = y * (z / a);
	} else if (t <= 3.5e-89) {
		tmp = x;
	} else if (t <= 1.35e+145) {
		tmp = x / (t / z);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.7e+50:
		tmp = y
	elif t <= -1.5e-184:
		tmp = x
	elif t <= 2.9e-222:
		tmp = y * (z / a)
	elif t <= 3.5e-89:
		tmp = x
	elif t <= 1.35e+145:
		tmp = x / (t / z)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.7e+50)
		tmp = y;
	elseif (t <= -1.5e-184)
		tmp = x;
	elseif (t <= 2.9e-222)
		tmp = Float64(y * Float64(z / a));
	elseif (t <= 3.5e-89)
		tmp = x;
	elseif (t <= 1.35e+145)
		tmp = Float64(x / Float64(t / z));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.7e+50)
		tmp = y;
	elseif (t <= -1.5e-184)
		tmp = x;
	elseif (t <= 2.9e-222)
		tmp = y * (z / a);
	elseif (t <= 3.5e-89)
		tmp = x;
	elseif (t <= 1.35e+145)
		tmp = x / (t / z);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+50], y, If[LessEqual[t, -1.5e-184], x, If[LessEqual[t, 2.9e-222], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-89], x, If[LessEqual[t, 1.35e+145], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], y]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-184}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-89}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+145}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6999999999999999e50 or 1.35000000000000011e145 < t

    1. Initial program 37.3%

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

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

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

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

    if -1.6999999999999999e50 < t < -1.49999999999999996e-184 or 2.9000000000000002e-222 < t < 3.4999999999999997e-89

    1. Initial program 86.8%

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

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

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

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

    if -1.49999999999999996e-184 < t < 2.9000000000000002e-222

    1. Initial program 92.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef87.8%

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

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

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

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

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

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

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

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

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

    if 3.4999999999999997e-89 < t < 1.35000000000000011e145

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Simplified36.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+50}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-222}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 36.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{+50}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-221}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.52e+50)
   y
   (if (<= t -1.3e-184)
     x
     (if (<= t 2e-221)
       (/ y (/ a z))
       (if (<= t 5.2e-89) x (if (<= t 1.2e+145) (/ x (/ t z)) y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.52e+50) {
		tmp = y;
	} else if (t <= -1.3e-184) {
		tmp = x;
	} else if (t <= 2e-221) {
		tmp = y / (a / z);
	} else if (t <= 5.2e-89) {
		tmp = x;
	} else if (t <= 1.2e+145) {
		tmp = x / (t / z);
	} 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.52d+50)) then
        tmp = y
    else if (t <= (-1.3d-184)) then
        tmp = x
    else if (t <= 2d-221) then
        tmp = y / (a / z)
    else if (t <= 5.2d-89) then
        tmp = x
    else if (t <= 1.2d+145) then
        tmp = x / (t / z)
    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.52e+50) {
		tmp = y;
	} else if (t <= -1.3e-184) {
		tmp = x;
	} else if (t <= 2e-221) {
		tmp = y / (a / z);
	} else if (t <= 5.2e-89) {
		tmp = x;
	} else if (t <= 1.2e+145) {
		tmp = x / (t / z);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.52e+50:
		tmp = y
	elif t <= -1.3e-184:
		tmp = x
	elif t <= 2e-221:
		tmp = y / (a / z)
	elif t <= 5.2e-89:
		tmp = x
	elif t <= 1.2e+145:
		tmp = x / (t / z)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.52e+50)
		tmp = y;
	elseif (t <= -1.3e-184)
		tmp = x;
	elseif (t <= 2e-221)
		tmp = Float64(y / Float64(a / z));
	elseif (t <= 5.2e-89)
		tmp = x;
	elseif (t <= 1.2e+145)
		tmp = Float64(x / Float64(t / z));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.52e+50)
		tmp = y;
	elseif (t <= -1.3e-184)
		tmp = x;
	elseif (t <= 2e-221)
		tmp = y / (a / z);
	elseif (t <= 5.2e-89)
		tmp = x;
	elseif (t <= 1.2e+145)
		tmp = x / (t / z);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.52e+50], y, If[LessEqual[t, -1.3e-184], x, If[LessEqual[t, 2e-221], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-89], x, If[LessEqual[t, 1.2e+145], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], y]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-184}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-89}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.5199999999999999e50 or 1.19999999999999996e145 < t

    1. Initial program 37.3%

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

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

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

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

    if -1.5199999999999999e50 < t < -1.29999999999999989e-184 or 2.00000000000000003e-221 < t < 5.1999999999999997e-89

    1. Initial program 86.8%

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

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

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

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

    if -1.29999999999999989e-184 < t < 2.00000000000000003e-221

    1. Initial program 92.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef87.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    12. Simplified43.2%

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

    if 5.1999999999999997e-89 < t < 1.19999999999999996e145

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Simplified36.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{+50}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-221}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq -1.2 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.7499999999999998e239 or -8.5000000000000001e198 < x < -1.2e119

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

    if -3.7499999999999998e239 < x < -8.5000000000000001e198

    1. Initial program 41.4%

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

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

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

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

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

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

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

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

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

    if -1.2e119 < x < 1.4999999999999999e54

    1. Initial program 77.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef87.0%

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

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

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

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

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

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

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

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

    if 1.4999999999999999e54 < x

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-x \cdot z}}{a} \]
      3. distribute-lft-neg-out50.1%

        \[\leadsto x + \frac{\color{blue}{\left(-x\right) \cdot z}}{a} \]
      4. associate-*r/53.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.75 \cdot 10^{+239}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+198}:\\ \;\;\;\;\frac{-x}{\frac{a - t}{z}}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+119}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 69.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y + \frac{x - y}{\frac{t}{z}}\\
t_2 := x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{if}\;a \leq -2100000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 71.2%

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

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

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

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

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

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

    if -2.1e9 < a < 4.4999999999999998e-86 or 1.7e-74 < a < 4.50000000000000028e-5

    1. Initial program 66.1%

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

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

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

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

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

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

        \[\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. div-sub74.0%

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

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

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

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

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

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

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

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

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

    if 4.4999999999999998e-86 < a < 1.7e-74

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef70.0%

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

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

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

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

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

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

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

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

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

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

Alternative 16: 53.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \frac{t}{t - a}\\

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

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

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


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

    1. Initial program 42.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef67.0%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv69.0%

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-150.4%

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

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified50.4%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg50.4%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv50.3%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg50.3%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg50.3%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg50.3%

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

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

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

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified50.4%

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

    if -3.1e21 < t < 1.3999999999999999e-89

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-89 < t < 2.60000000000000003e145

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.60000000000000003e145 < t

    1. Initial program 32.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef71.6%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv77.9%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{t}{z - t}}} \]
      3. distribute-neg-frac66.0%

        \[\leadsto \color{blue}{\frac{-y}{\frac{t}{z - t}}} \]
    12. Simplified66.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+145}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{\frac{t}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 84.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-76} \lor \neg \left(a \leq 4.7 \cdot 10^{-115}\right):\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{x - y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.50000000000000038e-76 or 4.7000000000000001e-115 < a

    1. Initial program 72.2%

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

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

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

    if -8.50000000000000038e-76 < a < 4.7000000000000001e-115

    1. Initial program 63.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.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+78.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/78.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/78.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. div-sub78.5%

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

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

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

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

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

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

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

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

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

Alternative 18: 52.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{t - a}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4999999999999998e22 or 1.30000000000000007e146 < t

    1. Initial program 38.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef68.7%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv72.4%

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-156.1%

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

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified56.1%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg56.1%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv55.9%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg55.9%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg55.9%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg55.9%

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

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

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

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified56.1%

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

    if -2.4999999999999998e22 < t < 3.5000000000000002e-25

    1. Initial program 88.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Simplified57.4%

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

    if 3.5000000000000002e-25 < t < 1.30000000000000007e146

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Simplified40.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+22}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+146}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 53.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{t - a}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7000000000000002e22 or 2.60000000000000003e145 < t

    1. Initial program 38.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef68.7%

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

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv72.4%

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-156.1%

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

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified56.1%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg56.1%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv55.9%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg55.9%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg55.9%

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

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg55.9%

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

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

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

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified56.1%

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

    if -2.7000000000000002e22 < t < 1.5000000000000001e-90

    1. Initial program 89.8%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified87.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 69.8%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*72.6%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified72.6%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    8. Taylor expanded in y around inf 55.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*59.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Simplified59.6%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]

    if 1.5000000000000001e-90 < t < 2.60000000000000003e145

    1. Initial program 69.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/80.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified80.1%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 53.6%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    6. Taylor expanded in a around 0 42.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg42.3%

        \[\leadsto \color{blue}{-\frac{z \cdot \left(y - x\right)}{t}} \]
      2. associate-*r/47.5%

        \[\leadsto -\color{blue}{z \cdot \frac{y - x}{t}} \]
      3. distribute-rgt-neg-in47.5%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y - x}{t}\right)} \]
    8. Simplified47.5%

      \[\leadsto \color{blue}{z \cdot \left(-\frac{y - x}{t}\right)} \]
    9. Taylor expanded in t around 0 42.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(x - y\right)}{t}} \]
    10. Step-by-step derivation
      1. associate-/l*47.6%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    11. Simplified47.6%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+22}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-90}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+145}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 48.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+47}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1800000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.6e+47)
   y
   (if (<= t 1800000000.0)
     (* x (- 1.0 (/ z a)))
     (if (<= t 1.5e+145) (/ x (/ t z)) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.6e+47) {
		tmp = y;
	} else if (t <= 1800000000.0) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 1.5e+145) {
		tmp = x / (t / z);
	} 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 <= (-2.6d+47)) then
        tmp = y
    else if (t <= 1800000000.0d0) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 1.5d+145) then
        tmp = x / (t / z)
    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 <= -2.6e+47) {
		tmp = y;
	} else if (t <= 1800000000.0) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 1.5e+145) {
		tmp = x / (t / z);
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.6e+47:
		tmp = y
	elif t <= 1800000000.0:
		tmp = x * (1.0 - (z / a))
	elif t <= 1.5e+145:
		tmp = x / (t / z)
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.6e+47)
		tmp = y;
	elseif (t <= 1800000000.0)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 1.5e+145)
		tmp = Float64(x / Float64(t / z));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.6e+47)
		tmp = y;
	elseif (t <= 1800000000.0)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 1.5e+145)
		tmp = x / (t / z);
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+47], y, If[LessEqual[t, 1800000000.0], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+145], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+47}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1800000000:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.60000000000000003e47 or 1.5000000000000001e145 < t

    1. Initial program 38.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/68.4%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 50.7%

      \[\leadsto \color{blue}{y} \]

    if -2.60000000000000003e47 < t < 1.8e9

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/86.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified86.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 63.9%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*67.5%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified67.5%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    8. Taylor expanded in x around inf 52.1%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg52.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg52.1%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    10. Simplified52.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]

    if 1.8e9 < t < 1.5000000000000001e145

    1. Initial program 63.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/75.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 48.3%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    6. Taylor expanded in a around 0 41.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.3%

        \[\leadsto \color{blue}{-\frac{z \cdot \left(y - x\right)}{t}} \]
      2. associate-*r/50.6%

        \[\leadsto -\color{blue}{z \cdot \frac{y - x}{t}} \]
      3. distribute-rgt-neg-in50.6%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{y - x}{t}\right)} \]
    8. Simplified50.6%

      \[\leadsto \color{blue}{z \cdot \left(-\frac{y - x}{t}\right)} \]
    9. Taylor expanded in y around 0 33.5%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-/l*43.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Simplified43.0%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+47}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1800000000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 51.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+33} \lor \neg \left(t \leq 5.8 \cdot 10^{+31}\right):\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -6.6e+33) (not (<= t 5.8e+31)))
   (* y (/ t (- t a)))
   (* x (- 1.0 (/ z a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -6.6e+33) || !(t <= 5.8e+31)) {
		tmp = y * (t / (t - a));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-6.6d+33)) .or. (.not. (t <= 5.8d+31))) then
        tmp = y * (t / (t - a))
    else
        tmp = x * (1.0d0 - (z / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -6.6e+33) || !(t <= 5.8e+31)) {
		tmp = y * (t / (t - a));
	} else {
		tmp = x * (1.0 - (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -6.6e+33) or not (t <= 5.8e+31):
		tmp = y * (t / (t - a))
	else:
		tmp = x * (1.0 - (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -6.6e+33) || !(t <= 5.8e+31))
		tmp = Float64(y * Float64(t / Float64(t - a)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -6.6e+33) || ~((t <= 5.8e+31)))
		tmp = y * (t / (t - a));
	else
		tmp = x * (1.0 - (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.6e+33], N[Not[LessEqual[t, 5.8e+31]], $MachinePrecision]], N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+33} \lor \neg \left(t \leq 5.8 \cdot 10^{+31}\right):\\
\;\;\;\;y \cdot \frac{t}{t - a}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.59999999999999953e33 or 5.8000000000000001e31 < t

    1. Initial program 43.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative43.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/69.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def70.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified70.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-udef69.7%

        \[\leadsto \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right) + x} \]
      2. associate-/r/72.5%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} + x \]
      3. div-inv72.5%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      4. clear-num72.5%

        \[\leadsto \left(y - x\right) \cdot \color{blue}{\frac{z - t}{a - t}} + x \]
    6. Applied egg-rr72.5%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t} + x} \]
    7. Taylor expanded in y around inf 60.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    8. Step-by-step derivation
      1. div-sub60.3%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    9. Simplified60.3%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    10. Taylor expanded in z around 0 50.1%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{t}{a - t}\right)} \]
    11. Step-by-step derivation
      1. neg-mul-150.1%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a - t}\right)} \]
      2. distribute-neg-frac50.1%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    12. Simplified50.1%

      \[\leadsto y \cdot \color{blue}{\frac{-t}{a - t}} \]
    13. Step-by-step derivation
      1. frac-2neg50.1%

        \[\leadsto y \cdot \color{blue}{\frac{-\left(-t\right)}{-\left(a - t\right)}} \]
      2. div-inv50.0%

        \[\leadsto y \cdot \color{blue}{\left(\left(-\left(-t\right)\right) \cdot \frac{1}{-\left(a - t\right)}\right)} \]
      3. remove-double-neg50.0%

        \[\leadsto y \cdot \left(\color{blue}{t} \cdot \frac{1}{-\left(a - t\right)}\right) \]
      4. sub-neg50.0%

        \[\leadsto y \cdot \left(t \cdot \frac{1}{-\color{blue}{\left(a + \left(-t\right)\right)}}\right) \]
      5. distribute-neg-in50.0%

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}\right) \]
      6. remove-double-neg50.0%

        \[\leadsto y \cdot \left(t \cdot \frac{1}{\left(-a\right) + \color{blue}{t}}\right) \]
    14. Applied egg-rr50.0%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \frac{1}{\left(-a\right) + t}\right)} \]
    15. Step-by-step derivation
      1. associate-*r/50.1%

        \[\leadsto y \cdot \color{blue}{\frac{t \cdot 1}{\left(-a\right) + t}} \]
      2. *-rgt-identity50.1%

        \[\leadsto y \cdot \frac{\color{blue}{t}}{\left(-a\right) + t} \]
      3. +-commutative50.1%

        \[\leadsto y \cdot \frac{t}{\color{blue}{t + \left(-a\right)}} \]
      4. unsub-neg50.1%

        \[\leadsto y \cdot \frac{t}{\color{blue}{t - a}} \]
    16. Simplified50.1%

      \[\leadsto y \cdot \color{blue}{\frac{t}{t - a}} \]

    if -6.59999999999999953e33 < t < 5.8000000000000001e31

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/86.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified86.8%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 64.4%

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*67.8%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a}{y - x}}} \]
    7. Simplified67.8%

      \[\leadsto \color{blue}{x + \frac{z}{\frac{a}{y - x}}} \]
    8. Taylor expanded in x around inf 52.7%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg52.7%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg52.7%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    10. Simplified52.7%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+33} \lor \neg \left(t \leq 5.8 \cdot 10^{+31}\right):\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 38.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1350000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1350000000000.0) x (if (<= a 4.3e+80) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1350000000000.0) {
		tmp = x;
	} else if (a <= 4.3e+80) {
		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 <= (-1350000000000.0d0)) then
        tmp = x
    else if (a <= 4.3d+80) 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 <= -1350000000000.0) {
		tmp = x;
	} else if (a <= 4.3e+80) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1350000000000.0:
		tmp = x
	elif a <= 4.3e+80:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1350000000000.0)
		tmp = x;
	elseif (a <= 4.3e+80)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1350000000000.0)
		tmp = x;
	elseif (a <= 4.3e+80)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1350000000000.0], x, If[LessEqual[a, 4.3e+80], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1350000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.35e12 or 4.30000000000000004e80 < a

    1. Initial program 70.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/90.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 47.8%

      \[\leadsto \color{blue}{x} \]

    if -1.35e12 < a < 4.30000000000000004e80

    1. Initial program 68.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/70.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified70.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 29.6%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1350000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 25.4% 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 69.4%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-*l/79.8%

      \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  3. Simplified79.8%

    \[\leadsto \color{blue}{x + \frac{y - x}{a - t} \cdot \left(z - t\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 25.1%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification25.1%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 86.7% 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 2024036 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))