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

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 2: 79.5% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(y + t\_2\right) - t\_1\\


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

    1. Initial program 99.9%

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

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

    if -2e-107 < (+.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. Add Preprocessing
    3. Taylor expanded in x around 0 79.4%

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

Alternative 3: 71.8% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in y around 0 80.3%

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

    if 1.99999999999999992e28 < (+.f64 x y)

    1. Initial program 100.0%

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

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

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

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

Alternative 4: 87.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+182}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(z - z \cdot \log t\right)\\

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 87.4%

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

    if -7.00000000000000045e182 < z < 3.1e203

    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. Add Preprocessing
    3. Taylor expanded in a around 0 100.0%

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

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

    if 3.1e203 < 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. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.1% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05000000000000007e183 < z < 2.15e204

    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. Add Preprocessing
    3. Taylor expanded in a around 0 100.0%

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

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

    if 2.15e204 < 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. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.50000000000000017e235 or 4.7999999999999999e204 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000017e235 < z < 4.7999999999999999e204

    1. Initial program 99.9%

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

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

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

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

Alternative 7: 86.6% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;y + t\_1\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.10000000000000003e182 < z < 2.90000000000000011e203

    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. Add Preprocessing
    3. Taylor expanded in a around 0 100.0%

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

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

    if 2.90000000000000011e203 < 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. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 84.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

    if -2.9000000000000001e236 < z < 9.0000000000000006e203

    1. Initial program 99.9%

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

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

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

    if 9.0000000000000006e203 < 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. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 84.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+235} \lor \neg \left(z \leq 1.7 \cdot 10^{+205}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.50000000000000017e235 or 1.7e205 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000017e235 < z < 1.7e205

    1. Initial program 99.9%

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

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

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

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

Alternative 10: 84.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

    if -1.09999999999999989e236 < z < 5.60000000000000049e204

    1. Initial program 99.9%

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

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

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

    if 5.60000000000000049e204 < 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. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 12: 62.0% accurate, 7.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -0.0012 \lor \neg \left(b \leq 1.55 \cdot 10^{+82}\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 -0.0012) (not (<= b 1.55e+82))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -0.0012) || !(b <= 1.55e+82)) {
		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 <= (-0.0012d0)) .or. (.not. (b <= 1.55d+82))) 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 <= -0.0012) || !(b <= 1.55e+82)) {
		tmp = b * (a - 0.5);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -0.0012) or not (b <= 1.55e+82):
		tmp = b * (a - 0.5)
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -0.0012) || !(b <= 1.55e+82))
		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 <= -0.0012) || ~((b <= 1.55e+82)))
		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, -0.0012], N[Not[LessEqual[b, 1.55e+82]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.0012 \lor \neg \left(b \leq 1.55 \cdot 10^{+82}\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 < -0.00119999999999999989 or 1.55000000000000016e82 < 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. Add Preprocessing
    3. Taylor expanded in a around 0 99.9%

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left(a - 0.5\right)\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg64.9%

        \[\leadsto -1 \cdot \color{blue}{\left(-b \cdot \left(a - 0.5\right)\right)} \]
      2. sub-neg64.9%

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

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

        \[\leadsto -1 \cdot \left(-b \cdot \color{blue}{\left(-0.5 + a\right)}\right) \]
      5. distribute-lft-out64.9%

        \[\leadsto -1 \cdot \left(-\color{blue}{\left(b \cdot -0.5 + b \cdot a\right)}\right) \]
      6. +-commutative64.9%

        \[\leadsto -1 \cdot \left(-\color{blue}{\left(b \cdot a + b \cdot -0.5\right)}\right) \]
      7. distribute-lft-in64.9%

        \[\leadsto -1 \cdot \left(-\color{blue}{b \cdot \left(a + -0.5\right)}\right) \]
      8. distribute-rgt-neg-in64.9%

        \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\left(a + -0.5\right)\right)\right)} \]
      9. +-commutative64.9%

        \[\leadsto -1 \cdot \left(b \cdot \left(-\color{blue}{\left(-0.5 + a\right)}\right)\right) \]
      10. distribute-neg-in64.9%

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(\left(--0.5\right) + \left(-a\right)\right)}\right) \]
      11. metadata-eval64.9%

        \[\leadsto -1 \cdot \left(b \cdot \left(\color{blue}{0.5} + \left(-a\right)\right)\right) \]
      12. mul-1-neg64.9%

        \[\leadsto -1 \cdot \left(b \cdot \left(0.5 + \color{blue}{-1 \cdot a}\right)\right) \]
      13. mul-1-neg64.9%

        \[\leadsto -1 \cdot \left(b \cdot \left(0.5 + \color{blue}{\left(-a\right)}\right)\right) \]
      14. unsub-neg64.9%

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(0.5 - a\right)}\right) \]
    10. Simplified64.9%

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

    if -0.00119999999999999989 < b < 1.55000000000000016e82

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative63.7%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified63.7%

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

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

Alternative 13: 58.3% accurate, 8.2× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if -4.0000000000000002e-173 < (+.f64 x y)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 51.1% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+80} \lor \neg \left(b \leq 2.7 \cdot 10^{+100}\right):\\
\;\;\;\;b \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.99999999999999961e80 or 2.69999999999999998e100 < 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. Add Preprocessing
    3. Taylor expanded in a around 0 99.9%

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*44.4%

        \[\leadsto -1 \cdot \color{blue}{\left(\left(-1 \cdot a\right) \cdot b\right)} \]
      2. mul-1-neg44.4%

        \[\leadsto -1 \cdot \left(\color{blue}{\left(-a\right)} \cdot b\right) \]
    10. Simplified44.4%

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

    if -4.99999999999999961e80 < b < 2.69999999999999998e100

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative60.6%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified60.6%

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

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

Alternative 15: 61.8% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 7.00000000000000038e86 < 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. Add Preprocessing
    3. Taylor expanded in a around 0 100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative64.4%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified64.4%

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

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

Alternative 16: 78.3% accurate, 10.5× speedup?

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

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

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

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

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

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

Alternative 17: 78.3% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 18: 28.6% accurate, 19.1× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e87 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 41.7% accurate, 38.3× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x + y} \]
  8. Step-by-step derivation
    1. +-commutative45.1%

      \[\leadsto \color{blue}{y + x} \]
  9. Simplified45.1%

    \[\leadsto \color{blue}{y + x} \]
  10. Final simplification45.1%

    \[\leadsto x + y \]
  11. Add Preprocessing

Alternative 20: 22.0% 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. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  7. Add Preprocessing

Developer Target 1: 99.6% accurate, 0.4× speedup?

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

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

Reproduce

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

  :alt
  (! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))

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