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

Percentage Accurate: 99.8% → 99.8%
Time: 13.1s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+126} \lor \neg \left(z \leq 1.25 \cdot 10^{+140}\right):\\
\;\;\;\;\left(\left(x + z\right) + b \cdot \left(-0.5 + a\right)\right) - z \cdot \log t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.89999999999999986e126 or 1.25000000000000002e140 < z

    1. Initial program 99.6%

      \[\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. associate-+l-99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999986e126 < z < 1.25000000000000002e140

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y + b \cdot \left(a + \color{blue}{-0.5}\right)\right) \]
      3. distribute-rgt-in96.4%

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

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

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

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

Alternative 3: 88.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+177} \lor \neg \left(z \leq 1.3 \cdot 10^{+141}\right):\\
\;\;\;\;\left(z - b \cdot \left(0.5 - a\right)\right) - z \cdot \log t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e177 or 1.3e141 < z

    1. Initial program 99.6%

      \[\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. associate-+l-99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e177 < z < 1.3e141

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+193} \lor \neg \left(z \leq 8.8 \cdot 10^{+162}\right):\\
\;\;\;\;\left(x + z\right) - z \cdot \log t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.59999999999999972e193 or 8.8000000000000007e162 < z

    1. Initial program 99.6%

      \[\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. associate-+l-99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.59999999999999972e193 < z < 8.8000000000000007e162

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -7 \cdot 10^{+185}:\\
\;\;\;\;\left(x + \left(y + z\right)\right) - t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\left(x + z\right) - t\_1\\


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

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000046e185 < z < 8.8000000000000007e162

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.8000000000000007e162 < z

    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. associate-+l-99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+185}:\\ \;\;\;\;\left(x + \left(y + z\right)\right) - z \cdot \log t\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+162}:\\ \;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z\right) - z \cdot \log t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+194} \lor \neg \left(z \leq 1.18 \cdot 10^{+166}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.99999999999999978e194 or 1.17999999999999999e166 < z

    1. Initial program 99.6%

      \[\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. associate-+l-99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999978e194 < z < 1.17999999999999999e166

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+194} \lor \neg \left(z \leq 1.18 \cdot 10^{+166}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+194}:\\
\;\;\;\;z - z \cdot \log t\\

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\


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

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x + z\right) - z \cdot \log t} \]
    9. Taylor expanded in x around 0 66.6%

      \[\leadsto \color{blue}{z - z \cdot \log t} \]

    if -4.4999999999999998e194 < z < 1.41999999999999995e166

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.41999999999999995e166 < z

    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. associate-+l-99.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+194}:\\ \;\;\;\;z - z \cdot \log t\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{+166}:\\ \;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 9: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.0% accurate, 5.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 a 1/2) < -4.99999999999999957e28 or -0.5 < (-.f64 a 1/2)

    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. associate-+l-99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y + x\right)} + \left(--1 \cdot \left(a \cdot b\right)\right) \]
      3. mul-1-neg82.4%

        \[\leadsto \left(y + x\right) + \left(-\color{blue}{\left(-a \cdot b\right)}\right) \]
      4. remove-double-neg82.4%

        \[\leadsto \left(y + x\right) + \color{blue}{a \cdot b} \]
    10. Simplified82.4%

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

    if -4.99999999999999957e28 < (-.f64 a 1/2) < -0.5

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 67.0% accurate, 6.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.69999999999999983e64 or 4.7e9 < 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.69999999999999983e64 < b < 4.7e9

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z + x\right) + y} \]
    10. Simplified65.4%

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

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

