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

Percentage Accurate: 61.1% → 97.6%
Time: 13.6s
Alternatives: 12
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 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: 61.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \left(x + t\right) + y\\
z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right) + \left(a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{-1}{\frac{t_2}{b} \cdot \frac{1}{y}}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 58.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. Taylor expanded in z around 0 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := a \cdot \left(t + y\right)\\ t_3 := \frac{\left(t_2 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_3 \leq -5 \cdot 10^{+304} \lor \neg \left(t_3 \leq 2 \cdot 10^{+261}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t_1} + \frac{y}{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 (+ (+ x t) y))
        (t_2 (* a (+ t y)))
        (t_3 (/ (- (+ t_2 (* z (+ x y))) (* y b)) t_1)))
   (if (or (<= t_3 -5e+304) (not (<= t_3 2e+261)))
     (- (+ z a) b)
     (+ (* z (+ (/ x t_1) (/ y 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 = (x + t) + y;
	double t_2 = a * (t + y);
	double t_3 = ((t_2 + (z * (x + y))) - (y * b)) / t_1;
	double tmp;
	if ((t_3 <= -5e+304) || !(t_3 <= 2e+261)) {
		tmp = (z + a) - b;
	} else {
		tmp = (z * ((x / t_1) + (y / t_1))) + ((t_2 - (y * b)) / t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (x + t) + y
    t_2 = a * (t + y)
    t_3 = ((t_2 + (z * (x + y))) - (y * b)) / t_1
    if ((t_3 <= (-5d+304)) .or. (.not. (t_3 <= 2d+261))) then
        tmp = (z + a) - b
    else
        tmp = (z * ((x / t_1) + (y / t_1))) + ((t_2 - (y * b)) / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = a * (t + y);
	double t_3 = ((t_2 + (z * (x + y))) - (y * b)) / t_1;
	double tmp;
	if ((t_3 <= -5e+304) || !(t_3 <= 2e+261)) {
		tmp = (z + a) - b;
	} else {
		tmp = (z * ((x / t_1) + (y / t_1))) + ((t_2 - (y * b)) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + t) + y
	t_2 = a * (t + y)
	t_3 = ((t_2 + (z * (x + y))) - (y * b)) / t_1
	tmp = 0
	if (t_3 <= -5e+304) or not (t_3 <= 2e+261):
		tmp = (z + a) - b
	else:
		tmp = (z * ((x / t_1) + (y / t_1))) + ((t_2 - (y * b)) / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(a * Float64(t + y))
	t_3 = Float64(Float64(Float64(t_2 + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_3 <= -5e+304) || !(t_3 <= 2e+261))
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = Float64(Float64(z * Float64(Float64(x / t_1) + Float64(y / 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 = (x + t) + y;
	t_2 = a * (t + y);
	t_3 = ((t_2 + (z * (x + y))) - (y * b)) / t_1;
	tmp = 0.0;
	if ((t_3 <= -5e+304) || ~((t_3 <= 2e+261)))
		tmp = (z + a) - b;
	else
		tmp = (z * ((x / t_1) + (y / 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[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$3, -5e+304], N[Not[LessEqual[t$95$3, 2e+261]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(y / 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 := \left(x + t\right) + y\\
t_2 := a \cdot \left(t + y\right)\\
t_3 := \frac{\left(t_2 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+304} \lor \neg \left(t_3 \leq 2 \cdot 10^{+261}\right):\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_1} + \frac{y}{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)) < -4.9999999999999997e304 or 1.9999999999999999e261 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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. Taylor expanded in y around inf 75.5%

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

    if -4.9999999999999997e304 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.9999999999999999e261

    1. Initial program 99.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. Taylor expanded in z around 0 99.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 88.3% accurate, 0.3× speedup?

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

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

\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)) < -4.9999999999999997e304 or 1.9999999999999999e261 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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. Taylor expanded in y around inf 75.5%

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

    if -4.9999999999999997e304 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.9999999999999999e261

    1. Initial program 99.8%

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

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

Alternative 4: 91.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \left(x + t\right) + y\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+210} \lor \neg \left(y \leq 2.15 \cdot 10^{+107}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.10000000000000001e210 or 2.15e107 < y

    1. Initial program 23.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. Taylor expanded in y around inf 86.9%

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

    if -4.10000000000000001e210 < y < 2.15e107

    1. Initial program 69.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. Taylor expanded in z around 0 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+210} \lor \neg \left(y \leq 2.15 \cdot 10^{+107}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{\left(x + t\right) + y} + \frac{y}{\left(x + t\right) + y}\right) + \left(a \cdot \left(\frac{y}{t + \left(x + y\right)} + \frac{t}{t + \left(x + y\right)}\right) - \frac{y \cdot b}{t + \left(x + y\right)}\right)\\ \end{array} \]

Alternative 5: 64.6% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.6000000000000004e-13 or 9.99999999999999949e60 < y

    1. Initial program 37.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. Taylor expanded in y around inf 77.0%

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

    if -5.6000000000000004e-13 < y < 1.2000000000000001e-149

    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. Taylor expanded in y around 0 65.5%

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

    if 1.2000000000000001e-149 < y < 9.99999999999999949e60

    1. Initial program 75.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. Taylor expanded in t around 0 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{-13}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-149}:\\ \;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\ \mathbf{elif}\;y \leq 10^{+61}:\\ \;\;\;\;\frac{y \cdot \left(a - b\right) + z \cdot \left(x + y\right)}{x + y}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 6: 59.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+218}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+138}:\\ \;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+161}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{t_1}{t + y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x t) y)) (t_2 (- (+ z a) b)))
   (if (<= t -2.9e+218)
     a
     (if (<= t 5.2e+67)
       t_2
       (if (<= t 8.2e+138)
         (/ z (/ t_1 (+ x y)))
         (if (<= t 7.6e+161) t_2 (/ a (/ t_1 (+ t y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = (z + a) - b;
	double tmp;
	if (t <= -2.9e+218) {
		tmp = a;
	} else if (t <= 5.2e+67) {
		tmp = t_2;
	} else if (t <= 8.2e+138) {
		tmp = z / (t_1 / (x + y));
	} else if (t <= 7.6e+161) {
		tmp = t_2;
	} else {
		tmp = a / (t_1 / (t + y));
	}
	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 = (x + t) + y
    t_2 = (z + a) - b
    if (t <= (-2.9d+218)) then
        tmp = a
    else if (t <= 5.2d+67) then
        tmp = t_2
    else if (t <= 8.2d+138) then
        tmp = z / (t_1 / (x + y))
    else if (t <= 7.6d+161) then
        tmp = t_2
    else
        tmp = a / (t_1 / (t + y))
    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 = (z + a) - b;
	double tmp;
	if (t <= -2.9e+218) {
		tmp = a;
	} else if (t <= 5.2e+67) {
		tmp = t_2;
	} else if (t <= 8.2e+138) {
		tmp = z / (t_1 / (x + y));
	} else if (t <= 7.6e+161) {
		tmp = t_2;
	} else {
		tmp = a / (t_1 / (t + y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + t) + y
	t_2 = (z + a) - b
	tmp = 0
	if t <= -2.9e+218:
		tmp = a
	elif t <= 5.2e+67:
		tmp = t_2
	elif t <= 8.2e+138:
		tmp = z / (t_1 / (x + y))
	elif t <= 7.6e+161:
		tmp = t_2
	else:
		tmp = a / (t_1 / (t + y))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t <= -2.9e+218)
		tmp = a;
	elseif (t <= 5.2e+67)
		tmp = t_2;
	elseif (t <= 8.2e+138)
		tmp = Float64(z / Float64(t_1 / Float64(x + y)));
	elseif (t <= 7.6e+161)
		tmp = t_2;
	else
		tmp = Float64(a / Float64(t_1 / Float64(t + y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + t) + y;
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (t <= -2.9e+218)
		tmp = a;
	elseif (t <= 5.2e+67)
		tmp = t_2;
	elseif (t <= 8.2e+138)
		tmp = z / (t_1 / (x + y));
	elseif (t <= 7.6e+161)
		tmp = t_2;
	else
		tmp = a / (t_1 / (t + y));
	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[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t, -2.9e+218], a, If[LessEqual[t, 5.2e+67], t$95$2, If[LessEqual[t, 8.2e+138], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e+161], t$95$2, N[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+67}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+138}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\

\mathbf{elif}\;t \leq 7.6 \cdot 10^{+161}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.8999999999999999e218

    1. Initial program 36.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. Taylor expanded in t around inf 77.3%

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

    if -2.8999999999999999e218 < t < 5.2000000000000001e67 or 8.19999999999999961e138 < t < 7.6000000000000005e161

    1. Initial program 59.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. Taylor expanded in y around inf 69.6%

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

    if 5.2000000000000001e67 < t < 8.19999999999999961e138

    1. Initial program 65.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. Taylor expanded in z around inf 38.3%

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

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

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

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

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

    if 7.6000000000000005e161 < t

    1. Initial program 56.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+218}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+67}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+138}:\\ \;\;\;\;\frac{z}{\frac{\left(x + t\right) + y}{x + y}}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+161}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{\left(x + t\right) + y}{t + y}}\\ \end{array} \]

Alternative 7: 63.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-24} \lor \neg \left(y \leq 6.5 \cdot 10^{-141}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.5000000000000002e-24 or 6.4999999999999995e-141 < y

    1. Initial program 45.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. Taylor expanded in y around inf 71.1%

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

    if -8.5000000000000002e-24 < y < 6.4999999999999995e-141

    1. Initial program 78.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. Taylor expanded in y around 0 65.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-24} \lor \neg \left(y \leq 6.5 \cdot 10^{-141}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\ \end{array} \]

Alternative 8: 59.2% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 36.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. Taylor expanded in t around inf 77.3%

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

    if -2.1499999999999999e219 < t < 6e61

    1. Initial program 60.4%

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

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

    if 6e61 < t

    1. Initial program 56.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. Taylor expanded in a around inf 34.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{+219}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+61}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{\left(x + t\right) + y}{t + y}}\\ \end{array} \]

Alternative 9: 57.9% accurate, 2.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.25000000000000004e218 or 5.50000000000000036e61 < t

    1. Initial program 52.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. Taylor expanded in t around inf 60.5%

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

    if -2.25000000000000004e218 < t < 5.50000000000000036e61

    1. Initial program 60.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+218}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+61}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 10: 47.0% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;a \leq 60:\\
\;\;\;\;z - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.7999999999999996e155 or 60 < a

    1. Initial program 45.2%

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

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

    if -7.7999999999999996e155 < a < 60

    1. Initial program 66.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. Taylor expanded in a around 0 49.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+155}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 60:\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 11: 44.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;a \leq 5.8 \cdot 10^{-25}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1000000000000001e28 or 5.8000000000000001e-25 < a

    1. Initial program 47.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. Taylor expanded in t around inf 54.7%

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

    if -3.1000000000000001e28 < a < 5.8000000000000001e-25

    1. Initial program 68.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+28}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-25}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 12: 32.7% 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.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. Taylor expanded in t around inf 36.1%

    \[\leadsto \color{blue}{a} \]
  3. Final simplification36.1%

    \[\leadsto a \]

Developer target: 82.2% 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 2023331 
(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)))