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

Percentage Accurate: 68.4% → 90.3%
Time: 17.6s
Alternatives: 21
Speedup: 0.7×

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 21 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 90.3% 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 -2 \cdot 10^{-269}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 10^{-234}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;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 -2e-269)
       t_2
       (if (<= t_2 1e-234)
         (+ t (/ (* (- t x) (- a y)) z))
         (if (<= t_2 2e+306) 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 <= -2e-269) {
		tmp = t_2;
	} else if (t_2 <= 1e-234) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+306) {
		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 <= -2e-269) {
		tmp = t_2;
	} else if (t_2 <= 1e-234) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+306) {
		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 <= -2e-269:
		tmp = t_2
	elif t_2 <= 1e-234:
		tmp = t + (((t - x) * (a - y)) / z)
	elif t_2 <= 2e+306:
		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 <= -2e-269)
		tmp = t_2;
	elseif (t_2 <= 1e-234)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (t_2 <= 2e+306)
		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 <= -2e-269)
		tmp = t_2;
	elseif (t_2 <= 1e-234)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (t_2 <= 2e+306)
		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, -2e-269], t$95$2, If[LessEqual[t$95$2, 1e-234], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], 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 -2 \cdot 10^{-269}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;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.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 45.7%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-269 or 9.9999999999999996e-235 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000003e306

    1. Initial program 97.5%

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

    if -1.9999999999999999e-269 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999996e-235

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub95.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-neg95.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--95.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/95.9%

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

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

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

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

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

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

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

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


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

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-269 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.99999999999999979e-269

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 42.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -96000000000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-54}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-131}:\\
\;\;\;\;\frac{x \cdot y}{z - a}\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+68}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.6e13

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

    if -9.6e13 < a < -1.55000000000000002e-54 or 5.19999999999999993e-131 < a < 6.39999999999999989e68

    1. Initial program 57.4%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
    9. Taylor expanded in x around 0 44.0%

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

    if -1.55000000000000002e-54 < a < 5.19999999999999993e-131

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

    if 6.39999999999999989e68 < a

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 42.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -29000000000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.9e13

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

    if -2.9e13 < a < -8.1999999999999996e-55 or 3.9999999999999999e-131 < a < 9.5000000000000003e63

    1. Initial program 57.4%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
    9. Taylor expanded in x around 0 44.0%

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

    if -8.1999999999999996e-55 < a < 3.9999999999999999e-131

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000003e63 < a

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

Alternative 5: 41.1% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+61}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5e13 or 1.89999999999999998e61 < a

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

    if -8.5e13 < a < -7.00000000000000051e-55 or 2e-131 < a < 1.89999999999999998e61

    1. Initial program 58.4%

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

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
    9. Taylor expanded in x around 0 44.8%

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

    if -7.00000000000000051e-55 < a < 2e-131

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 55.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -9500000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.45 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.5e12 or 2.40000000000000019e-75 < a

    1. Initial program 71.0%

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

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

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

        \[\leadsto x + \left(\color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
      2. associate-/l*87.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-out87.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. +-commutative87.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-sub87.4%

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

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

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

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

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

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

    if -9.5e12 < a < -2.4499999999999998e-36

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative41.8%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t}{a - z} \cdot z} \]
      3. distribute-lft-neg-in63.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - z}\right) \cdot z} \]
      4. distribute-neg-frac263.1%

        \[\leadsto \color{blue}{\frac{t}{-\left(a - z\right)}} \cdot z \]
    16. Simplified63.1%

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

    if -2.4499999999999998e-36 < a < 2.40000000000000019e-75

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--56.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9500000000000:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-75}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.65e13 or 2.1000000000000001e-75 < a

    1. Initial program 71.0%

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

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

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

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

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

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

    if -1.65e13 < a < -1.8499999999999999e-35

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative41.8%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t}{a - z} \cdot z} \]
      3. distribute-lft-neg-in63.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - z}\right) \cdot z} \]
      4. distribute-neg-frac263.1%

        \[\leadsto \color{blue}{\frac{t}{-\left(a - z\right)}} \cdot z \]
    16. Simplified63.1%

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

    if -1.8499999999999999e-35 < a < 2.1000000000000001e-75

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--56.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -16500000000000:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-35}:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-75}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.5e12

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

    if -9.5e12 < a < -7.20000000000000064e-36

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative41.8%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t}{a - z} \cdot z} \]
      3. distribute-lft-neg-in63.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - z}\right) \cdot z} \]
      4. distribute-neg-frac263.1%

        \[\leadsto \color{blue}{\frac{t}{-\left(a - z\right)}} \cdot z \]
    16. Simplified63.1%

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

    if -7.20000000000000064e-36 < a < 2.75e-70

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--56.8%

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

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

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

    if 2.75e-70 < a

    1. Initial program 68.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9500000000000:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3e13 or 1.31999999999999998e-73 < a

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

    if -1.3e13 < a < -6.0000000000000003e-36

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative41.8%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t}{a - z} \cdot z} \]
      3. distribute-lft-neg-in63.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - z}\right) \cdot z} \]
      4. distribute-neg-frac263.1%

        \[\leadsto \color{blue}{\frac{t}{-\left(a - z\right)}} \cdot z \]
    16. Simplified63.1%

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

    if -6.0000000000000003e-36 < a < 1.31999999999999998e-73

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--56.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -13000000000000:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 83.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-186} \lor \neg \left(a \leq 3.3 \cdot 10^{-52}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.80000000000000006e-186 or 3.29999999999999995e-52 < a

    1. Initial program 70.1%

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

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

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

    if -4.80000000000000006e-186 < a < 3.29999999999999995e-52

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -16500000000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-35}:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.65e13

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

    if -1.65e13 < a < -1.2000000000000001e-35

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative41.8%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t}{a - z} \cdot z} \]
      3. distribute-lft-neg-in63.1%

        \[\leadsto \color{blue}{\left(-\frac{t}{a - z}\right) \cdot z} \]
      4. distribute-neg-frac263.1%

        \[\leadsto \color{blue}{\frac{t}{-\left(a - z\right)}} \cdot z \]
    16. Simplified63.1%

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

    if -1.2000000000000001e-35 < a < 3.8000000000000002e-15

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--54.0%

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

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

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

    if 3.8000000000000002e-15 < a

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -17500000000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-34}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.75e13

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

    if -1.75e13 < a < -1.60000000000000001e-34

    1. Initial program 59.1%

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

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
    9. Taylor expanded in x around 0 59.6%

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

    if -1.60000000000000001e-34 < a < 5.20000000000000009e-15

    1. Initial program 65.1%

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

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

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

        \[\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 y around inf 59.5%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t - -1 \cdot x}{z}} \]
      4. distribute-lft-out--53.7%

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

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

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

    if 5.20000000000000009e-15 < a

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 77.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+62} \lor \neg \left(z \leq 1.95 \cdot 10^{+81}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2e62 or 1.95e81 < z

    1. Initial program 39.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative64.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot \frac{-1 \cdot t - -1 \cdot x}{z}} \]
      9. distribute-lft-out--79.1%

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

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

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

    if -4.2e62 < z < 1.95e81

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 73.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9999999999999998e61 or 2.99999999999999974e79 < z

    1. Initial program 39.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative64.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot \frac{-1 \cdot t - -1 \cdot x}{z}} \]
      9. distribute-lft-out--79.1%

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

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

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

    if -3.9999999999999998e61 < z < 2.99999999999999974e79

    1. Initial program 84.4%

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

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

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

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

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

