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

Percentage Accurate: 67.9% → 88.3%
Time: 17.1s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 67.9% 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: 88.3% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+180} \lor \neg \left(z \leq 1.3 \cdot 10^{+214}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.8000000000000002e180 or 1.29999999999999996e214 < z

    1. Initial program 27.7%

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e180 < z < 1.29999999999999996e214

    1. Initial program 80.2%

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

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

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

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

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

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

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

Alternative 2: 39.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{+127}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+19}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -225:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-20}:\\ \;\;\;\;x - \left(x - t\right)\\ \mathbf{elif}\;a \leq -1.06 \cdot 10^{-110}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-227}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* y (/ (- t x) a))))
   (if (<= a -6.5e+127)
     x
     (if (<= a -2.65e+19)
       t_2
       (if (<= a -225.0)
         t_1
         (if (<= a -9.6e-20)
           (- x (- x t))
           (if (<= a -1.06e-110)
             t_2
             (if (<= a -3.1e-227)
               t
               (if (<= a 3.2e-116) t_1 (if (<= a 1.2e+84) t_2 x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = y * ((t - x) / a);
	double tmp;
	if (a <= -6.5e+127) {
		tmp = x;
	} else if (a <= -2.65e+19) {
		tmp = t_2;
	} else if (a <= -225.0) {
		tmp = t_1;
	} else if (a <= -9.6e-20) {
		tmp = x - (x - t);
	} else if (a <= -1.06e-110) {
		tmp = t_2;
	} else if (a <= -3.1e-227) {
		tmp = t;
	} else if (a <= 3.2e-116) {
		tmp = t_1;
	} else if (a <= 1.2e+84) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = y * ((t - x) / a)
    if (a <= (-6.5d+127)) then
        tmp = x
    else if (a <= (-2.65d+19)) then
        tmp = t_2
    else if (a <= (-225.0d0)) then
        tmp = t_1
    else if (a <= (-9.6d-20)) then
        tmp = x - (x - t)
    else if (a <= (-1.06d-110)) then
        tmp = t_2
    else if (a <= (-3.1d-227)) then
        tmp = t
    else if (a <= 3.2d-116) then
        tmp = t_1
    else if (a <= 1.2d+84) then
        tmp = t_2
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = y * ((t - x) / a);
	double tmp;
	if (a <= -6.5e+127) {
		tmp = x;
	} else if (a <= -2.65e+19) {
		tmp = t_2;
	} else if (a <= -225.0) {
		tmp = t_1;
	} else if (a <= -9.6e-20) {
		tmp = x - (x - t);
	} else if (a <= -1.06e-110) {
		tmp = t_2;
	} else if (a <= -3.1e-227) {
		tmp = t;
	} else if (a <= 3.2e-116) {
		tmp = t_1;
	} else if (a <= 1.2e+84) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = y * ((t - x) / a)
	tmp = 0
	if a <= -6.5e+127:
		tmp = x
	elif a <= -2.65e+19:
		tmp = t_2
	elif a <= -225.0:
		tmp = t_1
	elif a <= -9.6e-20:
		tmp = x - (x - t)
	elif a <= -1.06e-110:
		tmp = t_2
	elif a <= -3.1e-227:
		tmp = t
	elif a <= 3.2e-116:
		tmp = t_1
	elif a <= 1.2e+84:
		tmp = t_2
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (a <= -6.5e+127)
		tmp = x;
	elseif (a <= -2.65e+19)
		tmp = t_2;
	elseif (a <= -225.0)
		tmp = t_1;
	elseif (a <= -9.6e-20)
		tmp = Float64(x - Float64(x - t));
	elseif (a <= -1.06e-110)
		tmp = t_2;
	elseif (a <= -3.1e-227)
		tmp = t;
	elseif (a <= 3.2e-116)
		tmp = t_1;
	elseif (a <= 1.2e+84)
		tmp = t_2;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = y * ((t - x) / a);
	tmp = 0.0;
	if (a <= -6.5e+127)
		tmp = x;
	elseif (a <= -2.65e+19)
		tmp = t_2;
	elseif (a <= -225.0)
		tmp = t_1;
	elseif (a <= -9.6e-20)
		tmp = x - (x - t);
	elseif (a <= -1.06e-110)
		tmp = t_2;
	elseif (a <= -3.1e-227)
		tmp = t;
	elseif (a <= 3.2e-116)
		tmp = t_1;
	elseif (a <= 1.2e+84)
		tmp = t_2;
	else
		tmp = x;
	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[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+127], x, If[LessEqual[a, -2.65e+19], t$95$2, If[LessEqual[a, -225.0], t$95$1, If[LessEqual[a, -9.6e-20], N[(x - N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.06e-110], t$95$2, If[LessEqual[a, -3.1e-227], t, If[LessEqual[a, 3.2e-116], t$95$1, If[LessEqual[a, 1.2e+84], t$95$2, x]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.65 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -225:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-20}:\\
\;\;\;\;x - \left(x - t\right)\\

\mathbf{elif}\;a \leq -1.06 \cdot 10^{-110}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-227}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6.5e127 or 1.2e84 < a

    1. Initial program 66.0%

      \[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 a around inf 60.4%

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

    if -6.5e127 < a < -2.65e19 or -9.59999999999999971e-20 < a < -1.0599999999999999e-110 or 3.20000000000000009e-116 < a < 1.2e84

    1. Initial program 78.0%

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

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

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

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

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

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

    if -2.65e19 < a < -225 or -3.09999999999999979e-227 < a < 3.20000000000000009e-116

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

    if -225 < a < -9.59999999999999971e-20

    1. Initial program 78.9%

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

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]

    if -1.0599999999999999e-110 < a < -3.09999999999999979e-227

    1. Initial program 50.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+127}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+19}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -225:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-20}:\\ \;\;\;\;x - \left(x - t\right)\\ \mathbf{elif}\;a \leq -1.06 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-227}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+84}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 37.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;a \leq -0.0027:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.24 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-181}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+59}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))))
   (if (<= a -0.0027)
     x
     (if (<= a -1.24e-110)
       (* y (/ t a))
       (if (<= a -1.45e-226)
         t
         (if (<= a 3.9e-181)
           t_1
           (if (<= a 1.65e+59) t (if (<= a 1.4e+82) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double tmp;
	if (a <= -0.0027) {
		tmp = x;
	} else if (a <= -1.24e-110) {
		tmp = y * (t / a);
	} else if (a <= -1.45e-226) {
		tmp = t;
	} else if (a <= 3.9e-181) {
		tmp = t_1;
	} else if (a <= 1.65e+59) {
		tmp = t;
	} else if (a <= 1.4e+82) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    if (a <= (-0.0027d0)) then
        tmp = x
    else if (a <= (-1.24d-110)) then
        tmp = y * (t / a)
    else if (a <= (-1.45d-226)) then
        tmp = t
    else if (a <= 3.9d-181) then
        tmp = t_1
    else if (a <= 1.65d+59) then
        tmp = t
    else if (a <= 1.4d+82) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double tmp;
	if (a <= -0.0027) {
		tmp = x;
	} else if (a <= -1.24e-110) {
		tmp = y * (t / a);
	} else if (a <= -1.45e-226) {
		tmp = t;
	} else if (a <= 3.9e-181) {
		tmp = t_1;
	} else if (a <= 1.65e+59) {
		tmp = t;
	} else if (a <= 1.4e+82) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	tmp = 0
	if a <= -0.0027:
		tmp = x
	elif a <= -1.24e-110:
		tmp = y * (t / a)
	elif a <= -1.45e-226:
		tmp = t
	elif a <= 3.9e-181:
		tmp = t_1
	elif a <= 1.65e+59:
		tmp = t
	elif a <= 1.4e+82:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	tmp = 0.0
	if (a <= -0.0027)
		tmp = x;
	elseif (a <= -1.24e-110)
		tmp = Float64(y * Float64(t / a));
	elseif (a <= -1.45e-226)
		tmp = t;
	elseif (a <= 3.9e-181)
		tmp = t_1;
	elseif (a <= 1.65e+59)
		tmp = t;
	elseif (a <= 1.4e+82)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	tmp = 0.0;
	if (a <= -0.0027)
		tmp = x;
	elseif (a <= -1.24e-110)
		tmp = y * (t / a);
	elseif (a <= -1.45e-226)
		tmp = t;
	elseif (a <= 3.9e-181)
		tmp = t_1;
	elseif (a <= 1.65e+59)
		tmp = t;
	elseif (a <= 1.4e+82)
		tmp = t_1;
	else
		tmp = x;
	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]}, If[LessEqual[a, -0.0027], x, If[LessEqual[a, -1.24e-110], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.45e-226], t, If[LessEqual[a, 3.9e-181], t$95$1, If[LessEqual[a, 1.65e+59], t, If[LessEqual[a, 1.4e+82], t$95$1, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y - a}{z}\\
\mathbf{if}\;a \leq -0.0027:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-226}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+59}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.0027000000000000001 or 1.4e82 < a

    1. Initial program 70.0%

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

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

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

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

    if -0.0027000000000000001 < a < -1.24000000000000006e-110

    1. Initial program 81.0%

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

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

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

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

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

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

    if -1.24000000000000006e-110 < a < -1.45000000000000001e-226 or 3.9e-181 < a < 1.65e59

    1. Initial program 62.0%

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

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

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

    if -1.45000000000000001e-226 < a < 3.9e-181 or 1.65e59 < a < 1.4e82

    1. Initial program 76.7%

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

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

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

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

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

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

        \[\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-sub82.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-neg82.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--82.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/82.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0027:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.24 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-181}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+59}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 37.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -0.00029:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq -4 \cdot 10^{-226}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.9e-4 or 2.2000000000000001e82 < a

    1. Initial program 70.0%

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

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

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

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

    if -2.9e-4 < a < -1.24000000000000006e-110

    1. Initial program 81.0%

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

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

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

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

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

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

    if -1.24000000000000006e-110 < a < -3.99999999999999969e-226 or 1.9e-180 < a < 5.5000000000000001e60

    1. Initial program 62.0%

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

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

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

    if -3.99999999999999969e-226 < a < 1.9e-180 or 5.5000000000000001e60 < a < 2.2000000000000001e82

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{y - z}{a - z}} \]
    9. Simplified46.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00029:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.24 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-180}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-27} \lor \neg \left(a \leq 2 \cdot 10^{+67}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.04999999999999994e-58 or 5.20000000000000005e-104 < a < 1.30000000000000009e-27 or 1.99999999999999997e67 < a

    1. Initial program 71.3%

      \[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 a around inf 64.1%

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

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

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

    if -1.04999999999999994e-58 < a < 5.20000000000000005e-104

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000009e-27 < a < 1.99999999999999997e67

    1. Initial program 77.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-58}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-104}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-27} \lor \neg \left(a \leq 2 \cdot 10^{+67}\right):\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 38.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -0.0026:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-226}:\\
