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

Percentage Accurate: 68.4% → 91.2%
Time: 19.9s
Alternatives: 22
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 68.4% accurate, 1.0× speedup?

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

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

Alternative 1: 91.2% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 10^{+261}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 31.7%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.9%

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.2% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+261}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 33.2%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 91.3% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+261}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 33.2%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    6. Applied egg-rr88.8%

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 37.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -1.9 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-190}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-135}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 210:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= a -1.9e+18)
     x
     (if (<= a -1.12e-190)
       t
       (if (<= a 1.75e-210)
         (* x (/ y z))
         (if (<= a 5.3e-135)
           t
           (if (<= a 3.5e-42)
             t_1
             (if (<= a 210.0) t (if (<= a 8e+175) t_1 x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -1.9e+18) {
		tmp = x;
	} else if (a <= -1.12e-190) {
		tmp = t;
	} else if (a <= 1.75e-210) {
		tmp = x * (y / z);
	} else if (a <= 5.3e-135) {
		tmp = t;
	} else if (a <= 3.5e-42) {
		tmp = t_1;
	} else if (a <= 210.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (a <= (-1.9d+18)) then
        tmp = x
    else if (a <= (-1.12d-190)) then
        tmp = t
    else if (a <= 1.75d-210) then
        tmp = x * (y / z)
    else if (a <= 5.3d-135) then
        tmp = t
    else if (a <= 3.5d-42) then
        tmp = t_1
    else if (a <= 210.0d0) then
        tmp = t
    else if (a <= 8d+175) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -1.9e+18) {
		tmp = x;
	} else if (a <= -1.12e-190) {
		tmp = t;
	} else if (a <= 1.75e-210) {
		tmp = x * (y / z);
	} else if (a <= 5.3e-135) {
		tmp = t;
	} else if (a <= 3.5e-42) {
		tmp = t_1;
	} else if (a <= 210.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if a <= -1.9e+18:
		tmp = x
	elif a <= -1.12e-190:
		tmp = t
	elif a <= 1.75e-210:
		tmp = x * (y / z)
	elif a <= 5.3e-135:
		tmp = t
	elif a <= 3.5e-42:
		tmp = t_1
	elif a <= 210.0:
		tmp = t
	elif a <= 8e+175:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.9e+18)
		tmp = x;
	elseif (a <= -1.12e-190)
		tmp = t;
	elseif (a <= 1.75e-210)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 5.3e-135)
		tmp = t;
	elseif (a <= 3.5e-42)
		tmp = t_1;
	elseif (a <= 210.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -1.9e+18)
		tmp = x;
	elseif (a <= -1.12e-190)
		tmp = t;
	elseif (a <= 1.75e-210)
		tmp = x * (y / z);
	elseif (a <= 5.3e-135)
		tmp = t;
	elseif (a <= 3.5e-42)
		tmp = t_1;
	elseif (a <= 210.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.9e+18], x, If[LessEqual[a, -1.12e-190], t, If[LessEqual[a, 1.75e-210], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.3e-135], t, If[LessEqual[a, 3.5e-42], t$95$1, If[LessEqual[a, 210.0], t, If[LessEqual[a, 8e+175], t$95$1, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-190}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 5.3 \cdot 10^{-135}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 210:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.9e18 or 7.9999999999999995e175 < a

    1. Initial program 73.9%

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

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

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

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

    if -1.9e18 < a < -1.12000000000000005e-190 or 1.75000000000000008e-210 < a < 5.3e-135 or 3.5000000000000002e-42 < a < 210

    1. Initial program 52.8%

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

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

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

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

    if -1.12000000000000005e-190 < a < 1.75000000000000008e-210

    1. Initial program 59.1%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac261.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified54.5%

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

    if 5.3e-135 < a < 3.5000000000000002e-42 or 210 < a < 7.9999999999999995e175

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-190}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-135}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 210:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 37.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-137}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 65000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+177}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= a -2.8e+23)
     x
     (if (<= a -1.6e-183)
       t
       (if (<= a 8.6e-209)
         (* x (/ y z))
         (if (<= a 7.5e-137)
           t
           (if (<= a 1.75e-42)
             t_1
             (if (<= a 65000000.0)
               t
               (if (<= a 8.2e+177) t_1 (* x (+ (/ z a) 1.0)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -2.8e+23) {
		tmp = x;
	} else if (a <= -1.6e-183) {
		tmp = t;
	} else if (a <= 8.6e-209) {
		tmp = x * (y / z);
	} else if (a <= 7.5e-137) {
		tmp = t;
	} else if (a <= 1.75e-42) {
		tmp = t_1;
	} else if (a <= 65000000.0) {
		tmp = t;
	} else if (a <= 8.2e+177) {
		tmp = t_1;
	} else {
		tmp = x * ((z / a) + 1.0);
	}
	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 = t * (y / (a - z))
    if (a <= (-2.8d+23)) then
        tmp = x
    else if (a <= (-1.6d-183)) then
        tmp = t
    else if (a <= 8.6d-209) then
        tmp = x * (y / z)
    else if (a <= 7.5d-137) then
        tmp = t
    else if (a <= 1.75d-42) then
        tmp = t_1
    else if (a <= 65000000.0d0) then
        tmp = t
    else if (a <= 8.2d+177) then
        tmp = t_1
    else
        tmp = x * ((z / a) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -2.8e+23) {
		tmp = x;
	} else if (a <= -1.6e-183) {
		tmp = t;
	} else if (a <= 8.6e-209) {
		tmp = x * (y / z);
	} else if (a <= 7.5e-137) {
		tmp = t;
	} else if (a <= 1.75e-42) {
		tmp = t_1;
	} else if (a <= 65000000.0) {
		tmp = t;
	} else if (a <= 8.2e+177) {
		tmp = t_1;
	} else {
		tmp = x * ((z / a) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if a <= -2.8e+23:
		tmp = x
	elif a <= -1.6e-183:
		tmp = t
	elif a <= 8.6e-209:
		tmp = x * (y / z)
	elif a <= 7.5e-137:
		tmp = t
	elif a <= 1.75e-42:
		tmp = t_1
	elif a <= 65000000.0:
		tmp = t
	elif a <= 8.2e+177:
		tmp = t_1
	else:
		tmp = x * ((z / a) + 1.0)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.8e+23)
		tmp = x;
	elseif (a <= -1.6e-183)
		tmp = t;
	elseif (a <= 8.6e-209)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 7.5e-137)
		tmp = t;
	elseif (a <= 1.75e-42)
		tmp = t_1;
	elseif (a <= 65000000.0)
		tmp = t;
	elseif (a <= 8.2e+177)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(z / a) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -2.8e+23)
		tmp = x;
	elseif (a <= -1.6e-183)
		tmp = t;
	elseif (a <= 8.6e-209)
		tmp = x * (y / z);
	elseif (a <= 7.5e-137)
		tmp = t;
	elseif (a <= 1.75e-42)
		tmp = t_1;
	elseif (a <= 65000000.0)
		tmp = t;
	elseif (a <= 8.2e+177)
		tmp = t_1;
	else
		tmp = x * ((z / a) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.8e+23], x, If[LessEqual[a, -1.6e-183], t, If[LessEqual[a, 8.6e-209], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-137], t, If[LessEqual[a, 1.75e-42], t$95$1, If[LessEqual[a, 65000000.0], t, If[LessEqual[a, 8.2e+177], t$95$1, N[(x * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-183}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-137}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 65000000:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.8e23

    1. Initial program 75.0%

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

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

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

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

    if -2.8e23 < a < -1.6000000000000001e-183 or 8.60000000000000011e-209 < a < 7.4999999999999995e-137 or 1.7500000000000001e-42 < a < 6.5e7

    1. Initial program 52.8%

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

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

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

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

    if -1.6000000000000001e-183 < a < 8.60000000000000011e-209

    1. Initial program 59.1%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac261.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified54.5%

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

    if 7.4999999999999995e-137 < a < 1.7500000000000001e-42 or 6.5e7 < a < 8.20000000000000029e177

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

    if 8.20000000000000029e177 < a

    1. Initial program 71.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{x}{a - z}}, x\right) \]
      2. distribute-neg-frac278.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{z - a}} \]
    10. Simplified73.8%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{z - a}} \]
    11. Taylor expanded in z around 0 59.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-137}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 65000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+177}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 36.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -2.6 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-183}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-132}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.65 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2100000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= a -2.6e+18)
     x
     (if (<= a -6.2e-183)
       t
       (if (<= a 1.7e-210)
         t_1
         (if (<= a 1.35e-132)
           t
           (if (<= a 2.65e-42)
             t_1
             (if (<= a 2100000000000.0)
               t
               (if (<= a 9e+175) (* t (/ y a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -2.6e+18) {
		tmp = x;
	} else if (a <= -6.2e-183) {
		tmp = t;
	} else if (a <= 1.7e-210) {
		tmp = t_1;
	} else if (a <= 1.35e-132) {
		tmp = t;
	} else if (a <= 2.65e-42) {
		tmp = t_1;
	} else if (a <= 2100000000000.0) {
		tmp = t;
	} else if (a <= 9e+175) {
		tmp = t * (y / a);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (y / z)
    if (a <= (-2.6d+18)) then
        tmp = x
    else if (a <= (-6.2d-183)) then
        tmp = t
    else if (a <= 1.7d-210) then
        tmp = t_1
    else if (a <= 1.35d-132) then
        tmp = t
    else if (a <= 2.65d-42) then
        tmp = t_1
    else if (a <= 2100000000000.0d0) then
        tmp = t
    else if (a <= 9d+175) then
        tmp = t * (y / a)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -2.6e+18) {
		tmp = x;
	} else if (a <= -6.2e-183) {
		tmp = t;
	} else if (a <= 1.7e-210) {
		tmp = t_1;
	} else if (a <= 1.35e-132) {
		tmp = t;
	} else if (a <= 2.65e-42) {
		tmp = t_1;
	} else if (a <= 2100000000000.0) {
		tmp = t;
	} else if (a <= 9e+175) {
		tmp = t * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if a <= -2.6e+18:
		tmp = x
	elif a <= -6.2e-183:
		tmp = t
	elif a <= 1.7e-210:
		tmp = t_1
	elif a <= 1.35e-132:
		tmp = t
	elif a <= 2.65e-42:
		tmp = t_1
	elif a <= 2100000000000.0:
		tmp = t
	elif a <= 9e+175:
		tmp = t * (y / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -2.6e+18)
		tmp = x;
	elseif (a <= -6.2e-183)
		tmp = t;
	elseif (a <= 1.7e-210)
		tmp = t_1;
	elseif (a <= 1.35e-132)
		tmp = t;
	elseif (a <= 2.65e-42)
		tmp = t_1;
	elseif (a <= 2100000000000.0)
		tmp = t;
	elseif (a <= 9e+175)
		tmp = Float64(t * Float64(y / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (a <= -2.6e+18)
		tmp = x;
	elseif (a <= -6.2e-183)
		tmp = t;
	elseif (a <= 1.7e-210)
		tmp = t_1;
	elseif (a <= 1.35e-132)
		tmp = t;
	elseif (a <= 2.65e-42)
		tmp = t_1;
	elseif (a <= 2100000000000.0)
		tmp = t;
	elseif (a <= 9e+175)
		tmp = t * (y / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+18], x, If[LessEqual[a, -6.2e-183], t, If[LessEqual[a, 1.7e-210], t$95$1, If[LessEqual[a, 1.35e-132], t, If[LessEqual[a, 2.65e-42], t$95$1, If[LessEqual[a, 2100000000000.0], t, If[LessEqual[a, 9e+175], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.65 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2100000000000:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.6e18 or 8.99999999999999979e175 < a

    1. Initial program 73.9%

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

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

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

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

    if -2.6e18 < a < -6.19999999999999999e-183 or 1.69999999999999987e-210 < a < 1.34999999999999995e-132 or 2.65e-42 < a < 2.1e12

    1. Initial program 53.5%

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

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

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

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

    if -6.19999999999999999e-183 < a < 1.69999999999999987e-210 or 1.34999999999999995e-132 < a < 2.65e-42

    1. Initial program 62.5%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac253.4%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified49.1%

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

    if 2.1e12 < a < 8.99999999999999979e175

    1. Initial program 78.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified33.4%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-183}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-132}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.65 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2100000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 40.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x - t}{z}\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-118}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- x t) z))))
   (if (<= a -1.7e+22)
     x
     (if (<= a -5.9e-182)
       t
       (if (<= a 2.5e-212)
         t_1
         (if (<= a 5.5e-118)
           t
           (if (<= a 1.55e-12)
             t_1
             (if (<= a 8e+175)
               (* t (/ y (- a z)))
               (* x (+ (/ z a) 1.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double tmp;
	if (a <= -1.7e+22) {
		tmp = x;
	} else if (a <= -5.9e-182) {
		tmp = t;
	} else if (a <= 2.5e-212) {
		tmp = t_1;
	} else if (a <= 5.5e-118) {
		tmp = t;
	} else if (a <= 1.55e-12) {
		tmp = t_1;
	} else if (a <= 8e+175) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x * ((z / a) + 1.0);
	}
	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 * ((x - t) / z)
    if (a <= (-1.7d+22)) then
        tmp = x
    else if (a <= (-5.9d-182)) then
        tmp = t
    else if (a <= 2.5d-212) then
        tmp = t_1
    else if (a <= 5.5d-118) then
        tmp = t
    else if (a <= 1.55d-12) then
        tmp = t_1
    else if (a <= 8d+175) then
        tmp = t * (y / (a - z))
    else
        tmp = x * ((z / a) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double tmp;
	if (a <= -1.7e+22) {
		tmp = x;
	} else if (a <= -5.9e-182) {
		tmp = t;
	} else if (a <= 2.5e-212) {
		tmp = t_1;
	} else if (a <= 5.5e-118) {
		tmp = t;
	} else if (a <= 1.55e-12) {
		tmp = t_1;
	} else if (a <= 8e+175) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x * ((z / a) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((x - t) / z)
	tmp = 0
	if a <= -1.7e+22:
		tmp = x
	elif a <= -5.9e-182:
		tmp = t
	elif a <= 2.5e-212:
		tmp = t_1
	elif a <= 5.5e-118:
		tmp = t
	elif a <= 1.55e-12:
		tmp = t_1
	elif a <= 8e+175:
		tmp = t * (y / (a - z))
	else:
		tmp = x * ((z / a) + 1.0)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(x - t) / z))
	tmp = 0.0
	if (a <= -1.7e+22)
		tmp = x;
	elseif (a <= -5.9e-182)
		tmp = t;
	elseif (a <= 2.5e-212)
		tmp = t_1;
	elseif (a <= 5.5e-118)
		tmp = t;
	elseif (a <= 1.55e-12)
		tmp = t_1;
	elseif (a <= 8e+175)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = Float64(x * Float64(Float64(z / a) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((x - t) / z);
	tmp = 0.0;
	if (a <= -1.7e+22)
		tmp = x;
	elseif (a <= -5.9e-182)
		tmp = t;
	elseif (a <= 2.5e-212)
		tmp = t_1;
	elseif (a <= 5.5e-118)
		tmp = t;
	elseif (a <= 1.55e-12)
		tmp = t_1;
	elseif (a <= 8e+175)
		tmp = t * (y / (a - z));
	else
		tmp = x * ((z / a) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+22], x, If[LessEqual[a, -5.9e-182], t, If[LessEqual[a, 2.5e-212], t$95$1, If[LessEqual[a, 5.5e-118], t, If[LessEqual[a, 1.55e-12], t$95$1, If[LessEqual[a, 8e+175], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-118}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.7e22

    1. Initial program 75.0%

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

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

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

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

    if -1.7e22 < a < -5.89999999999999968e-182 or 2.50000000000000022e-212 < a < 5.5000000000000003e-118

    1. Initial program 58.5%

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

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

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

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

    if -5.89999999999999968e-182 < a < 2.50000000000000022e-212 or 5.5000000000000003e-118 < a < 1.5500000000000001e-12

    1. Initial program 56.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr62.4%

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac254.1%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    12. Simplified52.7%

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

    if 1.5500000000000001e-12 < a < 7.9999999999999995e175

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

    if 7.9999999999999995e175 < a

    1. Initial program 71.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{x}{a - z}}, x\right) \]
      2. distribute-neg-frac278.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{z}{z - a}} \]
    10. Simplified73.8%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{z - a}} \]
    11. Taylor expanded in z around 0 59.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-118}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := x - x \cdot \frac{y}{a}\\ t_3 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+99}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -3.85 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-43}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+68}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z))))
        (t_2 (- x (* x (/ y a))))
        (t_3 (* t (/ (- y z) (- a z)))))
   (if (<= x -2.8e+99)
     t_2
     (if (<= x -3.85e-50)
       t_1
       (if (<= x 5.8e-43)
         t_3
         (if (<= x 8.2e+55) t_1 (if (<= x 8e+68) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = x - (x * (y / a));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -2.8e+99) {
		tmp = t_2;
	} else if (x <= -3.85e-50) {
		tmp = t_1;
	} else if (x <= 5.8e-43) {
		tmp = t_3;
	} else if (x <= 8.2e+55) {
		tmp = t_1;
	} else if (x <= 8e+68) {
		tmp = t_3;
	} 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 * ((t - x) / (a - z))
    t_2 = x - (x * (y / a))
    t_3 = t * ((y - z) / (a - z))
    if (x <= (-2.8d+99)) then
        tmp = t_2
    else if (x <= (-3.85d-50)) then
        tmp = t_1
    else if (x <= 5.8d-43) then
        tmp = t_3
    else if (x <= 8.2d+55) then
        tmp = t_1
    else if (x <= 8d+68) then
        tmp = t_3
    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 - x) / (a - z));
	double t_2 = x - (x * (y / a));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -2.8e+99) {
		tmp = t_2;
	} else if (x <= -3.85e-50) {
		tmp = t_1;
	} else if (x <= 5.8e-43) {
		tmp = t_3;
	} else if (x <= 8.2e+55) {
		tmp = t_1;
	} else if (x <= 8e+68) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	t_2 = x - (x * (y / a))
	t_3 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -2.8e+99:
		tmp = t_2
	elif x <= -3.85e-50:
		tmp = t_1
	elif x <= 5.8e-43:
		tmp = t_3
	elif x <= 8.2e+55:
		tmp = t_1
	elif x <= 8e+68:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(x - Float64(x * Float64(y / a)))
	t_3 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -2.8e+99)
		tmp = t_2;
	elseif (x <= -3.85e-50)
		tmp = t_1;
	elseif (x <= 5.8e-43)
		tmp = t_3;
	elseif (x <= 8.2e+55)
		tmp = t_1;
	elseif (x <= 8e+68)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	t_2 = x - (x * (y / a));
	t_3 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -2.8e+99)
		tmp = t_2;
	elseif (x <= -3.85e-50)
		tmp = t_1;
	elseif (x <= 5.8e-43)
		tmp = t_3;
	elseif (x <= 8.2e+55)
		tmp = t_1;
	elseif (x <= 8e+68)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+99], t$95$2, If[LessEqual[x, -3.85e-50], t$95$1, If[LessEqual[x, 5.8e-43], t$95$3, If[LessEqual[x, 8.2e+55], t$95$1, If[LessEqual[x, 8e+68], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.85 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{-43}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 8 \cdot 10^{+68}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.8e99 or 7.99999999999999962e68 < x

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

    if -2.8e99 < x < -3.84999999999999982e-50 or 5.8000000000000003e-43 < x < 8.19999999999999962e55

    1. Initial program 71.4%

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

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

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

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

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

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

    if -3.84999999999999982e-50 < x < 5.8000000000000003e-43 or 8.19999999999999962e55 < x < 7.99999999999999962e68

    1. Initial program 78.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+99}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -3.85 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+55}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;x \leq -1.32 \cdot 10^{-55} \lor \neg \left(x \leq 7.5 \cdot 10^{-49}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.75e67 or -4.79999999999999982e-34 < x < -1.31999999999999993e-55 or 7.4999999999999998e-49 < x

    1. Initial program 55.8%

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

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

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

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

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

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

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

    if -1.75e67 < x < -4.79999999999999982e-34

    1. Initial program 70.5%

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

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

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

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

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

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

    if -1.31999999999999993e-55 < x < 7.4999999999999998e-49

    1. Initial program 80.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \left(1 + \frac{y - z}{z - a}\right)\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-55} \lor \neg \left(x \leq 7.5 \cdot 10^{-49}\right):\\ \;\;\;\;x \cdot \left(1 + \frac{y - z}{z - a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+67} \lor \neg \left(x \leq -7.1 \cdot 10^{-34}\right) \land \left(x \leq -1.32 \cdot 10^{-55} \lor \neg \left(x \leq 2 \cdot 10^{+19}\right)\right):\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.50000000000000038e67 or -7.10000000000000036e-34 < x < -1.31999999999999993e-55 or 2e19 < x

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{a}} \]
    8. Simplified55.4%

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

    if -8.50000000000000038e67 < x < -7.10000000000000036e-34 or -1.31999999999999993e-55 < x < 2e19

    1. Initial program 76.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+67} \lor \neg \left(x \leq -7.1 \cdot 10^{-34}\right) \land \left(x \leq -1.32 \cdot 10^{-55} \lor \neg \left(x \leq 2 \cdot 10^{+19}\right)\right):\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 64.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.7e16 or 4e10 < a

    1. Initial program 75.6%

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

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

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

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

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

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

    if -4.7e16 < a < -9.4999999999999996e-192 or -2.0000000000000001e-222 < a < 4e10

    1. Initial program 58.7%

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

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

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

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

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

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

    if -9.4999999999999996e-192 < a < -2.0000000000000001e-222

    1. Initial program 36.9%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac256.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+16}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-192}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-222}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 40000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 63.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-14}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.2000000000000007e87 or 1.1500000000000001e22 < z

    1. Initial program 37.1%

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

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

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

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

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

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

    if -9.2000000000000007e87 < z < -1.35e9

    1. Initial program 62.9%

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

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

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

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

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

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

    if -1.35e9 < z < -5.49999999999999991e-14

    1. Initial program 35.2%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac2100.0%

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

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

    if -5.49999999999999991e-14 < z < 1.1500000000000001e22

    1. Initial program 92.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+87}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1350000000:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-14}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 82.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.20000000000000049e-121 or 5.49999999999999964e-16 < a

    1. Initial program 72.4%

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

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

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

    if -9.20000000000000049e-121 < a < 5.49999999999999964e-16

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 68.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+83} \lor \neg \left(z \leq 1.78 \cdot 10^{+44}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.29999999999999985e83 or 1.7799999999999999e44 < z

    1. Initial program 34.0%

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

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

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

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

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

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

    if -3.29999999999999985e83 < z < 1.7799999999999999e44

    1. Initial program 87.4%

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

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

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

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

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

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

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

Alternative 17: 73.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 76.9%

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

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

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

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

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

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

    if -8.60000000000000004e-23 < a < 8.5

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

Alternative 18: 55.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+90} \lor \neg \left(z \leq 3.9 \cdot 10^{+44}\right):\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8000000000000002e90 or 3.9000000000000003e44 < z

    1. Initial program 33.8%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac250.0%

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

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

    if -4.8000000000000002e90 < z < 3.9000000000000003e44

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

Alternative 19: 56.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+84} \lor \neg \left(z \leq 1.45 \cdot 10^{+45}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.80000000000000032e84 or 1.4499999999999999e45 < z

    1. Initial program 34.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr56.4%

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac240.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.80000000000000032e84 < z < 1.4499999999999999e45

    1. Initial program 87.4%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified60.0%

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

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

Alternative 20: 53.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+90}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.99999999999999987e90 or 4.5999999999999997e74 < z

    1. Initial program 31.3%

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

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

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

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

    if -3.99999999999999987e90 < z < 4.5999999999999997e74

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

Alternative 21: 39.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3800000000000:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.35e24 or 3.8e12 < a

    1. Initial program 75.2%

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

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

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

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

    if -2.35e24 < a < 3.8e12

    1. Initial program 57.9%

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.35 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3800000000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 24.7% accurate, 13.0× speedup?

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

\\
t
\end{array}
Derivation
  1. Initial program 66.5%

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification23.7%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

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