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

Percentage Accurate: 99.8% → 99.8%
Time: 17.1s
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.8% 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.8% accurate, 1.0× speedup?

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

\\
\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(b \cdot a + b \cdot -0.5\right)
\end{array}
Derivation
  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.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. Step-by-step derivation
    1. *-commutative99.9%

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

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

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

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

Alternative 2: 90.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+61} \lor \neg \left(a \leq 1.4 \cdot 10^{+95}\right):\\
\;\;\;\;b \cdot a + \left(\left(x + y\right) + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.00000000000000036e61 or 1.3999999999999999e95 < a

    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.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. Step-by-step derivation
      1. add-cube-cbrt99.6%

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

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

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

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

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

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

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

    if -7.00000000000000036e61 < a < 1.3999999999999999e95

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

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

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

Alternative 3: 99.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1500000000000001e29 or 2.39999999999999979e-7 < a

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

      \[\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. *-commutative80.6%

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

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

    if -2.1500000000000001e29 < a < 2.39999999999999979e-7

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

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

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

Alternative 4: 99.9% accurate, 1.0× speedup?

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

\\
\left(\left(x + y\right) + z \cdot \left(1 - \log t\right)\right) + b \cdot \left(a + -0.5\right)
\end{array}
Derivation
  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.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}{\left(1 - \log t\right) \cdot z}\right) + \left(a + -0.5\right) \cdot b \]
  5. Final simplification99.9%

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

Alternative 5: 87.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 3 \cdot 10^{+17}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.7000000000000001e43

    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+100.0%

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000001e43 < b < 3e17

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

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

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

    if 3e17 < b

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

Alternative 6: 81.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + y\right) + z\\
t_2 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+186}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+192}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8000000000000001e186 or 3.40000000000000011e165 < z < 3.7999999999999999e192

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

      \[\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 0 86.4%

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

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

    if -1.8000000000000001e186 < z < 3.40000000000000011e165

    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. Step-by-step derivation
      1. add-cube-cbrt99.7%

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

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

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

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

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

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

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

    if 3.7999999999999999e192 < 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. Step-by-step derivation
      1. add-cube-cbrt99.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+165}:\\ \;\;\;\;\left(b \cdot a + b \cdot -0.5\right) + \left(\left(x + y\right) + z\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+192}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a + -0.5\right) + \left(\left(x + y\right) + z\right)\\ \end{array} \]

Alternative 7: 78.6% accurate, 8.8× speedup?

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

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

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


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

    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.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. Step-by-step derivation
      1. add-cube-cbrt99.6%

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

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

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

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

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

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

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

    if -0.40000000000000002 < a < 9.2e13

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

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

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

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

Alternative 8: 79.6% accurate, 8.8× speedup?

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

\\
\left(b \cdot a + b \cdot -0.5\right) + \left(\left(x + y\right) + z\right)
\end{array}
Derivation
  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.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. Step-by-step derivation
    1. add-cube-cbrt99.5%

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

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

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

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

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

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

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

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

Alternative 9: 79.6% accurate, 10.5× speedup?

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

\\
b \cdot \left(a + -0.5\right) + \left(\left(x + y\right) + z\right)
\end{array}
Derivation
  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.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. Step-by-step derivation
    1. add-cube-cbrt99.5%

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

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

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

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

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

Alternative 10: 49.5% accurate, 12.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+130} \lor \neg \left(b \leq 1.25 \cdot 10^{+125}\right):\\
\;\;\;\;x + b \cdot -0.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.0000000000000005e130 or 1.24999999999999991e125 < 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. 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+100.0%

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

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

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

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

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

      \[\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 0 59.3%

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

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

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

    if -8.0000000000000005e130 < b < 1.24999999999999991e125

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

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

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

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

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

Alternative 11: 47.5% accurate, 16.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+134}:\\
\;\;\;\;b \cdot -0.5\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.35e134 or 4.50000000000000017e183 < b

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Step-by-step derivation
      1. 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 0 57.3%

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

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

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

    if -1.35e134 < b < 4.50000000000000017e183

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{+134}:\\ \;\;\;\;b \cdot -0.5\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+183}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;b \cdot -0.5\\ \end{array} \]

Alternative 12: 40.7% accurate, 16.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+77}:\\
\;\;\;\;x + b \cdot -0.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6000000000000002e77

    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+100.0%

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

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

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

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

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

      \[\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 0 77.9%

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

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

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

    if -2.6000000000000002e77 < x

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+77}:\\ \;\;\;\;x + b \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;y + b \cdot -0.5\\ \end{array} \]

Alternative 13: 54.6% accurate, 16.4× speedup?

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

\\
\left(x + y\right) + b \cdot -0.5
\end{array}
Derivation
  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.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 0 80.2%

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

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

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

Alternative 14: 28.8% accurate, 37.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.7999999999999999e77

    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+100.0%

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

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

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

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

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

      \[\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 0 77.9%

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

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

    if -1.7999999999999999e77 < x

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

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

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

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

Alternative 15: 21.9% accurate, 115.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 99.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.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 0 80.2%

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification23.4%

    \[\leadsto x \]

Developer target: 99.5% 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 2023274 
(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)))