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

Percentage Accurate: 60.4% → 97.5%
Time: 13.1s
Alternatives: 20
Speedup: 0.8×

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 20 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.4% 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: 97.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(t + x\right)\\ \mathsf{fma}\left(z, \frac{1}{\frac{x + \left(y + t\right)}{y + x}}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1} \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ t x))))
   (-
    (fma z (/ 1.0 (/ (+ x (+ y t)) (+ y x))) (* a (/ (+ y t) t_1)))
    (* y (/ b t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	return fma(z, (1.0 / ((x + (y + t)) / (y + x))), (a * ((y + t) / t_1))) - (y * (b / t_1));
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(t + x))
	return Float64(fma(z, Float64(1.0 / Float64(Float64(x + Float64(y + t)) / Float64(y + x))), Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / t_1)))
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(z * N[(1.0 / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathsf{fma}\left(z, \frac{1}{\frac{x + \left(y + t\right)}{y + x}}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1}
\end{array}
\end{array}
Derivation
  1. Initial program 60.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 60.8%

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

      \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative60.8%

      \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
    3. unsub-neg60.8%

      \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. +-commutative60.8%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    10. associate-+r+86.6%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
  6. Step-by-step derivation
    1. clear-num97.6%

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    3. associate-+l+97.6%

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

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

    \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
  8. Step-by-step derivation
    1. unpow-197.6%

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

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

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

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

    \[\leadsto \mathsf{fma}\left(z, \frac{1}{\frac{x + \left(y + t\right)}{y + x}}, a \cdot \frac{y + t}{y + \left(t + x\right)}\right) - y \cdot \frac{b}{y + \left(t + x\right)} \]
  11. Add Preprocessing

Alternative 2: 97.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(t + x\right)\\ \mathsf{fma}\left(z, \frac{y + x}{t\_1}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1} \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ t x))))
   (- (fma z (/ (+ y x) t_1) (* a (/ (+ y t) t_1))) (* y (/ b t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	return fma(z, ((y + x) / t_1), (a * ((y + t) / t_1))) - (y * (b / t_1));
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(t + x))
	return Float64(fma(z, Float64(Float64(y + x) / t_1), Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / t_1)))
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathsf{fma}\left(z, \frac{y + x}{t\_1}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1}
\end{array}
\end{array}
Derivation
  1. Initial program 60.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 60.8%

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

      \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative60.8%

      \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
    3. unsub-neg60.8%

      \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. +-commutative60.8%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    10. associate-+r+86.6%

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

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

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

Alternative 3: 92.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+296} \lor \neg \left(t\_2 \leq 10^{+258}\right):\\
\;\;\;\;\left(z + a\right) - y \cdot \frac{b}{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)) < -5.0000000000000001e296 or 1.00000000000000006e258 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 9.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 9.1%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative9.1%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg9.1%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative9.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+70.7%

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

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

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

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

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

    if -5.0000000000000001e296 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e258

    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
  3. Recombined 2 regimes into one program.
  4. Final simplification94.2%

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

Alternative 4: 92.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+258}:\\
\;\;\;\;t\_2\\

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


