Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A

Percentage Accurate: 99.9% → 99.9%
Time: 17.7s
Alternatives: 20
Speedup: 1.0×

Specification

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

\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\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: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.5× speedup?

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

\\
\mathsf{fma}\left(a + -0.5, b, x + \left(y + \left(z - z \cdot \log t\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative99.9%

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(a + -0.5, b, x + \left(y + \left(z - z \cdot \log t\right)\right)\right) \]

Alternative 2: 90.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y + z\right)\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_2 \leq -4.7 \cdot 10^{+78} \lor \neg \left(t_2 \leq 10^{+76}\right):\\
\;\;\;\;t_2 + t_1\\

\mathbf{else}:\\
\;\;\;\;t_1 - z \cdot \log t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.70000000000000006e78 or 1e76 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 91.0%

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

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

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

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

    if -4.70000000000000006e78 < (*.f64 (-.f64 a 1/2) b) < 1e76

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around 0 97.0%

      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t} \]
    3. Step-by-step derivation
      1. associate-+r+97.0%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + \left(z + -0.5 \cdot b\right)\right) - z \cdot \log t \]
      3. *-commutative97.0%

        \[\leadsto \left(\left(y + x\right) + \left(z + \color{blue}{b \cdot -0.5}\right)\right) - z \cdot \log t \]
    4. Simplified97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -4.7 \cdot 10^{+78} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 10^{+76}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(y + z\right)\right) - z \cdot \log t\\ \end{array} \]

