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

Percentage Accurate: 68.6% → 89.1%
Time: 15.5s
Alternatives: 25
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 25 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.6% 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: 89.1% accurate, 0.2× speedup?

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

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

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

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

\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))) < -4.9999999999999997e303 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 63.3%

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

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

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

    if -4.9999999999999997e303 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.00000000000000006e-279

    1. Initial program 97.7%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub99.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-neg99.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--99.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/99.5%

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

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.0× speedup?

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

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

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


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

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

Alternative 3: 89.6% accurate, 0.2× 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^{-279} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \frac{x - t}{\frac{a - z}{z - y}}\\ \mathbf{else}:\\ \;\;\;\;t + t \cdot \left(\frac{x}{z} \cdot \frac{y - a}{t} + \frac{a - y}{z}\right)\\ \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-279) (not (<= t_1 0.0)))
     (+ x (/ (- x t) (/ (- a z) (- z y))))
     (+ t (* t (+ (* (/ x z) (/ (- y a) t)) (/ (- a y) 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-279) || !(t_1 <= 0.0)) {
		tmp = x + ((x - t) / ((a - z) / (z - y)));
	} else {
		tmp = t + (t * (((x / z) * ((y - a) / t)) + ((a - y) / z)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - z) * (t - x)) / (a - z))
    if ((t_1 <= (-1d-279)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((x - t) / ((a - z) / (z - y)))
    else
        tmp = t + (t * (((x / z) * ((y - a) / t)) + ((a - y) / z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -1e-279) || !(t_1 <= 0.0)) {
		tmp = x + ((x - t) / ((a - z) / (z - y)));
	} else {
		tmp = t + (t * (((x / z) * ((y - a) / t)) + ((a - y) / 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-279) or not (t_1 <= 0.0):
		tmp = x + ((x - t) / ((a - z) / (z - y)))
	else:
		tmp = t + (t * (((x / z) * ((y - a) / t)) + ((a - y) / 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-279) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(x - t) / Float64(Float64(a - z) / Float64(z - y))));
	else
		tmp = Float64(t + Float64(t * Float64(Float64(Float64(x / z) * Float64(Float64(y - a) / t)) + Float64(Float64(a - y) / 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-279) || ~((t_1 <= 0.0)))
		tmp = x + ((x - t) / ((a - z) / (z - y)));
	else
		tmp = t + (t * (((x / z) * ((y - a) / t)) + ((a - y) / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-279], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(t * N[(N[(N[(x / z), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $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^{-279} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{x - t}{\frac{a - z}{z - y}}\\

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


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

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub99.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-neg99.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--99.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/99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub99.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-neg99.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--99.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/99.5%

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

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

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

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

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

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

Alternative 5: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{+193}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4 \cdot 10^{+165}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+143} \lor \neg \left(x \leq 5.2 \cdot 10^{+189}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= x -4.2e+193)
     t_1
     (if (<= x -4e+165)
       (* y (/ (- x t) z))
       (if (<= x -8e+106)
         (- x (/ (* x y) a))
         (if (<= x 9e-26)
           (* t (/ (- z y) (- z a)))
           (if (or (<= x 1.95e+143) (not (<= x 5.2e+189)))
             t_1
             (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (x <= -4.2e+193) {
		tmp = t_1;
	} else if (x <= -4e+165) {
		tmp = y * ((x - t) / z);
	} else if (x <= -8e+106) {
		tmp = x - ((x * y) / a);
	} else if (x <= 9e-26) {
		tmp = t * ((z - y) / (z - a));
	} else if ((x <= 1.95e+143) || !(x <= 5.2e+189)) {
		tmp = t_1;
	} else {
		tmp = 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 * (1.0d0 - (y / a))
    if (x <= (-4.2d+193)) then
        tmp = t_1
    else if (x <= (-4d+165)) then
        tmp = y * ((x - t) / z)
    else if (x <= (-8d+106)) then
        tmp = x - ((x * y) / a)
    else if (x <= 9d-26) then
        tmp = t * ((z - y) / (z - a))
    else if ((x <= 1.95d+143) .or. (.not. (x <= 5.2d+189))) then
        tmp = t_1
    else
        tmp = 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 * (1.0 - (y / a));
	double tmp;
	if (x <= -4.2e+193) {
		tmp = t_1;
	} else if (x <= -4e+165) {
		tmp = y * ((x - t) / z);
	} else if (x <= -8e+106) {
		tmp = x - ((x * y) / a);
	} else if (x <= 9e-26) {
		tmp = t * ((z - y) / (z - a));
	} else if ((x <= 1.95e+143) || !(x <= 5.2e+189)) {
		tmp = t_1;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if x <= -4.2e+193:
		tmp = t_1
	elif x <= -4e+165:
		tmp = y * ((x - t) / z)
	elif x <= -8e+106:
		tmp = x - ((x * y) / a)
	elif x <= 9e-26:
		tmp = t * ((z - y) / (z - a))
	elif (x <= 1.95e+143) or not (x <= 5.2e+189):
		tmp = t_1
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (x <= -4.2e+193)
		tmp = t_1;
	elseif (x <= -4e+165)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (x <= -8e+106)
		tmp = Float64(x - Float64(Float64(x * y) / a));
	elseif (x <= 9e-26)
		tmp = Float64(t * Float64(Float64(z - y) / Float64(z - a)));
	elseif ((x <= 1.95e+143) || !(x <= 5.2e+189))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (x <= -4.2e+193)
		tmp = t_1;
	elseif (x <= -4e+165)
		tmp = y * ((x - t) / z);
	elseif (x <= -8e+106)
		tmp = x - ((x * y) / a);
	elseif (x <= 9e-26)
		tmp = t * ((z - y) / (z - a));
	elseif ((x <= 1.95e+143) || ~((x <= 5.2e+189)))
		tmp = t_1;
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.2e+193], t$95$1, If[LessEqual[x, -4e+165], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e+106], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e-26], N[(t * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.95e+143], N[Not[LessEqual[x, 5.2e+189]], $MachinePrecision]], t$95$1, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -8 \cdot 10^{+106}:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\

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

\mathbf{elif}\;x \leq 1.95 \cdot 10^{+143} \lor \neg \left(x \leq 5.2 \cdot 10^{+189}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.2e193 or 8.9999999999999998e-26 < x < 1.9499999999999999e143 or 5.19999999999999963e189 < x

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

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

    if -4.2e193 < x < -3.9999999999999996e165

    1. Initial program 47.3%

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub68.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-neg68.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--68.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/68.5%

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

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

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

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

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

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

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

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

    if -3.9999999999999996e165 < x < -8.00000000000000073e106

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-x \cdot y}}{a} \]
      3. *-commutative65.2%

        \[\leadsto x + \frac{-\color{blue}{y \cdot x}}{a} \]
    10. Simplified65.2%

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

    if -8.00000000000000073e106 < x < 8.9999999999999998e-26

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

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

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

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

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

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

    if 1.9499999999999999e143 < x < 5.19999999999999963e189

    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{+193}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -4 \cdot 10^{+165}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+143} \lor \neg \left(x \leq 5.2 \cdot 10^{+189}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{x - t}{\frac{a}{z - y}}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;a \leq -5 \cdot 10^{-49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-257}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-41}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- x t) (/ a (- z y))))) (t_2 (* y (/ (- t x) (- a z)))))
   (if (<= a -5e-49)
     t_1
     (if (<= a 1.1e-257)
       (+ t (/ (* y (- x t)) z))
       (if (<= a 1.05e-68)
         t_2
         (if (<= a 2e-41)
           (+ t (/ (* (- t x) a) z))
           (if (<= a 6.5e+107) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) / (a / (z - y)));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -5e-49) {
		tmp = t_1;
	} else if (a <= 1.1e-257) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.05e-68) {
		tmp = t_2;
	} else if (a <= 2e-41) {
		tmp = t + (((t - x) * a) / z);
	} else if (a <= 6.5e+107) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((x - t) / (a / (z - y)))
    t_2 = y * ((t - x) / (a - z))
    if (a <= (-5d-49)) then
        tmp = t_1
    else if (a <= 1.1d-257) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 1.05d-68) then
        tmp = t_2
    else if (a <= 2d-41) then
        tmp = t + (((t - x) * a) / z)
    else if (a <= 6.5d+107) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) / (a / (z - y)));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -5e-49) {
		tmp = t_1;
	} else if (a <= 1.1e-257) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.05e-68) {
		tmp = t_2;
	} else if (a <= 2e-41) {
		tmp = t + (((t - x) * a) / z);
	} else if (a <= 6.5e+107) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((x - t) / (a / (z - y)))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if a <= -5e-49:
		tmp = t_1
	elif a <= 1.1e-257:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 1.05e-68:
		tmp = t_2
	elif a <= 2e-41:
		tmp = t + (((t - x) * a) / z)
	elif a <= 6.5e+107:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(x - t) / Float64(a / Float64(z - y))))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (a <= -5e-49)
		tmp = t_1;
	elseif (a <= 1.1e-257)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 1.05e-68)
		tmp = t_2;
	elseif (a <= 2e-41)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * a) / z));
	elseif (a <= 6.5e+107)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((x - t) / (a / (z - y)));
	t_2 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (a <= -5e-49)
		tmp = t_1;
	elseif (a <= 1.1e-257)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 1.05e-68)
		tmp = t_2;
	elseif (a <= 2e-41)
		tmp = t + (((t - x) * a) / z);
	elseif (a <= 6.5e+107)
		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[(x - t), $MachinePrecision] / N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5e-49], t$95$1, If[LessEqual[a, 1.1e-257], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-68], t$95$2, If[LessEqual[a, 2e-41], N[(t + N[(N[(N[(t - x), $MachinePrecision] * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+107], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.9999999999999999e-49 or 6.5000000000000006e107 < a

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e-49 < a < 1.09999999999999994e-257

    1. Initial program 67.6%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub79.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-neg79.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--79.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/79.5%

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

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

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

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

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

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

    if 1.09999999999999994e-257 < a < 1.05000000000000004e-68 or 2.00000000000000001e-41 < a < 6.5000000000000006e107

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

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

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

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

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

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

    if 1.05000000000000004e-68 < a < 2.00000000000000001e-41

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-49}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-257}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-41}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 64.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y}}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{-48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-258}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-41}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- t x) (/ a y)))) (t_2 (* y (/ (- t x) (- a z)))))
   (if (<= a -2.2e-48)
     t_1
     (if (<= a 3.4e-258)
       (+ t (/ (* y (- x t)) z))
       (if (<= a 1.1e-68)
         t_2
         (if (<= a 1.35e-41)
           (+ t (/ (* (- t x) a) z))
           (if (<= a 6.5e+107) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) / (a / y));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.2e-48) {
		tmp = t_1;
	} else if (a <= 3.4e-258) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.1e-68) {
		tmp = t_2;
	} else if (a <= 1.35e-41) {
		tmp = t + (((t - x) * a) / z);
	} else if (a <= 6.5e+107) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((t - x) / (a / y))
    t_2 = y * ((t - x) / (a - z))
    if (a <= (-2.2d-48)) then
        tmp = t_1
    else if (a <= 3.4d-258) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 1.1d-68) then
        tmp = t_2
    else if (a <= 1.35d-41) then
        tmp = t + (((t - x) * a) / z)
    else if (a <= 6.5d+107) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) / (a / y));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.2e-48) {
		tmp = t_1;
	} else if (a <= 3.4e-258) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.1e-68) {
		tmp = t_2;
	} else if (a <= 1.35e-41) {
		tmp = t + (((t - x) * a) / z);
	} else if (a <= 6.5e+107) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) / (a / y))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if a <= -2.2e-48:
		tmp = t_1
	elif a <= 3.4e-258:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 1.1e-68:
		tmp = t_2
	elif a <= 1.35e-41:
		tmp = t + (((t - x) * a) / z)
	elif a <= 6.5e+107:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y)))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.2e-48)
		tmp = t_1;
	elseif (a <= 3.4e-258)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 1.1e-68)
		tmp = t_2;
	elseif (a <= 1.35e-41)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * a) / z));
	elseif (a <= 6.5e+107)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) / (a / y));
	t_2 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (a <= -2.2e-48)
		tmp = t_1;
	elseif (a <= 3.4e-258)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 1.1e-68)
		tmp = t_2;
	elseif (a <= 1.35e-41)
		tmp = t + (((t - x) * a) / z);
	elseif (a <= 6.5e+107)
		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[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e-48], t$95$1, If[LessEqual[a, 3.4e-258], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-68], t$95$2, If[LessEqual[a, 1.35e-41], N[(t + N[(N[(N[(t - x), $MachinePrecision] * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+107], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.20000000000000013e-48 or 6.5000000000000006e107 < a

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000013e-48 < a < 3.3999999999999998e-258

    1. Initial program 67.6%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub79.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-neg79.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--79.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/79.5%

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

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

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

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

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

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

    if 3.3999999999999998e-258 < a < 1.10000000000000001e-68 or 1.35e-41 < a < 6.5000000000000006e107

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

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

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

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

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

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

    if 1.10000000000000001e-68 < a < 1.35e-41

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-48}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-258}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-41}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot a}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-286}:\\
\;\;\;\;t + \frac{t \cdot a}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -4.49999999999999967e-30

    1. Initial program 71.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified62.7%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    11. Step-by-step derivation
      1. clear-num62.8%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv62.8%

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

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

    if -4.49999999999999967e-30 < a < -2.99999999999999991e-184

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

    if -2.99999999999999991e-184 < a < -4.9999999999999997e-246

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified78.2%

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

    if -4.9999999999999997e-246 < a < 1.4e-286

    1. Initial program 61.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
      3. distribute-rgt-neg-in60.1%

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

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

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

    if 1.4e-286 < a < 1.02000000000000007e76

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.02000000000000007e76 < a

    1. Initial program 68.6%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified63.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-184}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-286}:\\ \;\;\;\;t + \frac{t \cdot a}{z}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-286}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -2.0500000000000002e-30

    1. Initial program 71.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified62.7%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    11. Step-by-step derivation
      1. clear-num62.8%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv62.8%

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

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

    if -2.0500000000000002e-30 < a < -6.89999999999999985e-184

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

    if -6.89999999999999985e-184 < a < -1.40000000000000013e-293

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000013e-293 < a < 1.6499999999999999e-286

    1. Initial program 57.0%

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

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

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

    if 1.6499999999999999e-286 < a < 1.02000000000000007e76

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.02000000000000007e76 < a

    1. Initial program 68.6%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified63.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -6.9 \cdot 10^{-184}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-293}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 34.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-129}:\\
