AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1

Percentage Accurate: 60.6% → 89.0%
Time: 12.6s
Alternatives: 17
Speedup: 1.4×

Specification

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

\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\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 17 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: 60.6% accurate, 1.0× speedup?

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

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

Alternative 1: 89.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z - b}}{y + t} + a \]
      2. lift-+.f64N/A

        \[\leadsto y \cdot \frac{z - b}{\color{blue}{y + t}} + a \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{z - b}{y + t} \cdot y} + a \]
      5. lift-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t} \cdot y}, a\right) \]
      10. lower-/.f6490.9

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t}} \cdot y, a\right) \]
    10. Applied rewrites90.9%

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

    if -1.99999999999999993e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4e303

    1. Initial program 99.7%

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

    if 4e303 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 4.8%

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z - b}}{y + t} + a \]
      2. lift-+.f64N/A

        \[\leadsto y \cdot \frac{z - b}{\color{blue}{y + t}} + a \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{z - b}{y + t} \cdot y} + a \]
      5. lift-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t} \cdot y}, a\right) \]
      10. lower-/.f6490.9

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t}} \cdot y, a\right) \]
    10. Applied rewrites90.9%

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

    if -1.99999999999999993e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4e303

    1. Initial program 99.7%

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

    if 4e303 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 76.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+240}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, y + t, t\_3\right)}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -2e259 or 4.00000000000000006e240 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{z - b}{\color{blue}{y + t}}, a\right) \]
      7. lower-+.f6476.1

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z - b}}{y + t} + a \]
      2. lift-+.f64N/A

        \[\leadsto y \cdot \frac{z - b}{\color{blue}{y + t}} + a \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{z - b}{y + t} \cdot y} + a \]
      5. lift-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t} \cdot y}, a\right) \]
      10. lower-/.f6482.4

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t}} \cdot y, a\right) \]
    10. Applied rewrites82.4%

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

    if -2e259 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.00000000000000006e240

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

Alternative 4: 70.1% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.3000000000000002e-42

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{z - b}{\color{blue}{y + t}}, a\right) \]
      7. lower-+.f6484.2

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z - b}}{y + t} + a \]
      2. lift-+.f64N/A

        \[\leadsto y \cdot \frac{z - b}{\color{blue}{y + t}} + a \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{z - b}{y + t} \cdot y} + a \]
      5. lift-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t} \cdot y}, a\right) \]
      10. lower-/.f6485.4

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t}} \cdot y, a\right) \]
    10. Applied rewrites85.4%

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

    if -3.3000000000000002e-42 < y < 3.1e-159

    1. Initial program 90.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
      5. lower-+.f6470.2

        \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
    5. Applied rewrites70.2%

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

    if 3.1e-159 < y < 0.016

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.016 < y

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-42}:\\ \;\;\;\;\mathsf{fma}\left(z - b, y \cdot \frac{1}{y + t}, a\right)\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, x \cdot z\right)}{x + t}\\ \mathbf{elif}\;y \leq 0.016:\\ \;\;\;\;\mathsf{fma}\left(y + t, \frac{a}{t + \left(x + y\right)}, z - b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{y + t}, a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.6% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.3000000000000002e-42

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{z - b}{\color{blue}{y + t}}, a\right) \]
      7. lower-+.f6484.2

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z - b}}{y + t} + a \]
      2. lift-+.f64N/A

        \[\leadsto y \cdot \frac{z - b}{\color{blue}{y + t}} + a \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{z - b}{y + t} \cdot y} + a \]
      5. lift-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t} \cdot y}, a\right) \]
      10. lower-/.f6485.4

        \[\leadsto \mathsf{fma}\left(z - b, \color{blue}{\frac{1}{y + t}} \cdot y, a\right) \]
    10. Applied rewrites85.4%

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

    if -3.3000000000000002e-42 < y < 2.4999999999999999e-73

    1. Initial program 89.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

    if 2.4999999999999999e-73 < y

    1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{z - b}{\color{blue}{y + t}}, a\right) \]
    8. Applied rewrites80.0%

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

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

Alternative 6: 70.1% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7000000000000001e-39 or 2.4999999999999999e-73 < y

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-39 < y < 2.4999999999999999e-73

    1. Initial program 88.6%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

