Numeric.Signal:interpolate from hsignal-0.2.7.1

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

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

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


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

    1. Initial program 94.3%

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

    if -1.9999999999999999e-213 < (+.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. Taylor expanded in z around inf 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -2 \cdot 10^{-213} \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{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]

Alternative 2: 36.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -9 \cdot 10^{-256}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+86}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+142}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.39999999999999984e160 or 5.50000000000000035e142 < a

    1. Initial program 93.1%

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

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

    if -4.39999999999999984e160 < a < -2.99999999999999986e-130 or 1.49999999999999988e86 < a < 5.50000000000000035e142

    1. Initial program 83.4%

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

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

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

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

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

    if -2.99999999999999986e-130 < a < -9.0000000000000005e-256

    1. Initial program 62.7%

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

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

    if -9.0000000000000005e-256 < a < 6.99999999999999966e-237

    1. Initial program 74.3%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z}} \]
      3. distribute-rgt-neg-in59.6%

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

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

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

    if 6.99999999999999966e-237 < a < 1.49999999999999988e86

    1. Initial program 76.9%

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

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

      \[\leadsto \color{blue}{t + x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification50.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{+160}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-130}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-256}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-237}:\\ \;\;\;\;y \cdot \frac{-t}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+86}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+142}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 48.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -6.5 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-25}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+78}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+142}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.79999999999999992e161 or 6.1999999999999998e142 < a

    1. Initial program 93.1%

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

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

    if -1.79999999999999992e161 < a < -6.5000000000000001e69 or 2.90000000000000017e78 < a < 6.1999999999999998e142

    1. Initial program 87.2%

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

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

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

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

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

    if -6.5000000000000001e69 < a < -2.79999999999999988e-25

    1. Initial program 84.7%

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

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

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

    if -2.79999999999999988e-25 < a < 2.90000000000000017e78

    1. Initial program 73.1%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/57.0%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg57.0%

        \[\leadsto \frac{t}{\frac{\color{blue}{-z}}{y - z}} \]
    7. Simplified57.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    9. Step-by-step derivation
      1. +-commutative52.8%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg52.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+161}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-25}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+142}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 69.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.5000000000000001e-7 or 6.9999999999999996e180 < z

    1. Initial program 58.9%

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

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

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

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

    if -9.5000000000000001e-7 < z < 5.9999999999999996e-137

    1. Initial program 95.9%

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

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

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

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

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

    if 5.9999999999999996e-137 < z < 6.9999999999999996e180

    1. Initial program 92.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-137}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+180}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 5: 47.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -2.35 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+142}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.00000000000000003e160 or 5.6e142 < a

    1. Initial program 93.1%

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

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

    if -4.00000000000000003e160 < a < -2.34999999999999983e-46 or 8.9999999999999999e70 < a < 5.6e142

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

    if -2.34999999999999983e-46 < a < 8.9999999999999999e70

    1. Initial program 73.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/58.3%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg58.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    9. Step-by-step derivation
      1. +-commutative53.8%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg53.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+160}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.35 \cdot 10^{-46}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+142}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 75.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.60000000000000001e-27 or 4.0000000000000001e-58 < a

    1. Initial program 87.9%

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

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

    if -7.60000000000000001e-27 < a < 4.0000000000000001e-58

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 60.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+18} \lor \neg \left(z \leq 6.5 \cdot 10^{-128}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.05e18 or 6.49999999999999977e-128 < z

    1. Initial program 72.4%

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

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

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

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

    if -2.05e18 < z < 6.49999999999999977e-128

    1. Initial program 95.0%

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

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

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

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

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

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

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

Alternative 8: 62.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -19000 \lor \neg \left(z \leq 5.8 \cdot 10^{-29}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -19000 or 5.80000000000000048e-29 < z

    1. Initial program 69.3%

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

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

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

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

    if -19000 < z < 5.80000000000000048e-29

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

Alternative 9: 66.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0037 \lor \neg \left(z \leq 5.7 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.0037000000000000002 or 5.69999999999999977e-30 < z

    1. Initial program 68.9%

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

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

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

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

    if -0.0037000000000000002 < z < 5.69999999999999977e-30

    1. Initial program 95.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified82.2%

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

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

Alternative 10: 67.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-6} \lor \neg \left(z \leq 650\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\

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


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

    1. Initial program 67.4%

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

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

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

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

    if -5.1000000000000003e-6 < z < 650

    1. Initial program 95.9%

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

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

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

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

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

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

Alternative 11: 39.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -70000000000:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-259}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7e10 or 1.2999999999999999e147 < z

    1. Initial program 61.2%

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

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

    if -7e10 < z < 4.49999999999999974e-259 or 5.39999999999999983e-204 < z < 1.2999999999999999e147

    1. Initial program 94.1%

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

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

    if 4.49999999999999974e-259 < z < 5.39999999999999983e-204

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    7. Applied egg-rr55.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -70000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-259}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+147}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 39.4% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+148}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8e15 or 1.19999999999999997e148 < z

    1. Initial program 61.2%

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

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

    if -6.8e15 < z < 2.8e-259 or 5.4999999999999999e-204 < z < 1.19999999999999997e148

    1. Initial program 94.1%

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

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

    if 2.8e-259 < z < 5.4999999999999999e-204

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    7. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+15}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-259}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-204}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+148}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 56.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+17} \lor \neg \left(z \leq 190000000\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2e17 or 1.9e8 < z

    1. Initial program 67.7%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/57.1%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg57.1%

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg52.1%

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

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

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

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

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

    if -2e17 < z < 1.9e8

    1. Initial program 95.2%

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

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

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

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

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

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

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

Alternative 14: 56.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -41000000:\\
\;\;\;\;t - y \cdot \frac{t}{z}\\

\mathbf{elif}\;z \leq 205000000:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

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


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

    1. Initial program 60.3%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/59.4%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg59.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    9. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg56.4%

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

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

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

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

    if -4.1e7 < z < 2.05e8

    1. Initial program 95.2%

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

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

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

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

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

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

    if 2.05e8 < z

    1. Initial program 75.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/54.6%

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

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg47.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -41000000:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 205000000:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 15: 56.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 48000:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

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


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

    1. Initial program 60.3%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/59.4%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y - z}}} \]
      2. mul-1-neg59.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    9. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg56.4%

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

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

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

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

    if -3e20 < z < 48000

    1. Initial program 95.2%

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

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

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

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

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

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

    if 48000 < z

    1. Initial program 75.5%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    6. Step-by-step derivation
      1. associate-*r/54.6%

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{-z}{y - z}}} \]
    8. Step-by-step derivation
      1. frac-2neg54.6%

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

        \[\leadsto \frac{t}{\color{blue}{\left(-\left(-z\right)\right) \cdot \frac{1}{-\left(y - z\right)}}} \]
      3. remove-double-neg54.5%

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

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

        \[\leadsto \frac{t}{z \cdot \frac{1}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}} \]
      6. remove-double-neg54.5%

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{z \cdot 1}{\left(-y\right) + z}}} \]
      2. *-rgt-identity54.6%

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

        \[\leadsto \frac{t}{\frac{z}{\color{blue}{z + \left(-y\right)}}} \]
      4. unsub-neg54.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+20}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 48000:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{z - y}}\\ \end{array} \]

Alternative 16: 39.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.1999999999999997e23 or 1.65e149 < z

    1. Initial program 61.2%

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

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

    if -7.1999999999999997e23 < z < 1.65e149

    1. Initial program 94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+23}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 26.3% accurate, 13.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification24.5%

    \[\leadsto t \]

Reproduce

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