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

Percentage Accurate: 60.8% → 98.8%
Time: 22.1s
Alternatives: 20
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 60.8% 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: 98.8% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := \frac{y}{t_1}\\
t_3 := y + \left(t + x\right)\\
a \cdot \left(\frac{y}{t_3} + \frac{t}{t_3}\right) + \mathsf{fma}\left(z, \frac{x}{t_1} + t_2, t_2 \cdot \left(-b\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(t + x\right)\\ t_2 := z \cdot \left(y + x\right)\\ t_3 := \frac{\left(t_2 + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+228}\right):\\ \;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{t_2 - y \cdot b}{t_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ t x)))
        (t_2 (* z (+ y x)))
        (t_3 (/ (- (+ t_2 (* a (+ y t))) (* y b)) t_1)))
   (if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+228)))
     (+ a (- z (/ b (/ (+ y x) y))))
     (+ (* a (+ (/ y t_1) (/ t t_1))) (/ (- t_2 (* y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	double t_2 = z * (y + x);
	double t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+228)) {
		tmp = a + (z - (b / ((y + x) / y)));
	} else {
		tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (t + x);
	double t_2 = z * (y + x);
	double t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+228)) {
		tmp = a + (z - (b / ((y + x) / y)));
	} else {
		tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (t + x)
	t_2 = z * (y + x)
	t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1
	tmp = 0
	if (t_3 <= -math.inf) or not (t_3 <= 1e+228):
		tmp = a + (z - (b / ((y + x) / y)))
	else:
		tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(t + x))
	t_2 = Float64(z * Float64(y + x))
	t_3 = Float64(Float64(Float64(t_2 + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+228))
		tmp = Float64(a + Float64(z - Float64(b / Float64(Float64(y + x) / y))));
	else
		tmp = Float64(Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1))) + Float64(Float64(t_2 - Float64(y * b)) / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (t + x);
	t_2 = z * (y + x);
	t_3 = ((t_2 + (a * (y + t))) - (y * b)) / t_1;
	tmp = 0.0;
	if ((t_3 <= -Inf) || ~((t_3 <= 1e+228)))
		tmp = a + (z - (b / ((y + x) / y)));
	else
		tmp = (a * ((y / t_1) + (t / t_1))) + ((t_2 - (y * b)) / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+228]], $MachinePrecision]], N[(a + N[(z - N[(b / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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


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

    1. Initial program 8.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(z - \color{blue}{\frac{b}{\frac{x + y}{y}}}\right) \]
      3. +-commutative81.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.7% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 11.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e266 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999992e227

    1. Initial program 98.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. Recombined 2 regimes into one program.
  4. Final simplification90.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(t + x\right)} \leq -1 \cdot 10^{+266} \lor \neg \left(\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(t + x\right)} \leq 10^{+228}\right):\\ \;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(t + x\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{+17}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;y \leq -7.6 \cdot 10^{-139}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-257}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+39}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.60000000000000008e86 or 5.60000000000000003e39 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(z - \color{blue}{\frac{b}{\frac{x + y}{y}}}\right) \]
      3. +-commutative88.0%

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

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

    if -5.60000000000000008e86 < y < -7.5e17 or -7.60000000000000015e-139 < y < -3.69999999999999984e-257

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5e17 < y < -7.60000000000000015e-139 or -3.69999999999999984e-257 < y < 5.60000000000000003e39

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+86}:\\ \;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+17}:\\ \;\;\;\;a \cdot \left(\frac{y}{y + \left(t + x\right)} + \frac{t}{y + \left(t + x\right)}\right) + z\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-139}:\\ \;\;\;\;a + \frac{z \cdot \left(y + x\right) - y \cdot b}{y + \left(t + x\right)}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-257}:\\ \;\;\;\;a \cdot \left(\frac{y}{y + \left(t + x\right)} + \frac{t}{y + \left(t + x\right)}\right) + z\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+39}:\\ \;\;\;\;a + \frac{z \cdot \left(y + x\right) - y \cdot b}{y + \left(t + x\right)}\\ \mathbf{else}:\\ \;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 71.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-147}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-264}:\\
\;\;\;\;\frac{z}{\frac{t_2}{y + x}}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.5e17 or 2.4e40 < y

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e17 < y < -2.24999999999999986e-147 or -3.5e-264 < y < 2.4e40

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999986e-147 < y < -3.5e-264

    1. Initial program 62.3%

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

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

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

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

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

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

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

Alternative 6: 62.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-15}:\\
\;\;\;\;a - \frac{y}{\frac{y + x}{b}}\\