Alternative 3: 84.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ t_2 := z \cdot \left(1 - \log t\right)\\ \mathbf{if}\;z \leq -7.7 \cdot 10^{+241}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+225}:\\ \;\;\;\;\left(x + y\right) + t_1\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+182} \lor \neg \left(z \leq 10^{+169}\right):\\ \;\;\;\;t_2 + -0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(x + \left(y + z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))) (t_2 (* z (- 1.0 (log t)))))
   (if (<= z -7.7e+241)
     t_2
     (if (<= z -2.4e+225)
       (+ (+ x y) t_1)
       (if (or (<= z -1.6e+182) (not (<= z 1e+169)))
         (+ t_2 (* -0.5 b))
         (+ t_1 (+ x (+ y z))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double t_2 = z * (1.0 - log(t));
	double tmp;
	if (z <= -7.7e+241) {
		tmp = t_2;
	} else if (z <= -2.4e+225) {
		tmp = (x + y) + t_1;
	} else if ((z <= -1.6e+182) || !(z <= 1e+169)) {
		tmp = t_2 + (-0.5 * b);
	} else {
		tmp = t_1 + (x + (y + 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = b * (a - 0.5d0)
    t_2 = z * (1.0d0 - log(t))
    if (z <= (-7.7d+241)) then
        tmp = t_2
    else if (z <= (-2.4d+225)) then
        tmp = (x + y) + t_1
    else if ((z <= (-1.6d+182)) .or. (.not. (z <= 1d+169))) then
        tmp = t_2 + ((-0.5d0) * b)
    else
        tmp = t_1 + (x + (y + z))
    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 = b * (a - 0.5);
	double t_2 = z * (1.0 - Math.log(t));
	double tmp;
	if (z <= -7.7e+241) {
		tmp = t_2;
	} else if (z <= -2.4e+225) {
		tmp = (x + y) + t_1;
	} else if ((z <= -1.6e+182) || !(z <= 1e+169)) {
		tmp = t_2 + (-0.5 * b);
	} else {
		tmp = t_1 + (x + (y + z));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	t_2 = z * (1.0 - math.log(t))
	tmp = 0
	if z <= -7.7e+241:
		tmp = t_2
	elif z <= -2.4e+225:
		tmp = (x + y) + t_1
	elif (z <= -1.6e+182) or not (z <= 1e+169):
		tmp = t_2 + (-0.5 * b)
	else:
		tmp = t_1 + (x + (y + z))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	t_2 = Float64(z * Float64(1.0 - log(t)))
	tmp = 0.0
	if (z <= -7.7e+241)
		tmp = t_2;
	elseif (z <= -2.4e+225)
		tmp = Float64(Float64(x + y) + t_1);
	elseif ((z <= -1.6e+182) || !(z <= 1e+169))
		tmp = Float64(t_2 + Float64(-0.5 * b));
	else
		tmp = Float64(t_1 + Float64(x + Float64(y + z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a - 0.5);
	t_2 = z * (1.0 - log(t));
	tmp = 0.0;
	if (z <= -7.7e+241)
		tmp = t_2;
	elseif (z <= -2.4e+225)
		tmp = (x + y) + t_1;
	elseif ((z <= -1.6e+182) || ~((z <= 1e+169)))
		tmp = t_2 + (-0.5 * b);
	else
		tmp = t_1 + (x + (y + z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.7e+241], t$95$2, If[LessEqual[z, -2.4e+225], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[z, -1.6e+182], N[Not[LessEqual[z, 1e+169]], $MachinePrecision]], N[(t$95$2 + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -7.7 \cdot 10^{+241}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{+225}:\\
\;\;\;\;\left(x + y\right) + t_1\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{+182} \lor \neg \left(z \leq 10^{+169}\right):\\
\;\;\;\;t_2 + -0.5 \cdot b\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + \left(y + z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.69999999999999998e241

    1. Initial program 99.5%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in z around inf 84.9%

      \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} + \left(a - 0.5\right) \cdot b \]
    3. Taylor expanded in z around inf 70.8%

      \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]

    if -7.69999999999999998e241 < z < -2.4000000000000001e225

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in z around 0 100.0%

      \[\leadsto \color{blue}{\left(x + y\right)} + \left(a - 0.5\right) \cdot b \]
    3. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\left(y + x\right)} + \left(a - 0.5\right) \cdot b \]
    4. Simplified100.0%

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

    if -2.4000000000000001e225 < z < -1.5999999999999999e182 or 9.99999999999999934e168 < z

    1. Initial program 99.7%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in z around inf 89.8%

      \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} + \left(a - 0.5\right) \cdot b \]
    3. Taylor expanded in a around 0 79.8%

      \[\leadsto z \cdot \left(1 - \log t\right) + \color{blue}{-0.5 \cdot b} \]
    4. Step-by-step derivation
      1. *-commutative79.8%

        \[\leadsto z \cdot \left(1 - \log t\right) + \color{blue}{b \cdot -0.5} \]
    5. Simplified79.8%

      \[\leadsto z \cdot \left(1 - \log t\right) + \color{blue}{b \cdot -0.5} \]

    if -1.5999999999999999e182 < z < 9.99999999999999934e168

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 92.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.7 \cdot 10^{+241}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+225}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+182} \lor \neg \left(z \leq 10^{+169}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right) + -0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right)\\ \end{array} \]

Alternative 4: 85.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;y \leq 2.4 \cdot 10^{+51}:\\ \;\;\;\;\left(x + \left(z + t_1\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(x + \left(y + z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))))
   (if (<= y 2.4e+51)
     (- (+ x (+ z t_1)) (* z (log t)))
     (+ t_1 (+ x (+ y z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double tmp;
	if (y <= 2.4e+51) {
		tmp = (x + (z + t_1)) - (z * log(t));
	} else {
		tmp = t_1 + (x + (y + 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) :: t_1
    real(8) :: tmp
    t_1 = b * (a - 0.5d0)
    if (y <= 2.4d+51) then
        tmp = (x + (z + t_1)) - (z * log(t))
    else
        tmp = t_1 + (x + (y + z))
    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 = b * (a - 0.5);
	double tmp;
	if (y <= 2.4e+51) {
		tmp = (x + (z + t_1)) - (z * Math.log(t));
	} else {
		tmp = t_1 + (x + (y + z));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	tmp = 0
	if y <= 2.4e+51:
		tmp = (x + (z + t_1)) - (z * math.log(t))
	else:
		tmp = t_1 + (x + (y + z))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	tmp = 0.0
	if (y <= 2.4e+51)
		tmp = Float64(Float64(x + Float64(z + t_1)) - Float64(z * log(t)));
	else
		tmp = Float64(t_1 + Float64(x + Float64(y + z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a - 0.5);
	tmp = 0.0;
	if (y <= 2.4e+51)
		tmp = (x + (z + t_1)) - (z * log(t));
	else
		tmp = t_1 + (x + (y + z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.4e+51], N[(N[(x + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + \left(y + z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.3999999999999999e51

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around 0 87.0%

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

    if 2.3999999999999999e51 < y

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 89.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.4 \cdot 10^{+51}:\\ \;\;\;\;\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right)\\ \end{array} \]

Alternative 5: 99.9% accurate, 1.0× speedup?

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

\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Final simplification99.9%

    \[\leadsto \left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right) \]

Alternative 6: 84.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+241} \lor \neg \left(z \leq 2.75 \cdot 10^{+169}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.1999999999999998e241 or 2.74999999999999986e169 < z

    1. Initial program 99.7%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in z around inf 85.9%

      \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} + \left(a - 0.5\right) \cdot b \]
    3. Taylor expanded in z around inf 72.6%

      \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]

    if -9.1999999999999998e241 < z < 2.74999999999999986e169

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 90.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+241} \lor \neg \left(z \leq 2.75 \cdot 10^{+169}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right)\\ \end{array} \]

Alternative 7: 48.0% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x + y \leq -1 \cdot 10^{-287}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;x + y \leq 4 \cdot 10^{-125}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\
\;\;\;\;a \cdot b\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x y) < -1.00000000000000001e122 or 3.99999999999999982e127 < (+.f64 x y)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 92.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y + b \cdot \left(a - 0.5\right)\right) + x} \]
      2. sub-neg92.1%

        \[\leadsto \left(y + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}\right) + x \]
      3. metadata-eval92.1%

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

        \[\leadsto \left(y + \color{blue}{\left(a + -0.5\right) \cdot b}\right) + x \]
      5. associate-+l+92.1%

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

        \[\leadsto y + \left(\color{blue}{b \cdot \left(a + -0.5\right)} + x\right) \]
      7. fma-def92.2%

        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
    9. Simplified92.2%

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

      \[\leadsto \color{blue}{x + y} \]

    if -1.00000000000000001e122 < (+.f64 x y) < -1.00000000000000002e-287 or 4.00000000000000005e-125 < (+.f64 x y) < 3.99999999999999982e127

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around inf 43.1%

      \[\leadsto \color{blue}{a \cdot b} \]
    3. Step-by-step derivation
      1. *-commutative43.1%

        \[\leadsto \color{blue}{b \cdot a} \]
    4. Simplified43.1%

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

    if -1.00000000000000002e-287 < (+.f64 x y) < 4.00000000000000005e-125

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around 0 83.1%

      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t} \]
    3. Step-by-step derivation
      1. associate-+r+83.1%

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

        \[\leadsto \left(\color{blue}{\left(y + x\right)} + \left(z + -0.5 \cdot b\right)\right) - z \cdot \log t \]
      3. *-commutative83.1%

        \[\leadsto \left(\left(y + x\right) + \left(z + \color{blue}{b \cdot -0.5}\right)\right) - z \cdot \log t \]
    4. Simplified83.1%

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative83.1%

        \[\leadsto \color{blue}{b \cdot -0.5} \]
    7. Simplified83.1%

      \[\leadsto \color{blue}{b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x + y \leq -1 \cdot 10^{-287}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x + y \leq 4 \cdot 10^{-125}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 69.8% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+98} \lor \neg \left(t_1 \leq 3 \cdot 10^{+85}\right):\\
\;\;\;\;x + t_1\\

\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999998e97 or 3e85 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in x around inf 79.1%

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

    if -9.99999999999999998e97 < (*.f64 (-.f64 a 1/2) b) < 3e85

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.5%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.5%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 75.7%

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

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

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

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

      \[\leadsto \color{blue}{x + \left(y + z\right)} \]
    8. Step-by-step derivation
      1. associate-+r+69.5%

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

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

        \[\leadsto \color{blue}{z + \left(y + x\right)} \]
      4. +-commutative69.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+98} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 3 \cdot 10^{+85}\right):\\ \;\;\;\;x + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + y\right)\\ \end{array} \]

