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

Percentage Accurate: 68.1% → 91.1%
Time: 17.5s
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: 68.1% 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: 91.1% 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^{-294}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+284}:\\ \;\;\;\;t\_2\\ \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-294)
       t_2
       (if (<= t_2 0.0)
         (- t (/ (* (- t x) (- y a)) z))
         (if (<= t_2 2e+284) t_2 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-294) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_2 <= 2e+284) {
		tmp = t_2;
	} 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-294) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_2 <= 2e+284) {
		tmp = t_2;
	} 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-294:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t - (((t - x) * (y - a)) / z)
	elif t_2 <= 2e+284:
		tmp = t_2
	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-294)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	elseif (t_2 <= 2e+284)
		tmp = t_2;
	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-294)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t - (((t - x) * (y - a)) / z);
	elseif (t_2 <= 2e+284)
		tmp = t_2;
	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-294], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+284], t$95$2, 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^{-294}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;t\_2\\

\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 2.00000000000000016e284 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 33.8%

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

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

      \[\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))) < -1.00000000000000002e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000016e284

    1. Initial program 94.7%

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

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

    1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

        \[\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 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 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^{-294} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \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-294) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (- 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-294) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} 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-294) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	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[Or[LessEqual[t$95$1, -1e-294], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * 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^{-294} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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

    1. Initial program 70.0%

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

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

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

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

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

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

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

    1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.7% 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^{-294} \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-294) (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-294) || !(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-294)) .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-294) || !(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-294) 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-294) || !(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-294) || ~((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-294], 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^{-294} \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))) < -1.00000000000000002e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 70.0%

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

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

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

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

        \[\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.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-out80.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. +-commutative80.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-sub80.8%

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

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

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

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

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

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

    1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -1 \cdot 10^{-294} \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: 75.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.00000000000000009e245 or 6.79999999999999973e230 < z

    1. Initial program 29.5%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified27.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 28.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified89.6%

      \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    14. Step-by-step derivation
      1. *-commutative89.6%

        \[\leadsto t + \color{blue}{\frac{-x}{z} \cdot a} \]
      2. add-sqr-sqrt57.1%

        \[\leadsto t + \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \cdot a \]
      3. sqrt-unprod69.3%

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

        \[\leadsto t + \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \cdot a \]
      5. sqrt-unprod29.4%

        \[\leadsto t + \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \cdot a \]
      6. add-sqr-sqrt69.2%

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

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

        \[\leadsto t - \color{blue}{\frac{-x}{z}} \cdot a \]
      9. *-commutative69.2%

        \[\leadsto t - \color{blue}{a \cdot \frac{-x}{z}} \]
      10. add-sqr-sqrt39.7%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \]
      11. sqrt-unprod60.4%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z} \]
      12. sqr-neg60.4%

        \[\leadsto t - a \cdot \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \]
      13. sqrt-unprod32.4%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \]
      14. add-sqr-sqrt89.6%

        \[\leadsto t - a \cdot \frac{\color{blue}{x}}{z} \]
    15. Applied egg-rr89.6%

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

    if -2.00000000000000009e245 < z < -1.75

    1. Initial program 50.1%

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

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

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

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

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

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

    if -1.75 < z < 6.49999999999999967e-147

    1. Initial program 87.5%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.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 89.6%

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999967e-147 < z < 6.79999999999999973e230

    1. Initial program 68.1%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified85.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 68.7%

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

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

