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

Percentage Accurate: 60.1% → 87.5%
Time: 14.5s
Alternatives: 14
Speedup: 1.2×

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 14 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.1% 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: 87.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ t_3 := z \cdot \left(x + y\right)\\ t_4 := \frac{\left(t\_3 + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+221}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, a - b, t\_3\right)\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 (- (+ z a) b))
        (t_3 (* z (+ x y)))
        (t_4 (/ (- (+ t_3 (* (+ y t) a)) (* y b)) t_1)))
   (if (<= t_4 (- INFINITY))
     t_2
     (if (<= t_4 2e+221) (/ (fma a t (fma y (- a b) 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 = (z + a) - b;
	double t_3 = z * (x + y);
	double t_4 = ((t_3 + ((y + t) * a)) - (y * b)) / t_1;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_4 <= 2e+221) {
		tmp = fma(a, t, fma(y, (a - b), 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 = Float64(Float64(z + a) - b)
	t_3 = Float64(z * Float64(x + y))
	t_4 = Float64(Float64(Float64(t_3 + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_4 <= 2e+221)
		tmp = Float64(fma(a, t, fma(y, Float64(a - b), 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 + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$2, If[LessEqual[t$95$4, 2e+221], N[(N[(a * t + N[(y * N[(a - b), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \left(z + a\right) - b\\
t_3 := z \cdot \left(x + y\right)\\
t_4 := \frac{\left(t\_3 + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+221}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, a - b, t\_3\right)\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)) < -inf.0 or 2.0000000000000001e221 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 8.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6473.8

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

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e221

    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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 72.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ t_3 := z \cdot \left(x + y\right)\\ t_4 := \frac{\left(t\_3 + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+221}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, a - b, 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 (- (+ z a) b))
        (t_3 (* z (+ x y)))
        (t_4 (/ (- (+ t_3 (* (+ y t) a)) (* y b)) t_1)))
   (if (<= t_4 (- INFINITY))
     t_2
     (if (<= t_4 2e+221) (/ (fma y (- a b) 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 = (z + a) - b;
	double t_3 = z * (x + y);
	double t_4 = ((t_3 + ((y + t) * a)) - (y * b)) / t_1;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_4 <= 2e+221) {
		tmp = fma(y, (a - b), 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 = Float64(Float64(z + a) - b)
	t_3 = Float64(z * Float64(x + y))
	t_4 = Float64(Float64(Float64(t_3 + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_4 <= 2e+221)
		tmp = Float64(fma(y, Float64(a - b), 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 + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$2, If[LessEqual[t$95$4, 2e+221], N[(N[(y * N[(a - b), $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 := \left(z + a\right) - b\\
t_3 := z \cdot \left(x + y\right)\\
t_4 := \frac{\left(t\_3 + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+221}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, a - b, 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)) < -inf.0 or 2.0000000000000001e221 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 8.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6473.8

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

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e221

    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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+221}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, z - b, x \cdot z\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) t_1))
        (t_3 (- (+ z a) b)))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 2e+221) (/ (fma y (- z b) (* x z)) t_1) t_3))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1;
	double t_3 = (z + a) - b;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= 2e+221) {
		tmp = fma(y, (z - b), (x * z)) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1)
	t_3 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= 2e+221)
		tmp = Float64(fma(y, Float64(z - b), Float64(x * z)) / t_1);
	else
		tmp = t_3;
	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[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 2e+221], N[(N[(y * N[(z - b), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t\_1}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+221}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, z - b, x \cdot z\right)}{t\_1}\\

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


\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)) < -inf.0 or 2.0000000000000001e221 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 8.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6473.8

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

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e221

    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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{z - b}, x \cdot z\right)}{\left(x + t\right) + y} \]
      4. *-lowering-*.f6464.4

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

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

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

Alternative 4: 66.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+267}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+221}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, y \cdot t\_2\right)}{y + t}\\

\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)) < -9.9999999999999997e266 or 2.0000000000000001e221 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 11.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6472.7

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

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

    if -9.9999999999999997e266 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e221

    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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 62.6% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.05 \cdot 10^{-44}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4500000000000001e-122 or 2.04999999999999996e-44 < y

    1. Initial program 46.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. --lowering--.f64N/A

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

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

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

    if -1.4500000000000001e-122 < y < 2.09999999999999995e-165

    1. Initial program 78.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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
      2. accelerator-lowering-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. *-lowering-*.f64N/A

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

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

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

    if 2.09999999999999995e-165 < y < 2.04999999999999996e-44

    1. Initial program 83.5%

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

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

        \[\leadsto \frac{\color{blue}{z \cdot x} - y \cdot b}{\left(x + t\right) + y} \]
      2. *-lowering-*.f6468.1

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

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

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

Alternative 6: 63.6% accurate, 1.2× speedup?

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-43}:\\
\;\;\;\;\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 < -1.50000000000000002e-122 or 1.65000000000000008e-43 < y

    1. Initial program 46.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. --lowering--.f64N/A

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

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

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

    if -1.50000000000000002e-122 < y < 1.65000000000000008e-43

    1. Initial program 79.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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
      2. accelerator-lowering-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. *-lowering-*.f64N/A

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

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

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

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

Alternative 7: 58.8% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.3e17 or 1.10000000000000003e151 < x

    1. Initial program 53.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 z around inf

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)}}{\left(x + t\right) + y} \]
      3. +-lowering-+.f6428.9

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)}}{\left(x + t\right) + y} \]
    5. Simplified28.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y + x}{\color{blue}{t + \left(y + x\right)}} \cdot z \]
      10. +-lowering-+.f6462.5

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

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

    if -2.3e17 < x < 1.10000000000000003e151

    1. Initial program 61.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6465.6

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

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

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