Alternative 9: 71.8% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+98} \lor \neg \left(t_1 \leq 2 \cdot 10^{+125}\right):\\
\;\;\;\;x + t_1\\

\mathbf{else}:\\
\;\;\;\;x + \left(y + -0.5 \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999998e97 or 1.9999999999999998e125 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in x around inf 81.4%

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

    if -9.99999999999999998e97 < (*.f64 (-.f64 a 1/2) b) < 1.9999999999999998e125

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around 0 95.1%

      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t} \]
    3. Step-by-step derivation
      1. associate-+r+95.1%

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

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

        \[\leadsto \left(\left(y + x\right) + \left(z + \color{blue}{b \cdot -0.5}\right)\right) - z \cdot \log t \]
    4. Simplified95.1%

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

      \[\leadsto \color{blue}{x + \left(y + -0.5 \cdot b\right)} \]
    6. Step-by-step derivation
      1. *-commutative70.1%

        \[\leadsto x + \left(y + \color{blue}{b \cdot -0.5}\right) \]
    7. Simplified70.1%

      \[\leadsto \color{blue}{x + \left(y + b \cdot -0.5\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -1 \cdot 10^{+98} \lor \neg \left(b \cdot \left(a - 0.5\right) \leq 2 \cdot 10^{+125}\right):\\ \;\;\;\;x + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y + -0.5 \cdot b\right)\\ \end{array} \]

Alternative 10: 57.2% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -1.00000000000000001e122 or 3.99999999999999982e127 < (+.f64 x y)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 92.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y + b \cdot \left(a - 0.5\right)\right) + x} \]
      2. sub-neg92.1%

        \[\leadsto \left(y + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}\right) + x \]
      3. metadata-eval92.1%

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

        \[\leadsto \left(y + \color{blue}{\left(a + -0.5\right) \cdot b}\right) + x \]
      5. associate-+l+92.1%

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

        \[\leadsto y + \left(\color{blue}{b \cdot \left(a + -0.5\right)} + x\right) \]
      7. fma-def92.2%

        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
    9. Simplified92.2%

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

      \[\leadsto \color{blue}{x + y} \]

    if -1.00000000000000001e122 < (+.f64 x y) < 3.99999999999999982e127

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in b around inf 57.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 50.3% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x y) < -1.00000000000000001e122

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 94.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y + b \cdot \left(a - 0.5\right)\right) + x} \]
      2. sub-neg93.7%

        \[\leadsto \left(y + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)}\right) + x \]
      3. metadata-eval93.7%

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

        \[\leadsto \left(y + \color{blue}{\left(a + -0.5\right) \cdot b}\right) + x \]
      5. associate-+l+93.7%

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

        \[\leadsto y + \left(\color{blue}{b \cdot \left(a + -0.5\right)} + x\right) \]
      7. fma-def93.7%

        \[\leadsto y + \color{blue}{\mathsf{fma}\left(b, a + -0.5, x\right)} \]
    9. Simplified93.7%

      \[\leadsto \color{blue}{y + \mathsf{fma}\left(b, a + -0.5, x\right)} \]
    10. Taylor expanded in b around 0 78.3%

      \[\leadsto \color{blue}{x + y} \]

    if -1.00000000000000001e122 < (+.f64 x y) < 3.99999999999999982e127

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in b around inf 57.8%

      \[\leadsto \color{blue}{b \cdot \left(a - 0.5\right)} \]

    if 3.99999999999999982e127 < (+.f64 x y)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around inf 59.7%

      \[\leadsto \color{blue}{y} + \left(a - 0.5\right) \cdot b \]
    3. Taylor expanded in a around 0 35.9%

      \[\leadsto \color{blue}{y + -0.5 \cdot b} \]
    4. Step-by-step derivation
      1. *-commutative35.9%

        \[\leadsto y + \color{blue}{b \cdot -0.5} \]
    5. Simplified35.9%

      \[\leadsto \color{blue}{y + b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + -0.5 \cdot b\\ \end{array} \]

Alternative 12: 50.4% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\
\;\;\;\;z + \left(x + y\right)\\

\mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x y) < -1.00000000000000001e122

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 94.1%

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

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

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

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

      \[\leadsto \color{blue}{x + \left(y + z\right)} \]
    8. Step-by-step derivation
      1. associate-+r+78.7%

        \[\leadsto \color{blue}{\left(x + y\right) + z} \]
      2. +-commutative78.7%

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

        \[\leadsto \color{blue}{z + \left(y + x\right)} \]
      4. +-commutative78.7%

        \[\leadsto z + \color{blue}{\left(x + y\right)} \]
    9. Simplified78.7%

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

    if -1.00000000000000001e122 < (+.f64 x y) < 3.99999999999999982e127

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in b around inf 57.8%

      \[\leadsto \color{blue}{b \cdot \left(a - 0.5\right)} \]

    if 3.99999999999999982e127 < (+.f64 x y)

    1. Initial program 100.0%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around inf 59.7%

      \[\leadsto \color{blue}{y} + \left(a - 0.5\right) \cdot b \]
    3. Taylor expanded in a around 0 35.9%

      \[\leadsto \color{blue}{y + -0.5 \cdot b} \]
    4. Step-by-step derivation
      1. *-commutative35.9%

        \[\leadsto y + \color{blue}{b \cdot -0.5} \]
    5. Simplified35.9%

      \[\leadsto \color{blue}{y + b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -1 \cdot 10^{+122}:\\ \;\;\;\;z + \left(x + y\right)\\ \mathbf{elif}\;x + y \leq 4 \cdot 10^{+127}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + -0.5 \cdot b\\ \end{array} \]

Alternative 13: 58.5% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 2 \cdot 10^{-65}:\\
\;\;\;\;\left(x + z\right) + \left(a + -0.5\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;y + b \cdot \left(a - 0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < 1.99999999999999985e-65

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 82.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + z\right) + b \cdot \left(a - 0.5\right)} \]
      2. sub-neg67.2%

        \[\leadsto \left(x + z\right) + b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)} \]
      3. metadata-eval67.2%

        \[\leadsto \left(x + z\right) + b \cdot \left(a + \color{blue}{-0.5}\right) \]
    9. Simplified67.2%

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

    if 1.99999999999999985e-65 < (+.f64 x y)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around inf 61.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq 2 \cdot 10^{-65}:\\ \;\;\;\;\left(x + z\right) + \left(a + -0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 14: 57.8% accurate, 10.4× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -4 \cdot 10^{-30}:\\
\;\;\;\;x + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -4e-30

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in x around inf 66.6%

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

    if -4e-30 < (+.f64 x y)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in y around inf 62.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq -4 \cdot 10^{-30}:\\ \;\;\;\;x + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 15: 79.2% accurate, 10.5× speedup?

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

\\
b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. add-cube-cbrt99.7%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
    2. pow399.7%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
  3. Applied egg-rr99.7%

    \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
  4. Taylor expanded in z around 0 82.9%

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

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

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

    \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
  7. Final simplification82.9%

    \[\leadsto b \cdot \left(a - 0.5\right) + \left(x + \left(y + z\right)\right) \]

Alternative 16: 78.4% accurate, 12.8× speedup?

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

\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Taylor expanded in z around 0 81.9%

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

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

    \[\leadsto \color{blue}{\left(y + x\right)} + \left(a - 0.5\right) \cdot b \]
  5. Final simplification81.9%

    \[\leadsto \left(x + y\right) + b \cdot \left(a - 0.5\right) \]

Alternative 17: 28.7% accurate, 16.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-287}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-239}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+54}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.70000000000000027e-287 or 8.49999999999999958e-239 < y < 1.4499999999999999e54

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 80.2%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in x around inf 27.1%

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

    if -3.70000000000000027e-287 < y < 8.49999999999999958e-239

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around 0 62.5%

      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t} \]
    3. Step-by-step derivation
      1. associate-+r+62.5%

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative19.9%

        \[\leadsto \color{blue}{b \cdot -0.5} \]
    7. Simplified19.9%

      \[\leadsto \color{blue}{b \cdot -0.5} \]

    if 1.4499999999999999e54 < y

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 89.0%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in y around inf 45.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification30.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{-287}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-239}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 18: 30.1% accurate, 16.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+122}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-103}:\\
\;\;\;\;a \cdot b\\