Alternative 5: 75.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -75:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+231}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0000000000000002e252 or 4.49999999999999991e231 < z

    1. Initial program 29.5%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified27.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 28.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified89.6%

      \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    14. Step-by-step derivation
      1. *-commutative89.6%

        \[\leadsto t + \color{blue}{\frac{-x}{z} \cdot a} \]
      2. add-sqr-sqrt57.1%

        \[\leadsto t + \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \cdot a \]
      3. sqrt-unprod69.3%

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

        \[\leadsto t + \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \cdot a \]
      5. sqrt-unprod29.4%

        \[\leadsto t + \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \cdot a \]
      6. add-sqr-sqrt69.2%

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

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

        \[\leadsto t - \color{blue}{\frac{-x}{z}} \cdot a \]
      9. *-commutative69.2%

        \[\leadsto t - \color{blue}{a \cdot \frac{-x}{z}} \]
      10. add-sqr-sqrt39.7%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \]
      11. sqrt-unprod60.4%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z} \]
      12. sqr-neg60.4%

        \[\leadsto t - a \cdot \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \]
      13. sqrt-unprod32.4%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \]
      14. add-sqr-sqrt89.6%

        \[\leadsto t - a \cdot \frac{\color{blue}{x}}{z} \]
    15. Applied egg-rr89.6%

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

    if -2.0000000000000002e252 < z < -75 or 9.4999999999999991e-47 < z < 4.49999999999999991e231

    1. Initial program 53.7%

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

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

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

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

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

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

    if -75 < z < 9.4999999999999991e-47

    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*92.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+252}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -75:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+231}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-182}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.05e-107 or 3.2999999999999998e-26 < a

    1. Initial program 67.6%

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

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

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

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

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

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

    if -1.05e-107 < a < -5.20000000000000011e-182

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000011e-182 < a < 3.2999999999999998e-26

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-107}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-182}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 44.0%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified29.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 37.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + a \cdot \frac{t - x}{z}} \]
    11. Step-by-step derivation
      1. clear-num83.6%

        \[\leadsto t + a \cdot \color{blue}{\frac{1}{\frac{z}{t - x}}} \]
      2. un-div-inv83.8%

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

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

    if -2e229 < z < 1.76000000000000003e230

    1. Initial program 69.7%

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

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

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

    if 1.76000000000000003e230 < z

    1. Initial program 20.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified29.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 20.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified94.2%

      \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    14. Step-by-step derivation
      1. *-commutative94.2%

        \[\leadsto t + \color{blue}{\frac{-x}{z} \cdot a} \]
      2. add-sqr-sqrt52.9%

        \[\leadsto t + \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \cdot a \]
      3. sqrt-unprod71.1%

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

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

        \[\leadsto t + \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \cdot a \]
      6. add-sqr-sqrt76.9%

        \[\leadsto t + \frac{\color{blue}{x}}{z} \cdot a \]
      7. cancel-sign-sub76.9%

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

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

        \[\leadsto t - \color{blue}{a \cdot \frac{-x}{z}} \]
      10. add-sqr-sqrt41.5%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \]
      11. sqrt-unprod65.6%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z} \]
      12. sqr-neg65.6%

        \[\leadsto t - a \cdot \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \]
      13. sqrt-unprod41.2%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \]
      14. add-sqr-sqrt94.2%

        \[\leadsto t - a \cdot \frac{\color{blue}{x}}{z} \]
    15. Applied egg-rr94.2%

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

