Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 94.3%
Time: 14.6s
Alternatives: 15
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 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: 80.1% accurate, 1.0× speedup?

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

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

Alternative 1: 94.3% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 89.5%

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. clear-numN/A

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
      6. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
      7. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
      8. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
      9. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
      13. --lowering--.f64N/A

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

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

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

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

    1. Initial program 3.6%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
      7. associate-/l*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
      9. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
      11. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

Alternative 2: 68.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+228}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{a - z}, x\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.5e+228)
   (+ t (* (/ y z) (- x t)))
   (if (<= z -3.7e-14)
     (fma (- x t) (/ z (- a z)) x)
     (if (<= z 3e+44) (fma (/ y a) (- t x) x) (fma (/ x z) (- y a) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.5e+228) {
		tmp = t + ((y / z) * (x - t));
	} else if (z <= -3.7e-14) {
		tmp = fma((x - t), (z / (a - z)), x);
	} else if (z <= 3e+44) {
		tmp = fma((y / a), (t - x), x);
	} else {
		tmp = fma((x / z), (y - a), t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.5e+228)
		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
	elseif (z <= -3.7e-14)
		tmp = fma(Float64(x - t), Float64(z / Float64(a - z)), x);
	elseif (z <= 3e+44)
		tmp = fma(Float64(y / a), Float64(t - x), x);
	else
		tmp = fma(Float64(x / z), Float64(y - a), t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+228], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-14], N[(N[(x - t), $MachinePrecision] * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3e+44], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{a - z}, x\right)\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\

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


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

    1. Initial program 53.8%

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. clear-numN/A

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
      6. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
      7. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
      8. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
      9. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
      13. --lowering--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. --lowering--.f64N/A

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. distribute-rgt-out--N/A

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

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
      9. *-lowering-*.f64N/A

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
      10. --lowering--.f64N/A

        \[\leadsto t - \color{blue}{\left(t - x\right)} \cdot \frac{y - a}{z} \]
      11. /-lowering-/.f64N/A

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

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

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

      \[\leadsto t - \left(t - x\right) \cdot \color{blue}{\frac{y}{z}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f6495.7

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

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

    if -9.50000000000000046e228 < z < -3.70000000000000001e-14

    1. Initial program 86.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(t - x\right)}{a - z}\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot z}}{a - z}\right)\right) + x \]
      4. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{z}{a - z}}\right)\right) + x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{z}{a - z}} + x \]
      6. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{z}{a - z} + x \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - x\right), \frac{z}{a - z}, x\right)} \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, \frac{z}{a - z}, x\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(x\right)\right)\right)}\right), \frac{z}{a - z}, x\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)}\right), \frac{z}{a - z}, x\right) \]
      11. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, \frac{z}{a - z}, x\right) \]
      12. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, \frac{z}{a - z}, x\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x} - t, \frac{z}{a - z}, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{z}{a - z}, x\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{z}{a - z}}, x\right) \]
      16. --lowering--.f6469.3

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

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

    if -3.70000000000000001e-14 < z < 2.99999999999999987e44

    1. Initial program 93.4%

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. clear-numN/A

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
      6. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
      7. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
      8. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
      9. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
      13. --lowering--.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, t - x, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6475.2

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

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

    if 2.99999999999999987e44 < z

    1. Initial program 55.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
      7. associate-/l*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
      9. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
      11. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
      12. accelerator-lowering-fma.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y - a, t\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6471.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+228}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{a - z}, x\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 69.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-129}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (/ x z) (- y a) t)))
   (if (<= z -2.5e+114)
     t_1
     (if (<= z -2.7e-129)
       (fma (- y z) (/ t a) x)
       (if (<= z 6.2e+44) (fma (/ y a) (- t x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x / z), (y - a), t);
	double tmp;
	if (z <= -2.5e+114) {
		tmp = t_1;
	} else if (z <= -2.7e-129) {
		tmp = fma((y - z), (t / a), x);
	} else if (z <= 6.2e+44) {
		tmp = fma((y / a), (t - x), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x / z), Float64(y - a), t)
	tmp = 0.0
	if (z <= -2.5e+114)
		tmp = t_1;
	elseif (z <= -2.7e-129)
		tmp = fma(Float64(y - z), Float64(t / a), x);
	elseif (z <= 6.2e+44)
		tmp = fma(Float64(y / a), Float64(t - x), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.5e+114], t$95$1, If[LessEqual[z, -2.7e-129], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.2e+44], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-129}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.5e114 or 6.19999999999999991e44 < z

    1. Initial program 60.2%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
      7. associate-/l*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
      9. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
      11. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
      12. accelerator-lowering-fma.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y - a, t\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6474.3

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

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

    if -2.5e114 < z < -2.69999999999999999e-129

    1. Initial program 96.1%

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

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

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

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
      6. /-lowering-/.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t}{a}}, x\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6462.4

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

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

    if -2.69999999999999999e-129 < z < 6.19999999999999991e44

    1. Initial program 92.3%

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. clear-numN/A

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
      6. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
      7. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
      8. clear-numN/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
      9. flip3--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
      13. --lowering--.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, t - x, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6479.2

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

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

