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

Percentage Accurate: 68.5% → 91.3%
Time: 16.2s
Alternatives: 20
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 20 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.5% 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.3% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 39.6%

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

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

      \[\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))) < -1.00000000000000003e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.00000000000000009e305

    1. Initial program 98.3%

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.1× speedup?

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

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

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

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


\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))) < -1.00000000000000003e-306

    1. Initial program 79.9%

      \[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. Step-by-step derivation
      1. *-commutative85.7%

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

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 71.1%

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

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

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

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

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

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

Alternative 3: 90.7% accurate, 0.3× speedup?

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

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

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

    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*82.6%

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

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

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

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 38.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -2.35 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-65}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-242}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-280}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-181}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-51}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+60}:\\ \;\;\;\;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 -2.35e+79)
     x
     (if (<= a -1.3e-65)
       (* (- y z) (/ t a))
       (if (<= a -8e-242)
         t
         (if (<= a 1.8e-280)
           t_1
           (if (<= a 3.6e-181)
             (* x (/ y z))
             (if (<= a 4.4e-51) t (if (<= a 6.5e+60) 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 <= -2.35e+79) {
		tmp = x;
	} else if (a <= -1.3e-65) {
		tmp = (y - z) * (t / a);
	} else if (a <= -8e-242) {
		tmp = t;
	} else if (a <= 1.8e-280) {
		tmp = t_1;
	} else if (a <= 3.6e-181) {
		tmp = x * (y / z);
	} else if (a <= 4.4e-51) {
		tmp = t;
	} else if (a <= 6.5e+60) {
		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 <= (-2.35d+79)) then
        tmp = x
    else if (a <= (-1.3d-65)) then
        tmp = (y - z) * (t / a)
    else if (a <= (-8d-242)) then
        tmp = t
    else if (a <= 1.8d-280) then
        tmp = t_1
    else if (a <= 3.6d-181) then
        tmp = x * (y / z)
    else if (a <= 4.4d-51) then
        tmp = t
    else if (a <= 6.5d+60) 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 <= -2.35e+79) {
		tmp = x;
	} else if (a <= -1.3e-65) {
		tmp = (y - z) * (t / a);
	} else if (a <= -8e-242) {
		tmp = t;
	} else if (a <= 1.8e-280) {
		tmp = t_1;
	} else if (a <= 3.6e-181) {
		tmp = x * (y / z);
	} else if (a <= 4.4e-51) {
		tmp = t;
	} else if (a <= 6.5e+60) {
		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 <= -2.35e+79:
		tmp = x
	elif a <= -1.3e-65:
		tmp = (y - z) * (t / a)
	elif a <= -8e-242:
		tmp = t
	elif a <= 1.8e-280:
		tmp = t_1
	elif a <= 3.6e-181:
		tmp = x * (y / z)
	elif a <= 4.4e-51:
		tmp = t
	elif a <= 6.5e+60:
		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 <= -2.35e+79)
		tmp = x;
	elseif (a <= -1.3e-65)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= -8e-242)
		tmp = t;
	elseif (a <= 1.8e-280)
		tmp = t_1;
	elseif (a <= 3.6e-181)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 4.4e-51)
		tmp = t;
	elseif (a <= 6.5e+60)
		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 <= -2.35e+79)
		tmp = x;
	elseif (a <= -1.3e-65)
		tmp = (y - z) * (t / a);
	elseif (a <= -8e-242)
		tmp = t;
	elseif (a <= 1.8e-280)
		tmp = t_1;
	elseif (a <= 3.6e-181)
		tmp = x * (y / z);
	elseif (a <= 4.4e-51)
		tmp = t;
	elseif (a <= 6.5e+60)
		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, -2.35e+79], x, If[LessEqual[a, -1.3e-65], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8e-242], t, If[LessEqual[a, 1.8e-280], t$95$1, If[LessEqual[a, 3.6e-181], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-51], t, If[LessEqual[a, 6.5e+60], t$95$1, x]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -8 \cdot 10^{-242}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-51}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.35000000000000011e79 or 6.49999999999999931e60 < a

    1. Initial program 72.9%

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

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

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

    if -2.35000000000000011e79 < a < -1.30000000000000005e-65

    1. Initial program 81.1%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{t \cdot \left(y - z\right)}}} \]
      2. inv-pow42.3%

        \[\leadsto \color{blue}{{\left(\frac{a - z}{t \cdot \left(y - z\right)}\right)}^{-1}} \]
    7. Applied egg-rr42.3%

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

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

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

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

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

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

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

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

    if -1.30000000000000005e-65 < a < -8e-242 or 3.5999999999999999e-181 < a < 4.4e-51

    1. Initial program 57.2%

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

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

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

    if -8e-242 < a < 1.79999999999999997e-280 or 4.4e-51 < a < 6.49999999999999931e60

    1. Initial program 79.4%

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

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

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

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

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

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

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

    if 1.79999999999999997e-280 < a < 3.5999999999999999e-181

    1. Initial program 75.4%

      \[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 t around 0 40.1%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{y - z}{z}} \]
    10. Simplified35.6%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified50.2%

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

