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

Percentage Accurate: 99.8% → 99.9%
Time: 16.8s
Alternatives: 19
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 19 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.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999998e30 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+184} \lor \neg \left(z \leq 9.5 \cdot 10^{+174}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.0999999999999998e184 or 9.4999999999999992e174 < 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. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

    if -3.0999999999999998e184 < z < 9.4999999999999992e174

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.8% accurate, 1.0× speedup?

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

\\
y + \left(\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\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.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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+131} \lor \neg \left(z \leq 6 \cdot 10^{+209}\right):\\
\;\;\;\;x + \left(y + z \cdot \left(1 - \log t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.1000000000000004e131 or 5.99999999999999971e209 < 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. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

    if -5.1000000000000004e131 < z < 5.99999999999999971e209

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 87.4% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8000000000000002e131 < z < 4.69999999999999972e194

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999972e194 < z

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(z + -0.5 \cdot b\right) - z \cdot \log t} \]
    7. Step-by-step derivation
      1. log-pow6.2%

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

        \[\leadsto \color{blue}{z + \left(-0.5 \cdot b - \log \left({t}^{z}\right)\right)} \]
      3. *-commutative6.2%

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

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

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

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

Alternative 7: 86.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+194} \lor \neg \left(z \leq 4.9 \cdot 10^{+210}\right):\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8e194 or 4.90000000000000007e210 < 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.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e194 < z < 4.90000000000000007e210

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 85.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+241} \lor \neg \left(z \leq 1.95 \cdot 10^{+210}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.69999999999999982e241 or 1.95e210 < z

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + z \cdot \left(1 - \log t\right)} \]
    7. Step-by-step derivation
      1. +-commutative75.9%

        \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right) + x} \]
    8. Simplified75.9%

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

    if -4.69999999999999982e241 < z < 1.95e210

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 84.7% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.49999999999999993e241 or 2.5999999999999998e211 < z

    1. Initial program 99.5%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. 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. +-commutative99.4%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in99.5%

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999993e241 < z < 2.5999999999999998e211

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.9% accurate, 8.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+68} \lor \neg \left(b \leq 3.4 \cdot 10^{-58}\right) \land \left(b \leq 8 \cdot 10^{-11} \lor \neg \left(b \leq 3.4 \cdot 10^{+92}\right)\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 -3.5e+68)
         (and (not (<= b 3.4e-58)) (or (<= b 8e-11) (not (<= b 3.4e+92)))))
   (* b (- a 0.5))
   (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92)))) {
		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 <= (-3.5d+68)) .or. (.not. (b <= 3.4d-58)) .and. (b <= 8d-11) .or. (.not. (b <= 3.4d+92))) 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 <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92)))) {
		tmp = b * (a - 0.5);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -3.5e+68) or (not (b <= 3.4e-58) and ((b <= 8e-11) or not (b <= 3.4e+92))):
		tmp = b * (a - 0.5)
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92))))
		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 <= -3.5e+68) || (~((b <= 3.4e-58)) && ((b <= 8e-11) || ~((b <= 3.4e+92)))))
		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, -3.5e+68], And[N[Not[LessEqual[b, 3.4e-58]], $MachinePrecision], Or[LessEqual[b, 8e-11], N[Not[LessEqual[b, 3.4e+92]], $MachinePrecision]]]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+68} \lor \neg \left(b \leq 3.4 \cdot 10^{-58}\right) \land \left(b \leq 8 \cdot 10^{-11} \lor \neg \left(b \leq 3.4 \cdot 10^{+92}\right)\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 < -3.49999999999999977e68 or 3.39999999999999973e-58 < b < 7.99999999999999952e-11 or 3.3999999999999998e92 < b

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999977e68 < b < 3.39999999999999973e-58 or 7.99999999999999952e-11 < b < 3.3999999999999998e92

    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.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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+68} \lor \neg \left(b \leq 3.4 \cdot 10^{-58}\right) \land \left(b \leq 8 \cdot 10^{-11} \lor \neg \left(b \leq 3.4 \cdot 10^{+92}\right)\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 59.3% accurate, 8.7× speedup?

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

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

\mathbf{elif}\;b \leq 5.4 \cdot 10^{-59}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;b \leq 1.12 \cdot 10^{+144}:\\
\;\;\;\;y + a \cdot b\\

\mathbf{elif}\;b \leq 1.45 \cdot 10^{+253}:\\
\;\;\;\;x + -0.5 \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.0999999999999998e68 or 1.44999999999999994e253 < b

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.0999999999999998e68 < b < 5.3999999999999998e-59

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.3999999999999998e-59 < b < 1.11999999999999999e144

    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. +-commutative100.0%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{b \cdot a} \]
    6. Simplified61.6%

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

    if 1.11999999999999999e144 < b < 1.44999999999999994e253

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-0.5 \cdot b} \]
    7. Step-by-step derivation
      1. *-commutative62.8%

        \[\leadsto x + \color{blue}{b \cdot -0.5} \]
    8. Simplified62.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+68}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{-59}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{+144}:\\ \;\;\;\;y + a \cdot b\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{+253}:\\ \;\;\;\;x + -0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 12: 64.5% accurate, 10.4× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{b \cdot \left(a + -0.5\right)} \]
      2. distribute-lft-in62.0%

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

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

    if 7.0000000000000004e23 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.9% accurate, 12.7× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999998e37 < y

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

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

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

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

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

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

      \[\leadsto y + \color{blue}{a \cdot b} \]
    5. Step-by-step derivation
      1. *-commutative66.2%

        \[\leadsto y + \color{blue}{b \cdot a} \]
    6. Simplified66.2%

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

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

Alternative 14: 64.5% accurate, 12.7× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e23 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 78.9% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 29.7% accurate, 16.1× speedup?

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

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+80}:\\
\;\;\;\;a \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 5.7600000000000003e-198

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.7600000000000003e-198 < y < 7.59999999999999995e80

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified33.0%

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

    if 7.59999999999999995e80 < y

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.76 \cdot 10^{-198}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+80}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 17: 51.7% accurate, 16.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+141}:\\
\;\;\;\;a \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.0499999999999999e141 or 4.4999999999999999e92 < b

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified41.2%

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

    if -1.0499999999999999e141 < b < 4.4999999999999999e92

    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.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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+141}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+92}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 18: 28.7% accurate, 37.6× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6499999999999999e24 < y

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \color{blue}{\mathsf{fma}\left(z, \log t, -\left(a - 0.5\right) \cdot b\right)}\right) \]
      6. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto y + \left(\left(x + z\right) - \mathsf{fma}\left(z, \log t, b \cdot \left(-\color{blue}{\left(\left(-0.5\right) + a\right)}\right)\right)\right) \]
      10. distribute-neg-in100.0%

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

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

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

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

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

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

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

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

Alternative 19: 22.3% 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. remove-double-neg99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]

Developer target: 99.5% accurate, 0.4× speedup?

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

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

Reproduce

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