Alternative 8: 45.9% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.4000000000000001e156 or 1.15000000000000004e-17 < z

    1. Initial program 41.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified61.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 32.4%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    10. Simplified61.4%

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

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

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

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

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

    if -5.4000000000000001e156 < z < 2.39999999999999997e-159

    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*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 z around 0 53.8%

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

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

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

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

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

    if 2.39999999999999997e-159 < z < 1.15000000000000004e-17

    1. Initial program 87.4%

      \[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 t around inf 74.1%

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

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

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

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

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

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

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

Alternative 9: 75.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{-96} \lor \neg \left(a \leq 1.85 \cdot 10^{-12}\right):\\ \;\;\;\;x - t \cdot \frac{z - y}{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 -4.7e-96) (not (<= a 1.85e-12)))
   (- x (* t (/ (- z y) (- a z))))
   (- t (/ (* (- t x) (- y a)) z))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -4.7e-96) || !(a <= 1.85e-12)) {
		tmp = x - (t * ((z - y) / (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 <= (-4.7d-96)) .or. (.not. (a <= 1.85d-12))) then
        tmp = x - (t * ((z - y) / (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 <= -4.7e-96) || !(a <= 1.85e-12)) {
		tmp = x - (t * ((z - y) / (a - z)));
	} else {
		tmp = t - (((t - x) * (y - a)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -4.7e-96) or not (a <= 1.85e-12):
		tmp = x - (t * ((z - y) / (a - z)))
	else:
		tmp = t - (((t - x) * (y - a)) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -4.7e-96) || !(a <= 1.85e-12))
		tmp = Float64(x - Float64(t * Float64(Float64(z - y) / 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 <= -4.7e-96) || ~((a <= 1.85e-12)))
		tmp = x - (t * ((z - y) / (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, -4.7e-96], N[Not[LessEqual[a, 1.85e-12]], $MachinePrecision]], N[(x - N[(t * N[(N[(z - y), $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 -4.7 \cdot 10^{-96} \lor \neg \left(a \leq 1.85 \cdot 10^{-12}\right):\\
\;\;\;\;x - t \cdot \frac{z - y}{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 < -4.6999999999999998e-96 or 1.84999999999999999e-12 < a

    1. Initial program 67.2%

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

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

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

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

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

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

    if -4.6999999999999998e-96 < a < 1.84999999999999999e-12

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 37.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{-307}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 14500:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4999999999999998e99 or 14500 < z

    1. Initial program 42.3%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified61.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 30.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified60.1%

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

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

    if -3.4999999999999998e99 < z < 3.0999999999999998e-307

    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*87.3%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    3. Simplified87.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 34.3%

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

    if 3.0999999999999998e-307 < z < 14500

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified40.0%

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

Alternative 11: 65.6% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.29999999999999964e-105 or 2.80000000000000005e-48 < z

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

    if -4.29999999999999964e-105 < z < 2.80000000000000005e-48

    1. Initial program 93.0%

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

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

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

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

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

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

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

Alternative 12: 63.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-127} \lor \neg \left(t \leq 6.5 \cdot 10^{-63}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.20000000000000017e-127 or 6.4999999999999998e-63 < t

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000017e-127 < t < 6.4999999999999998e-63

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 60.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-128} \lor \neg \left(t \leq 9.5 \cdot 10^{-63}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.5000000000000004e-128 or 9.50000000000000016e-63 < t

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000004e-128 < t < 9.50000000000000016e-63

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

Alternative 14: 64.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

    if -2.10000000000000017e34 < a < 2.20000000000000003e80

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000003e80 < a

    1. Initial program 59.5%

      \[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 y around 0 72.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-neg72.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*87.5%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 55.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7999999999999999e49 or 9.7999999999999998e-26 < a

    1. Initial program 66.0%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified85.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 61.4%

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

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

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

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

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

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

    if -3.7999999999999999e49 < a < 9.7999999999999998e-26

    1. Initial program 62.9%

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. *-commutative62.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.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 56.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.65000000000000011e65 or 2.3e20 < 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. associate-/l*60.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified60.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 28.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    14. Step-by-step derivation
      1. *-commutative58.7%

        \[\leadsto t + \color{blue}{\frac{-x}{z} \cdot a} \]
      2. add-sqr-sqrt30.9%

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

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

        \[\leadsto t + \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \cdot a \]
      5. sqrt-unprod24.6%

        \[\leadsto t + \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \cdot a \]
      6. add-sqr-sqrt46.7%

        \[\leadsto t + \frac{\color{blue}{x}}{z} \cdot a \]
      7. cancel-sign-sub46.7%

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

        \[\leadsto t - \color{blue}{\frac{-x}{z}} \cdot a \]
      9. *-commutative46.7%

        \[\leadsto t - \color{blue}{a \cdot \frac{-x}{z}} \]
      10. add-sqr-sqrt22.1%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z} \]
      11. sqrt-unprod42.8%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z} \]
      12. sqr-neg42.8%

        \[\leadsto t - a \cdot \frac{\sqrt{\color{blue}{x \cdot x}}}{z} \]
      13. sqrt-unprod27.8%

        \[\leadsto t - a \cdot \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z} \]
      14. add-sqr-sqrt58.7%

        \[\leadsto t - a \cdot \frac{\color{blue}{x}}{z} \]
    15. Applied egg-rr58.7%

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

    if -2.65000000000000011e65 < z < 2.3e20

    1. Initial program 83.4%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified52.1%

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

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

Alternative 17: 44.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -33000000000000 \lor \neg \left(a \leq 1.7 \cdot 10^{-16}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.3e13 or 1.7e-16 < a

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

    if -3.3e13 < a < 1.7e-16

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    10. Simplified52.3%

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified44.8%

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

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

Alternative 18: 41.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5000000000000001e-14 or 3e176 < y

    1. Initial program 69.0%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified84.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 53.7%

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

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

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

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

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

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

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

    if -6.5000000000000001e-14 < y < 3e176

    1. Initial program 61.5%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified70.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 54.8%

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

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

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

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

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

Alternative 19: 53.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+107}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


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

    1. Initial program 35.7%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified54.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 30.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7500000000000001e157 < z < 2.5000000000000001e107

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e107 < z

    1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified67.6%

      \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    14. Step-by-step derivation
      1. clear-num67.6%

        \[\leadsto t + a \cdot \color{blue}{\frac{1}{\frac{z}{-x}}} \]
      2. un-div-inv67.5%

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{-x}}} \]
      3. add-sqr-sqrt34.1%

        \[\leadsto t + \frac{a}{\frac{z}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}} \]
      4. sqrt-unprod47.9%

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

        \[\leadsto t + \frac{a}{\frac{z}{\sqrt{\color{blue}{x \cdot x}}}} \]
      6. sqrt-unprod30.2%

        \[\leadsto t + \frac{a}{\frac{z}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}} \]
      7. add-sqr-sqrt58.4%

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

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

Alternative 20: 38.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+80}:\\
\;\;\;\;t\\

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


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

    1. Initial program 66.3%

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

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

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

        \[\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
    5. Taylor expanded in a around inf 41.3%

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

    if -4.20000000000000022e49 < a < 2.59999999999999982e80

    1. Initial program 65.1%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified68.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 23.8%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    10. Simplified48.4%

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified45.6%

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

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

    if 2.59999999999999982e80 < a

    1. Initial program 59.5%

      \[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 t around inf 59.9%

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

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

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

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

Alternative 21: 39.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+80}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.9000000000000001e49 or 4e80 < a

    1. Initial program 63.2%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    3. Simplified90.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 inf 43.6%

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

    if -3.9000000000000001e49 < a < 4e80

    1. Initial program 65.1%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified68.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 23.8%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    10. Simplified48.4%

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

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

        \[\leadsto t + a \cdot \frac{\color{blue}{-x}}{z} \]
    13. Simplified45.6%

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

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

Alternative 22: 25.3% accurate, 13.0× speedup?

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

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

    \[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 y around 0 33.8%

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

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

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

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

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

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

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

      \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
  10. Simplified38.3%

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

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

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

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

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

Alternative 23: 2.8% accurate, 13.0× speedup?

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

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

    \[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 y around 0 33.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{\left(-\left(-x\right)\right) + \left(-t\right)}}{z} \cdot \left(-z\right) \]
    6. remove-double-neg20.8%

      \[\leadsto x + \frac{\color{blue}{x} + \left(-t\right)}{z} \cdot \left(-z\right) \]
  10. Simplified20.8%

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

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

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

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

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

    \[\leadsto \color{blue}{0} \]
  14. Add Preprocessing

Developer Target 1: 83.9% 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 2024139 
(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))))