Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 90.9%
Time: 20.8s
Alternatives: 20
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 80.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 90.9% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 90.5%

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.0000000000000001e-259

    1. Initial program 6.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 83.5%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    4. Simplified94.3%

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

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

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

    if 1.0000000000000001e-259 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 95.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-302}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 10^{-259}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \end{array} \]

Alternative 2: 90.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 92.8%

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

    if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.0000000000000001e-259

    1. Initial program 6.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 83.5%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    4. Simplified94.3%

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

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

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

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

Alternative 3: 51.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-224}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))))
   (if (<= z -3e+127)
     t
     (if (<= z -4.2e-58)
       t_1
       (if (<= z -2.2e-128)
         (* y (/ (- t x) a))
         (if (<= z 4.4e-272)
           t_1
           (if (<= z 2.2e-224)
             (* x (- 1.0 (/ y a)))
             (if (<= z 5.4e+35) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double tmp;
	if (z <= -3e+127) {
		tmp = t;
	} else if (z <= -4.2e-58) {
		tmp = t_1;
	} else if (z <= -2.2e-128) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.4e-272) {
		tmp = t_1;
	} else if (z <= 2.2e-224) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5.4e+35) {
		tmp = t_1;
	} 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 / (a / y))
    if (z <= (-3d+127)) then
        tmp = t
    else if (z <= (-4.2d-58)) then
        tmp = t_1
    else if (z <= (-2.2d-128)) then
        tmp = y * ((t - x) / a)
    else if (z <= 4.4d-272) then
        tmp = t_1
    else if (z <= 2.2d-224) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 5.4d+35) then
        tmp = t_1
    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 / (a / y));
	double tmp;
	if (z <= -3e+127) {
		tmp = t;
	} else if (z <= -4.2e-58) {
		tmp = t_1;
	} else if (z <= -2.2e-128) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.4e-272) {
		tmp = t_1;
	} else if (z <= 2.2e-224) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5.4e+35) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	tmp = 0
	if z <= -3e+127:
		tmp = t
	elif z <= -4.2e-58:
		tmp = t_1
	elif z <= -2.2e-128:
		tmp = y * ((t - x) / a)
	elif z <= 4.4e-272:
		tmp = t_1
	elif z <= 2.2e-224:
		tmp = x * (1.0 - (y / a))
	elif z <= 5.4e+35:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (z <= -3e+127)
		tmp = t;
	elseif (z <= -4.2e-58)
		tmp = t_1;
	elseif (z <= -2.2e-128)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 4.4e-272)
		tmp = t_1;
	elseif (z <= 2.2e-224)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 5.4e+35)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	tmp = 0.0;
	if (z <= -3e+127)
		tmp = t;
	elseif (z <= -4.2e-58)
		tmp = t_1;
	elseif (z <= -2.2e-128)
		tmp = y * ((t - x) / a);
	elseif (z <= 4.4e-272)
		tmp = t_1;
	elseif (z <= 2.2e-224)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 5.4e+35)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+127], t, If[LessEqual[z, -4.2e-58], t$95$1, If[LessEqual[z, -2.2e-128], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-272], t$95$1, If[LessEqual[z, 2.2e-224], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+35], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.0000000000000002e127 or 5.40000000000000005e35 < z

    1. Initial program 64.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 42.2%

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

    if -3.0000000000000002e127 < z < -4.19999999999999975e-58 or -2.20000000000000009e-128 < z < 4.39999999999999976e-272 or 2.2000000000000001e-224 < z < 5.40000000000000005e35

    1. Initial program 90.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 67.3%

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

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

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

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

    if -4.19999999999999975e-58 < z < -2.20000000000000009e-128

    1. Initial program 95.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 62.5%

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

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

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

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

    if 4.39999999999999976e-272 < z < 2.2000000000000001e-224

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-58}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-224}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+35}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 50.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-271}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-225}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ t (/ a y)))))
   (if (<= z -1.2e+127)
     t
     (if (<= z -1.6e-61)
       t_1
       (if (<= z -2.2e-128)
         (* y (/ (- t x) a))
         (if (<= z 4.8e-271)
           (+ x (/ (* y t) a))
           (if (<= z 5e-225)
             (* x (- 1.0 (/ y a)))
             (if (<= z 2.6e+39) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / y));
	double tmp;
	if (z <= -1.2e+127) {
		tmp = t;
	} else if (z <= -1.6e-61) {
		tmp = t_1;
	} else if (z <= -2.2e-128) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.8e-271) {
		tmp = x + ((y * t) / a);
	} else if (z <= 5e-225) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.6e+39) {
		tmp = t_1;
	} 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 / (a / y))
    if (z <= (-1.2d+127)) then
        tmp = t
    else if (z <= (-1.6d-61)) then
        tmp = t_1
    else if (z <= (-2.2d-128)) then
        tmp = y * ((t - x) / a)
    else if (z <= 4.8d-271) then
        tmp = x + ((y * t) / a)
    else if (z <= 5d-225) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 2.6d+39) then
        tmp = t_1
    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 / (a / y));
	double tmp;
	if (z <= -1.2e+127) {
		tmp = t;
	} else if (z <= -1.6e-61) {
		tmp = t_1;
	} else if (z <= -2.2e-128) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.8e-271) {
		tmp = x + ((y * t) / a);
	} else if (z <= 5e-225) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.6e+39) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / y))
	tmp = 0
	if z <= -1.2e+127:
		tmp = t
	elif z <= -1.6e-61:
		tmp = t_1
	elif z <= -2.2e-128:
		tmp = y * ((t - x) / a)
	elif z <= 4.8e-271:
		tmp = x + ((y * t) / a)
	elif z <= 5e-225:
		tmp = x * (1.0 - (y / a))
	elif z <= 2.6e+39:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (z <= -1.2e+127)
		tmp = t;
	elseif (z <= -1.6e-61)
		tmp = t_1;
	elseif (z <= -2.2e-128)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 4.8e-271)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 5e-225)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 2.6e+39)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t / (a / y));
	tmp = 0.0;
	if (z <= -1.2e+127)
		tmp = t;
	elseif (z <= -1.6e-61)
		tmp = t_1;
	elseif (z <= -2.2e-128)
		tmp = y * ((t - x) / a);
	elseif (z <= 4.8e-271)
		tmp = x + ((y * t) / a);
	elseif (z <= 5e-225)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 2.6e+39)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+127], t, If[LessEqual[z, -1.6e-61], t$95$1, If[LessEqual[z, -2.2e-128], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-271], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-225], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+39], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2000000000000001e127 or 2.6e39 < z

    1. Initial program 64.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 42.2%

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

    if -1.2000000000000001e127 < z < -1.6000000000000001e-61 or 5.0000000000000001e-225 < z < 2.6e39

    1. Initial program 89.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 60.2%

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified61.9%

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

    if -1.6000000000000001e-61 < z < -2.20000000000000009e-128

    1. Initial program 95.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 62.5%

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

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

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

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

    if -2.20000000000000009e-128 < z < 4.8000000000000005e-271

    1. Initial program 92.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 77.8%

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

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

    if 4.8000000000000005e-271 < z < 5.0000000000000001e-225

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-61}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-271}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-225}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 64.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -9 \cdot 10^{-12}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-117}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-205}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -9e-12)
     t_2
     (if (<= z -6.5e-66)
       t_1
       (if (<= z -4.5e-117)
         (* (- y z) (/ t (- a z)))
         (if (<= z -1.1e-205)
           (* (- t x) (/ y (- a z)))
           (if (<= z 4.8e-43) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -9e-12) {
		tmp = t_2;
	} else if (z <= -6.5e-66) {
		tmp = t_1;
	} else if (z <= -4.5e-117) {
		tmp = (y - z) * (t / (a - z));
	} else if (z <= -1.1e-205) {
		tmp = (t - x) * (y / (a - z));
	} else if (z <= 4.8e-43) {
		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 + ((t - x) * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-9d-12)) then
        tmp = t_2
    else if (z <= (-6.5d-66)) then
        tmp = t_1
    else if (z <= (-4.5d-117)) then
        tmp = (y - z) * (t / (a - z))
    else if (z <= (-1.1d-205)) then
        tmp = (t - x) * (y / (a - z))
    else if (z <= 4.8d-43) 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 + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -9e-12) {
		tmp = t_2;
	} else if (z <= -6.5e-66) {
		tmp = t_1;
	} else if (z <= -4.5e-117) {
		tmp = (y - z) * (t / (a - z));
	} else if (z <= -1.1e-205) {
		tmp = (t - x) * (y / (a - z));
	} else if (z <= 4.8e-43) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -9e-12:
		tmp = t_2
	elif z <= -6.5e-66:
		tmp = t_1
	elif z <= -4.5e-117:
		tmp = (y - z) * (t / (a - z))
	elif z <= -1.1e-205:
		tmp = (t - x) * (y / (a - z))
	elif z <= 4.8e-43:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -9e-12)
		tmp = t_2;
	elseif (z <= -6.5e-66)
		tmp = t_1;
	elseif (z <= -4.5e-117)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (z <= -1.1e-205)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (z <= 4.8e-43)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -9e-12)
		tmp = t_2;
	elseif (z <= -6.5e-66)
		tmp = t_1;
	elseif (z <= -4.5e-117)
		tmp = (y - z) * (t / (a - z));
	elseif (z <= -1.1e-205)
		tmp = (t - x) * (y / (a - z));
	elseif (z <= 4.8e-43)
		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[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-12], t$95$2, If[LessEqual[z, -6.5e-66], t$95$1, If[LessEqual[z, -4.5e-117], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-205], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-43], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.99999999999999962e-12 or 4.8000000000000004e-43 < z

    1. Initial program 71.3%

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

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

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

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

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

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

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

    if -8.99999999999999962e-12 < z < -6.50000000000000024e-66 or -1.10000000000000005e-205 < z < 4.8000000000000004e-43

    1. Initial program 92.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 84.0%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/87.0%

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

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

    if -6.50000000000000024e-66 < z < -4.49999999999999969e-117

    1. Initial program 91.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in x around 0 99.6%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/99.3%

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

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

    if -4.49999999999999969e-117 < z < -1.10000000000000005e-205

    1. Initial program 84.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 55.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-12}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-66}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-117}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-205}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-43}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 6: 56.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.7 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+151}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.70000000000000021e41 or 1.59999999999999997e151 < a

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 65.4%

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.9%

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

    if -5.70000000000000021e41 < a < -3.70000000000000012e-234 or 1.06000000000000004e-63 < a < 1.59999999999999997e151

    1. Initial program 72.5%

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

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

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

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

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

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

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

    if -3.70000000000000012e-234 < a < 1.06000000000000004e-63

    1. Initial program 76.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.7 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-234}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-63}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+151}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 7: 57.2% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.0000000000000004e44 or 3.10000000000000014e150 < a

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 65.4%

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.9%

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

    if -4.0000000000000004e44 < a < -2.9500000000000002e-235

    1. Initial program 72.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around inf 63.5%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/69.9%

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

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

    if -2.9500000000000002e-235 < a < 7.7999999999999994e-64

    1. Initial program 76.2%

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

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

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

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

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

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

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

    if 7.7999999999999994e-64 < a < 3.10000000000000014e150

    1. Initial program 72.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{-235}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-64}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+150}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 8: 29.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -2.05 \cdot 10^{-39}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-134}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+159}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.7999999999999998e38

    1. Initial program 81.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 61.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified35.8%

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

    if -3.7999999999999998e38 < y < -2.05e-39 or -7.6999999999999997e-72 < y < -2.6999999999999998e-134

    1. Initial program 65.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 48.8%

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

    if -2.05e-39 < y < -7.6999999999999997e-72

    1. Initial program 95.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 84.4%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    7. Taylor expanded in t around 0 72.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. *-commutative72.1%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
    9. Simplified72.1%

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

    if -2.6999999999999998e-134 < y < 2.4e159

    1. Initial program 79.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 41.1%

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

    if 2.4e159 < y

    1. Initial program 92.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 70.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    5. Simplified63.4%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y}}} \]
      3. distribute-neg-frac58.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+38}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-39}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -7.7 \cdot 10^{-72}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-134}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+159}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y}}\\ \end{array} \]

