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

Percentage Accurate: 67.7% → 90.4%
Time: 23.3s
Alternatives: 22
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 67.7% 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: 90.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+269}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 39.4%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999999e-243 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.0000000000000001e269

    1. Initial program 98.6%

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Taylor expanded in z around inf 99.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}} \]
    9. Step-by-step derivation
      1. associate--l+99.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/99.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/99.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. div-sub99.8%

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

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

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

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

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

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

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

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

Alternative 2: 38.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;z \leq -8.3 \cdot 10^{+74}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-264}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-266}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+155}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= z -8.3e+74)
     t
     (if (<= z -1.65e-264)
       x
       (if (<= z 4.9e-266)
         t_1
         (if (<= z 6.2e-197)
           x
           (if (<= z 3.6e-144)
             t_1
             (if (<= z 2.8e-27) x (if (<= z 4.8e+155) (* x (/ y z)) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (z <= -8.3e+74) {
		tmp = t;
	} else if (z <= -1.65e-264) {
		tmp = x;
	} else if (z <= 4.9e-266) {
		tmp = t_1;
	} else if (z <= 6.2e-197) {
		tmp = x;
	} else if (z <= 3.6e-144) {
		tmp = t_1;
	} else if (z <= 2.8e-27) {
		tmp = x;
	} else if (z <= 4.8e+155) {
		tmp = x * (y / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (z <= (-8.3d+74)) then
        tmp = t
    else if (z <= (-1.65d-264)) then
        tmp = x
    else if (z <= 4.9d-266) then
        tmp = t_1
    else if (z <= 6.2d-197) then
        tmp = x
    else if (z <= 3.6d-144) then
        tmp = t_1
    else if (z <= 2.8d-27) then
        tmp = x
    else if (z <= 4.8d+155) then
        tmp = x * (y / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (z <= -8.3e+74) {
		tmp = t;
	} else if (z <= -1.65e-264) {
		tmp = x;
	} else if (z <= 4.9e-266) {
		tmp = t_1;
	} else if (z <= 6.2e-197) {
		tmp = x;
	} else if (z <= 3.6e-144) {
		tmp = t_1;
	} else if (z <= 2.8e-27) {
		tmp = x;
	} else if (z <= 4.8e+155) {
		tmp = x * (y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if z <= -8.3e+74:
		tmp = t
	elif z <= -1.65e-264:
		tmp = x
	elif z <= 4.9e-266:
		tmp = t_1
	elif z <= 6.2e-197:
		tmp = x
	elif z <= 3.6e-144:
		tmp = t_1
	elif z <= 2.8e-27:
		tmp = x
	elif z <= 4.8e+155:
		tmp = x * (y / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (z <= -8.3e+74)
		tmp = t;
	elseif (z <= -1.65e-264)
		tmp = x;
	elseif (z <= 4.9e-266)
		tmp = t_1;
	elseif (z <= 6.2e-197)
		tmp = x;
	elseif (z <= 3.6e-144)
		tmp = t_1;
	elseif (z <= 2.8e-27)
		tmp = x;
	elseif (z <= 4.8e+155)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (z <= -8.3e+74)
		tmp = t;
	elseif (z <= -1.65e-264)
		tmp = x;
	elseif (z <= 4.9e-266)
		tmp = t_1;
	elseif (z <= 6.2e-197)
		tmp = x;
	elseif (z <= 3.6e-144)
		tmp = t_1;
	elseif (z <= 2.8e-27)
		tmp = x;
	elseif (z <= 4.8e+155)
		tmp = x * (y / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.3e+74], t, If[LessEqual[z, -1.65e-264], x, If[LessEqual[z, 4.9e-266], t$95$1, If[LessEqual[z, 6.2e-197], x, If[LessEqual[z, 3.6e-144], t$95$1, If[LessEqual[z, 2.8e-27], x, If[LessEqual[z, 4.8e+155], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-264}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.9 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-197}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-27}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+155}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.2999999999999998e74 or 4.80000000000000042e155 < z

    1. Initial program 38.7%

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

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

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

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

    if -8.2999999999999998e74 < z < -1.65000000000000006e-264 or 4.9000000000000003e-266 < z < 6.20000000000000057e-197 or 3.6e-144 < z < 2.8e-27

    1. Initial program 91.3%

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

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

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

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

    if -1.65000000000000006e-264 < z < 4.9000000000000003e-266 or 6.20000000000000057e-197 < z < 3.6e-144

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

    if 2.8e-27 < z < 4.80000000000000042e155

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.3 \cdot 10^{+74}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-264}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-266}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-144}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+155}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 52.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.70000000000000004e78 or 5.5999999999999997e153 < z

    1. Initial program 38.7%

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

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

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

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

    if -2.70000000000000004e78 < z < 6.99999999999999991e-291 or 1.9499999999999999e-268 < z < 2.79999999999999997e-180

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999991e-291 < z < 1.9499999999999999e-268

    1. Initial program 99.6%

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

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

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

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

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

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

    if 2.79999999999999997e-180 < z < 6.49999999999999953e-11

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

    if 6.49999999999999953e-11 < z < 5.5999999999999997e153

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y} + -1 \cdot a}{z} \]
      7. mul-1-neg44.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+78}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-291}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-180}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.8 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.99999999999999997e77 or 5.5000000000000001e155 < z

    1. Initial program 38.7%

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

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

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

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

    if -1.99999999999999997e77 < z < 7.49999999999999981e-291 or 3.6000000000000001e-268 < z < 1.60000000000000008e-180

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999981e-291 < z < 3.6000000000000001e-268

    1. Initial program 99.6%

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

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

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

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

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

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

    if 1.60000000000000008e-180 < z < 8.7999999999999994e-8

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

    if 8.7999999999999994e-8 < z < 5.5000000000000001e155

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+77}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-291}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-180}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+155}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 52.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-291}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-180}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+153}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a)))))
   (if (<= z -3.1e+75)
     t
     (if (<= z 7.2e-291)
       t_1
       (if (<= z 1.9e-268)
         (* y (/ (- t x) a))
         (if (<= z 3.5e-180)
           t_1
           (if (<= z 6e-11)
             (- x (* x (/ y a)))
             (if (<= z 9.5e+153) (* y (/ (- x t) z)) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -3.1e+75) {
		tmp = t;
	} else if (z <= 7.2e-291) {
		tmp = t_1;
	} else if (z <= 1.9e-268) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.5e-180) {
		tmp = t_1;
	} else if (z <= 6e-11) {
		tmp = x - (x * (y / a));
	} else if (z <= 9.5e+153) {
		tmp = y * ((x - t) / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    if (z <= (-3.1d+75)) then
        tmp = t
    else if (z <= 7.2d-291) then
        tmp = t_1
    else if (z <= 1.9d-268) then
        tmp = y * ((t - x) / a)
    else if (z <= 3.5d-180) then
        tmp = t_1
    else if (z <= 6d-11) then
        tmp = x - (x * (y / a))
    else if (z <= 9.5d+153) then
        tmp = y * ((x - t) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -3.1e+75) {
		tmp = t;
	} else if (z <= 7.2e-291) {
		tmp = t_1;
	} else if (z <= 1.9e-268) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.5e-180) {
		tmp = t_1;
	} else if (z <= 6e-11) {
		tmp = x - (x * (y / a));
	} else if (z <= 9.5e+153) {
		tmp = y * ((x - t) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	tmp = 0
	if z <= -3.1e+75:
		tmp = t
	elif z <= 7.2e-291:
		tmp = t_1
	elif z <= 1.9e-268:
		tmp = y * ((t - x) / a)
	elif z <= 3.5e-180:
		tmp = t_1
	elif z <= 6e-11:
		tmp = x - (x * (y / a))
	elif z <= 9.5e+153:
		tmp = y * ((x - t) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (z <= -3.1e+75)
		tmp = t;
	elseif (z <= 7.2e-291)
		tmp = t_1;
	elseif (z <= 1.9e-268)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 3.5e-180)
		tmp = t_1;
	elseif (z <= 6e-11)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= 9.5e+153)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	tmp = 0.0;
	if (z <= -3.1e+75)
		tmp = t;
	elseif (z <= 7.2e-291)
		tmp = t_1;
	elseif (z <= 1.9e-268)
		tmp = y * ((t - x) / a);
	elseif (z <= 3.5e-180)
		tmp = t_1;
	elseif (z <= 6e-11)
		tmp = x - (x * (y / a));
	elseif (z <= 9.5e+153)
		tmp = y * ((x - t) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+75], t, If[LessEqual[z, 7.2e-291], t$95$1, If[LessEqual[z, 1.9e-268], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-180], t$95$1, If[LessEqual[z, 6e-11], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+153], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.1000000000000001e75 or 9.4999999999999995e153 < z

    1. Initial program 38.7%

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

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

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

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

    if -3.1000000000000001e75 < z < 7.1999999999999993e-291 or 1.9000000000000001e-268 < z < 3.5000000000000001e-180

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999993e-291 < z < 1.9000000000000001e-268

    1. Initial program 99.6%

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

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

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

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

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

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

    if 3.5000000000000001e-180 < z < 6e-11

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6e-11 < z < 9.4999999999999995e153

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-291}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-180}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+153}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+79}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-291}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-191}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-12}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+155}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a)))))
   (if (<= z -6.8e+79)
     t
     (if (<= z 9e-291)
       t_1
       (if (<= z 2.1e-268)
         (* y (/ (- t x) a))
         (if (<= z 5.2e-191)
           t_1
           (if (<= z 5.7e-12)
             (- x (* x (/ y a)))
             (if (<= z 6.5e+155) (/ y (/ z (- x t))) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -6.8e+79) {
		tmp = t;
	} else if (z <= 9e-291) {
		tmp = t_1;
	} else if (z <= 2.1e-268) {
		tmp = y * ((t - x) / a);
	} else if (z <= 5.2e-191) {
		tmp = t_1;
	} else if (z <= 5.7e-12) {
		tmp = x - (x * (y / a));
	} else if (z <= 6.5e+155) {
		tmp = y / (z / (x - t));
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    if (z <= (-6.8d+79)) then
        tmp = t
    else if (z <= 9d-291) then
        tmp = t_1
    else if (z <= 2.1d-268) then
        tmp = y * ((t - x) / a)
    else if (z <= 5.2d-191) then
        tmp = t_1
    else if (z <= 5.7d-12) then
        tmp = x - (x * (y / a))
    else if (z <= 6.5d+155) then
        tmp = y / (z / (x - t))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -6.8e+79) {
		tmp = t;
	} else if (z <= 9e-291) {
		tmp = t_1;
	} else if (z <= 2.1e-268) {
		tmp = y * ((t - x) / a);
	} else if (z <= 5.2e-191) {
		tmp = t_1;
	} else if (z <= 5.7e-12) {
		tmp = x - (x * (y / a));
	} else if (z <= 6.5e+155) {
		tmp = y / (z / (x - t));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	tmp = 0
	if z <= -6.8e+79:
		tmp = t
	elif z <= 9e-291:
		tmp = t_1
	elif z <= 2.1e-268:
		tmp = y * ((t - x) / a)
	elif z <= 5.2e-191:
		tmp = t_1
	elif z <= 5.7e-12:
		tmp = x - (x * (y / a))
	elif z <= 6.5e+155:
		tmp = y / (z / (x - t))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (z <= -6.8e+79)
		tmp = t;
	elseif (z <= 9e-291)
		tmp = t_1;
	elseif (z <= 2.1e-268)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 5.2e-191)
		tmp = t_1;
	elseif (z <= 5.7e-12)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= 6.5e+155)
		tmp = Float64(y / Float64(z / Float64(x - t)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	tmp = 0.0;
	if (z <= -6.8e+79)
		tmp = t;
	elseif (z <= 9e-291)
		tmp = t_1;
	elseif (z <= 2.1e-268)
		tmp = y * ((t - x) / a);
	elseif (z <= 5.2e-191)
		tmp = t_1;
	elseif (z <= 5.7e-12)
		tmp = x - (x * (y / a));
	elseif (z <= 6.5e+155)
		tmp = y / (z / (x - t));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+79], t, If[LessEqual[z, 9e-291], t$95$1, If[LessEqual[z, 2.1e-268], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-191], t$95$1, If[LessEqual[z, 5.7e-12], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+155], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.80000000000000063e79 or 6.50000000000000046e155 < z

    1. Initial program 38.7%

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

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

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

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

    if -6.80000000000000063e79 < z < 8.99999999999999948e-291 or 2.09999999999999998e-268 < z < 5.19999999999999972e-191

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.99999999999999948e-291 < z < 2.09999999999999998e-268

    1. Initial program 99.6%

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

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

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

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

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

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

    if 5.19999999999999972e-191 < z < 5.7000000000000003e-12

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.7000000000000003e-12 < z < 6.50000000000000046e155

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+79}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-291}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-191}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-12}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+155}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 64.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -0.00055:\\
\;\;\;\;x + \frac{x - t}{\frac{z}{y}}\\

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.0499999999999998e74 or -5.50000000000000033e-4 < z < -1.54999999999999998e-33 or 5.5999999999999997e153 < z

    1. Initial program 44.1%

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

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

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

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

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

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

    if -3.0499999999999998e74 < z < -5.50000000000000033e-4

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t - x}{\color{blue}{\frac{z}{-y}}} \]
    11. Simplified64.0%

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

    if -1.54999999999999998e-33 < z < 2.5000000000000001e-27

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e-27 < z < 5.5999999999999997e153

    1. Initial program 64.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.05 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;z \leq -0.00055:\\ \;\;\;\;x + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-33}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+153}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.7% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.24999999999999996e218 or 2.5999999999999999e121 < z

    1. Initial program 31.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999996e218 < z < -4.9999999999999999e-232 or 3.99999999999999982e-258 < z < 2.5999999999999999e121

    1. Initial program 83.0%

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

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

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

    if -4.9999999999999999e-232 < z < 3.99999999999999982e-258

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+218}:\\ \;\;\;\;t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-232}:\\ \;\;\;\;x - \frac{x - t}{z - a} \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-258}:\\ \;\;\;\;x + \frac{x - t}{\frac{z - a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+121}:\\ \;\;\;\;x - \frac{x - t}{z - a} \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{z} \cdot \left(y - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-8} \lor \neg \left(t \leq -9 \cdot 10^{-71}\right) \land t \leq 1.75 \cdot 10^{-152}:\\
\;\;\;\;x \cdot \left(1 - t\_1\right)\\

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


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

    1. Initial program 62.9%

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

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

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

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

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

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

    if -2.05e52 < t < -2.4999999999999999e-8 or -9.0000000000000004e-71 < t < 1.7500000000000001e-152

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -2.4999999999999999e-8 < t < -9.0000000000000004e-71 or 1.7500000000000001e-152 < t

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+52}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-8} \lor \neg \left(t \leq -9 \cdot 10^{-71}\right) \land t \leq 1.75 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(1 - \frac{z - y}{z - a}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{t}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 64.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 3 \cdot 10^{-6}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999999e51 or 3.0000000000000001e-6 < t

    1. Initial program 66.6%

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

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

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

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

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

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

    if -9.9999999999999999e51 < t < -4.4999999999999999e-44 or -1.3500000000000001e-70 < t < 3.0000000000000001e-6

    1. Initial program 75.5%

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

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

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

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

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

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

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

    if -4.4999999999999999e-44 < t < -1.3500000000000001e-70

    1. Initial program 91.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+52}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-44}:\\ \;\;\;\;x \cdot \left(1 - \frac{z - y}{z - a}\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-70}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z - a}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(1 - \frac{z - y}{z - a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.6% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 4.7 \cdot 10^{-21}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.70000000000000006e-91 or 4.7000000000000003e-21 < t

    1. Initial program 71.1%

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

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

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

      \[\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.70000000000000006e-91 < t < -1.1600000000000001e-267

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1600000000000001e-267 < t < 5.50000000000000054e-175

    1. Initial program 74.8%

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

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

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

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

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

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

    if 5.50000000000000054e-175 < t < 4.7000000000000003e-21

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-91}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{-267}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-175}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.55000000000000018e-34 or 8.49999999999999935e153 < z

    1. Initial program 49.4%

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

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

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

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

    if -3.55000000000000018e-34 < z < 5.0000000000000002e-27

    1. Initial program 93.6%

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

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

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

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

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

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

    if 5.0000000000000002e-27 < z < 8.49999999999999935e153

    1. Initial program 64.5%

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

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

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

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

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

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

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

Alternative 13: 65.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.54999999999999998e-33 or 4.4000000000000005e155 < z

    1. Initial program 49.4%

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

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

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

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

    if -1.54999999999999998e-33 < z < 6.50000000000000025e-27

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000025e-27 < z < 4.4000000000000005e155

    1. Initial program 64.5%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    7. Simplified60.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}\;z \leq -1.55 \cdot 10^{-33}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+155}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 88.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.26000000000000005e218 or 1.9499999999999999e120 < z

    1. Initial program 31.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.26000000000000005e218 < z < 1.9499999999999999e120

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 48.0% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e22 or 1.6e157 < z

    1. Initial program 43.3%

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

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

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

    if -3.2e22 < z < 1.49999999999999987e-4

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if 1.49999999999999987e-4 < z < 1.6e157

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y} + -1 \cdot a}{z} \]
      7. mul-1-neg44.8%

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

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

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

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

