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

Percentage Accurate: 67.9% → 90.5%
Time: 17.9s
Alternatives: 18
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.9% 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.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\

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

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

    1. Initial program 34.7%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified78.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))) < -1.99999999999999999e-243 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.00000000000000022e263

    1. Initial program 96.7%

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

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

    1. Initial program 10.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-228} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -2e-228) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -2e-228) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t - (((t - x) * (y - a)) / z);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -2e-228) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-228], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 71.9%

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

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

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

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

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

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

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

    1. Initial program 15.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 15.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-106}:\\
\;\;\;\;x - t \cdot \frac{y - z}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.49999999999999991e-106

    1. Initial program 60.1%

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

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

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

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

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

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

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

    if -2.49999999999999991e-106 < z < 3.40000000000000018e-68

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

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

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

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

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

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

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

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

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

    if 3.40000000000000018e-68 < z < 7.3999999999999998e264

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

    if 7.3999999999999998e264 < z

    1. Initial program 12.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t - x}{\color{blue}{1 - \frac{a - y}{z}}} \]
    10. Simplified43.4%

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

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

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

        \[\leadsto \frac{t}{1 + \color{blue}{\frac{y - a}{z}}} \]
    13. Simplified78.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-106}:\\ \;\;\;\;x - t \cdot \frac{y - z}{z}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-68}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+264}:\\ \;\;\;\;x + t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{y - a}{z} + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-106}:\\
\;\;\;\;x - t \cdot \frac{y - z}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.49999999999999991e-106

    1. Initial program 60.1%

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

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

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

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

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

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

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

    if -2.49999999999999991e-106 < z < 8.9999999999999995e-66

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

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

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

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

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

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

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

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

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

    if 8.9999999999999995e-66 < z < 1.45000000000000009e266

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

    if 1.45000000000000009e266 < z

    1. Initial program 12.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-106}:\\ \;\;\;\;x - t \cdot \frac{y - z}{z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-66}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+266}:\\ \;\;\;\;x + t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-156} \lor \neg \left(a \leq 2 \cdot 10^{-185}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.19999999999999982e-156 or 2e-185 < a

    1. Initial program 72.4%

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

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

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

    if -3.19999999999999982e-156 < a < 2e-185

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 48.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45e-31

    1. Initial program 51.0%

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

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

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

    if -1.45e-31 < z < -6e-196

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

    if -6e-196 < z < 1.60000000000000008e118

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

    if 1.60000000000000008e118 < z

    1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 42.0% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.0000000000000001e-32

    1. Initial program 51.0%

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

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

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

    if -6.0000000000000001e-32 < z < 7.4999999999999998e-258

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

    if 7.4999999999999998e-258 < z < 9.50000000000000041e117

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000041e117 < z

    1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.26 \cdot 10^{-130} \lor \neg \left(t \leq 3.5 \cdot 10^{-136}\right):\\
\;\;\;\;x - t \cdot \frac{y - z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2599999999999999e-130 or 3.50000000000000029e-136 < t

    1. Initial program 71.8%

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

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

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

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

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

    if -1.2599999999999999e-130 < t < 3.50000000000000029e-136

    1. Initial program 59.3%

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

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

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

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

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

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

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

Alternative 10: 72.9% accurate, 0.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - t \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.1999999999999997e81 or 3.9e124 < x

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999997e81 < x < 3.9e124

    1. Initial program 78.3%

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

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

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

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

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

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

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

Alternative 11: 64.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.6000000000000004e-56 or 4.89999999999999974e26 < y

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
    7. Applied egg-rr64.2%

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

    if -7.6000000000000004e-56 < y < 4.89999999999999974e26

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 72.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 64.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified87.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 75.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-neg75.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*87.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-out87.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. +-commutative87.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-sub87.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-out87.0%

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

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

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

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

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

    if -0.014200000000000001 < a < 9.19999999999999978e-178

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.19999999999999978e-178 < a

    1. Initial program 75.7%

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

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

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

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

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

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

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

Alternative 13: 57.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05999999999999995e-29 or 1.84999999999999994e26 < y

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

    if -1.05999999999999995e-29 < y < 1.84999999999999994e26

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 57.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.99999999999999959e124 or 9e117 < z

    1. Initial program 38.3%

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

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

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

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

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

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

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

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

    if -7.99999999999999959e124 < z < 9e117

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

Alternative 15: 46.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 57.1%

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

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

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

    if -5.09999999999999986e-76 < z < 3.80000000000000016e118

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000016e118 < z

    1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 37.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-133}:\\
\;\;\;\;t\\

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


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

    1. Initial program 63.5%

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

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

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

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

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

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

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

    if -6.1999999999999995e40 < a < 2.1000000000000001e-133

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1000000000000001e-133 < a

    1. Initial program 75.2%

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

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

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

Alternative 17: 38.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+53}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.10000000000000017e35 or 1.4500000000000001e53 < a

    1. Initial program 69.0%

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

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

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

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

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

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

    if -5.10000000000000017e35 < a < 1.4500000000000001e53

    1. Initial program 67.6%

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

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

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

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

        \[\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*68.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-out68.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. +-commutative68.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-sub68.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-out73.5%

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

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

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

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

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

Alternative 18: 25.3% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer Target 1: 83.5% 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 2024146 
(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))))