Alternative 7: 71.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := z + t \cdot \frac{a}{x}\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.2000000000000002e60 or 1.26e175 < x

    1. Initial program 59.9%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z + t \cdot \color{blue}{\frac{a}{x}} \]
    10. Step-by-step derivation
      1. lower-/.f6463.3

        \[\leadsto z + t \cdot \color{blue}{\frac{a}{x}} \]
    11. Applied rewrites63.3%

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

    if -4.2000000000000002e60 < x < 1.26e175

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(y, -\frac{b}{y + t}, a\right)\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+173}:\\
\;\;\;\;a - \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.95000000000000005e30

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{y + t}, a\right) \]
      2. lower-neg.f6463.1

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

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

    if -1.95000000000000005e30 < t < 3.6000000000000002e173

    1. Initial program 71.7%

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

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

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      2. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. lower--.f6462.6

        \[\leadsto a + \color{blue}{\left(z - b\right)} \]
    5. Applied rewrites62.6%

      \[\leadsto \color{blue}{a + \left(z - b\right)} \]

    if 3.6000000000000002e173 < t

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t}} + a \]
      5. div-subN/A

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

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

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

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

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

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

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

Alternative 9: 61.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(b, -\frac{y}{y + t}, a\right)\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+173}:\\
\;\;\;\;a - \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.79999999999999983e30

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t + y}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{\mathsf{neg}\left(\frac{y}{t + y}\right)}, a\right) \]
      8. distribute-neg-frac2N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(b, \frac{y}{\mathsf{neg}\left(\color{blue}{\left(y + t\right)}\right)}, a\right) \]
      12. lower-+.f6463.1

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

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

    if -2.79999999999999983e30 < t < 3.6000000000000002e173

    1. Initial program 71.7%

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

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

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      2. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. lower--.f6462.6

        \[\leadsto a + \color{blue}{\left(z - b\right)} \]
    5. Applied rewrites62.6%

      \[\leadsto \color{blue}{a + \left(z - b\right)} \]

    if 3.6000000000000002e173 < t

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t}} + a \]
      5. div-subN/A

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

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

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

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

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

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

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