Alternative 16: 37.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-32}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+55}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+154}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1499999999999999e75 or 9.4999999999999999e-32 < z < 3.59999999999999987e55 or 5.00000000000000004e154 < z

    1. Initial program 47.2%

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

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

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

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

    if -1.1499999999999999e75 < z < 9.4999999999999999e-32 or 3.59999999999999987e55 < z < 5.00000000000000004e154

    1. Initial program 87.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+154}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 73.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+75} \lor \neg \left(z \leq 7.2 \cdot 10^{+153}\right):\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.40000000000000006e75 or 7.2000000000000001e153 < z

    1. Initial program 38.7%

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

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

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

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

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

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

    if -1.40000000000000006e75 < z < 7.2000000000000001e153

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 79.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8e17 or 9.7999999999999996e-32 < z

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8e17 < z < 9.7999999999999996e-32

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 37.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-27}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+155}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8999999999999998e78 or 7.7999999999999996e155 < z

    1. Initial program 38.7%

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

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

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

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

    if -6.8999999999999998e78 < z < 5.0000000000000002e-27

    1. Initial program 91.5%

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

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

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

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

    if 5.0000000000000002e-27 < z < 7.7999999999999996e155

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.9 \cdot 10^{+78}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+155}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 60.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-88} \lor \neg \left(t \leq 2.05 \cdot 10^{-21}\right):\\
\;\;\;\;t \cdot \frac{z - y}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5499999999999999e-88 or 2.04999999999999997e-21 < t

    1. Initial program 71.1%

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

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

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

      \[\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 -1.5499999999999999e-88 < t < 2.04999999999999997e-21

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 48.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+149}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.52e22 or 4.0000000000000002e149 < z

    1. Initial program 42.4%

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

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

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

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

    if -1.52e22 < z < 4.0000000000000002e149

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

Alternative 22: 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 72.5%

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification26.3%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.2% 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 2024053 
(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))))