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

Percentage Accurate: 68.2% → 90.5%
Time: 15.6s
Alternatives: 19
Speedup: 0.6×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\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 19 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-254}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+265}:\\
\;\;\;\;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 x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2.00000000000000013e265 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 40.3%

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-254 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000013e265

    1. Initial program 96.0%

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 72.3%

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

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

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

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

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-254}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;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 x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2.0000000000000001e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num79.7%

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    9. Applied egg-rr79.9%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 53.8%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in z around 0 63.2%

      \[\leadsto \color{blue}{y + -1 \cdot \left(z \cdot \left(\frac{y}{t} - \frac{x}{t}\right)\right)} \]
    12. Step-by-step derivation
      1. div-sub67.3%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-254 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.0000000000000001e289

    1. Initial program 96.0%

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 57.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4e4 or 5.79999999999999974e101 < y

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e4 < y < -3.19999999999999995e-169 or 1.22e-138 < y < 5.79999999999999974e101

    1. Initial program 63.9%

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{a - t}{y - x}}} \]
      3. un-div-inv46.5%

        \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    7. Applied egg-rr46.5%

      \[\leadsto \color{blue}{\frac{z}{\frac{a - t}{y - x}}} \]
    8. Step-by-step derivation
      1. associate-/r/53.8%

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

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

    if -3.19999999999999995e-169 < y < 1.22e-138

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -40000:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-169}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-138}:\\ \;\;\;\;x - \frac{x \cdot z}{a}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+101}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-121} \lor \neg \left(a \leq 3.4 \cdot 10^{+30}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4000000000000001e-121 or 3.4000000000000002e30 < a

    1. Initial program 71.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity76.1%

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

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

    if -1.4000000000000001e-121 < a < 3.4000000000000002e30

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 72.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.8000000000000002e-70 or 6.5e51 < a

    1. Initial program 72.7%

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

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

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

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

    if -4.8000000000000002e-70 < a < 6.5e51

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num66.7%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/66.9%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    9. Applied egg-rr66.9%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 49.5%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in z around 0 70.4%

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

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

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

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

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

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

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

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

Alternative 7: 73.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 69.5%

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

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

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

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

    if -5.1999999999999997e-71 < a < 6.4e19

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num66.7%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/66.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    9. Applied egg-rr66.8%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 49.3%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in z around 0 70.5%

      \[\leadsto \color{blue}{y + -1 \cdot \left(z \cdot \left(\frac{y}{t} - \frac{x}{t}\right)\right)} \]
    12. Step-by-step derivation
      1. div-sub74.3%

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

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

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

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

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

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

    if 6.4e19 < a

    1. Initial program 73.5%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity79.3%

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

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

Alternative 8: 68.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{-67} \lor \neg \left(a \leq 9.2 \cdot 10^{+51}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7000000000000002e-67 or 9.2000000000000002e51 < a

    1. Initial program 72.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity75.4%

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

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

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

    if -5.7000000000000002e-67 < a < 9.2000000000000002e51

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num66.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/66.4%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    9. Applied egg-rr66.4%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 49.0%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in z around 0 69.8%

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

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

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

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

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

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    13. Simplified73.4%

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

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

Alternative 9: 64.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.75000000000000013e-121 or 3.3e55 < t

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.75000000000000013e-121 < t < 3.3e55

    1. Initial program 88.3%

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

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

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

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

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

Alternative 10: 58.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+41} \lor \neg \left(x \leq 2.35 \cdot 10^{+39}\right):\\
\;\;\;\;x - \frac{x \cdot z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.9000000000000001e41 or 2.35e39 < x

    1. Initial program 59.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e41 < x < 2.35e39

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 53.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-20} \lor \neg \left(t \leq 1.95 \cdot 10^{+75}\right):\\
\;\;\;\;y \cdot \frac{t}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.0000000000000003e-20 or 1.95000000000000019e75 < t

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \frac{\color{blue}{-1 \cdot t}}{a - t} \]
    12. Step-by-step derivation
      1. neg-mul-149.4%

        \[\leadsto y \cdot \frac{\color{blue}{-t}}{a - t} \]
    13. Simplified49.4%

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

    if -9.0000000000000003e-20 < t < 1.95000000000000019e75

    1. Initial program 86.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity68.1%

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

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

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

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

Alternative 12: 43.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5999999999999994e121 or 2.8999999999999998e69 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

    if -8.5999999999999994e121 < z < 2.8999999999999998e69

    1. Initial program 68.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity65.3%

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

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

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

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

Alternative 13: 51.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+122}:\\
\;\;\;\;y\\

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

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8499999999999998e122 or 6.4999999999999998e75 < t

    1. Initial program 36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8499999999999998e122 < t < 6.4999999999999998e75

    1. Initial program 83.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity66.2%

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

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

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

Alternative 14: 40.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+72}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num80.0%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/82.7%

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

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 60.1%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in x around inf 40.9%

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

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

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

    if -2.04999999999999991e127 < z < 1.45000000000000009e72

    1. Initial program 68.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity65.2%

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

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

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

    if 1.45000000000000009e72 < z

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 38.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+128} \lor \neg \left(z \leq 8 \cdot 10^{+44}\right):\\
\;\;\;\;x \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.14999999999999999e128 or 8.0000000000000007e44 < z

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/82.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    9. Applied egg-rr82.8%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 49.1%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in x around inf 32.9%

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

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

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

    if -1.14999999999999999e128 < z < 8.0000000000000007e44

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

Alternative 16: 38.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+74}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\


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

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num80.0%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/82.7%

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

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 60.1%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in x around inf 40.9%

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

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

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

    if -1.3e128 < z < 6.6000000000000004e74

    1. Initial program 68.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity65.2%

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

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

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

    if 6.6000000000000004e74 < z

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    11. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      2. un-div-inv51.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    12. Applied egg-rr51.3%

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

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

Alternative 17: 38.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+71}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)} \]
    8. Step-by-step derivation
      1. clear-num80.0%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{\frac{a - t}{y - x}}}, x\right) \]
      2. associate-/r/82.7%

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

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{a - t} \cdot \left(y - x\right)}, x\right) \]
    10. Taylor expanded in a around 0 60.1%

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{-1}{t}} \cdot \left(y - x\right), x\right) \]
    11. Taylor expanded in x around inf 40.9%

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

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

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

    if -5.20000000000000024e129 < z < 2.0500000000000001e71

    1. Initial program 68.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity65.2%

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

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

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

    if 2.0500000000000001e71 < z

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    13. Simplified36.6%

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

Alternative 18: 38.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+103}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+76}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.20000000000000033e103 or 3.89999999999999989e76 < t

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000033e103 < t < 3.89999999999999989e76

    1. Initial program 84.7%

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

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

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

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

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

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

Alternative 19: 25.0% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 68.1%

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 86.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024186 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))