Alternative 5: 34.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -3.4 \cdot 10^{+118}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-57}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.34 \cdot 10^{-250}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-82}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))) (t_2 (* t (/ y (- a z)))))
   (if (<= y -3.4e+118)
     t_2
     (if (<= y -7.2e+45)
       t_1
       (if (<= y -1.7e-57)
         t_2
         (if (<= y 1.34e-250)
           x
           (if (<= y 1.45e-82) t (if (<= y 4.3e+85) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (y <= -3.4e+118) {
		tmp = t_2;
	} else if (y <= -7.2e+45) {
		tmp = t_1;
	} else if (y <= -1.7e-57) {
		tmp = t_2;
	} else if (y <= 1.34e-250) {
		tmp = x;
	} else if (y <= 1.45e-82) {
		tmp = t;
	} else if (y <= 4.3e+85) {
		tmp = 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) :: t_2
    real(8) :: tmp
    t_1 = x * (y / z)
    t_2 = t * (y / (a - z))
    if (y <= (-3.4d+118)) then
        tmp = t_2
    else if (y <= (-7.2d+45)) then
        tmp = t_1
    else if (y <= (-1.7d-57)) then
        tmp = t_2
    else if (y <= 1.34d-250) then
        tmp = x
    else if (y <= 1.45d-82) then
        tmp = t
    else if (y <= 4.3d+85) then
        tmp = x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (y <= -3.4e+118) {
		tmp = t_2;
	} else if (y <= -7.2e+45) {
		tmp = t_1;
	} else if (y <= -1.7e-57) {
		tmp = t_2;
	} else if (y <= 1.34e-250) {
		tmp = x;
	} else if (y <= 1.45e-82) {
		tmp = t;
	} else if (y <= 4.3e+85) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	t_2 = t * (y / (a - z))
	tmp = 0
	if y <= -3.4e+118:
		tmp = t_2
	elif y <= -7.2e+45:
		tmp = t_1
	elif y <= -1.7e-57:
		tmp = t_2
	elif y <= 1.34e-250:
		tmp = x
	elif y <= 1.45e-82:
		tmp = t
	elif y <= 4.3e+85:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	t_2 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -3.4e+118)
		tmp = t_2;
	elseif (y <= -7.2e+45)
		tmp = t_1;
	elseif (y <= -1.7e-57)
		tmp = t_2;
	elseif (y <= 1.34e-250)
		tmp = x;
	elseif (y <= 1.45e-82)
		tmp = t;
	elseif (y <= 4.3e+85)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	t_2 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -3.4e+118)
		tmp = t_2;
	elseif (y <= -7.2e+45)
		tmp = t_1;
	elseif (y <= -1.7e-57)
		tmp = t_2;
	elseif (y <= 1.34e-250)
		tmp = x;
	elseif (y <= 1.45e-82)
		tmp = t;
	elseif (y <= 4.3e+85)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+118], t$95$2, If[LessEqual[y, -7.2e+45], t$95$1, If[LessEqual[y, -1.7e-57], t$95$2, If[LessEqual[y, 1.34e-250], x, If[LessEqual[y, 1.45e-82], t, If[LessEqual[y, 4.3e+85], x, t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-57}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.34 \cdot 10^{-250}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-82}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 4.3 \cdot 10^{+85}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.39999999999999986e118 or -7.2e45 < y < -1.70000000000000008e-57

    1. Initial program 82.8%

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

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

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

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

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

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

    if -3.39999999999999986e118 < y < -7.2e45 or 4.2999999999999999e85 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified47.0%

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

    if -1.70000000000000008e-57 < y < 1.33999999999999995e-250 or 1.44999999999999989e-82 < y < 4.2999999999999999e85

    1. Initial program 70.9%

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

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

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

    if 1.33999999999999995e-250 < y < 1.44999999999999989e-82

    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*63.8%

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

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

Alternative 6: 66.5% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.99999999999999996e109 or 1.84999999999999989e45 < z

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999996e109 < z < -1.7e-4

    1. Initial program 67.2%

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

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

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

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

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

    if -1.7e-4 < z < -3.8e-86

    1. Initial program 81.9%

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

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

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

    if -3.8e-86 < z < -7.5000000000000003e-95

    1. Initial program 100.0%

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

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

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

    if -7.5000000000000003e-95 < z < 1.84999999999999989e45

    1. Initial program 90.4%

      \[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. Step-by-step derivation
      1. *-commutative88.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+109}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq -0.00017:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-95}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 45.1% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.7999999999999999e110 or 4.60000000000000021e109 < z

    1. Initial program 40.2%

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

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

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

    if -5.7999999999999999e110 < z < -0.031

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.031 < z < -2.40000000000000026e-66

    1. Initial program 80.0%

      \[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 x around 0 58.9%

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

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

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

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

    if -2.40000000000000026e-66 < z < 4.60000000000000021e109

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+110}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -0.031:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+109}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 45.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -0.0022:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.19999999999999994e109 or 5.99999999999999937e104 < z

    1. Initial program 40.2%

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

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

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

    if -1.19999999999999994e109 < z < -0.00220000000000000013

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{y - z}{z}} \]
    10. Simplified28.1%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified48.4%

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

    if -0.00220000000000000013 < z < -3.5999999999999998e-65

    1. Initial program 80.0%

      \[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 x around 0 58.9%

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

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

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

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

    if -3.5999999999999998e-65 < z < 5.99999999999999937e104

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -0.0022:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-65}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+104}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 36.3% accurate, 0.5× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.05000000000000003e76 or 1.27999999999999994e-42 < a

    1. Initial program 74.9%

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

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

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

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

    if -1.05000000000000003e76 < a < -1.4499999999999999e-65

    1. Initial program 81.1%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a - z}{t \cdot \left(y - z\right)}}} \]
      2. inv-pow42.3%

        \[\leadsto \color{blue}{{\left(\frac{a - z}{t \cdot \left(y - z\right)}\right)}^{-1}} \]
    7. Applied egg-rr42.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e-65 < a < -1.70000000000000004e-69 or 1.61999999999999996e-180 < a < 1.27999999999999994e-42

    1. Initial program 56.4%

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

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

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

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

    if -1.70000000000000004e-69 < a < 1.61999999999999996e-180

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{y - z}{z}} \]
    10. Simplified24.7%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified37.4%

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

