Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 94.7%
Time: 10.4s
Alternatives: 15
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 80.1% accurate, 1.0× speedup?

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

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

Alternative 1: 94.7% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 92.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. lift-/.f64N/A

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

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

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

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

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

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

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

    1. Initial program 3.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 88.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 94.7% accurate, 0.3× speedup?

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

      1. Initial program 90.0%

        \[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. lift-/.f64N/A

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

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

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

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

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

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

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

      1. Initial program 3.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 60.3% accurate, 0.7× speedup?

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

        1. Initial program 92.4%

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

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

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

            \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
          3. *-commutativeN/A

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

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

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

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

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

        if -0.0410000000000000017 < a < 2.20000000000000006e-192

        1. Initial program 71.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
          3. Step-by-step derivation
            1. Applied rewrites64.6%

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

            if 2.20000000000000006e-192 < a < 1.25000000000000005e35

            1. Initial program 67.5%

              \[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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.041:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-192}:\\ \;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+35}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \end{array} \]
              6. Add Preprocessing

              Alternative 4: 48.9% accurate, 0.7× speedup?

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

                1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                7. Step-by-step derivation
                  1. Applied rewrites57.8%

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

                  if -2.8999999999999999e140 < a < -0.450000000000000011

                  1. Initial program 91.4%

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

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

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

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

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

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

                      \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                    6. lower--.f6466.4

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

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

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

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

                    if -0.450000000000000011 < a < 1.6500000000000001e66

                    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites59.9%

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

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

                      Alternative 5: 76.4% accurate, 0.8× speedup?

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

                        1. Initial program 93.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

                        if -0.52000000000000002 < a < 1.06000000000000004e66

                        1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 6: 75.8% accurate, 0.8× speedup?

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

                          1. Initial program 93.7%

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

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

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

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

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

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

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

                          if -0.52000000000000002 < a < 1.06000000000000004e66

                          1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 7: 73.4% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\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 -0.37) (not (<= a 1.06e+66)))
                             (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 <= -0.37) || !(a <= 1.06e+66)) {
                          		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 <= -0.37) || !(a <= 1.06e+66))
                          		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, -0.37], N[Not[LessEqual[a, 1.06e+66]], $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 -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\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 < -0.37 or 1.06000000000000004e66 < a

                            1. Initial program 93.7%

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

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

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

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

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

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

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

                            if -0.37 < a < 1.06000000000000004e66

                            1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\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 8: 70.0% accurate, 0.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{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 -0.37) (not (<= a 1.06e+66)))
                                 (fma (- t x) (/ y a) x)
                                 (fma (- x t) (/ y z) t)))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if ((a <= -0.37) || !(a <= 1.06e+66)) {
                              		tmp = fma((t - x), (y / a), x);
                              	} else {
                              		tmp = fma((x - t), (y / z), t);
                              	}
                              	return tmp;
                              }
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if ((a <= -0.37) || !(a <= 1.06e+66))
                              		tmp = fma(Float64(t - x), Float64(y / 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, -0.37], N[Not[LessEqual[a, 1.06e+66]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(y / 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 -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\
                              \;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{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 < -0.37 or 1.06000000000000004e66 < a

                                1. Initial program 93.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

                                if -0.37 < a < 1.06000000000000004e66

                                1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 9: 69.5% accurate, 0.9× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, 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 -0.37) (not (<= a 1.06e+66)))
                                     (fma (/ (- t x) a) y x)
                                     (fma (- x t) (/ y z) t)))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double tmp;
                                  	if ((a <= -0.37) || !(a <= 1.06e+66)) {
                                  		tmp = fma(((t - x) / a), y, x);
                                  	} else {
                                  		tmp = fma((x - t), (y / z), t);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a)
                                  	tmp = 0.0
                                  	if ((a <= -0.37) || !(a <= 1.06e+66))
                                  		tmp = fma(Float64(Float64(t - x) / a), y, 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, -0.37], N[Not[LessEqual[a, 1.06e+66]], $MachinePrecision]], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, 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 < -0.37 or 1.06000000000000004e66 < a

                                    1. Initial program 93.7%

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

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

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

                                        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                      3. *-commutativeN/A

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

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

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

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

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

                                    if -0.37 < a < 1.06000000000000004e66

                                    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 10: 68.0% accurate, 0.9× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, 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 -0.37) (not (<= a 1.06e+66)))
                                         (fma (/ (- t x) a) y x)
                                         (fma (/ (- x t) z) y t)))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if ((a <= -0.37) || !(a <= 1.06e+66)) {
                                      		tmp = fma(((t - x) / a), y, x);
                                      	} else {
                                      		tmp = fma(((x - t) / z), y, t);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a)
                                      	tmp = 0.0
                                      	if ((a <= -0.37) || !(a <= 1.06e+66))
                                      		tmp = fma(Float64(Float64(t - x) / a), y, 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, -0.37], N[Not[LessEqual[a, 1.06e+66]], $MachinePrecision]], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;a \leq -0.37 \lor \neg \left(a \leq 1.06 \cdot 10^{+66}\right):\\
                                      \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, 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 < -0.37 or 1.06000000000000004e66 < a

                                        1. Initial program 93.7%

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

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

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

                                            \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                          3. *-commutativeN/A

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

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

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

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

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

                                        if -0.37 < a < 1.06000000000000004e66

                                        1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 11: 45.2% accurate, 0.9× speedup?

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

                                          1. Initial program 70.0%

                                            \[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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -9.50000000000000054e26 < z < 2.1000000000000002e-30

                                              1. Initial program 89.5%

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

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

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

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

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

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

                                                  \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                                6. lower--.f6445.2

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

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

                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites43.9%

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

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

                                              Alternative 12: 43.6% accurate, 1.0× speedup?

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

                                                1. Initial program 73.0%

                                                  \[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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -6.00000000000000012e-17 < z < 2.10000000000000001e-44

                                                    1. Initial program 88.6%

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

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

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

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

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

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

                                                        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                                      6. lower--.f6442.0

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

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

                                                      \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites33.5%

                                                        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Final simplification45.5%

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

                                                    Alternative 13: 30.0% accurate, 1.0× speedup?

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

                                                      1. Initial program 71.0%

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

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

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

                                                      if -1.1000000000000001e42 < z < 2.7999999999999998e-43

                                                      1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites31.2%

                                                          \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
                                                      8. Recombined 2 regimes into one program.
                                                      9. Final simplification33.4%

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

                                                      Alternative 14: 18.9% 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 79.8%

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

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

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

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

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

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

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

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

                                                        Reproduce

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