Alternative 9: 73.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000002e-4 or 9.00000000000000001e-46 < z

    1. Initial program 70.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 61.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000002e-4 < z < 9.00000000000000001e-46

    1. Initial program 92.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 77.3%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/80.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00042 \lor \neg \left(z \leq 9 \cdot 10^{-46}\right):\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 10: 73.4% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7e-5

    1. Initial program 73.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 57.3%

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

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

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

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

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

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

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

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

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

    if -1.7e-5 < z < 7.9999999999999998e-47

    1. Initial program 92.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 77.3%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/80.4%

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

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

    if 7.9999999999999998e-47 < z

    1. Initial program 68.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 65.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}} \]
    3. Step-by-step derivation
      1. associate--l+65.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--65.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-sub65.0%

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    4. Simplified74.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-5}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-47}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \]

Alternative 11: 68.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-92} \lor \neg \left(a \leq 1.05 \cdot 10^{-31}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5000000000000002e-92 or 1.04999999999999996e-31 < a

    1. Initial program 85.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 60.7%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/67.2%

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

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

    if -5.5000000000000002e-92 < a < 1.04999999999999996e-31

    1. Initial program 74.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 57.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-92} \lor \neg \left(a \leq 1.05 \cdot 10^{-31}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \]

Alternative 12: 69.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{-6} \lor \neg \left(z \leq 1.8 \cdot 10^{-43}\right):\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7499999999999999e-6 or 1.7999999999999999e-43 < z

    1. Initial program 70.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 61.6%

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

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

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

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

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

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

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

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

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

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

    if -2.7499999999999999e-6 < z < 1.7999999999999999e-43

    1. Initial program 92.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 77.3%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/80.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{-6} \lor \neg \left(z \leq 1.8 \cdot 10^{-43}\right):\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 13: 58.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-56}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.79999999999999964e-56

    1. Initial program 75.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 53.1%

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

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

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

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

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

    if -6.79999999999999964e-56 < x < 4.49999999999999994e148

    1. Initial program 87.4%

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

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

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

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

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

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

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

    if 4.49999999999999994e148 < x

    1. Initial program 61.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 52.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg52.1%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a - z}{y}}} \]
      3. distribute-neg-frac61.6%

        \[\leadsto \color{blue}{\frac{-x}{\frac{a - z}{y}}} \]
    5. Simplified61.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-56}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+148}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{a - z}{y}}\\ \end{array} \]