Alternative 4: 68.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-129}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (/ x z) (- y a) t)))
   (if (<= z -2.4e+114)
     t_1
     (if (<= z -3.2e-129)
       (fma (- y z) (/ t a) x)
       (if (<= z 1.95e+44) (fma y (/ (- t x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x / z), (y - a), t);
	double tmp;
	if (z <= -2.4e+114) {
		tmp = t_1;
	} else if (z <= -3.2e-129) {
		tmp = fma((y - z), (t / a), x);
	} else if (z <= 1.95e+44) {
		tmp = fma(y, ((t - x) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x / z), Float64(y - a), t)
	tmp = 0.0
	if (z <= -2.4e+114)
		tmp = t_1;
	elseif (z <= -3.2e-129)
		tmp = fma(Float64(y - z), Float64(t / a), x);
	elseif (z <= 1.95e+44)
		tmp = fma(y, Float64(Float64(t - x) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.4e+114], t$95$1, If[LessEqual[z, -3.2e-129], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.95e+44], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-129}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e114 or 1.9500000000000001e44 < z

    1. Initial program 60.2%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
      7. associate-/l*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
      9. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
      11. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
      12. accelerator-lowering-fma.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y - a, t\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6474.3

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

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

    if -2.4e114 < z < -3.2000000000000003e-129

    1. Initial program 96.1%

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

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

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

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
      6. /-lowering-/.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t}{a}}, x\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f6462.4

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

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

    if -3.2000000000000003e-129 < z < 1.9500000000000001e44

    1. Initial program 92.3%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{t - x}{a}}, x\right) \]
      5. --lowering--.f6478.0

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

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