\;\;\;\;x \cdot \frac{y}{-a}\\

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-286}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+107}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.90000000000000004e-13 or 6.7999999999999994e107 < a

    1. Initial program 70.7%

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

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

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

    if -3.90000000000000004e-13 < a < -6.2000000000000001e-129

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    10. Simplified44.3%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
      3. *-commutative34.6%

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot x} \]
      4. distribute-rgt-neg-in34.6%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} \]
    13. Simplified34.6%

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

    if -6.2000000000000001e-129 < a < -2.19999999999999991e-238

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.19999999999999991e-238 < a < 1.6499999999999999e-286

    1. Initial program 61.0%

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

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

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

    if 1.6499999999999999e-286 < a < 6.7999999999999994e107

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    14. Step-by-step derivation
      1. clear-num34.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv34.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    15. Applied egg-rr34.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-129}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 40.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-286}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.44999999999999993e-182 or 7.7999999999999996e65 < a

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    10. Simplified54.6%

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

    if -1.44999999999999993e-182 < a < -9.9999999999999997e-242 or 1.5e-286 < a < 7.7999999999999996e65

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999997e-242 < a < 1.5e-286

    1. Initial program 61.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-182}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 42.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-286}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.68e-124 or 6.5000000000000006e107 < a

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

    if -1.68e-124 < a < -5.79999999999999952e-274 or 1.4e-286 < a < 6.5000000000000006e107

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    10. Simplified47.4%

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

    if -5.79999999999999952e-274 < a < 1.4e-286

    1. Initial program 59.6%

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.68 \cdot 10^{-124}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-274}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 45.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-286}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.89999999999999959e-125

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

    if -5.89999999999999959e-125 < a < -4.69999999999999962e-273 or 1.9000000000000001e-286 < a < 1.55000000000000006e76

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x - t}{z}} \]
    10. Simplified48.0%

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

    if -4.69999999999999962e-273 < a < 1.9000000000000001e-286

    1. Initial program 59.6%

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

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

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

    if 1.55000000000000006e76 < a

    1. Initial program 68.6%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified63.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.9 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.7500000000000002e-87 or 6.5000000000000006e107 < a

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

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

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

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

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

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

    if -2.7500000000000002e-87 < a < 2.09999999999999988e-286

    1. Initial program 64.6%

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

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

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

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

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

    if 2.09999999999999988e-286 < a < 6.5000000000000006e107

    1. Initial program 65.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.75 \cdot 10^{-87}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-286}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 60.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -2.65 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.64999999999999984e-85 or 6.5000000000000006e107 < a

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

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

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

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

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

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

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

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

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

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

    if -2.64999999999999984e-85 < a < 1.74999999999999994e-286

    1. Initial program 64.6%

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

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

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

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

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

    if 1.74999999999999994e-286 < a < 6.5000000000000006e107

    1. Initial program 65.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-286}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 64.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15e-48 or 6.5000000000000006e107 < a

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

    if -1.15e-48 < a < 5.40000000000000013e-254

    1. Initial program 67.6%

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub79.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-neg79.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--79.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/79.5%

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

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

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

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

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

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

    if 5.40000000000000013e-254 < a < 6.5000000000000006e107

    1. Initial program 63.5%

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

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

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

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

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

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

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

