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

Percentage Accurate: 67.2% → 90.5%
Time: 17.3s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 67.2% 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.5% 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 -5 \cdot 10^{-278} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{1}{\frac{z}{\left(y - a\right) \cdot \left(x + t\right)}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -5e-278) (not (<= t_1 0.0)))
     (+ x (/ (- t x) (/ (- a z) (- y z))))
     (+ t (/ 1.0 (/ z (* (- y a) (+ x t))))))))
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 <= -5e-278) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else {
		tmp = t + (1.0 / (z / ((y - a) * (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) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - z) * (t - x)) / (a - z))
    if ((t_1 <= (-5d-278)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((t - x) / ((a - z) / (y - z)))
    else
        tmp = t + (1.0d0 / (z / ((y - a) * (x + t))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-278) || !(t_1 <= 0.0)) {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	} else {
		tmp = t + (1.0 / (z / ((y - a) * (x + t))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if (t_1 <= -5e-278) or not (t_1 <= 0.0):
		tmp = x + ((t - x) / ((a - z) / (y - z)))
	else:
		tmp = t + (1.0 / (z / ((y - a) * (x + t))))
	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 <= -5e-278) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	else
		tmp = Float64(t + Float64(1.0 / Float64(z / Float64(Float64(y - a) * Float64(x + t)))));
	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 <= -5e-278) || ~((t_1 <= 0.0)))
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	else
		tmp = t + (1.0 / (z / ((y - a) * (x + t))));
	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, -5e-278], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(1.0 / N[(z / N[(N[(y - a), $MachinePrecision] * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -5 \cdot 10^{-278} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\

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


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

    1. Initial program 73.4%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified86.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.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-neg74.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*82.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-out82.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. +-commutative82.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-sub82.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-out86.0%

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

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

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

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

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

    1. Initial program 4.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-278}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{1}{\frac{z}{\left(y - a\right) \cdot \left(x + t\right)}}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;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 -5e-278)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ 1.0 (/ z (* (- y a) (+ x t)))))
         (if (<= t_2 5e+292) 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 <= -5e-278) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (1.0 / (z / ((y - a) * (x + t))));
	} else if (t_2 <= 5e+292) {
		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 <= -5e-278) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (1.0 / (z / ((y - a) * (x + t))));
	} else if (t_2 <= 5e+292) {
		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 <= -5e-278:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (1.0 / (z / ((y - a) * (x + t))))
	elif t_2 <= 5e+292:
		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 <= -5e-278)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(1.0 / Float64(z / Float64(Float64(y - a) * Float64(x + t)))));
	elseif (t_2 <= 5e+292)
		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 <= -5e-278)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (1.0 / (z / ((y - a) * (x + t))));
	elseif (t_2 <= 5e+292)
		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, -5e-278], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(1.0 / N[(z / N[(N[(y - a), $MachinePrecision] * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+292], 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 -5 \cdot 10^{-278}:\\
\;\;\;\;t\_2\\

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

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

    1. Initial program 39.1%

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

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

      \[\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))) < -4.99999999999999985e-278 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.9999999999999996e292

    1. Initial program 96.7%

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

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

    1. Initial program 4.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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 -5 \cdot 10^{-278}:\\ \;\;\;\;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 0:\\ \;\;\;\;t + \frac{1}{\frac{z}{\left(y - a\right) \cdot \left(x + t\right)}}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 5 \cdot 10^{+292}:\\ \;\;\;\;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 3: 76.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -7.6 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.9e111 or 4.7999999999999999e157 < z

    1. Initial program 39.6%

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

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

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

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

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

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

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

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

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

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

    if -2.9e111 < z < -7.599999999999999e-188 or 9.4000000000000002e-138 < z < 4.7999999999999999e157

    1. Initial program 75.8%

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

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

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

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

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

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

    if -7.599999999999999e-188 < z < 9.4000000000000002e-138

    1. Initial program 88.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.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 92.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-neg92.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*80.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-out80.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. +-commutative80.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-sub80.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-out92.9%

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

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

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

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

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

Alternative 4: 75.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999998e106 or 1.35e91 < z

    1. Initial program 41.8%

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

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

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

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

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

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

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

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

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

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

    if -3.1999999999999998e106 < z < -2.6999999999999999e-84

    1. Initial program 65.3%

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

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

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

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

    if -2.6999999999999999e-84 < z < 1.35e91

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-291}:\\
\;\;\;\;x \cdot \left(1 - t\_1\right)\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+49}:\\
\;\;\;\;x + t \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.89999999999999987e23 or 1.2500000000000001e49 < z

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999987e23 < z < -1.2999999999999999e-291

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2999999999999999e-291 < z < 1.2500000000000001e49

    1. Initial program 88.2%

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

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

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

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

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

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

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