\mathbf{elif}\;z \leq -1.4 \cdot 10^{-34}:\\
\;\;\;\;z\\

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+217}:\\
\;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2999999999999999e82 or 1.8000000000000001e217 < z

    1. Initial program 46.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 38.5%

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

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

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

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

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

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

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

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

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

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

    if -1.2999999999999999e82 < z < -3.6000000000000001e-15

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac66.5%

        \[\leadsto a + \color{blue}{\frac{-y}{\frac{x + \left(y + t\right)}{b}}} \]
    9. Simplified66.5%

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

      \[\leadsto a + \frac{-y}{\color{blue}{\frac{x + y}{b}}} \]
    11. Step-by-step derivation
      1. +-commutative66.5%

        \[\leadsto a + \frac{-y}{\frac{\color{blue}{y + x}}{b}} \]
    12. Simplified66.5%

      \[\leadsto a + \frac{-y}{\color{blue}{\frac{y + x}{b}}} \]

    if -3.6000000000000001e-15 < z < -1.39999999999999998e-34

    1. Initial program 100.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 100.0%

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

    if -1.39999999999999998e-34 < z < 6.80000000000000029e-50

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{\frac{-y}{\frac{x + \left(y + t\right)}{b}}} \]
    9. Simplified69.2%

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t + y}} \]
    11. Step-by-step derivation
      1. mul-1-neg52.7%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t + y}} \]
      3. associate-/l*66.2%

        \[\leadsto a - \color{blue}{\frac{b}{\frac{t + y}{y}}} \]
    12. Simplified66.2%

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

    if 6.80000000000000029e-50 < z < 1.8000000000000001e217

    1. Initial program 50.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+82}:\\ \;\;\;\;\left(y + x\right) \cdot \frac{z}{x + \left(y + t\right)}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-15}:\\ \;\;\;\;a - \frac{y}{\frac{y + x}{b}}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-34}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-50}:\\ \;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+217}:\\ \;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot \frac{z}{x + \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-105}:\\
\;\;\;\;a - \frac{y}{\frac{t}{b}}\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-189}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-187}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -5.49999999999999974e40 or 9.00000000000000039e131 < y

    1. Initial program 30.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 84.1%

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

    if -5.49999999999999974e40 < y < -5.6e-105

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac53.1%

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

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

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

    if -5.6e-105 < y < -4.00000000000000027e-189 or -4.49999999999999977e-218 < y < 1.65e-187

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

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

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

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

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

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

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

    if -4.00000000000000027e-189 < y < -4.49999999999999977e-218

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    8. Simplified75.2%

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

    if 1.65e-187 < y < 9.00000000000000039e131

    1. Initial program 72.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. Step-by-step derivation
      1. associate-+l+72.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + y, z, \mathsf{fma}\left(a, y + t, y \cdot \color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)}\right)\right) \cdot \frac{1}{x + \left(y + t\right)} \]
      14. add-sqr-sqrt57.2%

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

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. +-commutative61.2%

        \[\leadsto \color{blue}{z + a} \]
    8. Simplified61.2%

      \[\leadsto \color{blue}{z + a} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification69.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+40}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-105}:\\ \;\;\;\;a - \frac{y}{\frac{t}{b}}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-189}:\\ \;\;\;\;\frac{z}{\frac{t + x}{x}}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-218}:\\ \;\;\;\;\frac{a}{\frac{t + x}{t}}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-187}:\\ \;\;\;\;\frac{z}{\frac{t + x}{x}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.6% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-22}:\\
\;\;\;\;z\\

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -4.70000000000000002e45 or 9.00000000000000039e131 < y

    1. Initial program 30.6%

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

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

    if -4.70000000000000002e45 < y < -2.29999999999999999e-21

    1. Initial program 61.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{a}{\frac{\left(t + x\right) + y}{t + y}}} \]
    6. Step-by-step derivation
      1. associate-/r/61.4%

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

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

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

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

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

    if -2.29999999999999999e-21 < y < -3.7e-22

    1. Initial program 100.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 100.0%

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

    if -3.7e-22 < y < 2.20000000000000002e-37

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \frac{x \cdot z}{t + x}} \]
    8. Step-by-step derivation
      1. +-commutative56.0%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified66.5%

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

    if 2.20000000000000002e-37 < y < 2.6e21

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac67.3%

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t + y}} \]
    11. Step-by-step derivation
      1. mul-1-neg67.2%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t + y}} \]
      3. associate-/l*67.2%

        \[\leadsto a - \color{blue}{\frac{b}{\frac{t + y}{y}}} \]
    12. Simplified67.2%

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

    if 2.6e21 < y < 9.00000000000000039e131

    1. Initial program 49.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. Step-by-step derivation
      1. associate-+l+49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. +-commutative70.1%

        \[\leadsto \color{blue}{z + a} \]
    8. Simplified70.1%

      \[\leadsto \color{blue}{z + a} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification73.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+45}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-21}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(t + x\right)}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-22}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-37}:\\ \;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+21}:\\ \;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\