Alternative 5: 65.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-129}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+85}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (/ x z) y t)))
   (if (<= z -2.05e+117)
     t_1
     (if (<= z -3.2e-129)
       (fma (- y z) (/ t a) x)
       (if (<= z 7.5e+85) (fma y (/ (- t x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x / z), y, t);
	double tmp;
	if (z <= -2.05e+117) {
		tmp = t_1;
	} else if (z <= -3.2e-129) {
		tmp = fma((y - z), (t / a), x);
	} else if (z <= 7.5e+85) {
		tmp = fma(y, ((t - x) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x / z), y, t)
	tmp = 0.0
	if (z <= -2.05e+117)
		tmp = t_1;
	elseif (z <= -3.2e-129)
		tmp = fma(Float64(y - z), Float64(t / a), x);
	elseif (z <= 7.5e+85)
		tmp = fma(y, Float64(Float64(t - x) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -2.05e+117], t$95$1, If[LessEqual[z, -3.2e-129], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 7.5e+85], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-129}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e117 or 7.49999999999999942e85 < z

    1. Initial program 59.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
      7. associate-/l*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
      9. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
      11. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]

      if -2.05e117 < z < -3.2000000000000003e-129

      1. Initial program 96.1%

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
        6. /-lowering-/.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t}{a}}, x\right) \]
      7. Step-by-step derivation
        1. /-lowering-/.f6462.4

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

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

      if -3.2000000000000003e-129 < z < 7.49999999999999942e85

      1. Initial program 90.0%

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

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

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

          \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{t - x}{a}}, x\right) \]
        5. --lowering--.f6475.2

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
    11. Recombined 3 regimes into one program.
    12. Add Preprocessing

    Alternative 6: 74.1% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+114}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= z -3.1e+114)
       (fma (/ (- x t) z) (- y a) t)
       (if (<= z 5.4e+44)
         (fma (- y z) (/ (- t x) a) x)
         (fma (/ (- y a) z) (- x t) t))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -3.1e+114) {
    		tmp = fma(((x - t) / z), (y - a), t);
    	} else if (z <= 5.4e+44) {
    		tmp = fma((y - z), ((t - x) / a), x);
    	} else {
    		tmp = fma(((y - a) / z), (x - t), t);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -3.1e+114)
    		tmp = fma(Float64(Float64(x - t) / z), Float64(y - a), t);
    	elseif (z <= 5.4e+44)
    		tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x);
    	else
    		tmp = fma(Float64(Float64(y - a) / z), Float64(x - t), t);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+114], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.4e+44], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -3.1 \cdot 10^{+114}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
    
    \mathbf{elif}\;z \leq 5.4 \cdot 10^{+44}:\\
    \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -3.1e114

      1. Initial program 66.5%

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
        6. div-subN/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
        7. associate-/l*N/A

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

          \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
        9. distribute-rgt-out--N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
        10. distribute-lft-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
        11. mul-1-negN/A

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
        12. accelerator-lowering-fma.f64N/A

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

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

      if -3.1e114 < z < 5.4e44

      1. Initial program 93.7%

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
        6. /-lowering-/.f64N/A

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

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

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

      if 5.4e44 < z

      1. Initial program 55.9%

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
        2. clear-numN/A

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
        6. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
        7. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
        8. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
        9. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
        12. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
        13. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

          \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} \]
        5. unsub-negN/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        6. --lowering--.f64N/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        7. distribute-rgt-out--N/A

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

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        9. *-lowering-*.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        10. --lowering--.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right)} \cdot \frac{y - a}{z} \]
        11. /-lowering-/.f64N/A

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

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

        \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]
      8. Step-by-step derivation
        1. cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{t + \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} \]
        2. sub-negN/A

          \[\leadsto t + \left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(x\right)\right)\right)}\right)\right) \cdot \frac{y - a}{z} \]
        3. distribute-neg-inN/A

          \[\leadsto t + \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)\right)} \cdot \frac{y - a}{z} \]
        4. remove-double-negN/A

          \[\leadsto t + \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{x}\right) \cdot \frac{y - a}{z} \]
        5. +-commutativeN/A

          \[\leadsto t + \color{blue}{\left(x + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot \frac{y - a}{z} \]
        6. sub-negN/A

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

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

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

          \[\leadsto \color{blue}{\frac{x - t}{z} \cdot \left(y - a\right) + t} \]
        10. *-commutativeN/A

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

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

    Alternative 7: 72.3% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
       (if (<= a -2.3e+114)
         t_1
         (if (<= a 6.2e+68) (fma (/ (- x t) z) (- y a) t) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((y - z), ((t - x) / a), x);
    	double tmp;
    	if (a <= -2.3e+114) {
    		tmp = t_1;
    	} else if (a <= 6.2e+68) {
    		tmp = fma(((x - t) / z), (y - a), t);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x)
    	tmp = 0.0
    	if (a <= -2.3e+114)
    		tmp = t_1;
    	elseif (a <= 6.2e+68)
    		tmp = fma(Float64(Float64(x - t) / z), Float64(y - a), t);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.3e+114], t$95$1, If[LessEqual[a, 6.2e+68], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
    \mathbf{if}\;a \leq -2.3 \cdot 10^{+114}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 6.2 \cdot 10^{+68}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -2.3e114 or 6.1999999999999997e68 < a

      1. Initial program 89.4%

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
        6. /-lowering-/.f64N/A

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

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

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

      if -2.3e114 < a < 6.1999999999999997e68

      1. Initial program 72.4%

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
        6. div-subN/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
        7. associate-/l*N/A

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

          \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
        9. distribute-rgt-out--N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
        10. distribute-lft-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
        11. mul-1-negN/A

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
        12. accelerator-lowering-fma.f64N/A

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

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

    Alternative 8: 71.0% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\ \mathbf{if}\;a \leq -1.22 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+70}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
       (if (<= a -1.22e+114)
         t_1
         (if (<= a 1.55e+70) (+ t (* (/ y z) (- x t))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((y - z), ((t - x) / a), x);
    	double tmp;
    	if (a <= -1.22e+114) {
    		tmp = t_1;
    	} else if (a <= 1.55e+70) {
    		tmp = t + ((y / z) * (x - t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x)
    	tmp = 0.0
    	if (a <= -1.22e+114)
    		tmp = t_1;
    	elseif (a <= 1.55e+70)
    		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.22e+114], t$95$1, If[LessEqual[a, 1.55e+70], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
    \mathbf{if}\;a \leq -1.22 \cdot 10^{+114}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 1.55 \cdot 10^{+70}:\\
    \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -1.21999999999999999e114 or 1.55000000000000015e70 < a

      1. Initial program 89.4%

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
        6. /-lowering-/.f64N/A

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

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

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

      if -1.21999999999999999e114 < a < 1.55000000000000015e70

      1. Initial program 72.4%

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
        2. clear-numN/A

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
        6. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
        7. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
        8. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
        9. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
        12. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
        13. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

          \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} \]
        5. unsub-negN/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        6. --lowering--.f64N/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        7. distribute-rgt-out--N/A

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

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        9. *-lowering-*.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        10. --lowering--.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right)} \cdot \frac{y - a}{z} \]
        11. /-lowering-/.f64N/A

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

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

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

        \[\leadsto t - \left(t - x\right) \cdot \color{blue}{\frac{y}{z}} \]
      9. Step-by-step derivation
        1. /-lowering-/.f6470.9

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

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

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

    Alternative 9: 68.2% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\ \mathbf{if}\;a \leq -1.22 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+111}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (- y z) (/ t a) x)))
       (if (<= a -1.22e+114)
         t_1
         (if (<= a 7.2e+111) (+ t (* (/ y z) (- x t))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((y - z), (t / a), x);
    	double tmp;
    	if (a <= -1.22e+114) {
    		tmp = t_1;
    	} else if (a <= 7.2e+111) {
    		tmp = t + ((y / z) * (x - t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(y - z), Float64(t / a), x)
    	tmp = 0.0
    	if (a <= -1.22e+114)
    		tmp = t_1;
    	elseif (a <= 7.2e+111)
    		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.22e+114], t$95$1, If[LessEqual[a, 7.2e+111], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
    \mathbf{if}\;a \leq -1.22 \cdot 10^{+114}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 7.2 \cdot 10^{+111}:\\
    \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -1.21999999999999999e114 or 7.2000000000000004e111 < a

      1. Initial program 89.2%

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

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

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

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
        6. /-lowering-/.f64N/A

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

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

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

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

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

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

      if -1.21999999999999999e114 < a < 7.2000000000000004e111

      1. Initial program 73.5%

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
        2. clear-numN/A

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{t - x}}} + x \]
        6. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}}}} + x \]
        7. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\color{blue}{\frac{t \cdot t + \left(x \cdot x + t \cdot x\right)}{{t}^{3} - {x}^{3}}}} + x \]
        8. clear-numN/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{{t}^{3} - {x}^{3}}{t \cdot t + \left(x \cdot x + t \cdot x\right)}} + x \]
        9. flip3--N/A

          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\left(t - x\right)} + x \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y - z}{a - z}}, t - x, x\right) \]
        12. --lowering--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - z}}{a - z}, t - x, x\right) \]
        13. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

          \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} \]
        5. unsub-negN/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        6. --lowering--.f64N/A

          \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        7. distribute-rgt-out--N/A

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

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        9. *-lowering-*.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
        10. --lowering--.f64N/A

          \[\leadsto t - \color{blue}{\left(t - x\right)} \cdot \frac{y - a}{z} \]
        11. /-lowering-/.f64N/A

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

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

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

        \[\leadsto t - \left(t - x\right) \cdot \color{blue}{\frac{y}{z}} \]
      9. Step-by-step derivation
        1. /-lowering-/.f6469.8

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

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

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

    Alternative 10: 64.9% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \mathbf{if}\;z \leq -1.24 \cdot 10^{+120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+86}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (/ x z) y t)))
       (if (<= z -1.24e+120)
         t_1
         (if (<= z 1.55e+86) (fma y (/ (- t x) a) x) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((x / z), y, t);
    	double tmp;
    	if (z <= -1.24e+120) {
    		tmp = t_1;
    	} else if (z <= 1.55e+86) {
    		tmp = fma(y, ((t - x) / a), x);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(x / z), y, t)
    	tmp = 0.0
    	if (z <= -1.24e+120)
    		tmp = t_1;
    	elseif (z <= 1.55e+86)
    		tmp = fma(y, Float64(Float64(t - x) / a), x);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -1.24e+120], t$95$1, If[LessEqual[z, 1.55e+86], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
    \mathbf{if}\;z \leq -1.24 \cdot 10^{+120}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.55 \cdot 10^{+86}:\\
    \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.23999999999999998e120 or 1.5500000000000001e86 < z

      1. Initial program 59.5%

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

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

          \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
        2. distribute-lft-out--N/A

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

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

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
        6. div-subN/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
        7. associate-/l*N/A

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

          \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
        9. distribute-rgt-out--N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
        10. distribute-lft-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
        11. mul-1-negN/A

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
        12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]

        if -1.23999999999999998e120 < z < 1.5500000000000001e86

        1. Initial program 92.2%

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

          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{t - x}{a}}, x\right) \]
          5. --lowering--.f6467.2

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
      11. Recombined 2 regimes into one program.
      12. Add Preprocessing

      Alternative 11: 54.8% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - z \cdot \frac{t}{a}\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{+111}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (- x (* z (/ t a)))))
         (if (<= a -2.7e+98) t_1 (if (<= a 6.3e+111) (fma (/ x z) y t) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x - (z * (t / a));
      	double tmp;
      	if (a <= -2.7e+98) {
      		tmp = t_1;
      	} else if (a <= 6.3e+111) {
      		tmp = fma((x / z), y, t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x - Float64(z * Float64(t / a)))
      	tmp = 0.0
      	if (a <= -2.7e+98)
      		tmp = t_1;
      	elseif (a <= 6.3e+111)
      		tmp = fma(Float64(x / z), y, t);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e+98], t$95$1, If[LessEqual[a, 6.3e+111], N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x - z \cdot \frac{t}{a}\\
      \mathbf{if}\;a \leq -2.7 \cdot 10^{+98}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;a \leq 6.3 \cdot 10^{+111}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -2.7e98 or 6.3000000000000001e111 < a

        1. Initial program 88.5%

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

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

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

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

            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
          6. /-lowering-/.f64N/A

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

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

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

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

            \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(t - x\right)}{a}\right)\right)} \]
          2. unsub-negN/A

            \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
          3. --lowering--.f64N/A

            \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
          4. /-lowering-/.f64N/A

            \[\leadsto x - \color{blue}{\frac{z \cdot \left(t - x\right)}{a}} \]
          5. *-lowering-*.f64N/A

            \[\leadsto x - \frac{\color{blue}{z \cdot \left(t - x\right)}}{a} \]
          6. --lowering--.f6461.2

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

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

          \[\leadsto x - \color{blue}{\frac{t \cdot z}{a}} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto x - \frac{\color{blue}{z \cdot t}}{a} \]
          2. associate-/l*N/A

            \[\leadsto x - \color{blue}{z \cdot \frac{t}{a}} \]
          3. *-lowering-*.f64N/A

            \[\leadsto x - \color{blue}{z \cdot \frac{t}{a}} \]
          4. /-lowering-/.f6469.3

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

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

        if -2.7e98 < a < 6.3000000000000001e111

        1. Initial program 73.6%

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

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

            \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
          2. distribute-lft-out--N/A

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

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

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

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
          6. div-subN/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
          7. associate-/l*N/A

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

            \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
          9. distribute-rgt-out--N/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
          10. distribute-lft-neg-inN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
          11. mul-1-negN/A

            \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
          12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]
        10. Step-by-step derivation
          1. Simplified57.4%

            \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]
        11. Recombined 2 regimes into one program.
        12. Add Preprocessing

        Alternative 12: 52.1% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.3 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (fma x (/ z a) x)))
           (if (<= a -1.35e+114) t_1 (if (<= a 7.3e+112) (fma (/ x z) y t) t_1))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = fma(x, (z / a), x);
        	double tmp;
        	if (a <= -1.35e+114) {
        		tmp = t_1;
        	} else if (a <= 7.3e+112) {
        		tmp = fma((x / z), y, t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a)
        	t_1 = fma(x, Float64(z / a), x)
        	tmp = 0.0
        	if (a <= -1.35e+114)
        		tmp = t_1;
        	elseif (a <= 7.3e+112)
        		tmp = fma(Float64(x / z), y, t);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.35e+114], t$95$1, If[LessEqual[a, 7.3e+112], N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\
        \mathbf{if}\;a \leq -1.35 \cdot 10^{+114}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;a \leq 7.3 \cdot 10^{+112}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -1.35e114 or 7.3e112 < a

          1. Initial program 89.2%

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

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

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

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

              \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
            5. --lowering--.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
            6. /-lowering-/.f64N/A

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

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

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

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

              \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(t - x\right)}{a}\right)\right)} \]
            2. unsub-negN/A

              \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
            3. --lowering--.f64N/A

              \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto x - \color{blue}{\frac{z \cdot \left(t - x\right)}{a}} \]
            5. *-lowering-*.f64N/A

              \[\leadsto x - \frac{\color{blue}{z \cdot \left(t - x\right)}}{a} \]
            6. --lowering--.f6462.1

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

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

            \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{z}{a}\right)} \]
          10. Step-by-step derivation
            1. distribute-rgt-out--N/A

              \[\leadsto \color{blue}{1 \cdot x - \left(-1 \cdot \frac{z}{a}\right) \cdot x} \]
            2. *-lft-identityN/A

              \[\leadsto \color{blue}{x} - \left(-1 \cdot \frac{z}{a}\right) \cdot x \]
            3. mul-1-negN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\frac{z}{a}\right)\right)} \cdot x \]
            4. cancel-sign-subN/A

              \[\leadsto \color{blue}{x + \frac{z}{a} \cdot x} \]
            5. associate-*l/N/A

              \[\leadsto x + \color{blue}{\frac{z \cdot x}{a}} \]
            6. *-commutativeN/A

              \[\leadsto x + \frac{\color{blue}{x \cdot z}}{a} \]
            7. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{x \cdot z}{a} + x} \]
            8. associate-/l*N/A

              \[\leadsto \color{blue}{x \cdot \frac{z}{a}} + x \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{a}, x\right)} \]
            10. /-lowering-/.f6459.8

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{a}}, x\right) \]
          11. Simplified59.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{a}, x\right)} \]

          if -1.35e114 < a < 7.3e112

          1. Initial program 73.5%

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

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

              \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
            2. distribute-lft-out--N/A

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

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

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

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
            6. div-subN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)}\right)\right) + t \]
            7. associate-/l*N/A

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

              \[\leadsto \left(\mathsf{neg}\left(\left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right)\right)\right) + t \]
            9. distribute-rgt-out--N/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)}\right)\right) + t \]
            10. distribute-lft-neg-inN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot \left(y - a\right)} + t \]
            11. mul-1-negN/A

              \[\leadsto \color{blue}{\left(-1 \cdot \frac{t - x}{z}\right)} \cdot \left(y - a\right) + t \]
            12. accelerator-lowering-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y - a, t\right) \]
          7. Step-by-step derivation
            1. /-lowering-/.f6461.2

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

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

            \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]
          10. Step-by-step derivation
            1. Simplified56.6%

              \[\leadsto \mathsf{fma}\left(\frac{x}{z}, \color{blue}{y}, t\right) \]
          11. Recombined 2 regimes into one program.
          12. Add Preprocessing

          Alternative 13: 39.2% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+118}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+86}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= z -3.6e+118) t (if (<= z 2e+86) (fma x (/ z a) x) t)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -3.6e+118) {
          		tmp = t;
          	} else if (z <= 2e+86) {
          		tmp = fma(x, (z / a), x);
          	} else {
          		tmp = t;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (z <= -3.6e+118)
          		tmp = t;
          	elseif (z <= 2e+86)
          		tmp = fma(x, Float64(z / a), x);
          	else
          		tmp = t;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+118], t, If[LessEqual[z, 2e+86], N[(x * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -3.6 \cdot 10^{+118}:\\
          \;\;\;\;t\\
          
          \mathbf{elif}\;z \leq 2 \cdot 10^{+86}:\\
          \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -3.6e118 or 2e86 < z

            1. Initial program 59.5%

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

              \[\leadsto \color{blue}{t} \]
            4. Step-by-step derivation
              1. Simplified53.9%

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

              if -3.6e118 < z < 2e86

              1. Initial program 92.2%

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

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

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

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

                  \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a}} + x \]
                4. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
                5. --lowering--.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
                6. /-lowering-/.f64N/A

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

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

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

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

                  \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(t - x\right)}{a}\right)\right)} \]
                2. unsub-negN/A

                  \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
                3. --lowering--.f64N/A

                  \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a}} \]
                4. /-lowering-/.f64N/A

                  \[\leadsto x - \color{blue}{\frac{z \cdot \left(t - x\right)}{a}} \]
                5. *-lowering-*.f64N/A

                  \[\leadsto x - \frac{\color{blue}{z \cdot \left(t - x\right)}}{a} \]
                6. --lowering--.f6445.0

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

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

                \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{z}{a}\right)} \]
              10. Step-by-step derivation
                1. distribute-rgt-out--N/A

                  \[\leadsto \color{blue}{1 \cdot x - \left(-1 \cdot \frac{z}{a}\right) \cdot x} \]
                2. *-lft-identityN/A

                  \[\leadsto \color{blue}{x} - \left(-1 \cdot \frac{z}{a}\right) \cdot x \]
                3. mul-1-negN/A

                  \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\frac{z}{a}\right)\right)} \cdot x \]
                4. cancel-sign-subN/A

                  \[\leadsto \color{blue}{x + \frac{z}{a} \cdot x} \]
                5. associate-*l/N/A

                  \[\leadsto x + \color{blue}{\frac{z \cdot x}{a}} \]
                6. *-commutativeN/A

                  \[\leadsto x + \frac{\color{blue}{x \cdot z}}{a} \]
                7. +-commutativeN/A

                  \[\leadsto \color{blue}{\frac{x \cdot z}{a} + x} \]
                8. associate-/l*N/A

                  \[\leadsto \color{blue}{x \cdot \frac{z}{a}} + x \]
                9. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{a}, x\right)} \]
                10. /-lowering-/.f6442.1

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{a}}, x\right) \]
              11. Simplified42.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{a}, x\right)} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 14: 37.6% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+114}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.9 \cdot 10^{+112}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (if (<= a -4.6e+114) x (if (<= a 6.9e+112) t x)))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (a <= -4.6e+114) {
            		tmp = x;
            	} else if (a <= 6.9e+112) {
            		tmp = t;
            	} else {
            		tmp = x;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: tmp
                if (a <= (-4.6d+114)) then
                    tmp = x
                else if (a <= 6.9d+112) then
                    tmp = t
                else
                    tmp = x
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (a <= -4.6e+114) {
            		tmp = x;
            	} else if (a <= 6.9e+112) {
            		tmp = t;
            	} else {
            		tmp = x;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	tmp = 0
            	if a <= -4.6e+114:
            		tmp = x
            	elif a <= 6.9e+112:
            		tmp = t
            	else:
            		tmp = x
            	return tmp
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if (a <= -4.6e+114)
            		tmp = x;
            	elseif (a <= 6.9e+112)
            		tmp = t;
            	else
            		tmp = x;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	tmp = 0.0;
            	if (a <= -4.6e+114)
            		tmp = x;
            	elseif (a <= 6.9e+112)
            		tmp = t;
            	else
            		tmp = x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e+114], x, If[LessEqual[a, 6.9e+112], t, x]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq -4.6 \cdot 10^{+114}:\\
            \;\;\;\;x\\
            
            \mathbf{elif}\;a \leq 6.9 \cdot 10^{+112}:\\
            \;\;\;\;t\\
            
            \mathbf{else}:\\
            \;\;\;\;x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < -4.6000000000000001e114 or 6.8999999999999999e112 < a

              1. Initial program 89.2%

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

                \[\leadsto \color{blue}{x} \]
              4. Step-by-step derivation
                1. Simplified59.6%

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

                if -4.6000000000000001e114 < a < 6.8999999999999999e112

                1. Initial program 73.5%

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

                  \[\leadsto \color{blue}{t} \]
                4. Step-by-step derivation
                  1. Simplified37.8%

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

                Alternative 15: 25.2% accurate, 29.0× speedup?

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

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

                  \[\leadsto \color{blue}{t} \]
                4. Step-by-step derivation
                  1. Simplified29.2%

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

                  Reproduce

                  ?
                  herbie shell --seed 2024195 
                  (FPCore (x y z t a)
                    :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                    :precision binary64
                    (+ x (* (- y z) (/ (- t x) (- a z)))))