Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.5% → 94.9%
Time: 15.2s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 80.5% 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: 94.9% accurate, 0.1× 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^{-290}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-290)
     (fma (- t x) (/ (- y z) (- a z)) x)
     (if (<= t_1 0.0)
       (+ t (* (/ (- t x) z) (- a y)))
       (+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-290) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) / z) * (a - y));
	} else {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	}
	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-290)
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)));
	else
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	end
	return 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[LessEqual[t$95$1, -1e-290], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $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^{-290}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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

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


\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)))) < -1.0000000000000001e-290

    1. Initial program 90.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg92.5%

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

Alternative 2: 91.3% 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^{-290} \lor \neg \left(t\_1 \leq 0\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-290) (not (<= t_1 0.0)))
     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-290) || !(t_1 <= 0.0)) {
		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-290)) .or. (.not. (t_1 <= 0.0d0))) 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-290) || !(t_1 <= 0.0)) {
		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-290) or not (t_1 <= 0.0):
		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-290) || !(t_1 <= 0.0))
		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-290) || ~((t_1 <= 0.0)))
		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-290], N[Not[LessEqual[t$95$1, 0.0]], $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^{-290} \lor \neg \left(t\_1 \leq 0\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)))) < -1.0000000000000001e-290 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.6%

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.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^{-290} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \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-290) (not (<= t_1 0.0)))
     (+ x (/ (- t x) (/ (- a z) (- y z))))
     (+ 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-290) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} 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-290)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((t - x) / ((a - z) / (y - z)))
    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-290) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} 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-290) or not (t_1 <= 0.0):
		tmp = x + ((t - x) / ((a - z) / (y - z)))
	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-290) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	else
		tmp = Float64(t + Float64(Float64(Float64(t - x) / 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-290) || ~((t_1 <= 0.0)))
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	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-290], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / 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^{-290} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\

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

    1. Initial program 92.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative92.6%

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

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y}}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-189}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+59} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- t x) (/ a y)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -2.85e-82)
     t_2
     (if (<= z 3.7e-189)
       t_1
       (if (<= z 1.25e-42)
         (* y (/ (- t x) (- a z)))
         (if (<= z 4.7e+38)
           t_1
           (if (or (<= z 7.8e+59) (not (<= z 2.15e+73)))
             t_2
             (* x (- 1.0 (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) / (a / y));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.85e-82) {
		tmp = t_2;
	} else if (z <= 3.7e-189) {
		tmp = t_1;
	} else if (z <= 1.25e-42) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 4.7e+38) {
		tmp = t_1;
	} else if ((z <= 7.8e+59) || !(z <= 2.15e+73)) {
		tmp = t_2;
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((t - x) / (a / y))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-2.85d-82)) then
        tmp = t_2
    else if (z <= 3.7d-189) then
        tmp = t_1
    else if (z <= 1.25d-42) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 4.7d+38) then
        tmp = t_1
    else if ((z <= 7.8d+59) .or. (.not. (z <= 2.15d+73))) then
        tmp = t_2
    else
        tmp = x * (1.0d0 - (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) / (a / y));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.85e-82) {
		tmp = t_2;
	} else if (z <= 3.7e-189) {
		tmp = t_1;
	} else if (z <= 1.25e-42) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 4.7e+38) {
		tmp = t_1;
	} else if ((z <= 7.8e+59) || !(z <= 2.15e+73)) {
		tmp = t_2;
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) / (a / y))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -2.85e-82:
		tmp = t_2
	elif z <= 3.7e-189:
		tmp = t_1
	elif z <= 1.25e-42:
		tmp = y * ((t - x) / (a - z))
	elif z <= 4.7e+38:
		tmp = t_1
	elif (z <= 7.8e+59) or not (z <= 2.15e+73):
		tmp = t_2
	else:
		tmp = x * (1.0 - (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -2.85e-82)
		tmp = t_2;
	elseif (z <= 3.7e-189)
		tmp = t_1;
	elseif (z <= 1.25e-42)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 4.7e+38)
		tmp = t_1;
	elseif ((z <= 7.8e+59) || !(z <= 2.15e+73))
		tmp = t_2;
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) / (a / y));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -2.85e-82)
		tmp = t_2;
	elseif (z <= 3.7e-189)
		tmp = t_1;
	elseif (z <= 1.25e-42)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 4.7e+38)
		tmp = t_1;
	elseif ((z <= 7.8e+59) || ~((z <= 2.15e+73)))
		tmp = t_2;
	else
		tmp = x * (1.0 - (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-82], t$95$2, If[LessEqual[z, 3.7e-189], t$95$1, If[LessEqual[z, 1.25e-42], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+38], t$95$1, If[Or[LessEqual[z, 7.8e+59], N[Not[LessEqual[z, 2.15e+73]], $MachinePrecision]], t$95$2, N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+59} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.85000000000000001e-82 or 4.6999999999999999e38 < z < 7.80000000000000043e59 or 2.15000000000000007e73 < z

    1. Initial program 69.8%

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

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

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

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

    if -2.85000000000000001e-82 < z < 3.70000000000000019e-189 or 1.25000000000000001e-42 < z < 4.6999999999999999e38

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

    if 3.70000000000000019e-189 < z < 1.25000000000000001e-42

    1. Initial program 86.9%

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

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

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

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

    if 7.80000000000000043e59 < z < 2.15000000000000007e73

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-189}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+59} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t - x}{\frac{a}{y}}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-192}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-41}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- t x) (/ a y)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -2.85e-82)
     t_2
     (if (<= z 9.8e-192)
       t_1
       (if (<= z 1.85e-41)
         (* y (/ (- t x) (- a z)))
         (if (<= z 3.25e+39)
           t_1
           (if (<= z 1.05e+60)
             (/ t (/ (- a z) (- y z)))
             (if (<= z 3.1e+76) (* x (- 1.0 (/ y a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) / (a / y));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.85e-82) {
		tmp = t_2;
	} else if (z <= 9.8e-192) {
		tmp = t_1;
	} else if (z <= 1.85e-41) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 3.25e+39) {
		tmp = t_1;
	} else if (z <= 1.05e+60) {
		tmp = t / ((a - z) / (y - z));
	} else if (z <= 3.1e+76) {
		tmp = x * (1.0 - (y / a));
	} 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) / (a / y))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-2.85d-82)) then
        tmp = t_2
    else if (z <= 9.8d-192) then
        tmp = t_1
    else if (z <= 1.85d-41) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 3.25d+39) then
        tmp = t_1
    else if (z <= 1.05d+60) then
        tmp = t / ((a - z) / (y - z))
    else if (z <= 3.1d+76) then
        tmp = x * (1.0d0 - (y / a))
    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) / (a / y));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2.85e-82) {
		tmp = t_2;
	} else if (z <= 9.8e-192) {
		tmp = t_1;
	} else if (z <= 1.85e-41) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 3.25e+39) {
		tmp = t_1;
	} else if (z <= 1.05e+60) {
		tmp = t / ((a - z) / (y - z));
	} else if (z <= 3.1e+76) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) / (a / y))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -2.85e-82:
		tmp = t_2
	elif z <= 9.8e-192:
		tmp = t_1
	elif z <= 1.85e-41:
		tmp = y * ((t - x) / (a - z))
	elif z <= 3.25e+39:
		tmp = t_1
	elif z <= 1.05e+60:
		tmp = t / ((a - z) / (y - z))
	elif z <= 3.1e+76:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -2.85e-82)
		tmp = t_2;
	elseif (z <= 9.8e-192)
		tmp = t_1;
	elseif (z <= 1.85e-41)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 3.25e+39)
		tmp = t_1;
	elseif (z <= 1.05e+60)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	elseif (z <= 3.1e+76)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) / (a / y));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -2.85e-82)
		tmp = t_2;
	elseif (z <= 9.8e-192)
		tmp = t_1;
	elseif (z <= 1.85e-41)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 3.25e+39)
		tmp = t_1;
	elseif (z <= 1.05e+60)
		tmp = t / ((a - z) / (y - z));
	elseif (z <= 3.1e+76)
		tmp = x * (1.0 - (y / a));
	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[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-82], t$95$2, If[LessEqual[z, 9.8e-192], t$95$1, If[LessEqual[z, 1.85e-41], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e+39], t$95$1, If[LessEqual[z, 1.05e+60], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+76], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.25 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.85000000000000001e-82 or 3.10000000000000011e76 < z

    1. Initial program 69.7%

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

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

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

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

    if -2.85000000000000001e-82 < z < 9.7999999999999999e-192 or 1.8500000000000001e-41 < z < 3.2500000000000001e39

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

    if 9.7999999999999999e-192 < z < 1.8500000000000001e-41

    1. Initial program 86.9%

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

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

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

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

    if 3.2500000000000001e39 < z < 1.0500000000000001e60

    1. Initial program 71.0%

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    6. Step-by-step derivation
      1. clear-num61.4%

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

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

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

    if 1.0500000000000001e60 < z < 3.10000000000000011e76

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-192}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-41}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+39}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+60}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 45.8% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.6e20 or 1.40000000000000002e86 < z

    1. Initial program 66.3%

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

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

    if -8.6e20 < z < -4.14999999999999972e-82

    1. Initial program 80.0%

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

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

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

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

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

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

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

    if -4.14999999999999972e-82 < z < 6.99999999999999964e-168 or 5.1000000000000001e-54 < z < 1.40000000000000002e86

    1. Initial program 93.9%

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

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

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

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

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

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

    if 6.99999999999999964e-168 < z < 5.1000000000000001e-54

    1. Initial program 83.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+20}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.15 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-168}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-54}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7.6 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.5e21 or 7.59999999999999984e85 < z

    1. Initial program 66.3%

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

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

    if -6.5e21 < z < -4.4999999999999998e-82

    1. Initial program 80.0%

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

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

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

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

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

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

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

    if -4.4999999999999998e-82 < z < -5.5e-226 or 1.2000000000000001e-43 < z < 7.59999999999999984e85

    1. Initial program 90.7%

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

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

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

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

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

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

    if -5.5e-226 < z < 1.2000000000000001e-43

    1. Initial program 94.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-226}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 51.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{-226}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-44}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (- t (* t (/ y z)))))
   (if (<= z -7.5e+20)
     t_2
     (if (<= z -6.2e-82)
       (* t (/ (- y z) a))
       (if (<= z -6.1e-226)
         t_1
         (if (<= z 6.2e-44)
           (+ x (/ (* y t) a))
           (if (<= z 6.5e+84) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t - (t * (y / z));
	double tmp;
	if (z <= -7.5e+20) {
		tmp = t_2;
	} else if (z <= -6.2e-82) {
		tmp = t * ((y - z) / a);
	} else if (z <= -6.1e-226) {
		tmp = t_1;
	} else if (z <= 6.2e-44) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.5e+84) {
		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 * (1.0d0 - (y / a))
    t_2 = t - (t * (y / z))
    if (z <= (-7.5d+20)) then
        tmp = t_2
    else if (z <= (-6.2d-82)) then
        tmp = t * ((y - z) / a)
    else if (z <= (-6.1d-226)) then
        tmp = t_1
    else if (z <= 6.2d-44) then
        tmp = x + ((y * t) / a)
    else if (z <= 6.5d+84) 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 * (1.0 - (y / a));
	double t_2 = t - (t * (y / z));
	double tmp;
	if (z <= -7.5e+20) {
		tmp = t_2;
	} else if (z <= -6.2e-82) {
		tmp = t * ((y - z) / a);
	} else if (z <= -6.1e-226) {
		tmp = t_1;
	} else if (z <= 6.2e-44) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.5e+84) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t - (t * (y / z))
	tmp = 0
	if z <= -7.5e+20:
		tmp = t_2
	elif z <= -6.2e-82:
		tmp = t * ((y - z) / a)
	elif z <= -6.1e-226:
		tmp = t_1
	elif z <= 6.2e-44:
		tmp = x + ((y * t) / a)
	elif z <= 6.5e+84:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (z <= -7.5e+20)
		tmp = t_2;
	elseif (z <= -6.2e-82)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= -6.1e-226)
		tmp = t_1;
	elseif (z <= 6.2e-44)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 6.5e+84)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t - (t * (y / z));
	tmp = 0.0;
	if (z <= -7.5e+20)
		tmp = t_2;
	elseif (z <= -6.2e-82)
		tmp = t * ((y - z) / a);
	elseif (z <= -6.1e-226)
		tmp = t_1;
	elseif (z <= 6.2e-44)
		tmp = x + ((y * t) / a);
	elseif (z <= 6.5e+84)
		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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+20], t$95$2, If[LessEqual[z, -6.2e-82], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.1e-226], t$95$1, If[LessEqual[z, 6.2e-44], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+84], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -6.1 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.5e20 or 6.50000000000000027e84 < z

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in62.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. associate-*r/62.6%

        \[\leadsto t - \color{blue}{t \cdot \frac{y}{z}} \]
    11. Simplified62.6%

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

    if -7.5e20 < z < -6.19999999999999999e-82

    1. Initial program 80.0%

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

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

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

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

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

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

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

    if -6.19999999999999999e-82 < z < -6.0999999999999998e-226 or 6.19999999999999968e-44 < z < 6.50000000000000027e84

    1. Initial program 90.7%

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

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

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

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

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

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

    if -6.0999999999999998e-226 < z < 6.19999999999999968e-44

    1. Initial program 94.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+20}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{-226}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-44}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-82}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-226}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (- t (* t (/ y z)))))
   (if (<= z -3.3e+20)
     t_2
     (if (<= z -6.4e-82)
       (/ t (/ a (- y z)))
       (if (<= z -5.2e-226)
         t_1
         (if (<= z 1.02e-47)
           (+ x (/ (* y t) a))
           (if (<= z 1.5e+85) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t - (t * (y / z));
	double tmp;
	if (z <= -3.3e+20) {
		tmp = t_2;
	} else if (z <= -6.4e-82) {
		tmp = t / (a / (y - z));
	} else if (z <= -5.2e-226) {
		tmp = t_1;
	} else if (z <= 1.02e-47) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.5e+85) {
		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 * (1.0d0 - (y / a))
    t_2 = t - (t * (y / z))
    if (z <= (-3.3d+20)) then
        tmp = t_2
    else if (z <= (-6.4d-82)) then
        tmp = t / (a / (y - z))
    else if (z <= (-5.2d-226)) then
        tmp = t_1
    else if (z <= 1.02d-47) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.5d+85) 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 * (1.0 - (y / a));
	double t_2 = t - (t * (y / z));
	double tmp;
	if (z <= -3.3e+20) {
		tmp = t_2;
	} else if (z <= -6.4e-82) {
		tmp = t / (a / (y - z));
	} else if (z <= -5.2e-226) {
		tmp = t_1;
	} else if (z <= 1.02e-47) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.5e+85) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t - (t * (y / z))
	tmp = 0
	if z <= -3.3e+20:
		tmp = t_2
	elif z <= -6.4e-82:
		tmp = t / (a / (y - z))
	elif z <= -5.2e-226:
		tmp = t_1
	elif z <= 1.02e-47:
		tmp = x + ((y * t) / a)
	elif z <= 1.5e+85:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (z <= -3.3e+20)
		tmp = t_2;
	elseif (z <= -6.4e-82)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (z <= -5.2e-226)
		tmp = t_1;
	elseif (z <= 1.02e-47)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.5e+85)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t - (t * (y / z));
	tmp = 0.0;
	if (z <= -3.3e+20)
		tmp = t_2;
	elseif (z <= -6.4e-82)
		tmp = t / (a / (y - z));
	elseif (z <= -5.2e-226)
		tmp = t_1;
	elseif (z <= 1.02e-47)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.5e+85)
		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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+20], t$95$2, If[LessEqual[z, -6.4e-82], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-226], t$95$1, If[LessEqual[z, 1.02e-47], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+85], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.3e20 or 1.5e85 < z

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in62.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. associate-*r/62.6%

        \[\leadsto t - \color{blue}{t \cdot \frac{y}{z}} \]
    11. Simplified62.6%

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

    if -3.3e20 < z < -6.4000000000000002e-82

    1. Initial program 80.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} \]
    9. Step-by-step derivation
      1. clear-num47.9%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
    10. Applied egg-rr48.1%

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

    if -6.4000000000000002e-82 < z < -5.1999999999999997e-226 or 1.02000000000000002e-47 < z < 1.5e85

    1. Initial program 90.7%

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

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

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

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

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

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

    if -5.1999999999999997e-226 < z < 1.02000000000000002e-47

    1. Initial program 94.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+20}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-82}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-226}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-47}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-70}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.4000000000000002e-82

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot z}{a - z}} \]
      6. neg-mul-155.2%

        \[\leadsto t \cdot \frac{\color{blue}{-z}}{a - z} \]
    8. Simplified55.2%

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

    if -6.4000000000000002e-82 < z < 6.59999999999999998e-157 or 1.3500000000000001e-70 < z < 6.80000000000000005e-51

    1. Initial program 92.9%

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

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

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

    if 6.59999999999999998e-157 < z < 1.3500000000000001e-70 or 1.7999999999999999e85 < z

    1. Initial program 70.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in66.2%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y - z}{z}} \]
      4. div-sub66.2%

        \[\leadsto \left(-t\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. *-inverses66.2%

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. associate-*r/66.2%

        \[\leadsto t - \color{blue}{t \cdot \frac{y}{z}} \]
    11. Simplified66.2%

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

    if 6.80000000000000005e-51 < z < 1.7999999999999999e85

    1. Initial program 92.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-70}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-51}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 6.9 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.4000000000000002e-82

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub55.3%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg55.3%

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

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval55.3%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \color{blue}{-1}\right)} \]
    10. Simplified55.3%

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

    if -6.4000000000000002e-82 < z < 6.5000000000000002e-157 or 3.1999999999999999e-68 < z < 6.89999999999999994e-47

    1. Initial program 92.9%

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

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

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

    if 6.5000000000000002e-157 < z < 3.1999999999999999e-68 or 6.9999999999999998e84 < z

    1. Initial program 70.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in66.2%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y - z}{z}} \]
      4. div-sub66.2%

        \[\leadsto \left(-t\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. *-inverses66.2%

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. associate-*r/66.2%

        \[\leadsto t - \color{blue}{t \cdot \frac{y}{z}} \]
    11. Simplified66.2%

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

    if 6.89999999999999994e-47 < z < 6.9999999999999998e84

    1. Initial program 92.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-82}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-68}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 6.9 \cdot 10^{-47}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.4% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.7000000000000001e-82 or 8.0000000000000001e86 < z

    1. Initial program 69.2%

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

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

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

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

    if -4.7000000000000001e-82 < z < 8.39999999999999966e-190

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

    if 8.39999999999999966e-190 < z < 2.20000000000000001e-39

    1. Initial program 86.9%

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

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

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

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

    if 2.20000000000000001e-39 < z < 8.0000000000000001e86

    1. Initial program 90.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-39}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 64.8% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.8e133 or 1.69999999999999989e-32 < a

    1. Initial program 94.8%

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

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

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

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

    if -8.8e133 < a < -1.3000000000000001e-221

    1. Initial program 74.3%

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

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

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

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

    if -1.3000000000000001e-221 < a < 8.1999999999999997e-89

    1. Initial program 72.6%

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

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

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

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

    if 8.1999999999999997e-89 < a < 1.69999999999999989e-32

    1. Initial program 67.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+133}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-89}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 74.1% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.8e133 or 3.8e-31 < a

    1. Initial program 94.8%

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

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

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

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

    if -8.8e133 < a < -5.8e52

    1. Initial program 84.8%

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    6. Step-by-step derivation
      1. clear-num79.9%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Applied egg-rr80.2%

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

    if -5.8e52 < a < -8.500000000000001e-5

    1. Initial program 75.9%

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

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

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

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

    if -8.500000000000001e-5 < a < 3.8e-31

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+133}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{+52}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-5}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-31}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 57.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.08 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 2.9 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6e74 or 2.0999999999999998e22 < x < 1.08e71

    1. Initial program 86.5%

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

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

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

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

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

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

    if -6e74 < x < 2.0999999999999998e22 or 1.08e71 < x < 2.9000000000000001e216

    1. Initial program 82.8%

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

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

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

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

    if 2.9000000000000001e216 < x

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+216}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -3 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 7.7 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.5000000000000002e90 or 7.70000000000000025e25 < y

    1. Initial program 93.1%

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

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

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

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

    if -8.5000000000000002e90 < y < -2.9999999999999999e-209 or -3.20000000000000005e-293 < y < 7.70000000000000025e25

    1. Initial program 72.2%

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

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

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

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

    if -2.9999999999999999e-209 < y < -3.20000000000000005e-293

    1. Initial program 78.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-209}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-293}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;y \leq 7.7 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 63.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.85000000000000001e-82 or 3.7999999999999998e38 < z

    1. Initial program 71.4%

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

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

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

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

    if -2.85000000000000001e-82 < z < 2.4e-194 or 6.00000000000000054e-42 < z < 3.7999999999999998e38

    1. Initial program 95.2%

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

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

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

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

    if 2.4e-194 < z < 6.00000000000000054e-42

    1. Initial program 86.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-194}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+38}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 32.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -1.06 \cdot 10^{-207}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -3.1 \cdot 10^{-294}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+14}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.35e44

    1. Initial program 92.4%

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

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

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

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

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

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

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

    if -1.35e44 < y < -1.05999999999999997e-207 or -3.10000000000000003e-294 < y < 7.2e14

    1. Initial program 69.7%

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

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

    if -1.05999999999999997e-207 < y < -3.10000000000000003e-294

    1. Initial program 78.7%

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

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

    if 7.2e14 < y

    1. Initial program 93.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-207}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 34.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -6.2 \cdot 10^{-209}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-293}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+14}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.60000000000000016e43

    1. Initial program 92.4%

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

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

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

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

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

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

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

    if -7.60000000000000016e43 < y < -6.2e-209 or -2.29999999999999995e-293 < y < 7.5e14

    1. Initial program 69.7%

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

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

    if -6.2e-209 < y < -2.29999999999999995e-293

    1. Initial program 78.7%

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

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

    if 7.5e14 < y

    1. Initial program 93.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-209}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-293}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 35.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+87}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.08e21 or 1.29999999999999999e87 < z

    1. Initial program 67.0%

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

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

    if -1.08e21 < z < 7.0000000000000003e-40

    1. Initial program 90.8%

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

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

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

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

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

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

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

    if 7.0000000000000003e-40 < z < 1.29999999999999999e87

    1. Initial program 90.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-40}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 37.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{-82}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+87}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.28e-82 or 5.19999999999999997e87 < z

    1. Initial program 69.5%

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

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

    if -1.28e-82 < z < 5.19999999999999997e87

    1. Initial program 92.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{-82}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

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

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification25.4%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024075 
(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)))))