Alternative 10: 62.1% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+173}:\\
\;\;\;\;a - \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.50000000000000005e94 or 3.6000000000000002e173 < t

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{z - b}{\color{blue}{y + t}}, a\right) \]
    8. Applied rewrites75.6%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t}} + a \]
      5. div-subN/A

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

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

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

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

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

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

    if -2.50000000000000005e94 < t < 3.6000000000000002e173

    1. Initial program 70.8%

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

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

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      2. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. lower--.f6462.6

        \[\leadsto a + \color{blue}{\left(z - b\right)} \]
    5. Applied rewrites62.6%

      \[\leadsto \color{blue}{a + \left(z - b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.2%

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

Alternative 11: 60.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + t \cdot \frac{a}{x}\\ \mathbf{if}\;x \leq -7.8 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+136}:\\ \;\;\;\;a - \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (* t (/ a x)))))
   (if (<= x -7.8e+88) t_1 (if (<= x 4.6e+136) (- a (- b z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (t * (a / x));
	double tmp;
	if (x <= -7.8e+88) {
		tmp = t_1;
	} else if (x <= 4.6e+136) {
		tmp = a - (b - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z + (t * (a / x))
    if (x <= (-7.8d+88)) then
        tmp = t_1
    else if (x <= 4.6d+136) then
        tmp = a - (b - z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (t * (a / x));
	double tmp;
	if (x <= -7.8e+88) {
		tmp = t_1;
	} else if (x <= 4.6e+136) {
		tmp = a - (b - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (t * (a / x))
	tmp = 0
	if x <= -7.8e+88:
		tmp = t_1
	elif x <= 4.6e+136:
		tmp = a - (b - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(t * Float64(a / x)))
	tmp = 0.0
	if (x <= -7.8e+88)
		tmp = t_1;
	elseif (x <= 4.6e+136)
		tmp = Float64(a - Float64(b - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (t * (a / x));
	tmp = 0.0;
	if (x <= -7.8e+88)
		tmp = t_1;
	elseif (x <= 4.6e+136)
		tmp = a - (b - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(t * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+88], t$95$1, If[LessEqual[x, 4.6e+136], N[(a - N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z + t \cdot \frac{a}{x}\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 4.6 \cdot 10^{+136}:\\
\;\;\;\;a - \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.8000000000000002e88 or 4.6e136 < x

    1. Initial program 62.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z + t \cdot \color{blue}{\frac{a}{x}} \]
    10. Step-by-step derivation
      1. lower-/.f6462.2

        \[\leadsto z + t \cdot \color{blue}{\frac{a}{x}} \]
    11. Applied rewrites62.2%

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

    if -7.8000000000000002e88 < x < 4.6e136

    1. Initial program 69.9%

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

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

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      2. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. lower--.f6461.2

        \[\leadsto a + \color{blue}{\left(z - b\right)} \]
    5. Applied rewrites61.2%

      \[\leadsto \color{blue}{a + \left(z - b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+88}:\\ \;\;\;\;z + t \cdot \frac{a}{x}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+136}:\\ \;\;\;\;a - \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;z + t \cdot \frac{a}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 56.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a - \left(b - z\right)\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-269}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-73}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- a (- b z))))
   (if (<= y -7.8e-42)
     t_1
     (if (<= y 2.35e-269) (* a (/ t (+ x t))) (if (<= y 1.45e-73) z t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a - (b - z);
	double tmp;
	if (y <= -7.8e-42) {
		tmp = t_1;
	} else if (y <= 2.35e-269) {
		tmp = a * (t / (x + t));
	} else if (y <= 1.45e-73) {
		tmp = z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a - (b - z)
    if (y <= (-7.8d-42)) then
        tmp = t_1
    else if (y <= 2.35d-269) then
        tmp = a * (t / (x + t))
    else if (y <= 1.45d-73) then
        tmp = z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a - (b - z);
	double tmp;
	if (y <= -7.8e-42) {
		tmp = t_1;
	} else if (y <= 2.35e-269) {
		tmp = a * (t / (x + t));
	} else if (y <= 1.45e-73) {
		tmp = z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a - (b - z)
	tmp = 0
	if y <= -7.8e-42:
		tmp = t_1
	elif y <= 2.35e-269:
		tmp = a * (t / (x + t))
	elif y <= 1.45e-73:
		tmp = z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a - Float64(b - z))
	tmp = 0.0
	if (y <= -7.8e-42)
		tmp = t_1;
	elseif (y <= 2.35e-269)
		tmp = Float64(a * Float64(t / Float64(x + t)));
	elseif (y <= 1.45e-73)
		tmp = z;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a - (b - z);
	tmp = 0.0;
	if (y <= -7.8e-42)
		tmp = t_1;
	elseif (y <= 2.35e-269)
		tmp = a * (t / (x + t));
	elseif (y <= 1.45e-73)
		tmp = z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a - N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e-42], t$95$1, If[LessEqual[y, 2.35e-269], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-73], z, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a - \left(b - z\right)\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.35 \cdot 10^{-269}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-73}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.8000000000000003e-42 or 1.45e-73 < y

    1. Initial program 54.0%

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

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

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      2. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. lower--.f6467.4

        \[\leadsto a + \color{blue}{\left(z - b\right)} \]
    5. Applied rewrites67.4%

      \[\leadsto \color{blue}{a + \left(z - b\right)} \]

    if -7.8000000000000003e-42 < y < 2.3499999999999999e-269

    1. Initial program 92.3%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
      5. lower-+.f6472.2

        \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
    5. Applied rewrites72.2%

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

      \[\leadsto \color{blue}{\frac{a \cdot t}{t + x}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{a \cdot t}}{t + x} \]
      3. lower-+.f6445.6

        \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
    8. Applied rewrites45.6%

      \[\leadsto \color{blue}{\frac{a \cdot t}{t + x}} \]
    9. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{t}{t + x} \cdot a} \]
      5. lift-+.f64N/A

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

        \[\leadsto \frac{t}{\color{blue}{x + t}} \cdot a \]
      7. lift-+.f64N/A

        \[\leadsto \frac{t}{\color{blue}{x + t}} \cdot a \]
      8. lower-/.f6448.6

        \[\leadsto \color{blue}{\frac{t}{x + t}} \cdot a \]
      9. lift-+.f64N/A

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

        \[\leadsto \frac{t}{\color{blue}{t + x}} \cdot a \]
      11. lift-+.f6448.6

        \[\leadsto \frac{t}{\color{blue}{t + x}} \cdot a \]
    10. Applied rewrites48.6%

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

    if 2.3499999999999999e-269 < y < 1.45e-73

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{\left(-1 \cdot \frac{x + y}{t + \left(x + y\right)} - \frac{\frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}}{z}\right)} \]
    5. Applied rewrites92.2%

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

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{-1} \]
    7. Step-by-step derivation
      1. Applied rewrites55.8%

        \[\leadsto \left(-z\right) \cdot \color{blue}{-1} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification61.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{-42}:\\ \;\;\;\;a - \left(b - z\right)\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-269}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-73}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - \left(b - z\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 13: 58.5% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+114}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+234}:\\ \;\;\;\;a - \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= x -1.95e+114) z (if (<= x 5.4e+234) (- a (- b z)) z)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (x <= -1.95e+114) {
    		tmp = z;
    	} else if (x <= 5.4e+234) {
    		tmp = a - (b - z);
    	} else {
    		tmp = z;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        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), intent (in) :: b
        real(8) :: tmp
        if (x <= (-1.95d+114)) then
            tmp = z
        else if (x <= 5.4d+234) then
            tmp = a - (b - z)
        else
            tmp = z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (x <= -1.95e+114) {
    		tmp = z;
    	} else if (x <= 5.4e+234) {
    		tmp = a - (b - z);
    	} else {
    		tmp = z;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if x <= -1.95e+114:
    		tmp = z
    	elif x <= 5.4e+234:
    		tmp = a - (b - z)
    	else:
    		tmp = z
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (x <= -1.95e+114)
    		tmp = z;
    	elseif (x <= 5.4e+234)
    		tmp = Float64(a - Float64(b - z));
    	else
    		tmp = z;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (x <= -1.95e+114)
    		tmp = z;
    	elseif (x <= 5.4e+234)
    		tmp = a - (b - z);
    	else
    		tmp = z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.95e+114], z, If[LessEqual[x, 5.4e+234], N[(a - N[(b - z), $MachinePrecision]), $MachinePrecision], z]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -1.95 \cdot 10^{+114}:\\
    \;\;\;\;z\\
    
    \mathbf{elif}\;x \leq 5.4 \cdot 10^{+234}:\\
    \;\;\;\;a - \left(b - z\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.95e114 or 5.4000000000000003e234 < x

      1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{-1} \]
      7. Step-by-step derivation
        1. Applied rewrites56.0%

          \[\leadsto \left(-z\right) \cdot \color{blue}{-1} \]

        if -1.95e114 < x < 5.4000000000000003e234

        1. Initial program 69.6%

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

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

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          3. lower--.f6460.0

            \[\leadsto a + \color{blue}{\left(z - b\right)} \]
        5. Applied rewrites60.0%

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification59.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+114}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+234}:\\ \;\;\;\;a - \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
      10. Add Preprocessing

      Alternative 14: 52.6% accurate, 2.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.65 \cdot 10^{-66}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-82}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -3.65e-66) (+ z a) (if (<= z 3.1e-82) (- a b) (+ z a))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -3.65e-66) {
      		tmp = z + a;
      	} else if (z <= 3.1e-82) {
      		tmp = a - b;
      	} else {
      		tmp = z + a;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          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), intent (in) :: b
          real(8) :: tmp
          if (z <= (-3.65d-66)) then
              tmp = z + a
          else if (z <= 3.1d-82) then
              tmp = a - b
          else
              tmp = z + a
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -3.65e-66) {
      		tmp = z + a;
      	} else if (z <= 3.1e-82) {
      		tmp = a - b;
      	} else {
      		tmp = z + a;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if z <= -3.65e-66:
      		tmp = z + a
      	elif z <= 3.1e-82:
      		tmp = a - b
      	else:
      		tmp = z + a
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -3.65e-66)
      		tmp = Float64(z + a);
      	elseif (z <= 3.1e-82)
      		tmp = Float64(a - b);
      	else
      		tmp = Float64(z + a);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (z <= -3.65e-66)
      		tmp = z + a;
      	elseif (z <= 3.1e-82)
      		tmp = a - b;
      	else
      		tmp = z + a;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.65e-66], N[(z + a), $MachinePrecision], If[LessEqual[z, 3.1e-82], N[(a - b), $MachinePrecision], N[(z + a), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -3.65 \cdot 10^{-66}:\\
      \;\;\;\;z + a\\
      
      \mathbf{elif}\;z \leq 3.1 \cdot 10^{-82}:\\
      \;\;\;\;a - b\\
      
      \mathbf{else}:\\
      \;\;\;\;z + a\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -3.6499999999999999e-66 or 3.1e-82 < z

        1. Initial program 64.4%

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

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

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          3. lower--.f6456.9

            \[\leadsto a + \color{blue}{\left(z - b\right)} \]
        5. Applied rewrites56.9%

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        6. Taylor expanded in b around 0

          \[\leadsto \color{blue}{a + z} \]
        7. Step-by-step derivation
          1. lower-+.f6458.8

            \[\leadsto \color{blue}{a + z} \]
        8. Applied rewrites58.8%

          \[\leadsto \color{blue}{a + z} \]

        if -3.6499999999999999e-66 < z < 3.1e-82

        1. Initial program 73.2%

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

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

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          3. lower--.f6448.7

            \[\leadsto a + \color{blue}{\left(z - b\right)} \]
        5. Applied rewrites48.7%

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        6. Taylor expanded in z around 0

          \[\leadsto \color{blue}{a - b} \]
        7. Step-by-step derivation
          1. lower--.f6446.5

            \[\leadsto \color{blue}{a - b} \]
        8. Applied rewrites46.5%

          \[\leadsto \color{blue}{a - b} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification54.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.65 \cdot 10^{-66}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-82}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 56.1% accurate, 3.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.9 \cdot 10^{+106}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - \left(b - z\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= x -6.9e+106) (+ z a) (- a (- b z))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (x <= -6.9e+106) {
      		tmp = z + a;
      	} else {
      		tmp = a - (b - z);
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          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), intent (in) :: b
          real(8) :: tmp
          if (x <= (-6.9d+106)) then
              tmp = z + a
          else
              tmp = a - (b - z)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (x <= -6.9e+106) {
      		tmp = z + a;
      	} else {
      		tmp = a - (b - z);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if x <= -6.9e+106:
      		tmp = z + a
      	else:
      		tmp = a - (b - z)
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (x <= -6.9e+106)
      		tmp = Float64(z + a);
      	else
      		tmp = Float64(a - Float64(b - z));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (x <= -6.9e+106)
      		tmp = z + a;
      	else
      		tmp = a - (b - z);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.9e+106], N[(z + a), $MachinePrecision], N[(a - N[(b - z), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -6.9 \cdot 10^{+106}:\\
      \;\;\;\;z + a\\
      
      \mathbf{else}:\\
      \;\;\;\;a - \left(b - z\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -6.8999999999999998e106

        1. Initial program 60.9%

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

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

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          3. lower--.f6437.2

            \[\leadsto a + \color{blue}{\left(z - b\right)} \]
        5. Applied rewrites37.2%

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        6. Taylor expanded in b around 0

          \[\leadsto \color{blue}{a + z} \]
        7. Step-by-step derivation
          1. lower-+.f6448.5

            \[\leadsto \color{blue}{a + z} \]
        8. Applied rewrites48.5%

          \[\leadsto \color{blue}{a + z} \]

        if -6.8999999999999998e106 < x

        1. Initial program 68.9%

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

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

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{a + \left(z - b\right)} \]
          3. lower--.f6456.8

            \[\leadsto a + \color{blue}{\left(z - b\right)} \]
        5. Applied rewrites56.8%

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification55.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.9 \cdot 10^{+106}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - \left(b - z\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 51.6% accurate, 11.3× speedup?

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

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

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

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        2. lower-+.f64N/A

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        3. lower--.f6453.8

          \[\leadsto a + \color{blue}{\left(z - b\right)} \]
      5. Applied rewrites53.8%

        \[\leadsto \color{blue}{a + \left(z - b\right)} \]
      6. Taylor expanded in b around 0

        \[\leadsto \color{blue}{a + z} \]
      7. Step-by-step derivation
        1. lower-+.f6449.0

          \[\leadsto \color{blue}{a + z} \]
      8. Applied rewrites49.0%

        \[\leadsto \color{blue}{a + z} \]
      9. Final simplification49.0%

        \[\leadsto z + a \]
      10. Add Preprocessing

      Alternative 17: 13.0% accurate, 15.0× speedup?

      \[\begin{array}{l} \\ -b \end{array} \]
      (FPCore (x y z t a b) :precision binary64 (- b))
      double code(double x, double y, double z, double t, double a, double b) {
      	return -b;
      }
      
      real(8) function code(x, y, z, t, a, b)
          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), intent (in) :: b
          code = -b
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return -b;
      }
      
      def code(x, y, z, t, a, b):
      	return -b
      
      function code(x, y, z, t, a, b)
      	return Float64(-b)
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = -b;
      end
      
      code[x_, y_, z_, t_, a_, b_] := (-b)
      
      \begin{array}{l}
      
      \\
      -b
      \end{array}
      
      Derivation
      1. Initial program 67.7%

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

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

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        2. lower-+.f64N/A

          \[\leadsto \color{blue}{a + \left(z - b\right)} \]
        3. lower--.f6453.8

          \[\leadsto a + \color{blue}{\left(z - b\right)} \]
      5. Applied rewrites53.8%

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

        \[\leadsto \color{blue}{-1 \cdot b} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(b\right)} \]
        2. lower-neg.f6412.4

          \[\leadsto \color{blue}{-b} \]
      8. Applied rewrites12.4%

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

      Developer Target 1: 82.3% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ (+ x t) y))
              (t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
              (t_3 (/ t_2 t_1))
              (t_4 (- (+ z a) b)))
         (if (< t_3 -3.5813117084150564e+153)
           t_4
           (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x + t) + y;
      	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
      	double t_3 = t_2 / t_1;
      	double t_4 = (z + a) - b;
      	double tmp;
      	if (t_3 < -3.5813117084150564e+153) {
      		tmp = t_4;
      	} else if (t_3 < 1.2285964308315609e+82) {
      		tmp = 1.0 / (t_1 / t_2);
      	} else {
      		tmp = t_4;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          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), intent (in) :: b
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: t_3
          real(8) :: t_4
          real(8) :: tmp
          t_1 = (x + t) + y
          t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
          t_3 = t_2 / t_1
          t_4 = (z + a) - b
          if (t_3 < (-3.5813117084150564d+153)) then
              tmp = t_4
          else if (t_3 < 1.2285964308315609d+82) then
              tmp = 1.0d0 / (t_1 / t_2)
          else
              tmp = t_4
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x + t) + y;
      	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
      	double t_3 = t_2 / t_1;
      	double t_4 = (z + a) - b;
      	double tmp;
      	if (t_3 < -3.5813117084150564e+153) {
      		tmp = t_4;
      	} else if (t_3 < 1.2285964308315609e+82) {
      		tmp = 1.0 / (t_1 / t_2);
      	} else {
      		tmp = t_4;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (x + t) + y
      	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
      	t_3 = t_2 / t_1
      	t_4 = (z + a) - b
      	tmp = 0
      	if t_3 < -3.5813117084150564e+153:
      		tmp = t_4
      	elif t_3 < 1.2285964308315609e+82:
      		tmp = 1.0 / (t_1 / t_2)
      	else:
      		tmp = t_4
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(x + t) + y)
      	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
      	t_3 = Float64(t_2 / t_1)
      	t_4 = Float64(Float64(z + a) - b)
      	tmp = 0.0
      	if (t_3 < -3.5813117084150564e+153)
      		tmp = t_4;
      	elseif (t_3 < 1.2285964308315609e+82)
      		tmp = Float64(1.0 / Float64(t_1 / t_2));
      	else
      		tmp = t_4;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = (x + t) + y;
      	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
      	t_3 = t_2 / t_1;
      	t_4 = (z + a) - b;
      	tmp = 0.0;
      	if (t_3 < -3.5813117084150564e+153)
      		tmp = t_4;
      	elseif (t_3 < 1.2285964308315609e+82)
      		tmp = 1.0 / (t_1 / t_2);
      	else
      		tmp = t_4;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(x + t\right) + y\\
      t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
      t_3 := \frac{t\_2}{t\_1}\\
      t_4 := \left(z + a\right) - b\\
      \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
      \;\;\;\;t\_4\\
      
      \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
      \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_4\\
      
      
      \end{array}
      \end{array}
      

      Reproduce

      ?
      herbie shell --seed 2024216 
      (FPCore (x y z t a b)
        :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))
      
        (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))