Alternative 17: 81.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+154}:\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1499999999999999e154

    1. Initial program 34.1%

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

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

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

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

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

    if -2.1499999999999999e154 < z < 1.94999999999999993e262

    1. Initial program 77.0%

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

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

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

    if 1.94999999999999993e262 < z

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 73.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+107}:\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.20000000000000029e107

    1. Initial program 47.0%

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

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

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

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

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

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

    if -3.20000000000000029e107 < z < 1.2999999999999999e92

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

    if 1.2999999999999999e92 < z

    1. Initial program 31.7%

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

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

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

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

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

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

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

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

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

Alternative 19: 74.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+107}:\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5999999999999999e107

    1. Initial program 47.0%

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

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

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

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

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

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

    if -8.5999999999999999e107 < z < 1.59999999999999996e39

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999996e39 < z

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 36.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-286}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.20000000000000002e-16 or 1.32000000000000013e108 < a

    1. Initial program 70.7%

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

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

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

    if -1.20000000000000002e-16 < a < 2.8999999999999998e-286

    1. Initial program 69.0%

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

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

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

    if 2.8999999999999998e-286 < a < 1.32000000000000013e108

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 36.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.39999999999999987e-12 or 6.5000000000000006e107 < a

    1. Initial program 70.7%

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

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

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

    if -2.39999999999999987e-12 < a < 1.7000000000000001e-286

    1. Initial program 69.0%

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

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

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

    if 1.7000000000000001e-286 < a < 6.5000000000000006e107

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    14. Step-by-step derivation
      1. clear-num34.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv34.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    15. Applied egg-rr34.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 63.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+102} \lor \neg \left(x \leq 1.52 \cdot 10^{-34}\right):\\