Alternative 15: 76.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.29999999999999996e-36 or 3.8000000000000001e-17 < a

    1. Initial program 70.1%

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

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

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

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

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

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

    if -2.29999999999999996e-36 < a < 3.8000000000000001e-17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot \frac{-1 \cdot t - -1 \cdot x}{z}} \]
      9. distribute-lft-out--75.5%

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

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

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

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

Alternative 16: 73.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9500000000000:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\

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

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


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

    1. Initial program 74.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 74.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-neg74.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*90.0%

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

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

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

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

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

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

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

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

    if -9.5e12 < a < 7.19999999999999976e-52

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999976e-52 < a

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

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

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

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

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

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

Alternative 17: 36.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.05 \cdot 10^{-40} \lor \neg \left(y \leq 2.3 \cdot 10^{+89}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.39999999999999979e255

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg42.8%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
      3. distribute-rgt-neg-in63.8%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. neg-mul-163.8%

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

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

    if -7.39999999999999979e255 < y < -1.05000000000000009e-40 or 2.2999999999999999e89 < y

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000009e-40 < y < 2.2999999999999999e89

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

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

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

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

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

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

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

Alternative 18: 69.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.3e13 or 1.85000000000000001e61 < a

    1. Initial program 73.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 77.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-neg77.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*88.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-out88.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. +-commutative88.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-sub88.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-out88.5%

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

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

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

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

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

    if -1.3e13 < a < 1.85000000000000001e61

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot \frac{-1 \cdot t - -1 \cdot x}{z}} \]
      9. distribute-lft-out--73.4%

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

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

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

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

Alternative 19: 36.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{-41} \lor \neg \left(y \leq 9.2 \cdot 10^{+92}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.7999999999999999e-41 or 9.19999999999999994e92 < y

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.7999999999999999e-41 < y < 9.19999999999999994e92

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

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

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

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

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

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

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

Alternative 20: 39.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+82}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.8e14 or 6.5000000000000003e82 < z

    1. Initial program 44.4%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t} \]
    9. Taylor expanded in x around 0 45.6%

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

    if -9.8e14 < z < 6.5000000000000003e82

    1. Initial program 84.5%

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

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

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

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

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

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

Alternative 21: 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 67.6%

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

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

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

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

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

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

    \[\leadsto x + \color{blue}{t} \]
  9. Taylor expanded in x around 0 23.3%

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

Developer Target 1: 84.2% 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 2024186 
(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))))