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

Percentage Accurate: 67.3% → 90.6%
Time: 14.8s
Alternatives: 23
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 67.3% accurate, 1.0× speedup?

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

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

Alternative 1: 90.6% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.7%

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

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

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

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

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

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

      \[\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+99.9%

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

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

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

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

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

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

        \[\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/99.9%

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

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

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

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

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

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

    1. Initial program 76.6%

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

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

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

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

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

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

Alternative 2: 88.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 65.4%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999996e-281

    1. Initial program 95.8%

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

    if -9.9999999999999996e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2e-257

    1. Initial program 18.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+95.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. associate-*r/95.0%

        \[\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/95.0%

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

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

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

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

        \[\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/95.0%

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

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

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

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

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

Alternative 3: 90.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.7%

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

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

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

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

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

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

      \[\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+99.9%

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

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

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

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

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

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

        \[\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/99.9%

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

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

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

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

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

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

Alternative 4: 74.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.6999999999999998e-141

    1. Initial program 78.8%

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

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

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

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

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

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

    if -4.6999999999999998e-141 < a < 1.1500000000000001e-24

    1. Initial program 58.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 79.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}} \]
    6. Step-by-step derivation
      1. associate--l+79.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. associate-*r/79.3%

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

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

        \[\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-sub79.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-neg79.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--79.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/79.3%

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

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

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

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

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

    if 1.1500000000000001e-24 < a < 1.24999999999999994e126

    1. Initial program 73.1%

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

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

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

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

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

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

    if 1.24999999999999994e126 < a

    1. Initial program 77.8%

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

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

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

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

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

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

Alternative 5: 60.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7e15 or 1.90000000000000003e166 < z

    1. Initial program 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e15 < z < 9.49999999999999967e-173

    1. Initial program 94.6%

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

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

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

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

    if 9.49999999999999967e-173 < z < 1.90000000000000003e166

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 56.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{t}{\frac{a}{y - z}}\\ \mathbf{if}\;a \leq -1.32 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-110}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+102}:\\ \;\;\;\;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 (+ x (/ t (/ a (- y z))))))
   (if (<= a -1.32e-5)
     t_1
     (if (<= a 4.1e-110)
       (* t (- 1.0 (/ y z)))
       (if (<= a 7.8e+102) (* x (/ (- y a) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t / (a / (y - z)));
	double tmp;
	if (a <= -1.32e-5) {
		tmp = t_1;
	} else if (a <= 4.1e-110) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.8e+102) {
		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 = x + (t / (a / (y - z)))
    if (a <= (-1.32d-5)) then
        tmp = t_1
    else if (a <= 4.1d-110) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 7.8d+102) 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 = x + (t / (a / (y - z)));
	double tmp;
	if (a <= -1.32e-5) {
		tmp = t_1;
	} else if (a <= 4.1e-110) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.8e+102) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t / (a / (y - z)))
	tmp = 0
	if a <= -1.32e-5:
		tmp = t_1
	elif a <= 4.1e-110:
		tmp = t * (1.0 - (y / z))
	elif a <= 7.8e+102:
		tmp = x * ((y - a) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t / Float64(a / Float64(y - z))))
	tmp = 0.0
	if (a <= -1.32e-5)
		tmp = t_1;
	elseif (a <= 4.1e-110)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 7.8e+102)
		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 = x + (t / (a / (y - z)));
	tmp = 0.0;
	if (a <= -1.32e-5)
		tmp = t_1;
	elseif (a <= 4.1e-110)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 7.8e+102)
		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[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.32e-5], t$95$1, If[LessEqual[a, 4.1e-110], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+102], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.32000000000000007e-5 or 7.7999999999999997e102 < a

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.32000000000000007e-5 < a < 4.09999999999999983e-110

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.09999999999999983e-110 < a < 7.7999999999999997e102

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3500000000000001e-76 or 5.19999999999999972e-191 < a

    1. Initial program 76.6%

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

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

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

    if -2.3500000000000001e-76 < a < 5.19999999999999972e-191

    1. Initial program 58.3%

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

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

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

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

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

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

      \[\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+84.9%

        \[\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/84.9%

        \[\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/84.9%

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

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

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

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

        \[\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/84.9%

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

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

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

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

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

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

Alternative 8: 49.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \frac{z}{a}\\ \mathbf{if}\;a \leq -2 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-116}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+102}:\\ \;\;\;\;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 (- x (* t (/ z a)))))
   (if (<= a -2e-6)
     t_1
     (if (<= a 5.8e-116)
       (* t (- 1.0 (/ y z)))
       (if (<= a 7.8e+102) (* x (/ (- y a) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t * (z / a));
	double tmp;
	if (a <= -2e-6) {
		tmp = t_1;
	} else if (a <= 5.8e-116) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.8e+102) {
		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 = x - (t * (z / a))
    if (a <= (-2d-6)) then
        tmp = t_1
    else if (a <= 5.8d-116) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 7.8d+102) 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 = x - (t * (z / a));
	double tmp;
	if (a <= -2e-6) {
		tmp = t_1;
	} else if (a <= 5.8e-116) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.8e+102) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t * (z / a))
	tmp = 0
	if a <= -2e-6:
		tmp = t_1
	elif a <= 5.8e-116:
		tmp = t * (1.0 - (y / z))
	elif a <= 7.8e+102:
		tmp = x * ((y - a) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t * Float64(z / a)))
	tmp = 0.0
	if (a <= -2e-6)
		tmp = t_1;
	elseif (a <= 5.8e-116)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 7.8e+102)
		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 = x - (t * (z / a));
	tmp = 0.0;
	if (a <= -2e-6)
		tmp = t_1;
	elseif (a <= 5.8e-116)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 7.8e+102)
		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[(x - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e-6], t$95$1, If[LessEqual[a, 5.8e-116], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+102], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.99999999999999991e-6 or 7.7999999999999997e102 < a

    1. Initial program 79.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg68.4%

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a - z}} \]
    10. Simplified75.0%

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

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

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

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

    if -1.99999999999999991e-6 < a < 5.7999999999999996e-116

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.7999999999999996e-116 < a < 7.7999999999999997e102

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 49.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x - t \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.45e-5 or 1.1e91 < a

    1. Initial program 79.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg67.3%

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a}} \]
    13. Simplified63.9%

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

    if -1.45e-5 < a < 6.4000000000000004e-122

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000004e-122 < a < 1.1e91

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a - z}} \]
      2. distribute-neg-frac240.9%

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

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

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

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