t_2 := y + \left(t + x\right)\\
\mathbf{if}\;y \leq -580:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-103}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\

\mathbf{elif}\;y \leq -5 \cdot 10^{-263}:\\
\;\;\;\;\frac{z}{\frac{t_2}{y + x}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -580 or 1.08000000000000005e-47 < y

    1. Initial program 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -580 < y < -1.29999999999999998e-103

    1. Initial program 94.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 z around 0 70.2%

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

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

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

    if -1.29999999999999998e-103 < y < -5.00000000000000006e-263

    1. Initial program 65.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 38.0%

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

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

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

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

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

    if -5.00000000000000006e-263 < y < 1.08000000000000005e-47

    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 a around 0 89.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \frac{x \cdot z}{t + x}} \]
    8. Step-by-step derivation
      1. +-commutative68.3%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified74.3%

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

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

Alternative 10: 65.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\
\;\;\;\;a + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.9999999999999995e-36 or 9.00000000000000039e131 < y

    1. Initial program 35.7%

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

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

    if -7.9999999999999995e-36 < y < 1.2999999999999999e-37

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \frac{x \cdot z}{t + x}} \]
    8. Step-by-step derivation
      1. +-commutative56.0%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified66.5%

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

    if 1.2999999999999999e-37 < y < 4.3e18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac67.3%

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t + y}} \]
    11. Step-by-step derivation
      1. mul-1-neg67.2%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t + y}} \]
      3. associate-/l*67.2%

        \[\leadsto a - \color{blue}{\frac{b}{\frac{t + y}{y}}} \]
    12. Simplified67.2%

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

    if 4.3e18 < y < 9.00000000000000039e131

    1. Initial program 49.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. Step-by-step derivation
      1. associate-+l+49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. +-commutative70.1%

        \[\leadsto \color{blue}{z + a} \]
    8. Simplified70.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-36}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-37}:\\ \;\;\;\;a + \frac{x}{\frac{t + x}{z}}\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\ \;\;\;\;a - \frac{b}{\frac{y + t}{y}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+131}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 69.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-34} \lor \neg \left(y \leq 1.9 \cdot 10^{-38}\right):\\
\;\;\;\;a + \left(z - \frac{b}{\frac{y + x}{y}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.50000000000000014e-34 or 1.9e-38 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000014e-34 < y < 1.9e-38

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \frac{x \cdot z}{t + x}} \]
    8. Step-by-step derivation
      1. +-commutative56.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified67.1%

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

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

Alternative 12: 58.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{z}{\frac{t + x}{x}}\\

\mathbf{elif}\;y \leq 1.16 \cdot 10^{+132}:\\
\;\;\;\;a + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7000000000000001e-47 or 1.16000000000000004e132 < y

    1. Initial program 35.7%

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

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

    if -1.7000000000000001e-47 < y < 3.29999999999999999e-186

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

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

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

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

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

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

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

    if 3.29999999999999999e-186 < y < 1.16000000000000004e132

    1. Initial program 72.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. Step-by-step derivation
      1. associate-+l+72.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + y, z, \mathsf{fma}\left(a, y + t, y \cdot \color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)}\right)\right) \cdot \frac{1}{x + \left(y + t\right)} \]
      14. add-sqr-sqrt57.2%

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

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. +-commutative61.2%

        \[\leadsto \color{blue}{z + a} \]
    8. Simplified61.2%

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

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

Alternative 13: 65.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.06 \cdot 10^{-22} \lor \neg \left(y \leq 9 \cdot 10^{+131}\right):\\
\;\;\;\;\left(a + z\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.0599999999999999e-22 or 9.00000000000000039e131 < y

    1. Initial program 35.7%

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

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

    if -2.0599999999999999e-22 < y < 9.00000000000000039e131

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} + a \]
    9. Simplified64.4%

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

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

