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

Percentage Accurate: 99.9% → 99.9%
Time: 10.6s
Alternatives: 15
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 15 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, 1.0× speedup?

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

\\
\left(\left(z - z \cdot \log t\right) + \left(x + y\right)\right) + \left(a + -0.5\right) \cdot b
\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. remove-double-neg99.9%

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

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
    4. distribute-rgt-neg-in99.9%

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.9%

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

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

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

Alternative 2: 94.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+59} \lor \neg \left(b \leq 1.05 \cdot 10^{+86}\right):\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.3e59 or 1.0499999999999999e86 < b

    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-sqr-sqrt37.7%

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

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

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

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

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

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

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

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

    if -1.3e59 < b < 1.0499999999999999e86

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    6. Simplified97.5%

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

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

Alternative 3: 84.8% accurate, 1.0× speedup?

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

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

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


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

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    6. Simplified91.5%

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

    if -4.99999999999999965e-40 < (+.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. Step-by-step derivation
      1. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

Alternative 4: 86.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+132} \lor \neg \left(z \leq 7.8 \cdot 10^{+25}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.9000000000000002e132 or 7.8000000000000004e25 < z

    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. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.8%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

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

    if -4.9000000000000002e132 < z < 7.8000000000000004e25

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+130} \lor \neg \left(z \leq 7.5 \cdot 10^{+83}\right):\\
\;\;\;\;a \cdot b + \left(y + \left(z - z \cdot \log t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.5000000000000009e130 or 7.49999999999999989e83 < z

    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. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.8%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified82.8%

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

        \[\leadsto \color{blue}{\left(\left(y + z\right) + \left(-z \cdot \log t\right)\right)} + b \cdot a \]
      2. associate-+l+82.8%

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

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

        \[\leadsto \left(y + \left(z - \color{blue}{\log t \cdot z}\right)\right) + b \cdot a \]
      5. *-un-lft-identity82.8%

        \[\leadsto \left(y + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + b \cdot a \]
      6. distribute-rgt-out--82.8%

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

        \[\leadsto \color{blue}{\left(z \cdot \left(1 - \log t\right) + y\right)} + b \cdot a \]
      8. distribute-rgt-out--82.8%

        \[\leadsto \left(\color{blue}{\left(1 \cdot z - \log t \cdot z\right)} + y\right) + b \cdot a \]
      9. *-un-lft-identity82.8%

        \[\leadsto \left(\left(\color{blue}{z} - \log t \cdot z\right) + y\right) + b \cdot a \]
      10. *-commutative82.8%

        \[\leadsto \left(\left(z - \color{blue}{z \cdot \log t}\right) + y\right) + b \cdot a \]
    9. Applied egg-rr82.8%

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

    if -9.5000000000000009e130 < z < 7.49999999999999989e83

    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-sqr-sqrt35.7%

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

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

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

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

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

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

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

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

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

Alternative 6: 89.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5000000000000002e132

    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. Step-by-step derivation
      1. remove-double-neg99.7%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.7%

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.7%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.7%

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified82.5%

      \[\leadsto \left(\left(y + z\right) - z \cdot \log t\right) + \color{blue}{b \cdot a} \]
    8. Step-by-step derivation
      1. sub-neg82.5%

        \[\leadsto \color{blue}{\left(\left(y + z\right) + \left(-z \cdot \log t\right)\right)} + b \cdot a \]
      2. associate-+l+82.5%

        \[\leadsto \color{blue}{\left(y + \left(z + \left(-z \cdot \log t\right)\right)\right)} + b \cdot a \]
      3. sub-neg82.5%

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

        \[\leadsto \left(y + \left(z - \color{blue}{\log t \cdot z}\right)\right) + b \cdot a \]
      5. *-un-lft-identity82.5%

        \[\leadsto \left(y + \left(\color{blue}{1 \cdot z} - \log t \cdot z\right)\right) + b \cdot a \]
      6. distribute-rgt-out--82.4%

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

        \[\leadsto \color{blue}{\left(z \cdot \left(1 - \log t\right) + y\right)} + b \cdot a \]
      8. distribute-rgt-out--82.5%

        \[\leadsto \left(\color{blue}{\left(1 \cdot z - \log t \cdot z\right)} + y\right) + b \cdot a \]
      9. *-un-lft-identity82.5%

        \[\leadsto \left(\left(\color{blue}{z} - \log t \cdot z\right) + y\right) + b \cdot a \]
      10. *-commutative82.5%

        \[\leadsto \left(\left(z - \color{blue}{z \cdot \log t}\right) + y\right) + b \cdot a \]
    9. Applied egg-rr82.5%

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

    if -3.5000000000000002e132 < z < 2.1e87

    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-sqr-sqrt35.7%

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

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

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

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

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

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

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

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

    if 2.1e87 < z

    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. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.8%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified83.0%

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

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

Alternative 7: 99.9% accurate, 1.0× speedup?

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

\\
\left(a + -0.5\right) \cdot b + \left(z \cdot \left(1 - \log t\right) + \left(x + y\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. remove-double-neg99.9%

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

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
    4. distribute-rgt-neg-in99.9%

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.9%

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

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

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

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

Alternative 8: 51.4% accurate, 10.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + a \cdot b\\
\mathbf{if}\;y \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 8 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 2.80000000000000019e-221 or 2.05e-113 < y < 7.9999999999999996e-7

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

      \[\leadsto x + \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative47.5%

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified47.5%

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

    if 2.80000000000000019e-221 < y < 2.05e-113

    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. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\left(-\left(-\left(a - 0.5\right) \cdot b\right)\right)} \]
      2. distribute-rgt-neg-out99.8%

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.8%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.8%

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

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

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

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

    if 7.9999999999999996e-7 < 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. remove-double-neg100.0%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified81.1%

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

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

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

      \[\leadsto \left(\left(y + z\right) - \color{blue}{{\left(\sqrt{z \cdot \log t}\right)}^{2}}\right) + b \cdot a \]
    10. Taylor expanded in y around inf 65.5%

      \[\leadsto \color{blue}{y} + b \cdot a \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-113}:\\ \;\;\;\;x + -0.5 \cdot b\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-7}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot b\\ \end{array} \]

Alternative 9: 78.0% accurate, 10.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.5 \lor \neg \left(a \leq 1.2 \cdot 10^{-22}\right):\\
\;\;\;\;a \cdot b + \left(x + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.5 or 1.20000000000000001e-22 < a

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot a} \]
    9. Simplified81.0%

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

    if -0.5 < a < 1.20000000000000001e-22

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

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

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

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

Alternative 10: 79.5% accurate, 10.5× speedup?

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

\\
\left(z + \left(x + y\right)\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. Step-by-step derivation
    1. add-sqr-sqrt37.7%

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

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

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

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

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

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

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

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

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

Alternative 11: 58.0% accurate, 12.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.5 \lor \neg \left(a \leq 0.5\right):\\
\;\;\;\;x + a \cdot b\\

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


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

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

      \[\leadsto x + \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative61.5%

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified61.5%

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

    if -0.5 < a < 0.5

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

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

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

Alternative 12: 63.4% accurate, 12.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\


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

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

    if 2.20000000000000009e88 < 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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

      \[\leadsto \left(\left(y + z\right) - z \cdot \log t\right) + \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative25.3%

        \[\leadsto x + \color{blue}{b \cdot a} \]
    7. Simplified87.5%

      \[\leadsto \left(\left(y + z\right) - z \cdot \log t\right) + \color{blue}{b \cdot a} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt42.2%

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

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

      \[\leadsto \left(\left(y + z\right) - \color{blue}{{\left(\sqrt{z \cdot \log t}\right)}^{2}}\right) + b \cdot a \]
    10. Taylor expanded in y around inf 74.0%

      \[\leadsto \color{blue}{y} + b \cdot a \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.5%

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

Alternative 13: 64.3% accurate, 12.7× speedup?

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

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

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


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

    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. remove-double-neg99.9%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

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

    if 1.5e15 < 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. remove-double-neg100.0%

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

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

        \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
      4. distribute-rgt-neg-in99.9%

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

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

        \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
      7. remove-double-neg99.9%

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

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

      \[\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}\;y \leq 1.5 \cdot 10^{+15}:\\ \;\;\;\;x + \left(a + -0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + \left(a + -0.5\right) \cdot b\\ \end{array} \]

Alternative 14: 78.8% accurate, 12.8× speedup?

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

\\
\left(a + -0.5\right) \cdot b + \left(x + y\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. remove-double-neg99.9%

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

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
    4. distribute-rgt-neg-in99.9%

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.9%

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

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

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

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

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

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

Alternative 15: 34.7% accurate, 23.0× speedup?

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

\\
x + -0.5 \cdot b
\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. remove-double-neg99.9%

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

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

      \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(-\left(a - 0.5\right) \cdot \left(-b\right)\right) \]
    4. distribute-rgt-neg-in99.9%

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

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

      \[\leadsto \left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + \color{blue}{-0.5}\right) \cdot \left(-\left(-b\right)\right) \]
    7. remove-double-neg99.9%

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

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

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

    \[\leadsto x + \color{blue}{-0.5 \cdot b} \]
  6. Final simplification30.4%

    \[\leadsto x + -0.5 \cdot b \]

Developer target: 99.4% 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 2023290 
(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)))