Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.9% → 90.8%
Time: 9.5s
Alternatives: 13
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 13 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.9% 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: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    1. Initial program 13.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+42} \lor \neg \left(z \leq 8.4 \cdot 10^{+37}\right):\\
\;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4000000000000003e42 or 8.4000000000000004e37 < z

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4000000000000003e42 < z < 8.4000000000000004e37

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 70.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-92} \lor \neg \left(a \leq 3.6 \cdot 10^{+145}\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.9999999999999999e-92 or 3.59999999999999974e145 < a

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999999e-92 < a < 3.59999999999999974e145

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 72.6% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-92} \lor \neg \left(a \leq 9.2 \cdot 10^{+76}\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (or (<= a -8e-92) (not (<= a 9.2e+76)))
         (fma (- y z) (/ (- t x) a) x)
         (fma (- x t) (/ y z) t)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if ((a <= -8e-92) || !(a <= 9.2e+76)) {
      		tmp = fma((y - z), ((t - x) / a), x);
      	} else {
      		tmp = fma((x - t), (y / z), t);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if ((a <= -8e-92) || !(a <= 9.2e+76))
      		tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x);
      	else
      		tmp = fma(Float64(x - t), Float64(y / z), t);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e-92], N[Not[LessEqual[a, 9.2e+76]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -8 \cdot 10^{-92} \lor \neg \left(a \leq 9.2 \cdot 10^{+76}\right):\\
      \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -7.9999999999999999e-92 or 9.20000000000000005e76 < a

        1. Initial program 87.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. lower-fma.f64N/A

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

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

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

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

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

        if -7.9999999999999999e-92 < a < 9.20000000000000005e76

        1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 70.6% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-76} \lor \neg \left(z \leq 8 \cdot 10^{+38}\right):\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= z -8.5e-76) (not (<= z 8e+38)))
             (fma (- x t) (/ y z) t)
             (fma (- t x) (/ y a) x)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if ((z <= -8.5e-76) || !(z <= 8e+38)) {
          		tmp = fma((x - t), (y / z), t);
          	} else {
          		tmp = fma((t - x), (y / a), x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((z <= -8.5e-76) || !(z <= 8e+38))
          		tmp = fma(Float64(x - t), Float64(y / z), t);
          	else
          		tmp = fma(Float64(t - x), Float64(y / a), x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e-76], N[Not[LessEqual[z, 8e+38]], $MachinePrecision]], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -8.5 \cdot 10^{-76} \lor \neg \left(z \leq 8 \cdot 10^{+38}\right):\\
          \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -8.50000000000000038e-76 or 7.99999999999999982e38 < z

            1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -8.50000000000000038e-76 < z < 7.99999999999999982e38

                1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 65.5% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+34} \lor \neg \left(a \leq 3.6 \cdot 10^{+145}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= a -8e+34) (not (<= a 3.6e+145)))
                   (fma y (/ t a) x)
                   (fma (- x t) (/ y z) t)))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((a <= -8e+34) || !(a <= 3.6e+145)) {
                		tmp = fma(y, (t / a), x);
                	} else {
                		tmp = fma((x - t), (y / z), t);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((a <= -8e+34) || !(a <= 3.6e+145))
                		tmp = fma(y, Float64(t / a), x);
                	else
                		tmp = fma(Float64(x - t), Float64(y / z), t);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e+34], N[Not[LessEqual[a, 3.6e+145]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;a \leq -8 \cdot 10^{+34} \lor \neg \left(a \leq 3.6 \cdot 10^{+145}\right):\\
                \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < -7.99999999999999956e34 or 3.59999999999999974e145 < a

                  1. Initial program 89.1%

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                  6. 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. lower-fma.f64N/A

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

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

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

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

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

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

                    if -7.99999999999999956e34 < a < 3.59999999999999974e145

                    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 7: 64.7% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+34} \lor \neg \left(a \leq 3.6 \cdot 10^{+145}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (or (<= a -8e+34) (not (<= a 3.6e+145)))
                         (fma y (/ t a) x)
                         (fma (/ (- x t) z) y t)))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if ((a <= -8e+34) || !(a <= 3.6e+145)) {
                      		tmp = fma(y, (t / a), x);
                      	} else {
                      		tmp = fma(((x - t) / z), y, t);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if ((a <= -8e+34) || !(a <= 3.6e+145))
                      		tmp = fma(y, Float64(t / a), x);
                      	else
                      		tmp = fma(Float64(Float64(x - t) / z), y, t);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e+34], N[Not[LessEqual[a, 3.6e+145]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;a \leq -8 \cdot 10^{+34} \lor \neg \left(a \leq 3.6 \cdot 10^{+145}\right):\\
                      \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if a < -7.99999999999999956e34 or 3.59999999999999974e145 < a

                        1. Initial program 89.1%

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                        6. 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. lower-fma.f64N/A

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

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

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

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

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

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

                          if -7.99999999999999956e34 < a < 3.59999999999999974e145

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 54.5% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-48} \lor \neg \left(a \leq 1.16 \cdot 10^{+120}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, 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 (or (<= a -3.9e-48) (not (<= a 1.16e+120)))
                             (fma y (/ t a) x)
                             (fma (- t) (/ y z) t)))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((a <= -3.9e-48) || !(a <= 1.16e+120)) {
                          		tmp = fma(y, (t / a), x);
                          	} else {
                          		tmp = fma(-t, (y / z), t);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((a <= -3.9e-48) || !(a <= 1.16e+120))
                          		tmp = fma(y, Float64(t / a), x);
                          	else
                          		tmp = fma(Float64(-t), Float64(y / z), t);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.9e-48], N[Not[LessEqual[a, 1.16e+120]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;a \leq -3.9 \cdot 10^{-48} \lor \neg \left(a \leq 1.16 \cdot 10^{+120}\right):\\
                          \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if a < -3.9e-48 or 1.16000000000000003e120 < a

                            1. Initial program 87.4%

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                            6. 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. lower-fma.f64N/A

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

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

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

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

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

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

                              if -3.9e-48 < a < 1.16000000000000003e120

                              1. Initial program 77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(-1 \cdot t, \frac{\color{blue}{y}}{z}, t\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites58.7%

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

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

                                Alternative 9: 50.2% accurate, 0.9× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{-92} \lor \neg \left(a \leq 1.75 \cdot 10^{-137}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \end{array} \end{array} \]
                                (FPCore (x y z t a)
                                 :precision binary64
                                 (if (or (<= a -2.7e-92) (not (<= a 1.75e-137)))
                                   (fma y (/ t a) x)
                                   (* (/ (- x t) z) y)))
                                double code(double x, double y, double z, double t, double a) {
                                	double tmp;
                                	if ((a <= -2.7e-92) || !(a <= 1.75e-137)) {
                                		tmp = fma(y, (t / a), x);
                                	} else {
                                		tmp = ((x - t) / z) * y;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a)
                                	tmp = 0.0
                                	if ((a <= -2.7e-92) || !(a <= 1.75e-137))
                                		tmp = fma(y, Float64(t / a), x);
                                	else
                                		tmp = Float64(Float64(Float64(x - t) / z) * y);
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.7e-92], N[Not[LessEqual[a, 1.75e-137]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;a \leq -2.7 \cdot 10^{-92} \lor \neg \left(a \leq 1.75 \cdot 10^{-137}\right):\\
                                \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{x - t}{z} \cdot y\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if a < -2.69999999999999995e-92 or 1.7500000000000001e-137 < a

                                  1. Initial program 83.2%

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                  6. 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. lower-fma.f64N/A

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

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

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

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

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

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

                                    if -2.69999999999999995e-92 < a < 1.7500000000000001e-137

                                    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites48.3%

                                        \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification52.7%

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

                                    Alternative 10: 48.6% accurate, 1.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+135} \lor \neg \left(z \leq 7.5 \cdot 10^{+139}\right):\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (if (or (<= z -8.2e+135) (not (<= z 7.5e+139)))
                                       (+ x (- t x))
                                       (fma y (/ t a) x)))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double tmp;
                                    	if ((z <= -8.2e+135) || !(z <= 7.5e+139)) {
                                    		tmp = x + (t - x);
                                    	} else {
                                    		tmp = fma(y, (t / a), x);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a)
                                    	tmp = 0.0
                                    	if ((z <= -8.2e+135) || !(z <= 7.5e+139))
                                    		tmp = Float64(x + Float64(t - x));
                                    	else
                                    		tmp = fma(y, Float64(t / a), x);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.2e+135], N[Not[LessEqual[z, 7.5e+139]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;z \leq -8.2 \cdot 10^{+135} \lor \neg \left(z \leq 7.5 \cdot 10^{+139}\right):\\
                                    \;\;\;\;x + \left(t - x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if z < -8.2e135 or 7.49999999999999992e139 < z

                                      1. Initial program 64.3%

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

                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                      4. Step-by-step derivation
                                        1. lower--.f6443.7

                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                      5. Applied rewrites43.7%

                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]

                                      if -8.2e135 < z < 7.49999999999999992e139

                                      1. Initial program 89.1%

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                      6. 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. lower-fma.f64N/A

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, \frac{t}{\color{blue}{a}}, x\right) \]
                                      10. Recombined 2 regimes into one program.
                                      11. Final simplification52.1%

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

                                      Alternative 11: 26.3% accurate, 1.0× speedup?

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

                                        1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{y - a}{z} \cdot \color{blue}{x} \]
                                            2. Taylor expanded in y around inf

                                              \[\leadsto \frac{x \cdot y}{z} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites37.4%

                                                \[\leadsto \frac{x}{z} \cdot y \]

                                              if -5.1999999999999998e92 < y < 2.8999999999999999e-40

                                              1. Initial program 77.6%

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

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              4. Step-by-step derivation
                                                1. lower--.f6432.2

                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              5. Applied rewrites32.2%

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            4. Recombined 2 regimes into one program.
                                            5. Final simplification34.6%

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

                                            Alternative 12: 19.4% accurate, 4.1× speedup?

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

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

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            4. Step-by-step derivation
                                              1. lower--.f6420.8

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            5. Applied rewrites20.8%

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            6. Add Preprocessing

                                            Alternative 13: 2.8% accurate, 4.8× speedup?

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

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

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            4. Step-by-step derivation
                                              1. lower--.f6420.8

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            5. Applied rewrites20.8%

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            6. Taylor expanded in x around inf

                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites2.7%

                                                \[\leadsto x + \left(-x\right) \]
                                              2. Add Preprocessing

                                              Reproduce

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