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

Percentage Accurate: 59.9% → 97.4%
Time: 14.5s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 59.9% 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.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\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 (+ x t))))
   (- (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 + (x + t);
	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(x + t))
	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[(x + t), $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(x + t\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 58.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 b around 0 58.5%

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

      \[\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. +-commutative58.5%

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

      \[\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. +-commutative58.5%

      \[\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*70.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-define70.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. +-commutative70.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+70.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.3%

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

      \[\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.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. Final simplification98.0%

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

Alternative 2: 95.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\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 -2 \cdot 10^{+303} \lor \neg \left(t\_2 \leq 10^{+252}\right):\\ \;\;\;\;\mathsf{fma}\left(z, \frac{1}{\frac{t\_1}{y + x}}, 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 (+ x t)))
        (t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) t_1)))
   (if (or (<= t_2 -2e+303) (not (<= t_2 1e+252)))
     (- (fma z (/ 1.0 (/ t_1 (+ y x))) 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 + (x + t);
	double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -2e+303) || !(t_2 <= 1e+252)) {
		tmp = fma(z, (1.0 / (t_1 / (y + x))), a) - (y * (b / t_1));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_2 <= -2e+303) || !(t_2 <= 1e+252))
		tmp = Float64(fma(z, Float64(1.0 / Float64(t_1 / Float64(y + x))), a) - Float64(y * Float64(b / t_1)));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(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, -2e+303], N[Not[LessEqual[t$95$2, 1e+252]], $MachinePrecision]], N[(N[(z * N[(1.0 / N[(t$95$1 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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(x + t\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 -2 \cdot 10^{+303} \lor \neg \left(t\_2 \leq 10^{+252}\right):\\
\;\;\;\;\mathsf{fma}\left(z, \frac{1}{\frac{t\_1}{y + x}}, 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)) < -2e303 or 1.0000000000000001e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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 6.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-neg6.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. +-commutative6.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-neg6.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. +-commutative6.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*32.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-define32.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. +-commutative32.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+32.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*69.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+69.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. 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. Step-by-step derivation
      1. clear-num99.9%

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

        \[\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. +-commutative99.9%

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{\color{blue}{\left(x + t\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} \]
      4. +-commutative99.9%

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{\color{blue}{y + \left(x + t\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} \]
      5. +-commutative99.9%

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{y + \color{blue}{\left(t + 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.9%

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{y + \left(t + 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.9%

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{\frac{y + \left(t + x\right)}{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 t around inf 88.8%

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

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

    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.9%

    \[\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(x + t\right)} \leq -2 \cdot 10^{+303} \lor \neg \left(\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 10^{+252}\right):\\ \;\;\;\;\mathsf{fma}\left(z, \frac{1}{\frac{y + \left(x + t\right)}{y + x}}, a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.0% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x + t\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 := y \cdot \frac{b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+303}:\\
\;\;\;\;\left(z + a\right) - t\_3\\

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

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


\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)) < -2e303

    1. Initial program 8.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 8.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-neg8.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. +-commutative8.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-neg8.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. +-commutative8.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*40.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-define40.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. +-commutative40.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+40.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*72.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+72.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. 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 y around inf 79.3%

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

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

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

    1. Initial program 4.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 4.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-neg4.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. +-commutative4.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-neg4.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. +-commutative4.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*27.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-define27.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. +-commutative27.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+27.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*67.0%

        \[\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+67.0%

        \[\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 a around inf 48.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(\frac{t}{y + \left(t + x\right)} + \left(\frac{y}{y + \left(t + x\right)} + z \cdot \frac{y + x}{a \cdot \left(y + \left(t + x\right)\right)}\right)\right)} - y \cdot \frac{b}{\left(t + x\right) + y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.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(x + t\right)} \leq -2 \cdot 10^{+303}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{elif}\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 10^{+252}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{t}{y + \left(x + t\right)} + \left(\frac{y}{y + \left(x + t\right)} + z \cdot \frac{y + x}{a \cdot \left(y + \left(x + t\right)\right)}\right)\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 91.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\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 -2 \cdot 10^{+303} \lor \neg \left(t\_2 \leq 10^{+252}\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 (+ x t)))
        (t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) t_1)))
   (if (or (<= t_2 -2e+303) (not (<= t_2 1e+252)))
     (- (+ 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 + (x + t);
	double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -2e+303) || !(t_2 <= 1e+252)) {
		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 + (x + t)
    t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1
    if ((t_2 <= (-2d+303)) .or. (.not. (t_2 <= 1d+252))) 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 + (x + t);
	double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -2e+303) || !(t_2 <= 1e+252)) {
		tmp = (z + a) - (y * (b / t_1));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1
	tmp = 0
	if (t_2 <= -2e+303) or not (t_2 <= 1e+252):
		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(x + t))
	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 <= -2e+303) || !(t_2 <= 1e+252))
		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 + (x + t);
	t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
	tmp = 0.0;
	if ((t_2 <= -2e+303) || ~((t_2 <= 1e+252)))
		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[(x + t), $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, -2e+303], N[Not[LessEqual[t$95$2, 1e+252]], $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(x + t\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 -2 \cdot 10^{+303} \lor \neg \left(t\_2 \leq 10^{+252}\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)) < -2e303 or 1.0000000000000001e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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 6.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-neg6.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. +-commutative6.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-neg6.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. +-commutative6.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*32.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-define32.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. +-commutative32.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+32.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*69.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+69.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. 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 75.4%

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

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

    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 simplification89.0%

    \[\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(x + t\right)} \leq -2 \cdot 10^{+303} \lor \neg \left(\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 10^{+252}\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\right) - \frac{y \cdot b}{x}\\ t_2 := \left(z + a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{if}\;x \leq -4.4 \cdot 10^{+184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-306}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-190}:\\ \;\;\;\;\left(a + \frac{z \cdot y}{y + t}\right) - \frac{y \cdot b}{y + t}\\ \mathbf{elif}\;x \leq 10^{+191}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z (* t (- (/ a x) (/ z x)))) (/ (* y b) x)))
        (t_2 (- (+ z a) (* y (/ b (+ y (+ x t)))))))
   (if (<= x -4.4e+184)
     t_1
     (if (<= x 5e-306)
       t_2
       (if (<= x 5.5e-190)
         (- (+ a (/ (* z y) (+ y t))) (/ (* y b) (+ y t)))
         (if (<= x 1e+191) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * ((a / x) - (z / x)))) - ((y * b) / x);
	double t_2 = (z + a) - (y * (b / (y + (x + t))));
	double tmp;
	if (x <= -4.4e+184) {
		tmp = t_1;
	} else if (x <= 5e-306) {
		tmp = t_2;
	} else if (x <= 5.5e-190) {
		tmp = (a + ((z * y) / (y + t))) - ((y * b) / (y + t));
	} else if (x <= 1e+191) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + (t * ((a / x) - (z / x)))) - ((y * b) / x)
    t_2 = (z + a) - (y * (b / (y + (x + t))))
    if (x <= (-4.4d+184)) then
        tmp = t_1
    else if (x <= 5d-306) then
        tmp = t_2
    else if (x <= 5.5d-190) then
        tmp = (a + ((z * y) / (y + t))) - ((y * b) / (y + t))
    else if (x <= 1d+191) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * ((a / x) - (z / x)))) - ((y * b) / x);
	double t_2 = (z + a) - (y * (b / (y + (x + t))));
	double tmp;
	if (x <= -4.4e+184) {
		tmp = t_1;
	} else if (x <= 5e-306) {
		tmp = t_2;
	} else if (x <= 5.5e-190) {
		tmp = (a + ((z * y) / (y + t))) - ((y * b) / (y + t));
	} else if (x <= 1e+191) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * ((a / x) - (z / x)))) - ((y * b) / x)
	t_2 = (z + a) - (y * (b / (y + (x + t))))
	tmp = 0
	if x <= -4.4e+184:
		tmp = t_1
	elif x <= 5e-306:
		tmp = t_2
	elif x <= 5.5e-190:
		tmp = (a + ((z * y) / (y + t))) - ((y * b) / (y + t))
	elif x <= 1e+191:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(Float64(a / x) - Float64(z / x)))) - Float64(Float64(y * b) / x))
	t_2 = Float64(Float64(z + a) - Float64(y * Float64(b / Float64(y + Float64(x + t)))))
	tmp = 0.0
	if (x <= -4.4e+184)
		tmp = t_1;
	elseif (x <= 5e-306)
		tmp = t_2;
	elseif (x <= 5.5e-190)
		tmp = Float64(Float64(a + Float64(Float64(z * y) / Float64(y + t))) - Float64(Float64(y * b) / Float64(y + t)));
	elseif (x <= 1e+191)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * ((a / x) - (z / x)))) - ((y * b) / x);
	t_2 = (z + a) - (y * (b / (y + (x + t))));
	tmp = 0.0;
	if (x <= -4.4e+184)
		tmp = t_1;
	elseif (x <= 5e-306)
		tmp = t_2;
	elseif (x <= 5.5e-190)
		tmp = (a + ((z * y) / (y + t))) - ((y * b) / (y + t));
	elseif (x <= 1e+191)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(N[(a / x), $MachinePrecision] - N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e+184], t$95$1, If[LessEqual[x, 5e-306], t$95$2, If[LessEqual[x, 5.5e-190], N[(N[(a + N[(N[(z * y), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+191], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 5 \cdot 10^{-306}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.4e184 or 1.00000000000000007e191 < x

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

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

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

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

    if -4.4e184 < x < 4.99999999999999998e-306 or 5.50000000000000048e-190 < x < 1.00000000000000007e191

    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 b around 0 56.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-neg56.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. +-commutative56.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-neg56.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. +-commutative56.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*68.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-define68.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. +-commutative68.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+68.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*84.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+84.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. Simplified99.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 75.2%

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

    if 4.99999999999999998e-306 < x < 5.50000000000000048e-190

    1. Initial program 87.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 86.9%

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

        \[\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. +-commutative86.9%

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

        \[\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. +-commutative86.9%

        \[\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*87.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-define87.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. +-commutative87.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+87.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*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. Simplified87.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. Taylor expanded in x around 0 92.8%

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

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

Alternative 6: 68.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-306}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq 2.9 \cdot 10^{+189}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.75000000000000011e144

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

    if -2.75000000000000011e144 < x < 5.49999999999999992e-306 or 4.3e-187 < x < 2.90000000000000019e189

    1. Initial program 55.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 55.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-neg55.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. +-commutative55.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-neg55.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. +-commutative55.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*67.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-define67.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. +-commutative67.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+67.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*83.3%

        \[\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+83.3%

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

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

    if 5.49999999999999992e-306 < x < 4.3e-187

    1. Initial program 87.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 86.9%

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

        \[\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. +-commutative86.9%

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

        \[\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. +-commutative86.9%

        \[\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*87.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-define87.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. +-commutative87.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+87.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*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. Simplified87.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. Taylor expanded in x around 0 92.8%

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

    if 2.90000000000000019e189 < 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 y around 0 44.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.75 \cdot 10^{+144}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-306}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-187}:\\ \;\;\;\;\left(a + \frac{z \cdot y}{y + t}\right) - \frac{y \cdot b}{y + t}\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+189}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;z + t \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -3.4 \cdot 10^{-272}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-284}:\\
\;\;\;\;a - \frac{y \cdot b}{t\_1}\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-147}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.49999999999999959e24 or 3.80000000000000028e-147 < y

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

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

    if -8.49999999999999959e24 < y < -3.4000000000000003e-272 or 3e-284 < y < 3.80000000000000028e-147

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

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

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

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

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

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

    if -3.4000000000000003e-272 < y < 3e-284

    1. Initial program 82.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 82.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-neg82.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. +-commutative82.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-neg82.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. +-commutative82.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*82.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-define82.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. +-commutative82.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+82.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*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. Simplified91.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{\color{blue}{\left(x + t\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} \]
      4. +-commutative91.4%

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{\color{blue}{y + \left(x + t\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} \]
      5. +-commutative91.4%

        \[\leadsto \mathsf{fma}\left(z, {\left(\frac{y + \color{blue}{\left(t + 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-rr91.4%

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{{\left(\frac{y + \left(t + 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-191.4%

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

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{\frac{y + \left(t + x\right)}{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 t around inf 71.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+24}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-272}:\\ \;\;\;\;z \cdot \frac{y + x}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-284}:\\ \;\;\;\;a - \frac{y \cdot b}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-147}:\\ \;\;\;\;z \cdot \frac{y + x}{\left(y + x\right) + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;y \leq -2.12 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-272}:\\ \;\;\;\;z \cdot \frac{y + x}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-214}:\\ \;\;\;\;a \cdot \frac{y + t}{t\_2}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-146}:\\ \;\;\;\;z \cdot \frac{x}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))))
   (if (<= y -2.12e+24)
     t_1
     (if (<= y -2.6e-272)
       (* z (/ (+ y x) (+ (+ y x) t)))
       (if (<= y 4.2e-214)
         (* a (/ (+ y t) t_2))
         (if (<= y 4.8e-146) (* z (/ x t_2)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = y + (x + t);
	double tmp;
	if (y <= -2.12e+24) {
		tmp = t_1;
	} else if (y <= -2.6e-272) {
		tmp = z * ((y + x) / ((y + x) + t));
	} else if (y <= 4.2e-214) {
		tmp = a * ((y + t) / t_2);
	} else if (y <= 4.8e-146) {
		tmp = z * (x / t_2);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + a) - b
    t_2 = y + (x + t)
    if (y <= (-2.12d+24)) then
        tmp = t_1
    else if (y <= (-2.6d-272)) then
        tmp = z * ((y + x) / ((y + x) + t))
    else if (y <= 4.2d-214) then
        tmp = a * ((y + t) / t_2)
    else if (y <= 4.8d-146) then
        tmp = z * (x / t_2)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = y + (x + t);
	double tmp;
	if (y <= -2.12e+24) {
		tmp = t_1;
	} else if (y <= -2.6e-272) {
		tmp = z * ((y + x) / ((y + x) + t));
	} else if (y <= 4.2e-214) {
		tmp = a * ((y + t) / t_2);
	} else if (y <= 4.8e-146) {
		tmp = z * (x / t_2);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	t_2 = y + (x + t)
	tmp = 0
	if y <= -2.12e+24:
		tmp = t_1
	elif y <= -2.6e-272:
		tmp = z * ((y + x) / ((y + x) + t))
	elif y <= 4.2e-214:
		tmp = a * ((y + t) / t_2)
	elif y <= 4.8e-146:
		tmp = z * (x / t_2)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + a) - b)
	t_2 = Float64(y + Float64(x + t))
	tmp = 0.0
	if (y <= -2.12e+24)
		tmp = t_1;
	elseif (y <= -2.6e-272)
		tmp = Float64(z * Float64(Float64(y + x) / Float64(Float64(y + x) + t)));
	elseif (y <= 4.2e-214)
		tmp = Float64(a * Float64(Float64(y + t) / t_2));
	elseif (y <= 4.8e-146)
		tmp = Float64(z * Float64(x / t_2));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + a) - b;
	t_2 = y + (x + t);
	tmp = 0.0;
	if (y <= -2.12e+24)
		tmp = t_1;
	elseif (y <= -2.6e-272)
		tmp = z * ((y + x) / ((y + x) + t));
	elseif (y <= 4.2e-214)
		tmp = a * ((y + t) / t_2);
	elseif (y <= 4.8e-146)
		tmp = z * (x / t_2);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.12e+24], t$95$1, If[LessEqual[y, -2.6e-272], N[(z * N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-214], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-146], N[(z * N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-214}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_2}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-146}:\\
\;\;\;\;z \cdot \frac{x}{t\_2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.1200000000000001e24 or 4.8000000000000003e-146 < y

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

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

    if -2.1200000000000001e24 < y < -2.59999999999999992e-272

    1. Initial program 75.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 z around inf 43.5%

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

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

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

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

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

    if -2.59999999999999992e-272 < y < 4.19999999999999984e-214

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

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

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

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

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

    if 4.19999999999999984e-214 < y < 4.8000000000000003e-146

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.12 \cdot 10^{+24}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-272}:\\ \;\;\;\;z \cdot \frac{y + x}{\left(y + x\right) + t}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-214}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-146}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.08 \cdot 10^{-271}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-148}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.85000000000000014e-70 or 3.19999999999999993e-148 < y

    1. Initial program 50.4%

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

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

    if -2.85000000000000014e-70 < y < -1.07999999999999997e-271 or 1.7999999999999999e-216 < y < 3.19999999999999993e-148

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

    if -1.07999999999999997e-271 < y < 1.7999999999999999e-216

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.85 \cdot 10^{-70}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-271}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-148}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-272}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-233}:\\
\;\;\;\;\frac{t \cdot a}{t\_1}\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-146}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9999999999999999e-69 or 3.69999999999999986e-146 < y

    1. Initial program 50.4%

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

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

    if -1.9999999999999999e-69 < y < -1.5000000000000001e-272 or 1.9e-233 < y < 3.69999999999999986e-146

    1. Initial program 69.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 x around inf 39.8%

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

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

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

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

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

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

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

    if -1.5000000000000001e-272 < y < 1.9e-233

    1. Initial program 85.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 44.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{-69}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-272}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-233}:\\ \;\;\;\;\frac{t \cdot a}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-146}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.16 \cdot 10^{-217}:\\
\;\;\;\;a\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.5000000000000002e-70 or 1.05e-147 < y

    1. Initial program 50.4%

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

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

    if -8.5000000000000002e-70 < y < -1.7000000000000002e-272 or 1.1600000000000001e-217 < y < 1.05e-147

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

    if -1.7000000000000002e-272 < y < 1.1600000000000001e-217

    1. Initial program 80.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 43.0%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-70}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-272}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{-217}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-147}:\\ \;\;\;\;z \cdot \frac{x}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 70.2% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.99999999999999978e-138 or 2.89999999999999998e-80 < y

    1. Initial program 50.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 50.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-neg50.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. +-commutative50.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-neg50.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. +-commutative50.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*62.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-define62.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. +-commutative62.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+62.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*79.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+79.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. Simplified98.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. Taylor expanded in y around inf 78.9%

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

    if -9.99999999999999978e-138 < y < -6.1999999999999997e-262

    1. Initial program 61.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 45.7%

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

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

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

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

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

    if -6.1999999999999997e-262 < y < 2.89999999999999998e-80

    1. Initial program 79.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 0 60.1%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.9%

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

Alternative 13: 64.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{-76} \lor \neg \left(y \leq 1.95 \cdot 10^{-72}\right):\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.75000000000000007e-76 or 1.95e-72 < y

    1. Initial program 46.9%

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

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

    if -2.75000000000000007e-76 < y < 1.95e-72

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.8%

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

Alternative 14: 58.0% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 48.9%

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t + x}} \]
      2. +-commutative51.0%

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

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

    if -8.7999999999999998e139 < x < 3.4e201

    1. Initial program 60.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 62.6%

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

    if 3.4e201 < x

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.1%

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

Alternative 15: 59.2% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.2000000000000004e167 or 5.2000000000000004e202 < x

    1. Initial program 49.8%

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

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

    if -5.2000000000000004e167 < x < 5.2000000000000004e202

    1. Initial program 60.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 61.8%

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

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

Alternative 16: 44.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+14}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+48}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.8e14 or 1.7000000000000002e48 < t

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

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

    if -3.8e14 < t < 1.7000000000000002e48

    1. Initial program 66.8%

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

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

Alternative 17: 32.2% 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 58.5%

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

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

Developer target: 81.5% 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 2024110 
(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)))