\;\;\;\;t\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.0025999999999999999 or 1.00000000000000003e83 < a

    1. Initial program 70.0%

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

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

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

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

    if -0.0025999999999999999 < a < -1.45000000000000001e-226 or 5.50000000000000033e-181 < a < 4.2000000000000002e60

    1. Initial program 67.4%

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

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

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

    if -1.45000000000000001e-226 < a < 5.50000000000000033e-181 or 4.2000000000000002e60 < a < 1.00000000000000003e83

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{y - z}{a - z}} \]
    9. Simplified46.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0026:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-181}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+60}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 10^{+83}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.7% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.00175000000000000004 or 8.50000000000000038e67 < a

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

    if -0.00175000000000000004 < a < -2.70000000000000014e-226 or 2.19999999999999997e-181 < a < 8.50000000000000038e67

    1. Initial program 68.8%

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

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

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

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

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

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

    if -2.70000000000000014e-226 < a < 2.19999999999999997e-181

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 55.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.0023 or 1.45000000000000006e68 < a

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

    if -0.0023 < a < -6.79999999999999958e-227 or 4.1000000000000001e-181 < a < 1.45000000000000006e68

    1. Initial program 68.8%

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

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

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

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

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

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

    if -6.79999999999999958e-227 < a < 4.1000000000000001e-181

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0023:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-181}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.20000000000000026e-4 or 5.19999999999999999e59 < a

    1. Initial program 70.4%

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

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

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

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

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

    if -3.20000000000000026e-4 < a < -3.79999999999999981e-226 or 6.4999999999999997e-181 < a < 5.19999999999999999e59

    1. Initial program 67.4%

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

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

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

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

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

    if -3.79999999999999981e-226 < a < 6.4999999999999997e-181

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00032:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-181}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 68.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -1.55 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-111}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+82}:\\ \;\;\;\;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 (/ (- t x) a)))))
   (if (<= a -1.55e-59)
     t_1
     (if (<= a 1.25e-111)
       (+ t (* y (/ (- x t) z)))
       (if (<= a 4.7e+58)
         (* t (/ (- y z) (- a z)))
         (if (<= a 1.15e+82) (* y (/ (- t x) (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -1.55e-59) {
		tmp = t_1;
	} else if (a <= 1.25e-111) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 4.7e+58) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 1.15e+82) {
		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 * ((t - x) / a))
    if (a <= (-1.55d-59)) then
        tmp = t_1
    else if (a <= 1.25d-111) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 4.7d+58) then
        tmp = t * ((y - z) / (a - z))
    else if (a <= 1.15d+82) 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 * ((t - x) / a));
	double tmp;
	if (a <= -1.55e-59) {
		tmp = t_1;
	} else if (a <= 1.25e-111) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 4.7e+58) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 1.15e+82) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((t - x) / a))
	tmp = 0
	if a <= -1.55e-59:
		tmp = t_1
	elif a <= 1.25e-111:
		tmp = t + (y * ((x - t) / z))
	elif a <= 4.7e+58:
		tmp = t * ((y - z) / (a - z))
	elif a <= 1.15e+82:
		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(t - x) / a)))
	tmp = 0.0
	if (a <= -1.55e-59)
		tmp = t_1;
	elseif (a <= 1.25e-111)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 4.7e+58)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (a <= 1.15e+82)
		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 * ((t - x) / a));
	tmp = 0.0;
	if (a <= -1.55e-59)
		tmp = t_1;
	elseif (a <= 1.25e-111)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 4.7e+58)
		tmp = t * ((y - z) / (a - z));
	elseif (a <= 1.15e+82)
		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[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.55e-59], t$95$1, If[LessEqual[a, 1.25e-111], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.7e+58], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+82], 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{t - x}{a}\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.55e-59 or 1.14999999999999994e82 < a

    1. Initial program 71.3%

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

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

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

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

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

    if -1.55e-59 < a < 1.2500000000000001e-111

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2500000000000001e-111 < a < 4.69999999999999972e58

    1. Initial program 72.9%

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

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

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

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

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

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

    if 4.69999999999999972e58 < a < 1.14999999999999994e82

    1. Initial program 72.0%

      \[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. Taylor expanded in y around inf 85.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-59}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-111}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+82}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0012:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-110}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-226}:\\