Alternative 14: 37.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-224}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6.9 \cdot 10^{-43}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.20000000000000017e128 or 6.89999999999999964e-43 < z

    1. Initial program 67.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 40.7%

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

    if -2.20000000000000017e128 < z < 1.45e-224 or 1.4000000000000001e-164 < z < 6.89999999999999964e-43

    1. Initial program 91.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 36.0%

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

    if 1.45e-224 < z < 1.4000000000000001e-164

    1. Initial program 89.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 89.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    8. Applied egg-rr58.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-224}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-164}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.9 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 37.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-224}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-43}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.50000000000000045e128 or 4.2000000000000001e-43 < z

    1. Initial program 67.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 40.7%

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

    if -8.50000000000000045e128 < z < 9.0000000000000009e-224 or 6.19999999999999992e-165 < z < 4.2000000000000001e-43

    1. Initial program 91.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 36.0%

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

    if 9.0000000000000009e-224 < z < 6.19999999999999992e-165

    1. Initial program 89.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 89.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-224}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-165}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 49.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-104} \lor \neg \left(a \leq 4.2 \cdot 10^{-60}\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.99999999999999971e-104 or 4.19999999999999982e-60 < a

    1. Initial program 84.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 59.3%

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

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

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

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

    if -3.99999999999999971e-104 < a < 4.19999999999999982e-60

    1. Initial program 74.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in y around -inf 56.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x - t}}} \]
    8. Simplified47.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{-104} \lor \neg \left(a \leq 4.2 \cdot 10^{-60}\right):\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \end{array} \]

Alternative 17: 47.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\
\;\;\;\;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 < -7.9999999999999994e126 or 1.15000000000000002e-42 < z

    1. Initial program 67.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 40.7%

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

    if -7.9999999999999994e126 < z < 1.15000000000000002e-42

    1. Initial program 91.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around 0 72.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 37.3% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1999999999999998e126 or 1.15000000000000002e-42 < z

    1. Initial program 67.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 40.7%

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

    if -3.1999999999999998e126 < z < 1.15000000000000002e-42

    1. Initial program 91.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in a around inf 34.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 19: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 81.0%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Taylor expanded in y around 0 33.5%

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

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

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

      \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
    4. associate-/r/42.8%

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

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

    \[\leadsto \color{blue}{x - -1 \cdot \frac{x \cdot z}{a - z}} \]
  6. Step-by-step derivation
    1. mul-1-neg24.0%

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

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

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

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

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

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

    \[\leadsto \color{blue}{0} \]
  11. Final simplification2.8%

    \[\leadsto 0 \]

Alternative 20: 25.4% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

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

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Taylor expanded in z around inf 21.7%

    \[\leadsto \color{blue}{t} \]
  3. Final simplification21.7%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023298 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))