Alternative 8: 58.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(x \cdot \frac{1}{x + t}\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1e17 or 1.15e151 < x

    1. Initial program 53.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 z around inf

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

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)}}{\left(x + t\right) + y} \]
      3. +-lowering-+.f6428.9

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)}}{\left(x + t\right) + y} \]
    5. Simplified28.9%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot z}}{t + x} \]
      3. +-lowering-+.f6429.0

        \[\leadsto \frac{x \cdot z}{\color{blue}{t + x}} \]
    8. Simplified29.0%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t + x}} \]
    9. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto z \cdot \left(x \cdot \color{blue}{\frac{1}{x + t}}\right) \]
      8. +-lowering-+.f6460.9

        \[\leadsto z \cdot \left(x \cdot \frac{1}{\color{blue}{x + t}}\right) \]
    10. Applied egg-rr60.9%

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

    if -2.1e17 < x < 1.15e151

    1. Initial program 61.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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6465.6

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

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

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

Alternative 9: 56.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+17}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+192}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -2.3e+17) (* x (/ z (+ x t))) (if (<= x 7e+192) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -2.3e+17) {
		tmp = x * (z / (x + t));
	} else if (x <= 7e+192) {
		tmp = (z + a) - b;
	} 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 <= (-2.3d+17)) then
        tmp = x * (z / (x + t))
    else if (x <= 7d+192) then
        tmp = (z + a) - b
    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 <= -2.3e+17) {
		tmp = x * (z / (x + t));
	} else if (x <= 7e+192) {
		tmp = (z + a) - b;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -2.3e+17:
		tmp = x * (z / (x + t))
	elif x <= 7e+192:
		tmp = (z + a) - b
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -2.3e+17)
		tmp = Float64(x * Float64(z / Float64(x + t)));
	elseif (x <= 7e+192)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -2.3e+17)
		tmp = x * (z / (x + t));
	elseif (x <= 7e+192)
		tmp = (z + a) - b;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.3e+17], N[(x * N[(z / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e+192], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \frac{z}{x + t}\\

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

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.3e17

    1. Initial program 53.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 \frac{\color{blue}{z \cdot \left(x + y\right)}}{\left(x + t\right) + y} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \frac{z \cdot \color{blue}{\left(y + x\right)}}{\left(x + t\right) + y} \]
      3. +-lowering-+.f6427.5

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot z}}{t + x} \]
      3. +-lowering-+.f6427.6

        \[\leadsto \frac{x \cdot z}{\color{blue}{t + x}} \]
    8. Simplified27.6%

      \[\leadsto \color{blue}{\frac{x \cdot z}{t + x}} \]
    9. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{x + t}} \cdot x \]
      6. +-lowering-+.f6453.7

        \[\leadsto \frac{z}{\color{blue}{x + t}} \cdot x \]
    10. Applied egg-rr53.7%

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

    if -2.3e17 < x < 6.99999999999999965e192

    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. --lowering--.f64N/A

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      2. +-lowering-+.f6464.7

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

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

    if 6.99999999999999965e192 < x

    1. Initial program 55.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 x around inf

      \[\leadsto \color{blue}{z} \]
    4. Step-by-step derivation
      1. Simplified77.5%

        \[\leadsto \color{blue}{z} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification63.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+17}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+192}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
    7. Add Preprocessing

    Alternative 10: 58.4% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+109}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{+194}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= x -2.8e+109) z (if (<= x 5.1e+194) (- (+ z a) b) z)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (x <= -2.8e+109) {
    		tmp = z;
    	} else if (x <= 5.1e+194) {
    		tmp = (z + a) - b;
    	} 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 <= (-2.8d+109)) then
            tmp = z
        else if (x <= 5.1d+194) then
            tmp = (z + a) - b
        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 <= -2.8e+109) {
    		tmp = z;
    	} else if (x <= 5.1e+194) {
    		tmp = (z + a) - b;
    	} else {
    		tmp = z;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if x <= -2.8e+109:
    		tmp = z
    	elif x <= 5.1e+194:
    		tmp = (z + a) - b
    	else:
    		tmp = z
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (x <= -2.8e+109)
    		tmp = z;
    	elseif (x <= 5.1e+194)
    		tmp = Float64(Float64(z + a) - b);
    	else
    		tmp = z;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (x <= -2.8e+109)
    		tmp = z;
    	elseif (x <= 5.1e+194)
    		tmp = (z + a) - b;
    	else
    		tmp = z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.8e+109], z, If[LessEqual[x, 5.1e+194], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -2.8 \cdot 10^{+109}:\\
    \;\;\;\;z\\
    
    \mathbf{elif}\;x \leq 5.1 \cdot 10^{+194}:\\
    \;\;\;\;\left(z + a\right) - b\\
    
    \mathbf{else}:\\
    \;\;\;\;z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -2.8000000000000002e109 or 5.1000000000000002e194 < x

      1. Initial program 48.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 x around inf

        \[\leadsto \color{blue}{z} \]
      4. Step-by-step derivation
        1. Simplified64.4%

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

        if -2.8000000000000002e109 < x < 5.1000000000000002e194

        1. Initial program 62.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. --lowering--.f64N/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{+109}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{+194}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
      7. Add Preprocessing

      Alternative 11: 47.5% accurate, 2.8× speedup?

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

        1. Initial program 50.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. --lowering--.f64N/A

            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
          2. +-lowering-+.f6457.4

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

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

          \[\leadsto \color{blue}{z - b} \]
        7. Step-by-step derivation
          1. --lowering--.f6455.2

            \[\leadsto \color{blue}{z - b} \]
        8. Simplified55.2%

          \[\leadsto \color{blue}{z - b} \]

        if -2.20000000000000012e-107 < z < 7.6000000000000002e77

        1. Initial program 70.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. --lowering--.f64N/A

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

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

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

          \[\leadsto \color{blue}{a - b} \]
        7. Step-by-step derivation
          1. --lowering--.f6452.6

            \[\leadsto \color{blue}{a - b} \]
        8. Simplified52.6%

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

      Alternative 12: 47.6% accurate, 2.8× speedup?

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

        1. Initial program 54.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 x around inf

          \[\leadsto \color{blue}{z} \]
        4. Step-by-step derivation
          1. Simplified51.4%

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

          if -1.01999999999999997e-17 < x < 1.35e90

          1. Initial program 62.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 y around inf

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

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

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

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

            \[\leadsto \color{blue}{a - b} \]
          7. Step-by-step derivation
            1. --lowering--.f6454.4

              \[\leadsto \color{blue}{a - b} \]
          8. Simplified54.4%

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

        Alternative 13: 45.0% accurate, 3.5× speedup?

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

          1. Initial program 49.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 x around inf

            \[\leadsto \color{blue}{z} \]
          4. Step-by-step derivation
            1. Simplified48.3%

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

            if -8e19 < z < 2.6499999999999998e-25

            1. Initial program 69.5%

              \[\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 t around inf

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

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

            Alternative 14: 33.2% accurate, 45.0× speedup?

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

              \[\leadsto \color{blue}{a} \]
            4. Step-by-step derivation
              1. Simplified28.7%

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

              Developer Target 1: 82.0% 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 2024198 
              (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)))