Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.5% → 95.2%
Time: 14.5s
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: 79.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: 95.2% 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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \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-305) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (+ 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-305) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} 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-305) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)));
	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[Or[LessEqual[t$95$1, -1e-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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


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

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 2.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a - y}{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)))) < -2e-160 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 91.6%

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

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

    1. Initial program 10.8%

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

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

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

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

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

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

        \[\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*68.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.7% 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^{-160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \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 -2e-160)
     t_1
     (if (<= t_1 0.0)
       (- t (* x (/ (- a y) z)))
       (+ x (/ (- y z) (/ (- a z) (- t x))))))))
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-160) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = t - (x * ((a - y) / z));
	} else {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_1 <= (-2d-160)) then
        tmp = t_1
    else if (t_1 <= 0.0d0) then
        tmp = t - (x * ((a - y) / z))
    else
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -2e-160) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = t - (x * ((a - y) / z));
	} else {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_1 <= -2e-160:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = t - (x * ((a - y) / z))
	else:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	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-160)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z)));
	else
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	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-160)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = t - (x * ((a - y) / z));
	else
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	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[LessEqual[t$95$1, -2e-160], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $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 -2 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\

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


\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)))) < -2e-160

    1. Initial program 92.4%

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

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

    1. Initial program 10.8%

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

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

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

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

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

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

        \[\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*68.3%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 90.7%

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

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

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

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

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

Alternative 4: 47.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{-26}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-208}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{+162}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* x (/ (- y a) z))))
   (if (<= z -1.8e-26)
     (+ x t)
     (if (<= z -2.1e-73)
       t_2
       (if (<= z 1.25e-208)
         (+ x (/ (* y t) a))
         (if (<= z 1.15e-70)
           t_1
           (if (<= z 4e-45)
             (* t (/ y (- a z)))
             (if (<= z 2.9e-7) t_1 (if (<= z 2.95e+162) t_2 t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = x * ((y - a) / z);
	double tmp;
	if (z <= -1.8e-26) {
		tmp = x + t;
	} else if (z <= -2.1e-73) {
		tmp = t_2;
	} else if (z <= 1.25e-208) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.15e-70) {
		tmp = t_1;
	} else if (z <= 4e-45) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.9e-7) {
		tmp = t_1;
	} else if (z <= 2.95e+162) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = x * ((y - a) / z)
    if (z <= (-1.8d-26)) then
        tmp = x + t
    else if (z <= (-2.1d-73)) then
        tmp = t_2
    else if (z <= 1.25d-208) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.15d-70) then
        tmp = t_1
    else if (z <= 4d-45) then
        tmp = t * (y / (a - z))
    else if (z <= 2.9d-7) then
        tmp = t_1
    else if (z <= 2.95d+162) then
        tmp = t_2
    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 t_2 = x * ((y - a) / z);
	double tmp;
	if (z <= -1.8e-26) {
		tmp = x + t;
	} else if (z <= -2.1e-73) {
		tmp = t_2;
	} else if (z <= 1.25e-208) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.15e-70) {
		tmp = t_1;
	} else if (z <= 4e-45) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.9e-7) {
		tmp = t_1;
	} else if (z <= 2.95e+162) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = x * ((y - a) / z)
	tmp = 0
	if z <= -1.8e-26:
		tmp = x + t
	elif z <= -2.1e-73:
		tmp = t_2
	elif z <= 1.25e-208:
		tmp = x + ((y * t) / a)
	elif z <= 1.15e-70:
		tmp = t_1
	elif z <= 4e-45:
		tmp = t * (y / (a - z))
	elif z <= 2.9e-7:
		tmp = t_1
	elif z <= 2.95e+162:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(x * Float64(Float64(y - a) / z))
	tmp = 0.0
	if (z <= -1.8e-26)
		tmp = Float64(x + t);
	elseif (z <= -2.1e-73)
		tmp = t_2;
	elseif (z <= 1.25e-208)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.15e-70)
		tmp = t_1;
	elseif (z <= 4e-45)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 2.9e-7)
		tmp = t_1;
	elseif (z <= 2.95e+162)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = x * ((y - a) / z);
	tmp = 0.0;
	if (z <= -1.8e-26)
		tmp = x + t;
	elseif (z <= -2.1e-73)
		tmp = t_2;
	elseif (z <= 1.25e-208)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.15e-70)
		tmp = t_1;
	elseif (z <= 4e-45)
		tmp = t * (y / (a - z));
	elseif (z <= 2.9e-7)
		tmp = t_1;
	elseif (z <= 2.95e+162)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-26], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.1e-73], t$95$2, If[LessEqual[z, 1.25e-208], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-70], t$95$1, If[LessEqual[z, 4e-45], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-7], t$95$1, If[LessEqual[z, 2.95e+162], t$95$2, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 2.95 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.8000000000000001e-26

    1. Initial program 81.4%

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

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

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

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

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

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

    if -1.8000000000000001e-26 < z < -2.0999999999999999e-73 or 2.8999999999999998e-7 < z < 2.95000000000000014e162

    1. Initial program 77.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{a + -1 \cdot y}{z}} \]
      2. neg-mul-155.3%

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

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

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

    if -2.0999999999999999e-73 < z < 1.24999999999999991e-208

    1. Initial program 94.0%

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

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

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

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

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

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

    if 1.24999999999999991e-208 < z < 1.15e-70 or 3.99999999999999994e-45 < z < 2.8999999999999998e-7

    1. Initial program 90.1%

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

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

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

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

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

    if 1.15e-70 < z < 3.99999999999999994e-45

    1. Initial program 80.3%

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

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

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

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

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

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

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

    if 2.95000000000000014e162 < z

    1. Initial program 55.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-26}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-208}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-70}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{+162}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 45.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\

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

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

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