\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)) < -5.0000000000000001e296

    1. Initial program 8.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 b around 0 8.2%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative8.2%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg8.2%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative8.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+87.1%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
    6. Step-by-step derivation
      1. clear-num100.0%

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+100.0%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-1100.0%

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

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{\frac{\left(y + t\right) + x}{y + x}}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    10. Step-by-step derivation
      1. fma-undefine100.0%

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot \left(\frac{1}{t + \left(x + y\right)} \cdot \color{blue}{\left(x + y\right)}\right) + a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      9. associate-+l+99.9%

        \[\leadsto \left(z \cdot \left(\frac{1}{t + \left(x + y\right)} \cdot \left(x + y\right)\right) + a \cdot \frac{t + y}{\color{blue}{t + \left(x + y\right)}}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    11. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left(z \cdot \left(\frac{1}{t + \left(x + y\right)} \cdot \left(x + y\right)\right) + a \cdot \frac{t + y}{t + \left(x + y\right)}\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
    12. Taylor expanded in y around inf 86.6%

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

    if -5.0000000000000001e296 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e258

    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 1.00000000000000006e258 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 9.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 9.6%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative9.6%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg9.6%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative9.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+59.8%

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

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

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

        \[\leadsto \color{blue}{\left(z + a\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Simplified88.3%

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

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

Alternative 5: 65.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \frac{y \cdot \left(a - b\right)}{y + x}\\ t_2 := \left(z + a\right) - b\\ t_3 := y + \left(t + x\right)\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{+103}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-143}:\\ \;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-16}:\\ \;\;\;\;a \cdot \frac{y + t}{t\_3}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\ \;\;\;\;z - y \cdot \frac{b}{t\_3}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (/ (* y (- a b)) (+ y x))))
        (t_2 (- (+ z a) b))
        (t_3 (+ y (+ t x))))
   (if (<= y -2.4e+103)
     t_2
     (if (<= y -6.6e-88)
       t_1
       (if (<= y 4.7e-143)
         (/ (+ (* t a) (* z x)) (+ t x))
         (if (<= y 4.8e-72)
           t_1
           (if (<= y 3.6e-16)
             (* a (/ (+ y t) t_3))
             (if (<= y 2.2e+32) (- z (* y (/ b t_3))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + ((y * (a - b)) / (y + x));
	double t_2 = (z + a) - b;
	double t_3 = y + (t + x);
	double tmp;
	if (y <= -2.4e+103) {
		tmp = t_2;
	} else if (y <= -6.6e-88) {
		tmp = t_1;
	} else if (y <= 4.7e-143) {
		tmp = ((t * a) + (z * x)) / (t + x);
	} else if (y <= 4.8e-72) {
		tmp = t_1;
	} else if (y <= 3.6e-16) {
		tmp = a * ((y + t) / t_3);
	} else if (y <= 2.2e+32) {
		tmp = z - (y * (b / t_3));
	} else {
		tmp = t_2;
	}
	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) :: tmp
    t_1 = z + ((y * (a - b)) / (y + x))
    t_2 = (z + a) - b
    t_3 = y + (t + x)
    if (y <= (-2.4d+103)) then
        tmp = t_2
    else if (y <= (-6.6d-88)) then
        tmp = t_1
    else if (y <= 4.7d-143) then
        tmp = ((t * a) + (z * x)) / (t + x)
    else if (y <= 4.8d-72) then
        tmp = t_1
    else if (y <= 3.6d-16) then
        tmp = a * ((y + t) / t_3)
    else if (y <= 2.2d+32) then
        tmp = z - (y * (b / t_3))
    else
        tmp = t_2
    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 + ((y * (a - b)) / (y + x));
	double t_2 = (z + a) - b;
	double t_3 = y + (t + x);
	double tmp;
	if (y <= -2.4e+103) {
		tmp = t_2;
	} else if (y <= -6.6e-88) {
		tmp = t_1;
	} else if (y <= 4.7e-143) {
		tmp = ((t * a) + (z * x)) / (t + x);
	} else if (y <= 4.8e-72) {
		tmp = t_1;
	} else if (y <= 3.6e-16) {
		tmp = a * ((y + t) / t_3);
	} else if (y <= 2.2e+32) {
		tmp = z - (y * (b / t_3));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + ((y * (a - b)) / (y + x))
	t_2 = (z + a) - b
	t_3 = y + (t + x)
	tmp = 0
	if y <= -2.4e+103:
		tmp = t_2
	elif y <= -6.6e-88:
		tmp = t_1
	elif y <= 4.7e-143:
		tmp = ((t * a) + (z * x)) / (t + x)
	elif y <= 4.8e-72:
		tmp = t_1
	elif y <= 3.6e-16:
		tmp = a * ((y + t) / t_3)
	elif y <= 2.2e+32:
		tmp = z - (y * (b / t_3))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x)))
	t_2 = Float64(Float64(z + a) - b)
	t_3 = Float64(y + Float64(t + x))
	tmp = 0.0
	if (y <= -2.4e+103)
		tmp = t_2;
	elseif (y <= -6.6e-88)
		tmp = t_1;
	elseif (y <= 4.7e-143)
		tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(t + x));
	elseif (y <= 4.8e-72)
		tmp = t_1;
	elseif (y <= 3.6e-16)
		tmp = Float64(a * Float64(Float64(y + t) / t_3));
	elseif (y <= 2.2e+32)
		tmp = Float64(z - Float64(y * Float64(b / t_3)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + ((y * (a - b)) / (y + x));
	t_2 = (z + a) - b;
	t_3 = y + (t + x);
	tmp = 0.0;
	if (y <= -2.4e+103)
		tmp = t_2;
	elseif (y <= -6.6e-88)
		tmp = t_1;
	elseif (y <= 4.7e-143)
		tmp = ((t * a) + (z * x)) / (t + x);
	elseif (y <= 4.8e-72)
		tmp = t_1;
	elseif (y <= 3.6e-16)
		tmp = a * ((y + t) / t_3);
	elseif (y <= 2.2e+32)
		tmp = z - (y * (b / t_3));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+103], t$95$2, If[LessEqual[y, -6.6e-88], t$95$1, If[LessEqual[y, 4.7e-143], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-72], t$95$1, If[LessEqual[y, 3.6e-16], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+32], N[(z - N[(y * N[(b / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -6.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4.7 \cdot 10^{-143}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_3}\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.3999999999999998e103 or 2.20000000000000001e32 < y

    1. Initial program 34.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 80.8%

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

    if -2.3999999999999998e103 < y < -6.59999999999999987e-88 or 4.70000000000000045e-143 < y < 4.8e-72

    1. Initial program 71.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 71.4%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative71.4%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg71.4%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative71.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+96.6%

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

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

      \[\leadsto \color{blue}{\left(z + \frac{a \cdot y}{x + y}\right) - \frac{b \cdot y}{x + y}} \]
    7. Step-by-step derivation
      1. associate--l+74.9%

        \[\leadsto \color{blue}{z + \left(\frac{a \cdot y}{x + y} - \frac{b \cdot y}{x + y}\right)} \]
      2. div-sub74.9%

        \[\leadsto z + \color{blue}{\frac{a \cdot y - b \cdot y}{x + y}} \]
      3. distribute-rgt-out--74.9%

        \[\leadsto z + \frac{\color{blue}{y \cdot \left(a - b\right)}}{x + y} \]
      4. +-commutative74.9%

        \[\leadsto z + \frac{y \cdot \left(a - b\right)}{\color{blue}{y + x}} \]
    8. Simplified74.9%

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

    if -6.59999999999999987e-88 < y < 4.70000000000000045e-143

    1. Initial program 84.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 75.9%

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

    if 4.8e-72 < y < 3.59999999999999983e-16

    1. Initial program 78.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 a around inf 47.8%

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. associate-+r+62.5%

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

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

    if 3.59999999999999983e-16 < y < 2.20000000000000001e32

    1. Initial program 88.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 88.3%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative88.3%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg88.3%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative88.3%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+99.8%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
    6. Step-by-step derivation
      1. clear-num99.6%

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+99.6%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-199.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+103}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-88}:\\ \;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-143}:\\ \;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\ \;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-16}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-87}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\

\mathbf{elif}\;y \leq 3.15 \cdot 10^{-16}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\
\;\;\;\;z - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.4999999999999999e102 or 8.1999999999999996e37 < y

    1. Initial program 33.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 33.8%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative33.8%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg33.8%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative33.8%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+70.5%

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

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

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

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

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

    if -1.4999999999999999e102 < y < -1.45e-87

    1. Initial program 73.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 73.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-neg73.0%

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative73.0%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg73.0%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative73.0%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+95.5%

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

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

      \[\leadsto \color{blue}{\left(z + \frac{a \cdot y}{x + y}\right) - \frac{b \cdot y}{x + y}} \]
    7. Step-by-step derivation
      1. associate--l+74.8%

        \[\leadsto \color{blue}{z + \left(\frac{a \cdot y}{x + y} - \frac{b \cdot y}{x + y}\right)} \]
      2. div-sub74.8%

        \[\leadsto z + \color{blue}{\frac{a \cdot y - b \cdot y}{x + y}} \]
      3. distribute-rgt-out--74.8%

        \[\leadsto z + \frac{\color{blue}{y \cdot \left(a - b\right)}}{x + y} \]
      4. +-commutative74.8%

        \[\leadsto z + \frac{y \cdot \left(a - b\right)}{\color{blue}{y + x}} \]
    8. Simplified74.8%

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

    if -1.45e-87 < y < 1.4e-108

    1. Initial program 82.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 72.0%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in z around inf 76.2%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t + x} + \frac{a \cdot t}{z \cdot \left(t + x\right)}\right)} \]
    5. Step-by-step derivation
      1. +-commutative76.2%

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

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

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

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

    if 1.4e-108 < y < 3.1499999999999999e-16

    1. Initial program 76.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 b around 0 76.2%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative76.2%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg76.2%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative76.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+99.9%

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

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

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

        \[\leadsto \color{blue}{a + \left(\frac{y \cdot z}{t + y} - \frac{b \cdot y}{t + y}\right)} \]
      2. div-sub98.0%

        \[\leadsto a + \color{blue}{\frac{y \cdot z - b \cdot y}{t + y}} \]
      3. +-commutative98.0%

        \[\leadsto a + \frac{y \cdot z - b \cdot y}{\color{blue}{y + t}} \]
    8. Simplified98.0%

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

    if 3.1499999999999999e-16 < y < 8.1999999999999996e37

    1. Initial program 76.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 b around 0 76.2%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative76.2%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg76.2%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative76.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+99.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+99.7%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-199.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+102}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-87}:\\ \;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-108}:\\ \;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\ \mathbf{elif}\;y \leq 3.15 \cdot 10^{-16}:\\ \;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 70.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-87}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\