Alternative 6: 62.5% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

    if -1.02e20 < z < 8.5e-197

    1. Initial program 87.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.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 0 61.6%

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

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

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

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

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

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

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

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

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

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

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

    if 8.5e-197 < z < 9.49999999999999969e49

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

Alternative 7: 84.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.00000000000000009e106 or 3.6999999999999997e206 < z

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000009e106 < z < 3.6999999999999997e206

    1. Initial program 80.4%

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

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

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

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

Alternative 8: 55.9% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8e52 or 1.4e55 < z

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e52 < z < 1.5e-196

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e-196 < z < 1.4e55

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

Alternative 9: 55.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4999999999999999e26 or 5.2e55 < z

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999999e26 < z < -1.35000000000000001e-293

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000001e-293 < z < 5.2e55

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

Alternative 10: 51.7% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.2e54

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    9. Simplified48.1%

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

    if -3.2e54 < z < -1.00000000000000004e-297

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000004e-297 < z < 8.2000000000000002e50

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

    if 8.2000000000000002e50 < z

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 70.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.30000000000000012e39 or 2.70000000000000019e53 < z

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000012e39 < z < 2.70000000000000019e53

    1. Initial program 85.1%

      \[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 88.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-neg88.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*83.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-out83.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. +-commutative83.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-sub83.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-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.7%

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

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

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

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

Alternative 12: 69.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.11999999999999991e40 or 9.00000000000000027e50 < z

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

    if -2.11999999999999991e40 < z < 9.00000000000000027e50

    1. Initial program 85.1%

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

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

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

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

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

Alternative 13: 66.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.60000000000000038e-7 or 4.9000000000000002e45 < a

    1. Initial program 69.8%

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

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

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

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

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

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

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

    if -5.60000000000000038e-7 < a < 4.9000000000000002e45

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 53.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    9. Simplified46.7%

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

    if -3.1000000000000002e43 < z < 6.20000000000000022e51

    1. Initial program 85.1%

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

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

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

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

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

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

    if 6.20000000000000022e51 < z

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 33.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e17

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    9. Simplified27.1%

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

    if -1.15e17 < y

    1. Initial program 69.4%

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

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

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

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

Alternative 16: 35.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+73}:\\
\;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\

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


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

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

    if -1.0600000000000001e73 < z

    1. Initial program 76.4%

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

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

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

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

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

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

Alternative 17: 38.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+54}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4999999999999997e53 or 1.12e54 < z

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

    if -7.4999999999999997e53 < z < 1.12e54

    1. Initial program 84.0%

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

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

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

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

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

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

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

Alternative 18: 33.8% accurate, 4.3× speedup?

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

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

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

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

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

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

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

Alternative 19: 25.2% 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 68.6%

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

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

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

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

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

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

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

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

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

Alternative 20: 2.8% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0} \cdot x \]
  10. Simplified2.9%

    \[\leadsto \color{blue}{0 \cdot x} \]
  11. Taylor expanded in x around 0 2.9%

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

Developer Target 1: 83.4% 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 2024157 
(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))))