\;\;\;\;t\\

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

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


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

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

    if -0.00119999999999999989 < a < -1.05000000000000001e-110

    1. Initial program 81.0%

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

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

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

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

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

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

    if -1.05000000000000001e-110 < a < -3.79999999999999981e-226

    1. Initial program 50.1%

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

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

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

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

    if -3.79999999999999981e-226 < a < 6.99999999999999988e-112

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999988e-112 < a

    1. Initial program 65.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0012:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-110}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-112}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 46.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.00046:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-112}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -0.00046)
   (- x (* x (/ y a)))
   (if (<= a -6.6e-111)
     (* y (/ (- t x) a))
     (if (<= a -1.9e-226)
       t
       (if (<= a 3.3e-112) (/ (* y (- x t)) z) (+ x (* t (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -0.00046) {
		tmp = x - (x * (y / a));
	} else if (a <= -6.6e-111) {
		tmp = y * ((t - x) / a);
	} else if (a <= -1.9e-226) {
		tmp = t;
	} else if (a <= 3.3e-112) {
		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 <= (-0.00046d0)) then
        tmp = x - (x * (y / a))
    else if (a <= (-6.6d-111)) then
        tmp = y * ((t - x) / a)
    else if (a <= (-1.9d-226)) then
        tmp = t
    else if (a <= 3.3d-112) 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 <= -0.00046) {
		tmp = x - (x * (y / a));
	} else if (a <= -6.6e-111) {
		tmp = y * ((t - x) / a);
	} else if (a <= -1.9e-226) {
		tmp = t;
	} else if (a <= 3.3e-112) {
		tmp = (y * (x - t)) / z;
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -0.00046:
		tmp = x - (x * (y / a))
	elif a <= -6.6e-111:
		tmp = y * ((t - x) / a)
	elif a <= -1.9e-226:
		tmp = t
	elif a <= 3.3e-112:
		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 <= -0.00046)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (a <= -6.6e-111)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (a <= -1.9e-226)
		tmp = t;
	elseif (a <= 3.3e-112)
		tmp = Float64(Float64(y * 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 <= -0.00046)
		tmp = x - (x * (y / a));
	elseif (a <= -6.6e-111)
		tmp = y * ((t - x) / a);
	elseif (a <= -1.9e-226)
		tmp = t;
	elseif (a <= 3.3e-112)
		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, -0.00046], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.6e-111], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-226], t, If[LessEqual[a, 3.3e-112], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00046:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-111}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

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

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

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


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

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

    if -4.6000000000000001e-4 < a < -6.6e-111

    1. Initial program 81.0%

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

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

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

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

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

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

    if -6.6e-111 < a < -1.89999999999999991e-226

    1. Initial program 50.1%

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

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

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

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

    if -1.89999999999999991e-226 < a < 3.3000000000000001e-112

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000001e-112 < a

    1. Initial program 65.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.00046:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-226}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-112}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 88.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+158} \lor \neg \left(z \leq 1.45 \cdot 10^{+214}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.7999999999999998e158 or 1.45e214 < z

    1. Initial program 29.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999998e158 < z < 1.45e214

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

Alternative 14: 85.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4e177 or 1.95000000000000007e214 < z

    1. Initial program 27.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4e177 < z < 1.95000000000000007e214

    1. Initial program 80.5%

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

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

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

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

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

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

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

Alternative 15: 82.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+181}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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

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


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

    1. Initial program 22.4%

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999989e181 < z < 2.05999999999999996e204

    1. Initial program 80.1%

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

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

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

    if 2.05999999999999996e204 < z

    1. Initial program 42.7%

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

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

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

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

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

        \[\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-sub91.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-neg91.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--91.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/91.8%

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

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

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

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

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

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

Alternative 16: 82.8% accurate, 0.6× speedup?

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

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

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

\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 < -2.80000000000000002e177

    1. Initial program 22.1%

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000002e177 < z < 1.07999999999999996e200

    1. Initial program 80.5%

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

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

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

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

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

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

    if 1.07999999999999996e200 < z

    1. Initial program 42.7%

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

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

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

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

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

        \[\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-sub91.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-neg91.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--91.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/91.8%

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

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

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

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

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

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

Alternative 17: 53.4% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.49999999999999965e130 or 1.61999999999999999e111 < z

    1. Initial program 39.5%

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

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

    if -8.49999999999999965e130 < z < 1.61999999999999999e111

    1. Initial program 84.2%

      \[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. Taylor expanded in z around 0 61.8%

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

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

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

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

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

Alternative 18: 39.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+67}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.00279999999999999997 or 9.5000000000000002e67 < a

    1. Initial program 69.4%

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

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

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

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

    if -0.00279999999999999997 < a < 9.5000000000000002e67

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

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

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

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

Alternative 19: 25.6% 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 70.6%

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification21.8%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 83.9% 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 2024115 
(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))))