\;\;\;\;x \cdot \left(\frac{y}{z - a} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.8000000000000001e102 or 1.52e-34 < x

    1. Initial program 62.4%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr79.0%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Taylor expanded in y around inf 70.9%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a - z}{y}}} \]
    8. Taylor expanded in x around inf 66.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a - z}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg66.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a - z}\right)}\right) \]
      2. unsub-neg66.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a - z}\right)} \]
    10. Simplified66.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a - z}\right)} \]

    if -6.8000000000000001e102 < x < 1.52e-34

    1. Initial program 75.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*85.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified85.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 57.1%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*71.5%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified71.5%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+102} \lor \neg \left(x \leq 1.52 \cdot 10^{-34}\right):\\ \;\;\;\;x \cdot \left(\frac{y}{z - a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 48.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.4e+104) t (if (<= z 9.2e+148) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.4e+104) {
		tmp = t;
	} else if (z <= 9.2e+148) {
		tmp = x * (1.0 - (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 <= (-2.4d+104)) then
        tmp = t
    else if (z <= 9.2d+148) then
        tmp = x * (1.0d0 - (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 <= -2.4e+104) {
		tmp = t;
	} else if (z <= 9.2e+148) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.4e+104:
		tmp = t
	elif z <= 9.2e+148:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.4e+104)
		tmp = t;
	elseif (z <= 9.2e+148)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.4e+104)
		tmp = t;
	elseif (z <= 9.2e+148)
		tmp = x * (1.0 - (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+104], t, If[LessEqual[z, 9.2e+148], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+104}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e104 or 9.2000000000000002e148 < z

    1. Initial program 37.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*62.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified62.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 48.8%

      \[\leadsto \color{blue}{t} \]

    if -2.4e104 < z < 9.2000000000000002e148

    1. Initial program 83.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 61.1%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*66.4%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified66.4%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]
    8. Taylor expanded in x around inf 53.9%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg53.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg53.9%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    10. Simplified53.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2e-13) x (if (<= a 1.5e+128) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2e-13) {
		tmp = x;
	} else if (a <= 1.5e+128) {
		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 <= (-2d-13)) then
        tmp = x
    else if (a <= 1.5d+128) 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 <= -2e-13) {
		tmp = x;
	} else if (a <= 1.5e+128) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2e-13:
		tmp = x
	elif a <= 1.5e+128:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2e-13)
		tmp = x;
	elseif (a <= 1.5e+128)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2e-13)
		tmp = x;
	elseif (a <= 1.5e+128)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-13], x, If[LessEqual[a, 1.5e+128], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-13}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+128}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.0000000000000001e-13 or 1.4999999999999999e128 < a

    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*92.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 56.0%

      \[\leadsto \color{blue}{x} \]

    if -2.0000000000000001e-13 < a < 1.4999999999999999e128

    1. Initial program 65.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*73.9%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified73.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 27.0%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 25.4% 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 68.3%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*80.7%

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified80.7%

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 23.5%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification23.5%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 83.6% 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 2024072 
(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))))