\;\;\;\;z - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.54999999999999993e102 or 8.1999999999999996e37 < y

    1. Initial program 33.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 33.8%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative33.8%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg33.8%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative33.8%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+70.5%

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

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

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

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

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

    if -1.54999999999999993e102 < y < -2.19999999999999988e-87

    1. Initial program 73.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 73.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-neg73.0%

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative73.0%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg73.0%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative73.0%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+95.5%

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

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

      \[\leadsto \color{blue}{\left(z + \frac{a \cdot y}{x + y}\right) - \frac{b \cdot y}{x + y}} \]
    7. Step-by-step derivation
      1. associate--l+74.8%

        \[\leadsto \color{blue}{z + \left(\frac{a \cdot y}{x + y} - \frac{b \cdot y}{x + y}\right)} \]
      2. div-sub74.8%

        \[\leadsto z + \color{blue}{\frac{a \cdot y - b \cdot y}{x + y}} \]
      3. distribute-rgt-out--74.8%

        \[\leadsto z + \frac{\color{blue}{y \cdot \left(a - b\right)}}{x + y} \]
      4. +-commutative74.8%

        \[\leadsto z + \frac{y \cdot \left(a - b\right)}{\color{blue}{y + x}} \]
    8. Simplified74.8%

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

    if -2.19999999999999988e-87 < y < 4.79999999999999993e-130

    1. Initial program 83.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 0 73.8%

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

    if 4.79999999999999993e-130 < y < 3.20000000000000023e-16

    1. Initial program 77.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 77.4%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative77.4%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg77.4%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative77.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+99.9%

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

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

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

        \[\leadsto \color{blue}{a + \left(\frac{y \cdot z}{t + y} - \frac{b \cdot y}{t + y}\right)} \]
      2. div-sub89.2%

        \[\leadsto a + \color{blue}{\frac{y \cdot z - b \cdot y}{t + y}} \]
      3. +-commutative89.2%

        \[\leadsto a + \frac{y \cdot z - b \cdot y}{\color{blue}{y + t}} \]
    8. Simplified89.2%

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

    if 3.20000000000000023e-16 < y < 8.1999999999999996e37

    1. Initial program 76.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 b around 0 76.2%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative76.2%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg76.2%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative76.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+99.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+99.7%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-199.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+102}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-87}:\\ \;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-16}:\\ \;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 7.7 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.7e28 or 1.5000000000000001e-27 < a < 7.6999999999999997e28 or 2.70000000000000019e148 < a

    1. Initial program 47.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 a around inf 38.7%

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. associate-+r+76.7%

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

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

    if -1.7e28 < a < 1.5000000000000001e-27 or 7.6999999999999997e28 < a < 4.80000000000000017e74

    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 b around 0 69.6%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative69.6%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg69.6%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative69.6%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+86.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
    6. Step-by-step derivation
      1. clear-num95.8%

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+95.8%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-195.8%

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

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

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

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

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

    if 4.80000000000000017e74 < a < 2.70000000000000019e148

    1. Initial program 56.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 inf 73.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{+28}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-27}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{elif}\;a \leq 7.7 \cdot 10^{+28}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+74}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+148}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 97.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\left(z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_1}\right) + a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{y + \left(t + x\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 60.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 60.8%

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

      \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative60.8%

      \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
    3. unsub-neg60.8%

      \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. +-commutative60.8%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
    10. associate-+r+86.6%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
  6. Step-by-step derivation
    1. clear-num97.6%

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    3. associate-+l+97.6%

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

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

    \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
  8. Step-by-step derivation
    1. unpow-197.6%

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

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

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

    \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{\frac{\left(y + t\right) + x}{y + x}}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
  10. Step-by-step derivation
    1. fma-undefine97.6%

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

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

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

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

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

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

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

      \[\leadsto \left(z \cdot \left(\frac{1}{t + \left(x + y\right)} \cdot \color{blue}{\left(x + y\right)}\right) + a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    9. associate-+l+97.5%

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

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

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

Alternative 10: 78.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-87} \lor \neg \left(y \leq 1.36 \cdot 10^{-67}\right):\\ \;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -9.2e-87) (not (<= y 1.36e-67)))
   (- (+ z (* a (/ y (+ y x)))) (* y (/ b (+ y (+ t x)))))
   (* z (+ (/ x (+ t x)) (* a (/ t (* z (+ t x))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -9.2e-87) || !(y <= 1.36e-67)) {
		tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))));
	} else {
		tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
	}
	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 ((y <= (-9.2d-87)) .or. (.not. (y <= 1.36d-67))) then
        tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))))
    else
        tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))))
    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 ((y <= -9.2e-87) || !(y <= 1.36e-67)) {
		tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))));
	} else {
		tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -9.2e-87) or not (y <= 1.36e-67):
		tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))))
	else:
		tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -9.2e-87) || !(y <= 1.36e-67))
		tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - Float64(y * Float64(b / Float64(y + Float64(t + x)))));
	else
		tmp = Float64(z * Float64(Float64(x / Float64(t + x)) + Float64(a * Float64(t / Float64(z * Float64(t + x))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -9.2e-87) || ~((y <= 1.36e-67)))
		tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))));
	else
		tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.2e-87], N[Not[LessEqual[y, 1.36e-67]], $MachinePrecision]], N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t / N[(z * N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-87} \lor \neg \left(y \leq 1.36 \cdot 10^{-67}\right):\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.2000000000000006e-87 or 1.36000000000000007e-67 < y

    1. Initial program 49.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 b around 0 49.2%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative49.2%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg49.2%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative49.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+80.5%

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

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

      \[\leadsto \color{blue}{\left(z + \frac{a \cdot y}{x + y}\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
    7. Step-by-step derivation
      1. associate-/l*84.8%

        \[\leadsto \left(z + \color{blue}{a \cdot \frac{y}{x + y}}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      2. +-commutative84.8%

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

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

    if -9.2000000000000006e-87 < y < 1.36000000000000007e-67

    1. Initial program 82.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 0 72.0%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in z around inf 78.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t + x} + \frac{a \cdot t}{z \cdot \left(t + x\right)}\right)} \]
    5. Step-by-step derivation
      1. +-commutative78.0%

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

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

        \[\leadsto z \cdot \left(\frac{x}{x + t} + a \cdot \frac{t}{z \cdot \color{blue}{\left(x + t\right)}}\right) \]
    6. Simplified80.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-87} \lor \neg \left(y \leq 1.36 \cdot 10^{-67}\right):\\ \;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 78.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\

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


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

    1. Initial program 53.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 53.7%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative53.7%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg53.7%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative53.7%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+79.8%

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

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

      \[\leadsto \color{blue}{\left(z + \frac{a \cdot y}{x + y}\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
    7. Step-by-step derivation
      1. associate-/l*84.4%

        \[\leadsto \left(z + \color{blue}{a \cdot \frac{y}{x + y}}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      2. +-commutative84.4%

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

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

    if -1.20000000000000007e-86 < y < 1.29999999999999992e-108

    1. Initial program 82.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 72.0%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in z around inf 76.2%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{t + x} + \frac{a \cdot t}{z \cdot \left(t + x\right)}\right)} \]
    5. Step-by-step derivation
      1. +-commutative76.2%

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

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

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

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

    if 1.29999999999999992e-108 < y

    1. Initial program 47.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 47.1%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative47.1%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg47.1%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative47.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+82.6%

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

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

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

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

        \[\leadsto \left(\color{blue}{y \cdot \frac{z}{t + y}} + a\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. +-commutative89.4%

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

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

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

Alternative 12: 62.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-125}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.95e39

    1. Initial program 45.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 73.9%

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

    if -1.95e39 < a < -3.49999999999999998e-125

    1. Initial program 71.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 71.4%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative71.4%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg71.4%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative71.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+89.7%

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

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

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

        \[\leadsto \color{blue}{a + \left(\frac{y \cdot z}{t + y} - \frac{b \cdot y}{t + y}\right)} \]
      2. div-sub64.1%

        \[\leadsto a + \color{blue}{\frac{y \cdot z - b \cdot y}{t + y}} \]
      3. +-commutative64.1%

        \[\leadsto a + \frac{y \cdot z - b \cdot y}{\color{blue}{y + t}} \]
    8. Simplified64.1%

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

    if -3.49999999999999998e-125 < a < 1.25e-27

    1. Initial program 68.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 68.4%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative68.4%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg68.4%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative68.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+85.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y}} \]
    6. Step-by-step derivation
      1. clear-num96.3%

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{\left(t + x\right) + y}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
      3. associate-+l+96.3%

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

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{t + \left(y + x\right)}{y + x}\right)}^{-1}}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right) - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Step-by-step derivation
      1. unpow-196.3%

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

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

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

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

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

    if 1.25e-27 < a

    1. Initial program 52.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 a around inf 42.4%

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. associate-+r+75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+39}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-125}:\\ \;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;z - y \cdot \frac{b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-26} \lor \neg \left(z \leq 4.2 \cdot 10^{+55}\right):\\
\;\;\;\;z \cdot \left(\frac{y + x}{t\_1} + \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-26 or 4.2000000000000001e55 < z

    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 z around -inf 73.1%

      \[\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*73.1%

        \[\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. mul-1-neg73.1%

        \[\leadsto \color{blue}{\left(-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-neg73.1%

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

        \[\leadsto \left(-z\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. associate-*r/73.1%

        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{\frac{-1 \cdot \left(x + y\right)}{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) \]
      6. distribute-lft-in73.1%

        \[\leadsto \left(-z\right) \cdot \left(\frac{\color{blue}{-1 \cdot x + -1 \cdot 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. neg-mul-173.1%

        \[\leadsto \left(-z\right) \cdot \left(\frac{-1 \cdot x + \color{blue}{\left(-y\right)}}{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) \]
      8. unsub-neg73.1%

        \[\leadsto \left(-z\right) \cdot \left(\frac{\color{blue}{-1 \cdot 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) \]
      9. neg-mul-173.1%

        \[\leadsto \left(-z\right) \cdot \left(\frac{\color{blue}{\left(-x\right)} - 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) \]
      10. associate-+r+73.1%

        \[\leadsto \left(-z\right) \cdot \left(\frac{\left(-x\right) - y}{\color{blue}{\left(t + x\right) + y}} - \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. Simplified73.1%

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

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

    if -2.8000000000000001e-26 < z < 4.2000000000000001e55

    1. Initial program 73.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 73.4%

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

        \[\leadsto \color{blue}{\left(-\frac{b \cdot y}{t + \left(x + y\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. +-commutative73.4%

        \[\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(-\frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      3. unsub-neg73.4%

        \[\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) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. +-commutative73.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}}\right) - \frac{b \cdot y}{t + \left(x + y\right)} \]
      10. associate-+r+87.2%

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

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

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

        \[\leadsto \color{blue}{\left(z + a\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
    8. Simplified71.3%

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

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

Alternative 14: 58.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+31} \lor \neg \left(x \leq 1.05 \cdot 10^{+118}\right):\\ \;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= x -5.4e+31) (not (<= x 1.05e+118)))
   (* z (/ (+ y x) (+ y (+ t x))))
   (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -5.4e+31) || !(x <= 1.05e+118)) {
		tmp = z * ((y + x) / (y + (t + x)));
	} else {
		tmp = (z + a) - 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 ((x <= (-5.4d+31)) .or. (.not. (x <= 1.05d+118))) then
        tmp = z * ((y + x) / (y + (t + x)))
    else
        tmp = (z + a) - 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 ((x <= -5.4e+31) || !(x <= 1.05e+118)) {
		tmp = z * ((y + x) / (y + (t + x)));
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (x <= -5.4e+31) or not (x <= 1.05e+118):
		tmp = z * ((y + x) / (y + (t + x)))
	else:
		tmp = (z + a) - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((x <= -5.4e+31) || !(x <= 1.05e+118))
		tmp = Float64(z * Float64(Float64(y + x) / Float64(y + Float64(t + x))));
	else
		tmp = Float64(Float64(z + a) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((x <= -5.4e+31) || ~((x <= 1.05e+118)))
		tmp = z * ((y + x) / (y + (t + x)));
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5.4e+31], N[Not[LessEqual[x, 1.05e+118]], $MachinePrecision]], N[(z * N[(N[(y + x), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+31} \lor \neg \left(x \leq 1.05 \cdot 10^{+118}\right):\\
\;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.39999999999999971e31 or 1.05e118 < x

    1. Initial program 54.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 34.1%

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

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

        \[\leadsto z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      3. associate-+r+66.5%

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

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

    if -5.39999999999999971e31 < x < 1.05e118

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+31} \lor \neg \left(x \leq 1.05 \cdot 10^{+118}\right):\\ \;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 59.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+182}:\\
\;\;\;\;a \cdot \frac{t}{t + x}\\

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

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


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

    1. Initial program 60.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 t around inf 25.5%

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

      \[\leadsto \color{blue}{\frac{a \cdot t}{t + x}} \]
    5. Step-by-step derivation
      1. associate-/l*54.8%

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

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

    if -1.3e182 < t < 6.20000000000000038e98

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

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

    if 6.20000000000000038e98 < t

    1. Initial program 48.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 a around inf 26.6%

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} \]
      2. associate-+r+58.0%

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

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

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

Alternative 16: 59.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+182} \lor \neg \left(t \leq 3.5 \cdot 10^{+97}\right):\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -1.65e+182) (not (<= t 3.5e+97)))
   (* a (/ t (+ t x)))
   (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.65e+182) || !(t <= 3.5e+97)) {
		tmp = a * (t / (t + x));
	} else {
		tmp = (z + a) - 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 ((t <= (-1.65d+182)) .or. (.not. (t <= 3.5d+97))) then
        tmp = a * (t / (t + x))
    else
        tmp = (z + a) - 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 ((t <= -1.65e+182) || !(t <= 3.5e+97)) {
		tmp = a * (t / (t + x));
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -1.65e+182) or not (t <= 3.5e+97):
		tmp = a * (t / (t + x))
	else:
		tmp = (z + a) - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.65e+182) || !(t <= 3.5e+97))
		tmp = Float64(a * Float64(t / Float64(t + x)));
	else
		tmp = Float64(Float64(z + a) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -1.65e+182) || ~((t <= 3.5e+97)))
		tmp = a * (t / (t + x));
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.65e+182], N[Not[LessEqual[t, 3.5e+97]], $MachinePrecision]], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+182} \lor \neg \left(t \leq 3.5 \cdot 10^{+97}\right):\\
\;\;\;\;a \cdot \frac{t}{t + x}\\

\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.65e182 or 3.5000000000000001e97 < t

    1. Initial program 53.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 t around inf 26.2%

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

      \[\leadsto \color{blue}{\frac{a \cdot t}{t + x}} \]
    5. Step-by-step derivation
      1. associate-/l*55.6%

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

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

    if -1.65e182 < t < 3.5000000000000001e97

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+182} \lor \neg \left(t \leq 3.5 \cdot 10^{+97}\right):\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 58.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+204}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4e204 or 5.5e199 < x

    1. Initial program 50.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 inf 64.9%

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

    if -2.4e204 < x < 5.5e199

    1. Initial program 63.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 66.4%

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

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

Alternative 18: 47.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{+157}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 2.65 \cdot 10^{-31}:\\
\;\;\;\;z - b\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.6499999999999999e157 or 2.65e-31 < a

    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 t around inf 63.3%

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

    if -2.6499999999999999e157 < a < 2.65e-31

    1. Initial program 66.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 a around 0 51.3%

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

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

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

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

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

Alternative 19: 44.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+102}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+76}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -4e+102) a (if (<= a 4.3e+76) z a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -4e+102) {
		tmp = a;
	} else if (a <= 4.3e+76) {
		tmp = z;
	} else {
		tmp = 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 (a <= (-4d+102)) then
        tmp = a
    else if (a <= 4.3d+76) then
        tmp = z
    else
        tmp = 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 (a <= -4e+102) {
		tmp = a;
	} else if (a <= 4.3e+76) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -4e+102:
		tmp = a
	elif a <= 4.3e+76:
		tmp = z
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -4e+102)
		tmp = a;
	elseif (a <= 4.3e+76)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -4e+102)
		tmp = a;
	elseif (a <= 4.3e+76)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4e+102], a, If[LessEqual[a, 4.3e+76], z, a]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+102}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+76}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.99999999999999991e102 or 4.29999999999999978e76 < a

    1. Initial program 41.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 t around inf 68.2%

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

    if -3.99999999999999991e102 < a < 4.29999999999999978e76

    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 x around inf 45.6%

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

Alternative 20: 32.3% accurate, 21.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 60.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 33.3%

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

Developer target: 81.7% 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 2024111 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :alt
  (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ 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)))