Alternative 10: 66.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.80000000000000013e109 or 1.19999999999999995e45 < z

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000013e109 < z < -2.2499999999999999e-4

    1. Initial program 67.2%

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

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

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

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

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

    if -2.2499999999999999e-4 < z < 1.19999999999999995e45

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+109}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -0.0004:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \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 -5.6e+109)
     t_1
     (if (<= z -0.0004)
       (* y (/ (- t x) (- a z)))
       (if (<= z 1.2e+45) (+ x (/ (- t x) (/ a y))) 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 <= -5.6e+109) {
		tmp = t_1;
	} else if (z <= -0.0004) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.2e+45) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-5.6d+109)) then
        tmp = t_1
    else if (z <= (-0.0004d0)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.2d+45) then
        tmp = x + ((t - x) / (a / y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -5.6e+109) {
		tmp = t_1;
	} else if (z <= -0.0004) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.2e+45) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -5.6e+109:
		tmp = t_1
	elif z <= -0.0004:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.2e+45:
		tmp = x + ((t - x) / (a / y))
	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 <= -5.6e+109)
		tmp = t_1;
	elseif (z <= -0.0004)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.2e+45)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	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 <= -5.6e+109)
		tmp = t_1;
	elseif (z <= -0.0004)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.2e+45)
		tmp = x + ((t - x) / (a / y));
	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, -5.6e+109], t$95$1, If[LessEqual[z, -0.0004], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+45], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6000000000000004e109 or 1.19999999999999995e45 < z

    1. Initial program 43.5%

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

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

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

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

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

    if -5.6000000000000004e109 < z < -4.00000000000000019e-4

    1. Initial program 67.2%

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

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

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

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

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

    if -4.00000000000000019e-4 < z < 1.19999999999999995e45

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 65.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-5}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 10^{+45}:\\ \;\;\;\;x + y \cdot \frac{t - x}{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 -3.6e+110)
     t_1
     (if (<= z -1.32e-5)
       (* y (/ (- t x) (- a z)))
       (if (<= z 1e+45) (+ 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 <= -3.6e+110) {
		tmp = t_1;
	} else if (z <= -1.32e-5) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1e+45) {
		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 <= (-3.6d+110)) then
        tmp = t_1
    else if (z <= (-1.32d-5)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1d+45) 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 <= -3.6e+110) {
		tmp = t_1;
	} else if (z <= -1.32e-5) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1e+45) {
		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 <= -3.6e+110:
		tmp = t_1
	elif z <= -1.32e-5:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1e+45:
		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 <= -3.6e+110)
		tmp = t_1;
	elseif (z <= -1.32e-5)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1e+45)
		tmp = Float64(x + Float64(y * Float64(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 <= -3.6e+110)
		tmp = t_1;
	elseif (z <= -1.32e-5)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1e+45)
		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, -3.6e+110], t$95$1, If[LessEqual[z, -1.32e-5], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+45], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5999999999999997e110 or 9.9999999999999993e44 < z

    1. Initial program 43.5%

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

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

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

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

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

    if -3.5999999999999997e110 < z < -1.32000000000000007e-5

    1. Initial program 67.2%

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

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

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

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

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

    if -1.32000000000000007e-5 < z < 9.9999999999999993e44

    1. Initial program 89.4%

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

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

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

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

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

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