Alternative 12: 67.4% accurate, 6.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.10000000000000024e64 or 4.7e8 < 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.10000000000000024e64 < b < 4.7e8

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.1 \cdot 10^{+64} \lor \neg \left(b \leq 470000000\right):\\ \;\;\;\;x - b \cdot \left(0.5 - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y + -0.5 \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.6% accurate, 7.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+64} \lor \neg \left(b \leq 1.55 \cdot 10^{+72}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.04999999999999989e64 or 1.54999999999999994e72 < 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.04999999999999989e64 < b < 1.54999999999999994e72

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{x + \left(\left(y + z\right) - \left(z \cdot \log t - \left(a + -0.5\right) \cdot b\right)\right)}}\right)}^{3} \]
      4. associate--r-98.2%

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

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

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

      \[\leadsto {\color{blue}{\left({\left(\left(x + \left(y + z\right)\right) - z \cdot \log t\right)}^{0.3333333333333333}\right)}}^{3} \]
    8. Step-by-step derivation
      1. unpow1/388.8%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{\left(x + \left(y + z\right)\right) - z \cdot \log t}\right)}}^{3} \]
      2. associate--l+88.8%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{x + \left(\left(y + z\right) - z \cdot \log t\right)}}\right)}^{3} \]
      3. +-commutative88.8%

        \[\leadsto {\left(\sqrt[3]{x + \left(\color{blue}{\left(z + y\right)} - z \cdot \log t\right)}\right)}^{3} \]
      4. associate-+r-88.8%

        \[\leadsto {\left(\sqrt[3]{x + \color{blue}{\left(z + \left(y - z \cdot \log t\right)\right)}}\right)}^{3} \]
    9. Simplified88.8%

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(x + y\right)} \]
    11. Step-by-step derivation
      1. pow-base-163.1%

        \[\leadsto \color{blue}{1} \cdot \left(x + y\right) \]
      2. *-lft-identity63.1%

        \[\leadsto \color{blue}{x + y} \]
    12. Simplified63.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.05 \cdot 10^{+64} \lor \neg \left(b \leq 1.55 \cdot 10^{+72}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 62.4% accurate, 7.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{+64} \lor \neg \left(b \leq 1.66 \cdot 10^{+69}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.5e64 or 1.66000000000000008e69 < 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e64 < b < 1.66000000000000008e69

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z + x\right) + y} \]
    10. Simplified64.1%

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

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

Alternative 15: 51.4% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+65} \lor \neg \left(b \leq 1.8 \cdot 10^{+78}\right):\\
\;\;\;\;b \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.2000000000000001e65 or 1.8000000000000001e78 < 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified45.5%

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

    if -1.2000000000000001e65 < b < 1.8000000000000001e78

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{x + \left(\left(y + z\right) - \left(z \cdot \log t - \left(a + -0.5\right) \cdot b\right)\right)}}\right)}^{3} \]
      4. associate--r-98.2%

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

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

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

      \[\leadsto {\color{blue}{\left({\left(\left(x + \left(y + z\right)\right) - z \cdot \log t\right)}^{0.3333333333333333}\right)}}^{3} \]
    8. Step-by-step derivation
      1. unpow1/388.3%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{\left(x + \left(y + z\right)\right) - z \cdot \log t}\right)}}^{3} \]
      2. associate--l+88.2%

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

        \[\leadsto {\left(\sqrt[3]{x + \left(\color{blue}{\left(z + y\right)} - z \cdot \log t\right)}\right)}^{3} \]
      4. associate-+r-88.2%

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

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

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(x + y\right)} \]
    11. Step-by-step derivation
      1. pow-base-162.9%

        \[\leadsto \color{blue}{1} \cdot \left(x + y\right) \]
      2. *-lft-identity62.9%

        \[\leadsto \color{blue}{x + y} \]
    12. Simplified62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{+65} \lor \neg \left(b \leq 1.8 \cdot 10^{+78}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 29.2% accurate, 8.8× speedup?

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

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

\mathbf{elif}\;x \leq 1.85 \cdot 10^{-266}:\\
\;\;\;\;b \cdot a\\

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


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

    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. associate-+l-99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e109 < x < 1.8500000000000001e-266

    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. associate-+l-99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified40.5%

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

    if 1.8500000000000001e-266 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-266}:\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 78.1% accurate, 10.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 78.1% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 28.3% accurate, 19.1× speedup?

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

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

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


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

    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. associate-+l-99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2500000000000001e68 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 21.4% accurate, 115.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.4% accurate, 0.4× speedup?

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

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

Reproduce

?
herbie shell --seed 2024034 
(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)))