\mathbf{else}:\\
\;\;\;\;y\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.9%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.9%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 95.1%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in x around inf 69.3%

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

    if -1.54999999999999999e122 < x < 4.20000000000000009e-103

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Taylor expanded in a around inf 31.8%

      \[\leadsto \color{blue}{a \cdot b} \]
    3. Step-by-step derivation
      1. *-commutative31.8%

        \[\leadsto \color{blue}{b \cdot a} \]
    4. Simplified31.8%

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

    if 4.20000000000000009e-103 < x

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.7%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.7%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 80.9%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in y around inf 14.1%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-103}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 19: 29.4% accurate, 37.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{+54}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 7.50000000000000042e54

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.6%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 81.0%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in x around inf 28.0%

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

    if 7.50000000000000042e54 < y

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
      2. pow399.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    3. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
    4. Taylor expanded in z around 0 89.0%

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

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

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

      \[\leadsto \color{blue}{\left(\left(z + y\right) + x\right)} + \left(a - 0.5\right) \cdot b \]
    7. Taylor expanded in y around inf 45.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification32.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 7.5 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 20: 22.9% accurate, 115.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Step-by-step derivation
    1. add-cube-cbrt99.7%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{\left(\sqrt[3]{z \cdot \log t} \cdot \sqrt[3]{z \cdot \log t}\right) \cdot \sqrt[3]{z \cdot \log t}}\right) + \left(a - 0.5\right) \cdot b \]
    2. pow399.7%

      \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
  3. Applied egg-rr99.7%

    \[\leadsto \left(\left(\left(x + y\right) + z\right) - \color{blue}{{\left(\sqrt[3]{z \cdot \log t}\right)}^{3}}\right) + \left(a - 0.5\right) \cdot b \]
  4. Taylor expanded in z around 0 82.9%

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  8. Final simplification25.7%

    \[\leadsto x \]

Developer target: 99.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+
  (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
  (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
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) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}

Reproduce

?
herbie shell --seed 2023280 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))