Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 94.4%
Time: 13.6s
Alternatives: 16
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 16 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.3% 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.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 90.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--.f6496.2

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

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

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

    1. Initial program 2.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--.f642.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 90.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--.f6494.6

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.4% 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^{-259}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{a - y}{z}, 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-259)
     t_1
     (if (<= t_2 0.0) (fma (- t x) (/ (- a y) z) 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-259) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = fma((t - x), ((a - y) / z), 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-259)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = fma(Float64(t - x), Float64(Float64(a - y) / z), 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-259], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $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^{-259}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{a - y}{z}, 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.0000000000000001e-259 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.7%

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

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

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

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

    1. Initial program 2.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--.f642.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 93.8%

      \[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--.f6486.7

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

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

    if -1.9000000000000002e47 < a < 2.40000000000000009e-119

    1. Initial program 72.2%

      \[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--.f6478.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.40000000000000009e-119 < a

    1. Initial program 84.1%

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

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

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

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

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

Alternative 4: 75.9% 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.1 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-21}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{a - y}{z}, 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.1e+54)
     t_1
     (if (<= a 4.8e-21) (fma (- t x) (/ (- a y) z) 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.1e+54) {
		tmp = t_1;
	} else if (a <= 4.8e-21) {
		tmp = fma((t - x), ((a - y) / z), 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.1e+54)
		tmp = t_1;
	elseif (a <= 4.8e-21)
		tmp = fma(Float64(t - x), Float64(Float64(a - y) / z), 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.1e+54], t$95$1, If[LessEqual[a, 4.8e-21], N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $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 -1.1 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.09999999999999995e54 or 4.7999999999999999e-21 < a

    1. Initial program 90.0%

      \[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.0

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

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

    if -1.09999999999999995e54 < a < 4.7999999999999999e-21

    1. Initial program 72.6%

      \[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--.f6479.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t - x, \frac{a - y}{z}, t\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+15}:\\ \;\;\;\;\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 (- t x) (/ (- a y) z) t)))
   (if (<= z -3.4e-64) t_1 (if (<= z 2.4e+15) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((t - x), ((a - y) / z), t);
	double tmp;
	if (z <= -3.4e-64) {
		tmp = t_1;
	} else if (z <= 2.4e+15) {
		tmp = fma((y / a), (t - x), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(t - x), Float64(Float64(a - y) / z), t)
	tmp = 0.0
	if (z <= -3.4e-64)
		tmp = t_1;
	elseif (z <= 2.4e+15)
		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[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.4e-64], t$95$1, If[LessEqual[z, 2.4e+15], 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(t - x, \frac{a - y}{z}, t\right)\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000012e-64 or 2.4e15 < z

    1. Initial program 73.1%

      \[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. Step-by-step derivation
      1. div-subN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000012e-64 < z < 2.4e15

    1. Initial program 90.2%

      \[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--.f6496.6

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

      \[\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.5

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

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

Alternative 6: 63.4% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 72.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
      2. clear-numN/A

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

        \[\leadsto \color{blue}{\frac{t \cdot 1}{\frac{a - z}{y - z}}} \]
      4. div-invN/A

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

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

        \[\leadsto \frac{t}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{y \cdot y - z \cdot z}{y + z}}}} \]
      7. clear-numN/A

        \[\leadsto \frac{t}{a - z} \cdot \frac{1}{\color{blue}{\frac{y + z}{y \cdot y - z \cdot z}}} \]
      8. clear-numN/A

        \[\leadsto \frac{t}{a - z} \cdot \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \]
      9. flip--N/A

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

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

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

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

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

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

    if -4.20000000000000006e-65 < z < 1.35000000000000002e48

    1. Initial program 90.6%

      \[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--.f6496.7

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

      \[\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-/.f6474.9

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

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

    if 1.35000000000000002e48 < z

    1. Initial program 70.7%

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

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

      \[\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. associate-*r/N/A

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. 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)} \]
      10. unsub-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
      5. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y}}{z}, t\right) \]
    12. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-y}}{z}, t\right) \]
    13. Simplified59.9%

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

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

Alternative 7: 64.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t, \frac{y}{-z}, t\right)\\ \mathbf{if}\;z \leq -3.25 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+39}:\\ \;\;\;\;\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 t (/ y (- z)) t)))
   (if (<= z -3.25e+66) t_1 (if (<= z 8.5e+39) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(t, (y / -z), t);
	double tmp;
	if (z <= -3.25e+66) {
		tmp = t_1;
	} else if (z <= 8.5e+39) {
		tmp = fma((y / a), (t - x), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(t, Float64(y / Float64(-z)), t)
	tmp = 0.0
	if (z <= -3.25e+66)
		tmp = t_1;
	elseif (z <= 8.5e+39)
		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[(t * N[(y / (-z)), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.25e+66], t$95$1, If[LessEqual[z, 8.5e+39], 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(t, \frac{y}{-z}, t\right)\\
\mathbf{if}\;z \leq -3.25 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2500000000000001e66 or 8.49999999999999971e39 < z

    1. Initial program 64.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--.f6468.1

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

      \[\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. associate-*r/N/A

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. 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)} \]
      10. unsub-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
      5. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y}}{z}, t\right) \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{\mathsf{neg}\left(y\right)}}{z}, t\right) \]
      2. neg-lowering-neg.f6456.0

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-y}}{z}, t\right) \]
    13. Simplified56.0%

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

    if -3.2500000000000001e66 < z < 8.49999999999999971e39

    1. Initial program 91.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--.f6496.1

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

      \[\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-/.f6468.0

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

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

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

Alternative 8: 59.8% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.09999999999999998e44 or 1.9e11 < a

    1. Initial program 90.4%

      \[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--.f6470.5

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

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

    if -1.09999999999999998e44 < a < 1.9e11

    1. Initial program 73.6%

      \[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--.f6480.5

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, \color{blue}{t - x}, x\right) \]
    4. Applied egg-rr80.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. associate-*r/N/A

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. 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)} \]
      10. unsub-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
      5. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

