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

Percentage Accurate: 67.7% → 91.6%
Time: 25.8s
Alternatives: 24
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 24 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: 67.7% accurate, 1.0× speedup?

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

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

Alternative 1: 91.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.45 \cdot 10^{+181}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right), \frac{y}{\frac{a - t}{z - t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - a, \frac{x}{t}, y\right) + \frac{y}{t} \cdot \left(a - z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t 1.45e+181)
   (fma
    (- x)
    (+ (/ z (- a t)) (- -1.0 (/ t (- a t))))
    (/ y (/ (- a t) (- z t))))
   (+ (fma (- z a) (/ x t) y) (* (/ y t) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 1.45e+181) {
		tmp = fma(-x, ((z / (a - t)) + (-1.0 - (t / (a - t)))), (y / ((a - t) / (z - t))));
	} else {
		tmp = fma((z - a), (x / t), y) + ((y / t) * (a - z));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= 1.45e+181)
		tmp = fma(Float64(-x), Float64(Float64(z / Float64(a - t)) + Float64(-1.0 - Float64(t / Float64(a - t)))), Float64(y / Float64(Float64(a - t) / Float64(z - t))));
	else
		tmp = Float64(fma(Float64(z - a), Float64(x / t), y) + Float64(Float64(y / t) * Float64(a - z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.45e+181], N[((-x) * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision] + y), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.45 \cdot 10^{+181}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right), \frac{y}{\frac{a - t}{z - t}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.45e181

    1. Initial program 71.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified80.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-udef80.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45e181 < t

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.3% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+167} \lor \neg \left(t \leq 5.8 \cdot 10^{+141}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.50000000000000006e167 or 5.80000000000000013e141 < t

    1. Initial program 20.3%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified49.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 63.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+63.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/63.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/63.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-sub63.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--63.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/63.8%

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

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

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

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

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

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

    if -1.50000000000000006e167 < t < 5.80000000000000013e141

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

Alternative 3: 89.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+165}:\\ \;\;\;\;\mathsf{fma}\left(z - a, \frac{x}{t}, y\right) + \frac{y}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+142}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.3e+165)
   (+ (fma (- z a) (/ x t) y) (* (/ y t) (- a z)))
   (if (<= t 7.2e+142)
     (fma (/ (- z t) (- a t)) (- y x) x)
     (+ y (/ (- x y) (/ t (- z a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.3e+165) {
		tmp = fma((z - a), (x / t), y) + ((y / t) * (a - z));
	} else if (t <= 7.2e+142) {
		tmp = fma(((z - t) / (a - t)), (y - x), x);
	} else {
		tmp = y + ((x - y) / (t / (z - a)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.3e+165)
		tmp = Float64(fma(Float64(z - a), Float64(x / t), y) + Float64(Float64(y / t) * Float64(a - z)));
	elseif (t <= 7.2e+142)
		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
	else
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.3e+165], N[(N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision] + y), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+142], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $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}\;t \leq -3.3 \cdot 10^{+165}:\\
\;\;\;\;\mathsf{fma}\left(z - a, \frac{x}{t}, y\right) + \frac{y}{t} \cdot \left(a - z\right)\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+142}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\

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


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

    1. Initial program 18.2%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified61.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 52.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+52.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/52.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/52.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-sub52.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--52.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/52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999999e165 < t < 7.2000000000000003e142

    1. Initial program 79.5%

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

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

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

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

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

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

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

    if 7.2000000000000003e142 < t

    1. Initial program 21.6%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified42.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 70.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+70.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/70.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/70.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-sub70.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--70.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/70.8%

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

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

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

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

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

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

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

Alternative 4: 88.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-234}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t_2\\

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


\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 -9.9999999999999996e-235 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0

    1. Initial program 17.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.9999999999999996e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000012e290

    1. Initial program 97.0%

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

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

    1. Initial program 40.1%

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

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

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

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

Alternative 5: 88.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 24.0%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified71.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 50.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+50.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/50.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/50.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-sub50.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--50.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/50.6%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.9999999999999996e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000012e290

    1. Initial program 97.0%

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

    1. Initial program 40.1%

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

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

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

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

Alternative 6: 63.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x - \frac{y}{a} \cdot \left(t - z\right)\\ t_3 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;a \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \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 (- x (* (/ y a) (- t z))))
        (t_3 (* z (/ (- y x) (- a t)))))
   (if (<= a -1.15e+92)
     t_2
     (if (<= a -4e-112)
       t_1
       (if (<= a -4.1e-202)
         t_3
         (if (<= a 1.35e+31)
           t_1
           (if (<= a 6.2e+83) t_3 (if (<= a 6.4e+83) y 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 = x - ((y / a) * (t - z));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -1.15e+92) {
		tmp = t_2;
	} else if (a <= -4e-112) {
		tmp = t_1;
	} else if (a <= -4.1e-202) {
		tmp = t_3;
	} else if (a <= 1.35e+31) {
		tmp = t_1;
	} else if (a <= 6.2e+83) {
		tmp = t_3;
	} else if (a <= 6.4e+83) {
		tmp = y;
	} 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 = x - ((y / a) * (t - z))
    t_3 = z * ((y - x) / (a - t))
    if (a <= (-1.15d+92)) then
        tmp = t_2
    else if (a <= (-4d-112)) then
        tmp = t_1
    else if (a <= (-4.1d-202)) then
        tmp = t_3
    else if (a <= 1.35d+31) then
        tmp = t_1
    else if (a <= 6.2d+83) then
        tmp = t_3
    else if (a <= 6.4d+83) then
        tmp = y
    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 = x - ((y / a) * (t - z));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -1.15e+92) {
		tmp = t_2;
	} else if (a <= -4e-112) {
		tmp = t_1;
	} else if (a <= -4.1e-202) {
		tmp = t_3;
	} else if (a <= 1.35e+31) {
		tmp = t_1;
	} else if (a <= 6.2e+83) {
		tmp = t_3;
	} else if (a <= 6.4e+83) {
		tmp = y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x - ((y / a) * (t - z))
	t_3 = z * ((y - x) / (a - t))
	tmp = 0
	if a <= -1.15e+92:
		tmp = t_2
	elif a <= -4e-112:
		tmp = t_1
	elif a <= -4.1e-202:
		tmp = t_3
	elif a <= 1.35e+31:
		tmp = t_1
	elif a <= 6.2e+83:
		tmp = t_3
	elif a <= 6.4e+83:
		tmp = y
	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(x - Float64(Float64(y / a) * Float64(t - z)))
	t_3 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (a <= -1.15e+92)
		tmp = t_2;
	elseif (a <= -4e-112)
		tmp = t_1;
	elseif (a <= -4.1e-202)
		tmp = t_3;
	elseif (a <= 1.35e+31)
		tmp = t_1;
	elseif (a <= 6.2e+83)
		tmp = t_3;
	elseif (a <= 6.4e+83)
		tmp = y;
	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 = x - ((y / a) * (t - z));
	t_3 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (a <= -1.15e+92)
		tmp = t_2;
	elseif (a <= -4e-112)
		tmp = t_1;
	elseif (a <= -4.1e-202)
		tmp = t_3;
	elseif (a <= 1.35e+31)
		tmp = t_1;
	elseif (a <= 6.2e+83)
		tmp = t_3;
	elseif (a <= 6.4e+83)
		tmp = y;
	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[(x - N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e+92], t$95$2, If[LessEqual[a, -4e-112], t$95$1, If[LessEqual[a, -4.1e-202], t$95$3, If[LessEqual[a, 1.35e+31], t$95$1, If[LessEqual[a, 6.2e+83], t$95$3, If[LessEqual[a, 6.4e+83], y, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-202}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.14999999999999999e92 or 6.3999999999999998e83 < a

    1. Initial program 70.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.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 67.6%

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

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

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

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

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

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

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

    if -1.14999999999999999e92 < a < -3.9999999999999998e-112 or -4.1000000000000004e-202 < a < 1.34999999999999993e31

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999998e-112 < a < -4.1000000000000004e-202 or 1.34999999999999993e31 < a < 6.19999999999999984e83

    1. Initial program 62.9%

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

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

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

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

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

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

    if 6.19999999999999984e83 < a < 6.3999999999999998e83

    1. Initial program 9.9%

      \[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 inf 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-112}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-202}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{\frac{t}{x - y}}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -5 \cdot 10^{-57}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-110}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-219}:\\ \;\;\;\;\frac{-x}{\frac{a - t}{z}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+27}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ z (/ t (- x y)))) (t_2 (+ x (/ y (/ a z)))))
   (if (<= a -5e-57)
     t_2
     (if (<= a -7e-110)
       y
       (if (<= a -2.05e-144)
         t_1
         (if (<= a -1.1e-219)
           (/ (- x) (/ (- a t) z))
           (if (<= a 1.8e-119) t_1 (if (<= a 9.5e+27) y t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z / (t / (x - y));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (a <= -5e-57) {
		tmp = t_2;
	} else if (a <= -7e-110) {
		tmp = y;
	} else if (a <= -2.05e-144) {
		tmp = t_1;
	} else if (a <= -1.1e-219) {
		tmp = -x / ((a - t) / z);
	} else if (a <= 1.8e-119) {
		tmp = t_1;
	} else if (a <= 9.5e+27) {
		tmp = y;
	} 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 = z / (t / (x - y))
    t_2 = x + (y / (a / z))
    if (a <= (-5d-57)) then
        tmp = t_2
    else if (a <= (-7d-110)) then
        tmp = y
    else if (a <= (-2.05d-144)) then
        tmp = t_1
    else if (a <= (-1.1d-219)) then
        tmp = -x / ((a - t) / z)
    else if (a <= 1.8d-119) then
        tmp = t_1
    else if (a <= 9.5d+27) then
        tmp = y
    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 = z / (t / (x - y));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (a <= -5e-57) {
		tmp = t_2;
	} else if (a <= -7e-110) {
		tmp = y;
	} else if (a <= -2.05e-144) {
		tmp = t_1;
	} else if (a <= -1.1e-219) {
		tmp = -x / ((a - t) / z);
	} else if (a <= 1.8e-119) {
		tmp = t_1;
	} else if (a <= 9.5e+27) {
		tmp = y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z / (t / (x - y))
	t_2 = x + (y / (a / z))
	tmp = 0
	if a <= -5e-57:
		tmp = t_2
	elif a <= -7e-110:
		tmp = y
	elif a <= -2.05e-144:
		tmp = t_1
	elif a <= -1.1e-219:
		tmp = -x / ((a - t) / z)
	elif a <= 1.8e-119:
		tmp = t_1
	elif a <= 9.5e+27:
		tmp = y
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z / Float64(t / Float64(x - y)))
	t_2 = Float64(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -5e-57)
		tmp = t_2;
	elseif (a <= -7e-110)
		tmp = y;
	elseif (a <= -2.05e-144)
		tmp = t_1;
	elseif (a <= -1.1e-219)
		tmp = Float64(Float64(-x) / Float64(Float64(a - t) / z));
	elseif (a <= 1.8e-119)
		tmp = t_1;
	elseif (a <= 9.5e+27)
		tmp = y;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z / (t / (x - y));
	t_2 = x + (y / (a / z));
	tmp = 0.0;
	if (a <= -5e-57)
		tmp = t_2;
	elseif (a <= -7e-110)
		tmp = y;
	elseif (a <= -2.05e-144)
		tmp = t_1;
	elseif (a <= -1.1e-219)
		tmp = -x / ((a - t) / z);
	elseif (a <= 1.8e-119)
		tmp = t_1;
	elseif (a <= 9.5e+27)
		tmp = y;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5e-57], t$95$2, If[LessEqual[a, -7e-110], y, If[LessEqual[a, -2.05e-144], t$95$1, If[LessEqual[a, -1.1e-219], N[((-x) / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-119], t$95$1, If[LessEqual[a, 9.5e+27], y, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-110}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+27}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.0000000000000002e-57 or 9.4999999999999997e27 < a

    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/82.7%

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

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

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

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

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

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

    if -5.0000000000000002e-57 < a < -6.99999999999999947e-110 or 1.8e-119 < a < 9.4999999999999997e27

    1. Initial program 53.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified72.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 54.8%

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

    if -6.99999999999999947e-110 < a < -2.05e-144 or -1.1e-219 < a < 1.8e-119

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    13. Simplified54.2%

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

    if -2.05e-144 < a < -1.1e-219

    1. Initial program 53.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-57}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-110}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-144}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-219}:\\ \;\;\;\;\frac{-x}{\frac{a - t}{z}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+27}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ t_3 := z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-200}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \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 (+ x (/ y (/ a z))))
        (t_3 (* z (/ (- y x) (- a t)))))
   (if (<= a -3.5e+100)
     t_2
     (if (<= a -3.7e-112)
       t_1
       (if (<= a -2.4e-200)
         t_3
         (if (<= a 4.8e+31)
           t_1
           (if (<= a 6.2e+83) t_3 (if (<= a 6.4e+83) y 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 = x + (y / (a / z));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -3.5e+100) {
		tmp = t_2;
	} else if (a <= -3.7e-112) {
		tmp = t_1;
	} else if (a <= -2.4e-200) {
		tmp = t_3;
	} else if (a <= 4.8e+31) {
		tmp = t_1;
	} else if (a <= 6.2e+83) {
		tmp = t_3;
	} else if (a <= 6.4e+83) {
		tmp = y;
	} 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 = x + (y / (a / z))
    t_3 = z * ((y - x) / (a - t))
    if (a <= (-3.5d+100)) then
        tmp = t_2
    else if (a <= (-3.7d-112)) then
        tmp = t_1
    else if (a <= (-2.4d-200)) then
        tmp = t_3
    else if (a <= 4.8d+31) then
        tmp = t_1
    else if (a <= 6.2d+83) then
        tmp = t_3
    else if (a <= 6.4d+83) then
        tmp = y
    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 = x + (y / (a / z));
	double t_3 = z * ((y - x) / (a - t));
	double tmp;
	if (a <= -3.5e+100) {
		tmp = t_2;
	} else if (a <= -3.7e-112) {
		tmp = t_1;
	} else if (a <= -2.4e-200) {
		tmp = t_3;
	} else if (a <= 4.8e+31) {
		tmp = t_1;
	} else if (a <= 6.2e+83) {
		tmp = t_3;
	} else if (a <= 6.4e+83) {
		tmp = y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	t_2 = x + (y / (a / z))
	t_3 = z * ((y - x) / (a - t))
	tmp = 0
	if a <= -3.5e+100:
		tmp = t_2
	elif a <= -3.7e-112:
		tmp = t_1
	elif a <= -2.4e-200:
		tmp = t_3
	elif a <= 4.8e+31:
		tmp = t_1
	elif a <= 6.2e+83:
		tmp = t_3
	elif a <= 6.4e+83:
		tmp = y
	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(x + Float64(y / Float64(a / z)))
	t_3 = Float64(z * Float64(Float64(y - x) / Float64(a - t)))
	tmp = 0.0
	if (a <= -3.5e+100)
		tmp = t_2;
	elseif (a <= -3.7e-112)
		tmp = t_1;
	elseif (a <= -2.4e-200)
		tmp = t_3;
	elseif (a <= 4.8e+31)
		tmp = t_1;
	elseif (a <= 6.2e+83)
		tmp = t_3;
	elseif (a <= 6.4e+83)
		tmp = y;
	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 = x + (y / (a / z));
	t_3 = z * ((y - x) / (a - t));
	tmp = 0.0;
	if (a <= -3.5e+100)
		tmp = t_2;
	elseif (a <= -3.7e-112)
		tmp = t_1;
	elseif (a <= -2.4e-200)
		tmp = t_3;
	elseif (a <= 4.8e+31)
		tmp = t_1;
	elseif (a <= 6.2e+83)
		tmp = t_3;
	elseif (a <= 6.4e+83)
		tmp = y;
	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[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+100], t$95$2, If[LessEqual[a, -3.7e-112], t$95$1, If[LessEqual[a, -2.4e-200], t$95$3, If[LessEqual[a, 4.8e+31], t$95$1, If[LessEqual[a, 6.2e+83], t$95$3, If[LessEqual[a, 6.4e+83], y, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.7 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-200}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.49999999999999976e100 or 6.3999999999999998e83 < a

    1. Initial program 70.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/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 69.4%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified76.0%

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

    if -3.49999999999999976e100 < a < -3.6999999999999998e-112 or -2.40000000000000002e-200 < a < 4.79999999999999965e31

    1. Initial program 60.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified67.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-udef67.3%

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

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

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

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

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

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

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

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

    if -3.6999999999999998e-112 < a < -2.40000000000000002e-200 or 4.79999999999999965e31 < a < 6.19999999999999984e83

    1. Initial program 62.9%

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

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

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

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

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

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

    if 6.19999999999999984e83 < a < 6.3999999999999998e83

    1. Initial program 9.9%

      \[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 inf 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-112}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-200}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 37.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+31}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-108}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.15e+92)
   x
   (if (<= a -4e+31)
     y
     (if (<= a -1.45e+18)
       x
       (if (<= a -8.6e-72)
         (* x (/ (- z a) t))
         (if (<= a -1.7e-108)
           y
           (if (<= a -2.05e-201) (/ x (/ t z)) (if (<= a 6.5e+83) y x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.15e+92) {
		tmp = x;
	} else if (a <= -4e+31) {
		tmp = y;
	} else if (a <= -1.45e+18) {
		tmp = x;
	} else if (a <= -8.6e-72) {
		tmp = x * ((z - a) / t);
	} else if (a <= -1.7e-108) {
		tmp = y;
	} else if (a <= -2.05e-201) {
		tmp = x / (t / z);
	} else if (a <= 6.5e+83) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.15d+92)) then
        tmp = x
    else if (a <= (-4d+31)) then
        tmp = y
    else if (a <= (-1.45d+18)) then
        tmp = x
    else if (a <= (-8.6d-72)) then
        tmp = x * ((z - a) / t)
    else if (a <= (-1.7d-108)) then
        tmp = y
    else if (a <= (-2.05d-201)) then
        tmp = x / (t / z)
    else if (a <= 6.5d+83) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.15e+92) {
		tmp = x;
	} else if (a <= -4e+31) {
		tmp = y;
	} else if (a <= -1.45e+18) {
		tmp = x;
	} else if (a <= -8.6e-72) {
		tmp = x * ((z - a) / t);
	} else if (a <= -1.7e-108) {
		tmp = y;
	} else if (a <= -2.05e-201) {
		tmp = x / (t / z);
	} else if (a <= 6.5e+83) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.15e+92:
		tmp = x
	elif a <= -4e+31:
		tmp = y
	elif a <= -1.45e+18:
		tmp = x
	elif a <= -8.6e-72:
		tmp = x * ((z - a) / t)
	elif a <= -1.7e-108:
		tmp = y
	elif a <= -2.05e-201:
		tmp = x / (t / z)
	elif a <= 6.5e+83:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.15e+92)
		tmp = x;
	elseif (a <= -4e+31)
		tmp = y;
	elseif (a <= -1.45e+18)
		tmp = x;
	elseif (a <= -8.6e-72)
		tmp = Float64(x * Float64(Float64(z - a) / t));
	elseif (a <= -1.7e-108)
		tmp = y;
	elseif (a <= -2.05e-201)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 6.5e+83)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.15e+92)
		tmp = x;
	elseif (a <= -4e+31)
		tmp = y;
	elseif (a <= -1.45e+18)
		tmp = x;
	elseif (a <= -8.6e-72)
		tmp = x * ((z - a) / t);
	elseif (a <= -1.7e-108)
		tmp = y;
	elseif (a <= -2.05e-201)
		tmp = x / (t / z);
	elseif (a <= 6.5e+83)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+92], x, If[LessEqual[a, -4e+31], y, If[LessEqual[a, -1.45e+18], x, If[LessEqual[a, -8.6e-72], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.7e-108], y, If[LessEqual[a, -2.05e-201], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+83], y, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4 \cdot 10^{+31}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq -1.45 \cdot 10^{+18}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq -1.7 \cdot 10^{-108}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.14999999999999999e92 or -3.9999999999999999e31 < a < -1.45e18 or 6.5000000000000003e83 < a

    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/89.1%

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

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

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

    if -1.14999999999999999e92 < a < -3.9999999999999999e31 or -8.5999999999999998e-72 < a < -1.70000000000000001e-108 or -2.05000000000000001e-201 < a < 6.5000000000000003e83

    1. Initial program 63.0%

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

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

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

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

    if -1.45e18 < a < -8.5999999999999998e-72

    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/56.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified56.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 52.1%

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

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

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

        \[\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-sub52.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--52.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/52.0%

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

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

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

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

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

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

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

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

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

    if -1.70000000000000001e-108 < a < -2.05000000000000001e-201

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+31}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-108}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.1% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+225}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.2200000000000001e237 or 3.7100000000000001e90 < t < 1.95000000000000012e225 or 2.7999999999999999e272 < t

    1. Initial program 25.9%

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

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

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

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

    if -1.2200000000000001e237 < t < -6.9999999999999995e58

    1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    13. Simplified51.5%

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

    if -6.9999999999999995e58 < t < 3.7100000000000001e90

    1. Initial program 85.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified85.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 62.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified59.0%

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

    if 1.95000000000000012e225 < t < 2.7999999999999999e272

    1. Initial program 11.0%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified37.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 55.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+55.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/55.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/55.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-sub55.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.22 \cdot 10^{+237}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -7 \cdot 10^{+58}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;t \leq 3.71 \cdot 10^{+90}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+225}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+272}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.7% accurate, 0.4× 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}\;a \leq -5.2 \cdot 10^{+99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{-203}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;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 (+ x (/ y (/ a z)))))
   (if (<= a -5.2e+99)
     t_2
     (if (<= a -3.2e-112)
       t_1
       (if (<= a -8.4e-203)
         (/ z (/ t (- x y)))
         (if (<= a 6.8e+65) 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 = x + (y / (a / z));
	double tmp;
	if (a <= -5.2e+99) {
		tmp = t_2;
	} else if (a <= -3.2e-112) {
		tmp = t_1;
	} else if (a <= -8.4e-203) {
		tmp = z / (t / (x - y));
	} else if (a <= 6.8e+65) {
		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 * ((z - t) / (a - t))
    t_2 = x + (y / (a / z))
    if (a <= (-5.2d+99)) then
        tmp = t_2
    else if (a <= (-3.2d-112)) then
        tmp = t_1
    else if (a <= (-8.4d-203)) then
        tmp = z / (t / (x - y))
    else if (a <= 6.8d+65) 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 = x + (y / (a / z));
	double tmp;
	if (a <= -5.2e+99) {
		tmp = t_2;
	} else if (a <= -3.2e-112) {
		tmp = t_1;
	} else if (a <= -8.4e-203) {
		tmp = z / (t / (x - y));
	} else if (a <= 6.8e+65) {
		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 = x + (y / (a / z))
	tmp = 0
	if a <= -5.2e+99:
		tmp = t_2
	elif a <= -3.2e-112:
		tmp = t_1
	elif a <= -8.4e-203:
		tmp = z / (t / (x - y))
	elif a <= 6.8e+65:
		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(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -5.2e+99)
		tmp = t_2;
	elseif (a <= -3.2e-112)
		tmp = t_1;
	elseif (a <= -8.4e-203)
		tmp = Float64(z / Float64(t / Float64(x - y)));
	elseif (a <= 6.8e+65)
		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 = x + (y / (a / z));
	tmp = 0.0;
	if (a <= -5.2e+99)
		tmp = t_2;
	elseif (a <= -3.2e-112)
		tmp = t_1;
	elseif (a <= -8.4e-203)
		tmp = z / (t / (x - y));
	elseif (a <= 6.8e+65)
		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[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e+99], t$95$2, If[LessEqual[a, -3.2e-112], t$95$1, If[LessEqual[a, -8.4e-203], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e+65], t$95$1, t$95$2]]]]]]
\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}\;a \leq -5.2 \cdot 10^{+99}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+65}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1999999999999999e99 or 6.7999999999999999e65 < a

    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/90.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.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 69.7%

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

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

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

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

    if -5.1999999999999999e99 < a < -3.19999999999999993e-112 or -8.40000000000000008e-203 < a < 6.7999999999999999e65

    1. Initial program 61.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified67.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-udef67.3%

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

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

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

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

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

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

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

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

    if -3.19999999999999993e-112 < a < -8.40000000000000008e-203

    1. Initial program 55.6%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified47.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 69.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+69.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/69.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/69.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-sub69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+99}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-112}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{-203}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a \leq -3.2 \cdot 10^{+92}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-199}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- z t) (- a t)))))
   (if (<= a -3.2e+92)
     (- x (* (/ y a) (- t z)))
     (if (<= a -5.2e-108)
       t_1
       (if (<= a -1.1e-199)
         (* z (/ (- y x) (- a t)))
         (if (<= a 4.9e+44) t_1 (+ x (/ z (/ a (- y x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (a <= -3.2e+92) {
		tmp = x - ((y / a) * (t - z));
	} else if (a <= -5.2e-108) {
		tmp = t_1;
	} else if (a <= -1.1e-199) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 4.9e+44) {
		tmp = t_1;
	} else {
		tmp = x + (z / (a / (y - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    if (a <= (-3.2d+92)) then
        tmp = x - ((y / a) * (t - z))
    else if (a <= (-5.2d-108)) then
        tmp = t_1
    else if (a <= (-1.1d-199)) then
        tmp = z * ((y - x) / (a - t))
    else if (a <= 4.9d+44) then
        tmp = t_1
    else
        tmp = x + (z / (a / (y - x)))
    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 tmp;
	if (a <= -3.2e+92) {
		tmp = x - ((y / a) * (t - z));
	} else if (a <= -5.2e-108) {
		tmp = t_1;
	} else if (a <= -1.1e-199) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 4.9e+44) {
		tmp = t_1;
	} else {
		tmp = x + (z / (a / (y - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if a <= -3.2e+92:
		tmp = x - ((y / a) * (t - z))
	elif a <= -5.2e-108:
		tmp = t_1
	elif a <= -1.1e-199:
		tmp = z * ((y - x) / (a - t))
	elif a <= 4.9e+44:
		tmp = t_1
	else:
		tmp = x + (z / (a / (y - x)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (a <= -3.2e+92)
		tmp = Float64(x - Float64(Float64(y / a) * Float64(t - z)));
	elseif (a <= -5.2e-108)
		tmp = t_1;
	elseif (a <= -1.1e-199)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 4.9e+44)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(z / Float64(a / Float64(y - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (a <= -3.2e+92)
		tmp = x - ((y / a) * (t - z));
	elseif (a <= -5.2e-108)
		tmp = t_1;
	elseif (a <= -1.1e-199)
		tmp = z * ((y - x) / (a - t));
	elseif (a <= 4.9e+44)
		tmp = t_1;
	else
		tmp = x + (z / (a / (y - x)));
	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]}, If[LessEqual[a, -3.2e+92], N[(x - N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.2e-108], t$95$1, If[LessEqual[a, -1.1e-199], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e+44], t$95$1, N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-108}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4.9 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000025e92 < a < -5.19999999999999968e-108 or -1.0999999999999999e-199 < a < 4.90000000000000035e44

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.19999999999999968e-108 < a < -1.0999999999999999e-199

    1. Initial program 55.6%

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

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

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

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

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

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

    if 4.90000000000000035e44 < a

    1. Initial program 67.4%

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

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

      \[\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*83.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+92}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-199}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 54.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-y}{\frac{t}{z - t}}\\ t_2 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -9 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-199}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y) (/ t (- z t)))) (t_2 (+ x (/ y (/ a z)))))
   (if (<= a -9e+50)
     t_2
     (if (<= a -6.4e-112)
       t_1
       (if (<= a -2.6e-199) (/ z (/ t (- x y))) (if (<= a 9e+30) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -y / (t / (z - t));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (a <= -9e+50) {
		tmp = t_2;
	} else if (a <= -6.4e-112) {
		tmp = t_1;
	} else if (a <= -2.6e-199) {
		tmp = z / (t / (x - y));
	} else if (a <= 9e+30) {
		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 / (t / (z - t))
    t_2 = x + (y / (a / z))
    if (a <= (-9d+50)) then
        tmp = t_2
    else if (a <= (-6.4d-112)) then
        tmp = t_1
    else if (a <= (-2.6d-199)) then
        tmp = z / (t / (x - y))
    else if (a <= 9d+30) 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 / (t / (z - t));
	double t_2 = x + (y / (a / z));
	double tmp;
	if (a <= -9e+50) {
		tmp = t_2;
	} else if (a <= -6.4e-112) {
		tmp = t_1;
	} else if (a <= -2.6e-199) {
		tmp = z / (t / (x - y));
	} else if (a <= 9e+30) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -y / (t / (z - t))
	t_2 = x + (y / (a / z))
	tmp = 0
	if a <= -9e+50:
		tmp = t_2
	elif a <= -6.4e-112:
		tmp = t_1
	elif a <= -2.6e-199:
		tmp = z / (t / (x - y))
	elif a <= 9e+30:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-y) / Float64(t / Float64(z - t)))
	t_2 = Float64(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -9e+50)
		tmp = t_2;
	elseif (a <= -6.4e-112)
		tmp = t_1;
	elseif (a <= -2.6e-199)
		tmp = Float64(z / Float64(t / Float64(x - y)));
	elseif (a <= 9e+30)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -y / (t / (z - t));
	t_2 = x + (y / (a / z));
	tmp = 0.0;
	if (a <= -9e+50)
		tmp = t_2;
	elseif (a <= -6.4e-112)
		tmp = t_1;
	elseif (a <= -2.6e-199)
		tmp = z / (t / (x - y));
	elseif (a <= 9e+30)
		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[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+50], t$95$2, If[LessEqual[a, -6.4e-112], t$95$1, If[LessEqual[a, -2.6e-199], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+30], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.00000000000000027e50 or 8.9999999999999999e30 < a

    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/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.6%

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

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

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

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

    if -9.00000000000000027e50 < a < -6.39999999999999986e-112 or -2.6000000000000001e-199 < a < 8.9999999999999999e30

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{t}{z - t}}} \]
      3. distribute-neg-frac63.1%

        \[\leadsto \color{blue}{\frac{-y}{\frac{t}{z - t}}} \]
    12. Simplified63.1%

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

    if -6.39999999999999986e-112 < a < -2.6000000000000001e-199

    1. Initial program 55.6%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified47.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 69.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+69.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/69.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/69.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-sub69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+50}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-112}:\\ \;\;\;\;\frac{-y}{\frac{t}{z - t}}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-199}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+30}:\\ \;\;\;\;\frac{-y}{\frac{t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 45.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{z}}\\ \mathbf{if}\;a \leq -2 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-111}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -3.05 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+28}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a z)))))
   (if (<= a -2e-57)
     t_1
     (if (<= a -1.9e-111)
       y
       (if (<= a -3.05e-201) (/ x (/ t z)) (if (<= a 1.35e+28) y t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / z));
	double tmp;
	if (a <= -2e-57) {
		tmp = t_1;
	} else if (a <= -1.9e-111) {
		tmp = y;
	} else if (a <= -3.05e-201) {
		tmp = x / (t / z);
	} else if (a <= 1.35e+28) {
		tmp = 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 = x + (y / (a / z))
    if (a <= (-2d-57)) then
        tmp = t_1
    else if (a <= (-1.9d-111)) then
        tmp = y
    else if (a <= (-3.05d-201)) then
        tmp = x / (t / z)
    else if (a <= 1.35d+28) then
        tmp = 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 = x + (y / (a / z));
	double tmp;
	if (a <= -2e-57) {
		tmp = t_1;
	} else if (a <= -1.9e-111) {
		tmp = y;
	} else if (a <= -3.05e-201) {
		tmp = x / (t / z);
	} else if (a <= 1.35e+28) {
		tmp = y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / z))
	tmp = 0
	if a <= -2e-57:
		tmp = t_1
	elif a <= -1.9e-111:
		tmp = y
	elif a <= -3.05e-201:
		tmp = x / (t / z)
	elif a <= 1.35e+28:
		tmp = y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / z)))
	tmp = 0.0
	if (a <= -2e-57)
		tmp = t_1;
	elseif (a <= -1.9e-111)
		tmp = y;
	elseif (a <= -3.05e-201)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 1.35e+28)
		tmp = y;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / z));
	tmp = 0.0;
	if (a <= -2e-57)
		tmp = t_1;
	elseif (a <= -1.9e-111)
		tmp = y;
	elseif (a <= -3.05e-201)
		tmp = x / (t / z);
	elseif (a <= 1.35e+28)
		tmp = y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e-57], t$95$1, If[LessEqual[a, -1.9e-111], y, If[LessEqual[a, -3.05e-201], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+28], y, t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-111}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+28}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.99999999999999991e-57 or 1.3500000000000001e28 < a

    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/82.7%

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

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

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

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

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

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

    if -1.99999999999999991e-57 < a < -1.90000000000000011e-111 or -3.05000000000000013e-201 < a < 1.3500000000000001e28

    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/68.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified68.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 45.2%

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

    if -1.90000000000000011e-111 < a < -3.05000000000000013e-201

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-57}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-111}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -3.05 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+28}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 50.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -7.6 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.50000000000000011e-57 or 6.3999999999999998e83 < a

    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/82.8%

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified82.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 61.3%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    8. Simplified66.2%

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

    if -5.50000000000000011e-57 < a < -7.5999999999999995e-105 or 5.9999999999999999e-171 < a < 6.3999999999999998e83

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

    if -7.5999999999999995e-105 < a < 5.9999999999999999e-171

    1. Initial program 66.3%

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

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

      \[\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.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+78.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/78.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/78.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-sub78.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--78.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/78.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{x - y}}} \]
    13. Simplified54.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-57}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-105}:\\ \;\;\;\;\frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-171}:\\ \;\;\;\;\frac{z}{\frac{t}{x - y}}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+83}:\\ \;\;\;\;\frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 73.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{x - y}{\frac{a}{z - t}}\\ \mathbf{if}\;a \leq -6.8 \cdot 10^{+99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-59}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+40}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (- x y) (/ a (- z t))))))
   (if (<= a -6.8e+99)
     t_1
     (if (<= a -4.6e-59)
       (* y (/ (- z t) (- a t)))
       (if (<= a 1.06e+40) (+ y (/ (- x y) (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((x - y) / (a / (z - t)));
	double tmp;
	if (a <= -6.8e+99) {
		tmp = t_1;
	} else if (a <= -4.6e-59) {
		tmp = y * ((z - t) / (a - t));
	} else if (a <= 1.06e+40) {
		tmp = y + ((x - y) / (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 = x - ((x - y) / (a / (z - t)))
    if (a <= (-6.8d+99)) then
        tmp = t_1
    else if (a <= (-4.6d-59)) then
        tmp = y * ((z - t) / (a - t))
    else if (a <= 1.06d+40) then
        tmp = y + ((x - y) / (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 = x - ((x - y) / (a / (z - t)));
	double tmp;
	if (a <= -6.8e+99) {
		tmp = t_1;
	} else if (a <= -4.6e-59) {
		tmp = y * ((z - t) / (a - t));
	} else if (a <= 1.06e+40) {
		tmp = y + ((x - y) / (t / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((x - y) / (a / (z - t)))
	tmp = 0
	if a <= -6.8e+99:
		tmp = t_1
	elif a <= -4.6e-59:
		tmp = y * ((z - t) / (a - t))
	elif a <= 1.06e+40:
		tmp = y + ((x - y) / (t / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(x - y) / Float64(a / Float64(z - t))))
	tmp = 0.0
	if (a <= -6.8e+99)
		tmp = t_1;
	elseif (a <= -4.6e-59)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (a <= 1.06e+40)
		tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((x - y) / (a / (z - t)));
	tmp = 0.0;
	if (a <= -6.8e+99)
		tmp = t_1;
	elseif (a <= -4.6e-59)
		tmp = y * ((z - t) / (a - t));
	elseif (a <= 1.06e+40)
		tmp = y + ((x - y) / (t / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.8e+99], t$95$1, If[LessEqual[a, -4.6e-59], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.06e+40], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.79999999999999968e99 or 1.05999999999999996e40 < a

    1. Initial program 72.3%

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

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

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

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

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

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

    if -6.79999999999999968e99 < a < -4.59999999999999959e-59

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.59999999999999959e-59 < a < 1.05999999999999996e40

    1. Initial program 62.1%

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

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

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

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

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

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

        \[\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*86.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+99}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z - t}}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-59}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+40}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - y}{\frac{a}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 70.7% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999998e92 < a < -1.50000000000000004e-58

    1. Initial program 48.6%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{a - t}, z - t, x\right)} \]
    3. Simplified63.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-udef62.2%

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

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

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

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

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

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

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

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

    if -1.50000000000000004e-58 < a < 8.59999999999999988e34

    1. Initial program 62.1%

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

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

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

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

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

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

        \[\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*86.9%

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

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

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

    if 8.59999999999999988e34 < a

    1. Initial program 67.4%

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

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

      \[\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*83.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+92}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+34}:\\ \;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 87.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+167} \lor \neg \left(t \leq 3.71 \cdot 10^{+90}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.2e167 or 3.7100000000000001e90 < t

    1. Initial program 23.6%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified52.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 64.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+64.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/64.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/64.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-sub64.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--64.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/64.6%

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

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

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

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

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

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

    if -8.2e167 < t < 3.7100000000000001e90

    1. Initial program 83.1%

      \[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
  3. Recombined 2 regimes into one program.
  4. Final simplification85.3%

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

Alternative 19: 89.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.55 \cdot 10^{+165} \lor \neg \left(t \leq 4 \cdot 10^{+142}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.54999999999999988e165 or 4.0000000000000002e142 < t

    1. Initial program 20.3%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified49.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 63.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+63.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/63.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/63.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-sub63.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--63.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/63.8%

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

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

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

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

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

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

    if -3.54999999999999988e165 < t < 4.0000000000000002e142

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 37.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{-111}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.8e92 or 1.44999999999999994e84 < a

    1. Initial program 70.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.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 60.0%

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

    if -3.8e92 < a < -8.99999999999999987e-111 or -1.26e-200 < a < 1.44999999999999994e84

    1. Initial program 61.8%

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

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

    if -8.99999999999999987e-111 < a < -1.26e-200

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/57.8%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot z} \]
    12. Applied egg-rr57.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-111}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.26 \cdot 10^{-200}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 37.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-109}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.6e+92)
   x
   (if (<= a -7e-109)
     y
     (if (<= a -7.8e-203) (/ x (/ t z)) (if (<= a 1.45e+84) y x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.6e+92) {
		tmp = x;
	} else if (a <= -7e-109) {
		tmp = y;
	} else if (a <= -7.8e-203) {
		tmp = x / (t / z);
	} else if (a <= 1.45e+84) {
		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 <= (-2.6d+92)) then
        tmp = x
    else if (a <= (-7d-109)) then
        tmp = y
    else if (a <= (-7.8d-203)) then
        tmp = x / (t / z)
    else if (a <= 1.45d+84) 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 <= -2.6e+92) {
		tmp = x;
	} else if (a <= -7e-109) {
		tmp = y;
	} else if (a <= -7.8e-203) {
		tmp = x / (t / z);
	} else if (a <= 1.45e+84) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.6e+92:
		tmp = x
	elif a <= -7e-109:
		tmp = y
	elif a <= -7.8e-203:
		tmp = x / (t / z)
	elif a <= 1.45e+84:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.6e+92)
		tmp = x;
	elseif (a <= -7e-109)
		tmp = y;
	elseif (a <= -7.8e-203)
		tmp = Float64(x / Float64(t / z));
	elseif (a <= 1.45e+84)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.6e+92)
		tmp = x;
	elseif (a <= -7e-109)
		tmp = y;
	elseif (a <= -7.8e-203)
		tmp = x / (t / z);
	elseif (a <= 1.45e+84)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e+92], x, If[LessEqual[a, -7e-109], y, If[LessEqual[a, -7.8e-203], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+84], y, x]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-109}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.5999999999999999e92 or 1.44999999999999994e84 < a

    1. Initial program 70.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.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 60.0%

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

    if -2.5999999999999999e92 < a < -7e-109 or -7.7999999999999998e-203 < a < 1.44999999999999994e84

    1. Initial program 61.8%

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

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

    if -7e-109 < a < -7.7999999999999998e-203

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{z}}} \]
    10. Simplified62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-109}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+84}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 75.4% accurate, 0.6× speedup?

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified90.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 70.0%

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

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

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

    if -4.8000000000000001e95 < a < 2.60000000000000021e43

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 23: 37.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.22 \cdot 10^{+85}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.9999999999999998e92 or 1.22e85 < a

    1. Initial program 70.4%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified89.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 60.0%

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

    if -8.9999999999999998e92 < a < 1.22e85

    1. Initial program 61.1%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified66.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 37.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{+85}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 24.2% 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 64.5%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification27.3%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 86.5% 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 2024021 
(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))))