Alternative 13: 83.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1000000000000001e-126 or 3.5e-52 < a

    1. Initial program 76.3%

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

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

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

    if -3.1000000000000001e-126 < a < 3.5e-52

    1. Initial program 63.0%

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

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

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

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

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

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

        \[\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-sub83.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-neg83.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--83.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/83.5%

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

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

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

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

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

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

Alternative 14: 69.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-66} \lor \neg \left(a \leq 9.5 \cdot 10^{-49}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.15000000000000007e-66 or 9.50000000000000006e-49 < a

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

    if -2.15000000000000007e-66 < a < 9.50000000000000006e-49

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 58.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+32} \lor \neg \left(t \leq 8.5 \cdot 10^{-150}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9000000000000002e32 or 8.4999999999999997e-150 < t

    1. Initial program 68.4%

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

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

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

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

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

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

    if -1.9000000000000002e32 < t < 8.4999999999999997e-150

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

Alternative 16: 57.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5499999999999999e39 or 6.99999999999999947e-110 < t

    1. Initial program 70.4%

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

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

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

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

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

    if -2.5499999999999999e39 < t < 6.99999999999999947e-110

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 36.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -75000:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -75000 or 2.69999999999999999e-42 < a

    1. Initial program 74.5%

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

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

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

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

    if -75000 < a < 8.49999999999999932e-179

    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*71.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{y - z}{z}} \]
    10. Simplified23.6%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified33.7%

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

    if 8.49999999999999932e-179 < a < 2.69999999999999999e-42

    1. Initial program 55.1%

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

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

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

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

Alternative 18: 37.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-43}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.79999999999999991e-16 or 6.00000000000000007e-43 < a

    1. Initial program 75.4%

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

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

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

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

    if -1.79999999999999991e-16 < a < 6.00000000000000007e-43

    1. Initial program 66.8%

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

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

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

Alternative 19: 25.3% 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 71.4%

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

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

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

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

Alternative 20: 2.8% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  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*78.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  12. Step-by-step derivation
    1. distribute-rgt1-in2.8%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-eval2.8%

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.8%

      \[\leadsto \color{blue}{0} \]
  13. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  14. Add Preprocessing

Developer target: 84.3% 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 2024087 
(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))))