Alternative 9: 56.6% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.5599999999999999e66 or 1.6e10 < a

    1. Initial program 90.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--.f6491.2

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

      \[\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-/.f6470.2

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

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

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

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

      if -1.5599999999999999e66 < a < 1.6e10

      1. Initial program 73.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--.f6480.6

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

        \[\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. associate-*r/N/A

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

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

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

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

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

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

          \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
        9. 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)} \]
        10. unsub-negN/A

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
        5. associate-*r/N/A

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

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

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

          \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
        9. neg-mul-1N/A

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

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

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

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

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

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

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

    Alternative 10: 56.5% accurate, 0.9× speedup?

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

      1. Initial program 90.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--.f6491.2

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

        \[\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-/.f6470.2

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

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

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

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

        if -4.49999999999999999e62 < a < 9e10

        1. Initial program 73.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--.f6480.6

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

          \[\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. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
          9. 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)} \]
          10. unsub-negN/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
          5. associate-*r/N/A

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

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

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

            \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
          9. neg-mul-1N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y}}{z}, t\right) \]
        12. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{\mathsf{neg}\left(y\right)}}{z}, t\right) \]
          2. neg-lowering-neg.f6454.3

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

          \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-y}}{z}, t\right) \]
      10. Recombined 2 regimes into one program.
      11. Final simplification58.8%

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

      Alternative 11: 53.6% accurate, 1.0× speedup?

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

        1. Initial program 58.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. Simplified45.4%

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

          if -5.60000000000000003e74 < z < 1e113

          1. Initial program 90.6%

            \[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.6

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

            \[\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-/.f6465.2

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

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

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

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

            if 1e113 < z

            1. Initial program 67.6%

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

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

              \[\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. associate-*r/N/A

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

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

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

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

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

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

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              9. 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)} \]
              10. unsub-negN/A

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
              5. associate-*r/N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
              9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 40.4% accurate, 1.0× speedup?

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

            1. Initial program 90.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. Simplified45.2%

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

              if -9.199999999999999e73 < a < 1.8e12

              1. Initial program 73.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--.f6480.8

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

                \[\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. associate-*r/N/A

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

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

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

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

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

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

                  \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                9. 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)} \]
                10. unsub-negN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
                5. associate-*r/N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
                9. neg-mul-1N/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{a}{z}}, t\right) \]
              13. Simplified38.4%

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

            Alternative 13: 41.1% accurate, 1.0× speedup?

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

              1. Initial program 90.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. Simplified45.2%

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

                if -1.6000000000000001e70 < a < 4e12

                1. Initial program 73.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--.f6480.8

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

                  \[\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. associate-*r/N/A

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

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

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

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

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

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

                    \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                  9. 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)} \]
                  10. unsub-negN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \frac{y - a}{z}, t\right)} \]
                  5. associate-*r/N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(t, \frac{\color{blue}{-1 \cdot y + -1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}{z}, t\right) \]
                  9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{t}{z}, t\right)} \]
                  4. /-lowering-/.f6438.3

                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t}{z}}, t\right) \]
                13. Simplified38.3%

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

              Alternative 14: 39.8% accurate, 2.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 480000000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= a -6e+69) x (if (<= a 480000000000.0) t x)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (a <= -6e+69) {
              		tmp = x;
              	} else if (a <= 480000000000.0) {
              		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 <= (-6d+69)) then
                      tmp = x
                  else if (a <= 480000000000.0d0) 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 <= -6e+69) {
              		tmp = x;
              	} else if (a <= 480000000000.0) {
              		tmp = t;
              	} else {
              		tmp = x;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if a <= -6e+69:
              		tmp = x
              	elif a <= 480000000000.0:
              		tmp = t
              	else:
              		tmp = x
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (a <= -6e+69)
              		tmp = x;
              	elseif (a <= 480000000000.0)
              		tmp = t;
              	else
              		tmp = x;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (a <= -6e+69)
              		tmp = x;
              	elseif (a <= 480000000000.0)
              		tmp = t;
              	else
              		tmp = x;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e+69], x, If[LessEqual[a, 480000000000.0], t, x]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a \leq -6 \cdot 10^{+69}:\\
              \;\;\;\;x\\
              
              \mathbf{elif}\;a \leq 480000000000:\\
              \;\;\;\;t\\
              
              \mathbf{else}:\\
              \;\;\;\;x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < -5.99999999999999967e69 or 4.8e11 < a

                1. Initial program 90.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. Simplified45.2%

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

                  if -5.99999999999999967e69 < a < 4.8e11

                  1. Initial program 73.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}{t} \]
                  4. Step-by-step derivation
                    1. Simplified36.9%

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

                  Alternative 15: 25.4% 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 81.1%

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

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

                    Alternative 16: 2.8% accurate, 29.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                    7. Step-by-step derivation
                      1. distribute-rgt1-inN/A

                        \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
                      2. metadata-evalN/A

                        \[\leadsto \color{blue}{0} \cdot x \]
                      3. mul0-lft2.7

                        \[\leadsto \color{blue}{0} \]
                    8. Simplified2.7%

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

                    Reproduce

                    ?
                    herbie shell --seed 2024204 
                    (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)))))