Alternative 14: 59.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+122} \lor \neg \left(t \leq 3.5 \cdot 10^{+165}\right):\\
\;\;\;\;a - \frac{y \cdot b}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.60000000000000007e122 or 3.49999999999999996e165 < t

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac65.1%

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t}} \]
    11. Step-by-step derivation
      1. mul-1-neg55.8%

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. *-commutative55.8%

        \[\leadsto a - \frac{\color{blue}{y \cdot b}}{t} \]
    12. Simplified55.8%

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

    if -2.60000000000000007e122 < t < 3.49999999999999996e165

    1. Initial program 59.8%

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

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

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

Alternative 15: 59.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+122} \lor \neg \left(t \leq 1.42 \cdot 10^{+146}\right):\\ \;\;\;\;\frac{a}{\frac{t + x}{t}}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -1.35e+122) (not (<= t 1.42e+146)))
   (/ a (/ (+ t x) t))
   (- (+ a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.35e+122) || !(t <= 1.42e+146)) {
		tmp = a / ((t + x) / t);
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-1.35d+122)) .or. (.not. (t <= 1.42d+146))) then
        tmp = a / ((t + x) / t)
    else
        tmp = (a + z) - b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.35e+122) || !(t <= 1.42e+146)) {
		tmp = a / ((t + x) / t);
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -1.35e+122) or not (t <= 1.42e+146):
		tmp = a / ((t + x) / t)
	else:
		tmp = (a + z) - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.35e+122) || !(t <= 1.42e+146))
		tmp = Float64(a / Float64(Float64(t + x) / t));
	else
		tmp = Float64(Float64(a + z) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -1.35e+122) || ~((t <= 1.42e+146)))
		tmp = a / ((t + x) / t);
	else
		tmp = (a + z) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.35e+122], N[Not[LessEqual[t, 1.42e+146]], $MachinePrecision]], N[(a / N[(N[(t + x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+122} \lor \neg \left(t \leq 1.42 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{a}{\frac{t + x}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3499999999999999e122 or 1.4200000000000001e146 < t

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    8. Simplified60.2%

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

    if -1.3499999999999999e122 < t < 1.4200000000000001e146

    1. Initial program 60.2%

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

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

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

Alternative 16: 58.9% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.19999999999999995e181 or 1e114 < x

    1. Initial program 52.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 49.0%

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

    if -4.19999999999999995e181 < x < 1e114

    1. Initial program 60.0%

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

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

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

Alternative 17: 44.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+72}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+75}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.45e+72) a (if (<= a 2.7e+75) z a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.45e+72) {
		tmp = a;
	} else if (a <= 2.7e+75) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-1.45d+72)) then
        tmp = a
    else if (a <= 2.7d+75) then
        tmp = z
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.45e+72) {
		tmp = a;
	} else if (a <= 2.7e+75) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.45e+72:
		tmp = a
	elif a <= 2.7e+75:
		tmp = z
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.45e+72)
		tmp = a;
	elseif (a <= 2.7e+75)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -1.45e+72)
		tmp = a;
	elseif (a <= 2.7e+75)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.45e+72], a, If[LessEqual[a, 2.7e+75], z, a]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+75}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45000000000000009e72 or 2.69999999999999998e75 < a

    1. Initial program 41.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 65.9%

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

    if -1.45000000000000009e72 < a < 2.69999999999999998e75

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+72}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+75}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 52.2% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+221}:\\
\;\;\;\;a - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.05000000000000001e221

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(-\color{blue}{\frac{y}{\frac{x + \left(y + t\right)}{b}}}\right) \]
      6. distribute-neg-frac74.3%

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

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

      \[\leadsto \color{blue}{a + -1 \cdot b} \]
    11. Step-by-step derivation
      1. neg-mul-160.2%

        \[\leadsto a + \color{blue}{\left(-b\right)} \]
      2. unsub-neg60.2%

        \[\leadsto \color{blue}{a - b} \]
    12. Simplified60.2%

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

    if -1.05000000000000001e221 < b

    1. Initial program 60.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. Step-by-step derivation
      1. associate-+l+60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. +-commutative56.2%

        \[\leadsto \color{blue}{z + a} \]
    8. Simplified56.2%

      \[\leadsto \color{blue}{z + a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.4%

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

Alternative 19: 51.6% accurate, 7.0× speedup?

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

\\
a + z
\end{array}
Derivation
  1. Initial program 58.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. Step-by-step derivation
    1. associate-+l+58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{z + a} \]
  9. Final simplification53.8%

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

Alternative 20: 32.6% 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.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 35.5%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification35.5%

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 83.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024011 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :herbie-target
  (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)))