Alternative 10: 74.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5999999999999999e61 or 2.0999999999999999e164 < y

    1. Initial program 74.6%

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

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

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

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

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

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

    if -1.5999999999999999e61 < y < 2.0999999999999999e164

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 74.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.59999999999999942e60 or 6.20000000000000057e163 < y

    1. Initial program 74.6%

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

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

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

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

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

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

    if -8.59999999999999942e60 < y < 6.20000000000000057e163

    1. Initial program 69.6%

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

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

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

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

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

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

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

Alternative 12: 69.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.20000000000000032e-73 or 4.40000000000000018e-172 < z

    1. Initial program 61.0%

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

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

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

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

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

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

    if -8.20000000000000032e-73 < z < 4.40000000000000018e-172

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 36.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+43}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-198}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.76 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3000000000000002e43 or 1.75999999999999999e112 < a

    1. Initial program 79.7%

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

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

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

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

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

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

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

    if -2.3000000000000002e43 < a < 2.39999999999999986e-198

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.39999999999999986e-198 < a < 1.75999999999999999e112

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 64.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.05e15 or 2e51 < z

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses54.0%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval54.0%

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

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

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

    if -2.05e15 < z < 2e51

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 63.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+15} \lor \neg \left(z \leq 4.5 \cdot 10^{+55}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8e15 or 4.49999999999999998e55 < z

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses54.0%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval54.0%

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

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

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

    if -3.8e15 < z < 4.49999999999999998e55

    1. Initial program 90.4%

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

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

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

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

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

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

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

Alternative 16: 60.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+71} \lor \neg \left(z \leq 1.25 \cdot 10^{+58}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45000000000000004e71 or 1.24999999999999996e58 < z

    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000004e71 < z < 1.24999999999999996e58

    1. Initial program 89.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified62.6%

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

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

Alternative 17: 62.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-70}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\

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

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


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

    1. Initial program 59.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg48.4%

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a - z}} \]
    10. Simplified60.2%

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

    if -2.4000000000000001e-70 < z < 1.69999999999999992e51

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999992e51 < z

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses51.0%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval51.0%

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

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

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

Alternative 18: 51.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.00000000000000023e-6 or 2.8999999999999997e45 < a

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a}} \]
    13. Simplified61.7%

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

    if -9.00000000000000023e-6 < a < 2.8999999999999997e45

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 55.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7999999999999998e42 or 1.50000000000000008e-77 < a

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e42 < a < 1.50000000000000008e-77

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 54.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.60000000000000002e44

    1. Initial program 79.9%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified68.9%

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    13. Simplified68.8%

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

    if -1.60000000000000002e44 < a < 5.2000000000000002e-73

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000002e-73 < a

    1. Initial program 76.4%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified49.9%

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

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

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

Alternative 21: 49.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+69}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.42e69 or 3.50000000000000023e45 < a

    1. Initial program 78.3%

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

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

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

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

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

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

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

    if -1.42e69 < a < 3.50000000000000023e45

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 38.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+42}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 0.00105:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.50000000000000019e42 or 0.00104999999999999994 < a

    1. Initial program 77.5%

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

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

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

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

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

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

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

    if -9.50000000000000019e42 < a < 0.00104999999999999994

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 23: 25.6% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer Target 1: 84.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024177 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))