\mathbf{elif}\;z \leq 1.52 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.4000000000000002e-19

    1. Initial program 81.7%

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

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

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

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

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

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

    if -5.4000000000000002e-19 < z < -2.0999999999999999e-73 or 1.52000000000000006e-6 < z < 2.90000000000000006e162

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-73 < z < 6.1999999999999998e-201

    1. Initial program 94.0%

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

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

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

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

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

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

    if 6.1999999999999998e-201 < z < 6.50000000000000005e-71 or 1.7999999999999999e-44 < z < 1.52000000000000006e-6

    1. Initial program 90.1%

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

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

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

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

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

    if 6.50000000000000005e-71 < z < 1.7999999999999999e-44

    1. Initial program 80.3%

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

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

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

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

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

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

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

    if 2.90000000000000006e162 < z

    1. Initial program 55.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-19}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+162}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -3.05 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-36}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-138}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+24}:\\ \;\;\;\;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 (/ (- y z) (- a z)))))
   (if (<= t -3.05e+85)
     t_2
     (if (<= t -1e+37)
       t_1
       (if (<= t -7e-36)
         t_2
         (if (<= t -2.05e-138)
           t_1
           (if (<= t -7.4e-233)
             (* x (/ (- y a) z))
             (if (<= t 3.6e+24) 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 * ((y - z) / (a - z));
	double tmp;
	if (t <= -3.05e+85) {
		tmp = t_2;
	} else if (t <= -1e+37) {
		tmp = t_1;
	} else if (t <= -7e-36) {
		tmp = t_2;
	} else if (t <= -2.05e-138) {
		tmp = t_1;
	} else if (t <= -7.4e-233) {
		tmp = x * ((y - a) / z);
	} else if (t <= 3.6e+24) {
		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 * ((y - z) / (a - z))
    if (t <= (-3.05d+85)) then
        tmp = t_2
    else if (t <= (-1d+37)) then
        tmp = t_1
    else if (t <= (-7d-36)) then
        tmp = t_2
    else if (t <= (-2.05d-138)) then
        tmp = t_1
    else if (t <= (-7.4d-233)) then
        tmp = x * ((y - a) / z)
    else if (t <= 3.6d+24) 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 * ((y - z) / (a - z));
	double tmp;
	if (t <= -3.05e+85) {
		tmp = t_2;
	} else if (t <= -1e+37) {
		tmp = t_1;
	} else if (t <= -7e-36) {
		tmp = t_2;
	} else if (t <= -2.05e-138) {
		tmp = t_1;
	} else if (t <= -7.4e-233) {
		tmp = x * ((y - a) / z);
	} else if (t <= 3.6e+24) {
		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 * ((y - z) / (a - z))
	tmp = 0
	if t <= -3.05e+85:
		tmp = t_2
	elif t <= -1e+37:
		tmp = t_1
	elif t <= -7e-36:
		tmp = t_2
	elif t <= -2.05e-138:
		tmp = t_1
	elif t <= -7.4e-233:
		tmp = x * ((y - a) / z)
	elif t <= 3.6e+24:
		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(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -3.05e+85)
		tmp = t_2;
	elseif (t <= -1e+37)
		tmp = t_1;
	elseif (t <= -7e-36)
		tmp = t_2;
	elseif (t <= -2.05e-138)
		tmp = t_1;
	elseif (t <= -7.4e-233)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (t <= 3.6e+24)
		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 * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -3.05e+85)
		tmp = t_2;
	elseif (t <= -1e+37)
		tmp = t_1;
	elseif (t <= -7e-36)
		tmp = t_2;
	elseif (t <= -2.05e-138)
		tmp = t_1;
	elseif (t <= -7.4e-233)
		tmp = x * ((y - a) / z);
	elseif (t <= 3.6e+24)
		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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.05e+85], t$95$2, If[LessEqual[t, -1e+37], t$95$1, If[LessEqual[t, -7e-36], t$95$2, If[LessEqual[t, -2.05e-138], t$95$1, If[LessEqual[t, -7.4e-233], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+24], 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 \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -3.05 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -2.05 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.04999999999999991e85 or -9.99999999999999954e36 < t < -6.9999999999999999e-36 or 3.59999999999999983e24 < t

    1. Initial program 88.5%

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

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

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

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

    if -3.04999999999999991e85 < t < -9.99999999999999954e36 or -6.9999999999999999e-36 < t < -2.05e-138 or -7.3999999999999996e-233 < t < 3.59999999999999983e24

    1. Initial program 80.6%

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

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

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

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

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

    if -2.05e-138 < t < -7.3999999999999996e-233

    1. Initial program 63.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{a + -1 \cdot y}{z}} \]
      2. neg-mul-168.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.05 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+37}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-36}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+24}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 44.7% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.2e-17

    1. Initial program 81.7%

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

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

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

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

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

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

    if -2.2e-17 < z < -2.0999999999999999e-73

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-73 < z < 2.35000000000000014e-139

    1. Initial program 93.6%

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

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

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

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

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

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

    if 2.35000000000000014e-139 < z < 2.20000000000000021e-65

    1. Initial program 86.7%

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

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

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

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

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

    if 2.20000000000000021e-65 < z < 7.19999999999999987e162

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified38.1%

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

    if 7.19999999999999987e162 < z

    1. Initial program 55.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-17}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-139}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-65}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+162}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 62.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -8 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 72000000000000:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \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 -8e+46)
     t_1
     (if (<= z -1.02e-66)
       (* y (/ (- t x) (- a z)))
       (if (<= z 72000000000000.0)
         (+ x (* y (/ (- t x) a)))
         (if (<= z 2e+139) (* x (/ (- y a) z)) 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 <= -8e+46) {
		tmp = t_1;
	} else if (z <= -1.02e-66) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 72000000000000.0) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2e+139) {
		tmp = x * ((y - 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 * ((y - z) / (a - z))
    if (z <= (-8d+46)) then
        tmp = t_1
    else if (z <= (-1.02d-66)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 72000000000000.0d0) then
        tmp = x + (y * ((t - x) / a))
    else if (z <= 2d+139) then
        tmp = x * ((y - 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 * ((y - z) / (a - z));
	double tmp;
	if (z <= -8e+46) {
		tmp = t_1;
	} else if (z <= -1.02e-66) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 72000000000000.0) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2e+139) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -8e+46:
		tmp = t_1
	elif z <= -1.02e-66:
		tmp = y * ((t - x) / (a - z))
	elif z <= 72000000000000.0:
		tmp = x + (y * ((t - x) / a))
	elif z <= 2e+139:
		tmp = x * ((y - a) / z)
	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 <= -8e+46)
		tmp = t_1;
	elseif (z <= -1.02e-66)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 72000000000000.0)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (z <= 2e+139)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	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 <= -8e+46)
		tmp = t_1;
	elseif (z <= -1.02e-66)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 72000000000000.0)
		tmp = x + (y * ((t - x) / a));
	elseif (z <= 2e+139)
		tmp = x * ((y - 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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+46], t$95$1, If[LessEqual[z, -1.02e-66], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 72000000000000.0], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+139], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 72000000000000:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.9999999999999999e46 or 2.00000000000000007e139 < z

    1. Initial program 71.5%

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

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

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

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

    if -7.9999999999999999e46 < z < -1.01999999999999996e-66

    1. Initial program 93.8%

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

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

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

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

    if -1.01999999999999996e-66 < z < 7.2e13

    1. Initial program 91.3%

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

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

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

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

    if 7.2e13 < z < 2.00000000000000007e139

    1. Initial program 62.1%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{a + -1 \cdot y}{z}} \]
      2. neg-mul-161.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+46}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 72000000000000:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 47.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+107}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-52} \lor \neg \left(a \leq 2.7 \cdot 10^{-65}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))))
   (if (<= a -3.5e+107)
     t_1
     (if (<= a -2e+55)
       t
       (if (or (<= a -2e-52) (not (<= a 2.7e-65))) t_1 (* y (/ (- x t) z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (a <= -3.5e+107) {
		tmp = t_1;
	} else if (a <= -2e+55) {
		tmp = t;
	} else if ((a <= -2e-52) || !(a <= 2.7e-65)) {
		tmp = t_1;
	} else {
		tmp = y * ((x - t) / 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 * t) / a)
    if (a <= (-3.5d+107)) then
        tmp = t_1
    else if (a <= (-2d+55)) then
        tmp = t
    else if ((a <= (-2d-52)) .or. (.not. (a <= 2.7d-65))) then
        tmp = t_1
    else
        tmp = y * ((x - t) / 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 * t) / a);
	double tmp;
	if (a <= -3.5e+107) {
		tmp = t_1;
	} else if (a <= -2e+55) {
		tmp = t;
	} else if ((a <= -2e-52) || !(a <= 2.7e-65)) {
		tmp = t_1;
	} else {
		tmp = y * ((x - t) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	tmp = 0
	if a <= -3.5e+107:
		tmp = t_1
	elif a <= -2e+55:
		tmp = t
	elif (a <= -2e-52) or not (a <= 2.7e-65):
		tmp = t_1
	else:
		tmp = y * ((x - t) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (a <= -3.5e+107)
		tmp = t_1;
	elseif (a <= -2e+55)
		tmp = t;
	elseif ((a <= -2e-52) || !(a <= 2.7e-65))
		tmp = t_1;
	else
		tmp = Float64(y * Float64(Float64(x - t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	tmp = 0.0;
	if (a <= -3.5e+107)
		tmp = t_1;
	elseif (a <= -2e+55)
		tmp = t;
	elseif ((a <= -2e-52) || ~((a <= 2.7e-65)))
		tmp = t_1;
	else
		tmp = y * ((x - t) / z);
	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]}, If[LessEqual[a, -3.5e+107], t$95$1, If[LessEqual[a, -2e+55], t, If[Or[LessEqual[a, -2e-52], N[Not[LessEqual[a, 2.7e-65]], $MachinePrecision]], t$95$1, N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{+55}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -2 \cdot 10^{-52} \lor \neg \left(a \leq 2.7 \cdot 10^{-65}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4999999999999997e107 or -2.00000000000000002e55 < a < -2e-52 or 2.6999999999999999e-65 < a

    1. Initial program 86.7%

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

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

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

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

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

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

    if -3.4999999999999997e107 < a < -2.00000000000000002e55

    1. Initial program 83.6%

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

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

    if -2e-52 < a < 2.6999999999999999e-65

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+107}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-52} \lor \neg \left(a \leq 2.7 \cdot 10^{-65}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 36.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+122} \lor \neg \left(y \leq -5.9 \cdot 10^{+28} \lor \neg \left(y \leq -2.2 \cdot 10^{-52}\right) \land y \leq 4.2 \cdot 10^{+61}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.20000000000000032e122 or -5.9000000000000002e28 < y < -2.20000000000000009e-52 or 4.2000000000000002e61 < y

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified46.5%

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

    if -4.20000000000000032e122 < y < -5.9000000000000002e28 or -2.20000000000000009e-52 < y < 4.2000000000000002e61

    1. Initial program 82.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+122} \lor \neg \left(y \leq -5.9 \cdot 10^{+28} \lor \neg \left(y \leq -2.2 \cdot 10^{-52}\right) \land y \leq 4.2 \cdot 10^{+61}\right):\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 39.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -1.06 \cdot 10^{+28}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+63}:\\
\;\;\;\;x + t\\

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


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

    1. Initial program 84.1%

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

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

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

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

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

    if -9.5000000000000001e91 < y < -1.0600000000000001e28 or -2.20000000000000009e-52 < y < 3.59999999999999999e63

    1. Initial program 81.3%

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

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

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

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

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

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

    if -1.0600000000000001e28 < y < -2.20000000000000009e-52

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

    if 3.59999999999999999e63 < y

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified43.8%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 12: 38.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -6.8 \cdot 10^{+27}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq 1.16 \cdot 10^{+54}:\\
\;\;\;\;x + t\\

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


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

    1. Initial program 83.5%

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

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

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

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

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

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

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

    if -5.40000000000000044e96 < y < -6.8e27 or -2.20000000000000009e-52 < y < 1.1600000000000001e54

    1. Initial program 81.5%

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

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

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

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

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

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

    if -6.8e27 < y < -2.20000000000000009e-52

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

    if 1.1600000000000001e54 < y

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified43.8%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 13: 36.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -7.6 \cdot 10^{+28}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+58}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.99999999999999978e122 or 1.05000000000000006e58 < y

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999978e122 < y < -7.5999999999999998e28 or -2.20000000000000009e-52 < y < 1.05000000000000006e58

    1. Initial program 82.4%

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

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

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

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

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

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

    if -7.5999999999999998e28 < y < -2.20000000000000009e-52

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 58.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.7500000000000001e218

    1. Initial program 56.6%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{a + -1 \cdot y}{z}} \]
      2. neg-mul-160.4%

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

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

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

    if -1.7500000000000001e218 < x < -9.99999999999999997e-74

    1. Initial program 85.4%

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

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

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

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

    if -9.99999999999999997e-74 < x < 1.50000000000000001e119

    1. Initial program 86.9%

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

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

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

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

    if 1.50000000000000001e119 < x

    1. Initial program 85.0%

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

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

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

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

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

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

Alternative 15: 75.1% accurate, 0.6× speedup?

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

\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.50000000000000023e-55 or 1.49999999999999999e-65 < a

    1. Initial program 86.5%

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

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

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

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

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

    if -7.50000000000000023e-55 < a < 1.49999999999999999e-65

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 76.3% accurate, 0.6× speedup?

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

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

\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 a < -2.39999999999999991e-37 or 1.82e-65 < a

    1. Initial program 87.4%

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

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

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

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

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

    if -2.39999999999999991e-37 < a < 1.82e-65

    1. Initial program 77.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.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+79.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--79.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-sub80.4%

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub79.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*79.4%

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

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

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

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

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

Alternative 17: 74.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.5e-49 or 1.2499999999999999e-66 < a

    1. Initial program 86.3%

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

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

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

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

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

    if -1.5e-49 < a < 1.2499999999999999e-66

    1. Initial program 78.2%

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

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

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

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

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

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

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

        \[\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*79.7%

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

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

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

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

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

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

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

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

Alternative 18: 68.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.6000000000000001e88 or 3.70000000000000018e49 < a

    1. Initial program 85.6%

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

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

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

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

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

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

    if -2.6000000000000001e88 < a < 3.70000000000000018e49

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 39.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+115} \lor \neg \left(y \leq 4.25 \cdot 10^{+167}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.45000000000000002e115 or 4.25000000000000003e167 < y

    1. Initial program 84.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t}}} \]
      3. div-inv41.0%

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + a}}{t}} \]
      7. add-sqr-sqrt24.9%

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

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

        \[\leadsto \frac{y}{\frac{\sqrt{\color{blue}{z \cdot z}} + a}{t}} \]
      10. sqrt-unprod11.7%

        \[\leadsto \frac{y}{\frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + a}{t}} \]
      11. add-sqr-sqrt32.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified36.7%

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

    if -1.45000000000000002e115 < y < 4.25000000000000003e167

    1. Initial program 82.4%

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

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

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

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

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

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

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

Alternative 20: 37.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+57}:\\
\;\;\;\;x\\

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


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

    1. Initial program 71.4%

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

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

    if -6.1999999999999999e-6 < z < 2.3500000000000001e57

    1. Initial program 91.0%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 33.8% accurate, 4.3× speedup?

\[\begin{array}{l} \\ x + t \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x t))
double code(double x, double y, double z, double t, double a) {
	return x + 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 = x + t
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + t;
}
def code(x, y, z, t, a):
	return x + t
function code(x, y, z, t, a)
	return Float64(x + t)
end
function tmp = code(x, y, z, t, a)
	tmp = x + t;
end
code[x_, y_, z_, t_, a_] := N[(x + t), $MachinePrecision]
\begin{array}{l}

\\
x + t
\end{array}
Derivation
  1. Initial program 83.0%

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

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

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

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

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

    \[\leadsto x + \color{blue}{t} \]
  7. Add Preprocessing

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

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

    \[\leadsto \color{blue}{t} \]
  4. Add Preprocessing

Reproduce

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