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

Percentage Accurate: 99.8% → 99.9%
Time: 12.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (* z (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
	return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b)
	return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y)))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

Alternative 2: 84.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ t_2 := x + \left(z - z \cdot \log t\right)\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+160}:\\ \;\;\;\;z \cdot \left(1 - \log t\right) + y\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+227}:\\ \;\;\;\;z \cdot \left(\left(1 + \frac{y}{z}\right) - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* b (- a 0.5)) (+ x y))) (t_2 (+ x (- z (* z (log t))))))
   (if (<= z -5.6e+158)
     t_2
     (if (<= z 2.3e+88)
       t_1
       (if (<= z 4.4e+160)
         (+ (* z (- 1.0 (log t))) y)
         (if (<= z 2.1e+194)
           t_1
           (if (<= z 1.12e+227) (* z (- (+ 1.0 (/ y z)) (log t))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (b * (a - 0.5)) + (x + y);
	double t_2 = x + (z - (z * log(t)));
	double tmp;
	if (z <= -5.6e+158) {
		tmp = t_2;
	} else if (z <= 2.3e+88) {
		tmp = t_1;
	} else if (z <= 4.4e+160) {
		tmp = (z * (1.0 - log(t))) + y;
	} else if (z <= 2.1e+194) {
		tmp = t_1;
	} else if (z <= 1.12e+227) {
		tmp = z * ((1.0 + (y / z)) - log(t));
	} else {
		tmp = t_2;
	}
	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 = (b * (a - 0.5d0)) + (x + y)
    t_2 = x + (z - (z * log(t)))
    if (z <= (-5.6d+158)) then
        tmp = t_2
    else if (z <= 2.3d+88) then
        tmp = t_1
    else if (z <= 4.4d+160) then
        tmp = (z * (1.0d0 - log(t))) + y
    else if (z <= 2.1d+194) then
        tmp = t_1
    else if (z <= 1.12d+227) then
        tmp = z * ((1.0d0 + (y / z)) - log(t))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (b * (a - 0.5)) + (x + y);
	double t_2 = x + (z - (z * Math.log(t)));
	double tmp;
	if (z <= -5.6e+158) {
		tmp = t_2;
	} else if (z <= 2.3e+88) {
		tmp = t_1;
	} else if (z <= 4.4e+160) {
		tmp = (z * (1.0 - Math.log(t))) + y;
	} else if (z <= 2.1e+194) {
		tmp = t_1;
	} else if (z <= 1.12e+227) {
		tmp = z * ((1.0 + (y / z)) - Math.log(t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (b * (a - 0.5)) + (x + y)
	t_2 = x + (z - (z * math.log(t)))
	tmp = 0
	if z <= -5.6e+158:
		tmp = t_2
	elif z <= 2.3e+88:
		tmp = t_1
	elif z <= 4.4e+160:
		tmp = (z * (1.0 - math.log(t))) + y
	elif z <= 2.1e+194:
		tmp = t_1
	elif z <= 1.12e+227:
		tmp = z * ((1.0 + (y / z)) - math.log(t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y))
	t_2 = Float64(x + Float64(z - Float64(z * log(t))))
	tmp = 0.0
	if (z <= -5.6e+158)
		tmp = t_2;
	elseif (z <= 2.3e+88)
		tmp = t_1;
	elseif (z <= 4.4e+160)
		tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y);
	elseif (z <= 2.1e+194)
		tmp = t_1;
	elseif (z <= 1.12e+227)
		tmp = Float64(z * Float64(Float64(1.0 + Float64(y / z)) - log(t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (b * (a - 0.5)) + (x + y);
	t_2 = x + (z - (z * log(t)));
	tmp = 0.0;
	if (z <= -5.6e+158)
		tmp = t_2;
	elseif (z <= 2.3e+88)
		tmp = t_1;
	elseif (z <= 4.4e+160)
		tmp = (z * (1.0 - log(t))) + y;
	elseif (z <= 2.1e+194)
		tmp = t_1;
	elseif (z <= 1.12e+227)
		tmp = z * ((1.0 + (y / z)) - log(t));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+158], t$95$2, If[LessEqual[z, 2.3e+88], t$95$1, If[LessEqual[z, 4.4e+160], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 2.1e+194], t$95$1, If[LessEqual[z, 1.12e+227], N[(z * N[(N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision] - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+160}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+227}:\\
\;\;\;\;z \cdot \left(\left(1 + \frac{y}{z}\right) - \log t\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.60000000000000003e158 or 1.1200000000000001e227 < z

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \left(\frac{x}{y} + \left(\frac{z}{y} + \frac{b \cdot \left(a - 0.5\right)}{y}\right)\right)\right) - \frac{z \cdot \log t}{y}\right)} \]
    4. Step-by-step derivation
      1. associate--l+60.9%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(1 + \left(\color{blue}{\mathsf{fma}\left(b, \frac{a + -0.5}{y}, \frac{z}{y}\right)} + \left(\frac{x}{y} - \frac{z \cdot \log t}{y}\right)\right)\right) \]
      9. associate-/l*60.6%

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

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

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

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

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

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

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

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

    if -5.60000000000000003e158 < z < 2.3000000000000002e88 or 4.39999999999999984e160 < z < 2.10000000000000016e194

    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 0 93.3%

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

    if 2.3000000000000002e88 < z < 4.39999999999999984e160

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\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 b around 0 73.4%

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

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

    if 2.10000000000000016e194 < z < 1.1200000000000001e227

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 99.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+158}:\\ \;\;\;\;x + \left(z - z \cdot \log t\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+88}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+160}:\\ \;\;\;\;z \cdot \left(1 - \log t\right) + y\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+194}:\\ \;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+227}:\\ \;\;\;\;z \cdot \left(\left(1 + \frac{y}{z}\right) - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - z \cdot \log t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 91.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+50} \lor \neg \left(z \leq 6.5 \cdot 10^{+76}\right):\\
\;\;\;\;x + \left(\left(z + \left(a + -0.5\right) \cdot b\right) - z \cdot \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e50 or 6.5000000000000005e76 < 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. Add Preprocessing
    3. Taylor expanded in y around inf 69.9%

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \left(\frac{x}{y} + \left(\frac{z}{y} + \frac{b \cdot \left(a - 0.5\right)}{y}\right)\right)\right) - \frac{z \cdot \log t}{y}\right)} \]
    4. Step-by-step derivation
      1. associate--l+69.9%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(1 + \left(\color{blue}{\mathsf{fma}\left(b, \frac{a + -0.5}{y}, \frac{z}{y}\right)} + \left(\frac{x}{y} - \frac{z \cdot \log t}{y}\right)\right)\right) \]
      9. associate-/l*69.7%

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

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

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

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

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

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

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

    if -1.65e50 < z < 6.5000000000000005e76

    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 z around 0 98.7%

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

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

Alternative 4: 87.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+101}:\\
\;\;\;\;t\_1 + \left(x + y\right)\\

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

      \[\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 80.5%

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

    if -9.2000000000000002e51 < z < 9.0000000000000004e101

    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 z around 0 96.8%

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

    if 9.0000000000000004e101 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.1%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+51} \lor \neg \left(z \leq 1.25 \cdot 10^{+83}\right):\\
\;\;\;\;x + \left(z \cdot \left(1 - \log t\right) + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.4999999999999999e51 or 1.25000000000000007e83 < 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.7%

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

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

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

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

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

      \[\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 79.4%

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

    if -9.4999999999999999e51 < z < 1.25000000000000007e83

    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 z around 0 98.7%

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

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

Alternative 6: 85.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+159} \lor \neg \left(z \leq 3.5 \cdot 10^{+147}\right):\\
\;\;\;\;x + \left(z - z \cdot \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45000000000000007e159 or 3.49999999999999975e147 < z

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \left(\frac{x}{y} + \left(\frac{z}{y} + \frac{b \cdot \left(a - 0.5\right)}{y}\right)\right)\right) - \frac{z \cdot \log t}{y}\right)} \]
    4. Step-by-step derivation
      1. associate--l+64.7%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(1 + \left(\color{blue}{\mathsf{fma}\left(b, \frac{a + -0.5}{y}, \frac{z}{y}\right)} + \left(\frac{x}{y} - \frac{z \cdot \log t}{y}\right)\right)\right) \]
      9. associate-/l*64.5%

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

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

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

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

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

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

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

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

    if -1.45000000000000007e159 < z < 3.49999999999999975e147

    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 0 91.6%

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

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

Alternative 7: 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.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. Final simplification99.8%

    \[\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 8: 29.4% accurate, 5.0× speedup?

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

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

\mathbf{elif}\;x \leq -2.35 \cdot 10^{-54} \lor \neg \left(x \leq -7.3 \cdot 10^{-84}\right) \land x \leq 2.2 \cdot 10^{-307}:\\
\;\;\;\;a \cdot b\\

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


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

    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 65.7%

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

    if -1.79999999999999997e162 < x < -2.35e-54 or -7.3000000000000004e-84 < x < 2.2e-307

    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 a around inf 31.5%

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

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

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

    if -2.35e-54 < x < -7.3000000000000004e-84 or 2.2e-307 < x

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+162}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{-54} \lor \neg \left(x \leq -7.3 \cdot 10^{-84}\right) \land x \leq 2.2 \cdot 10^{-307}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.0% accurate, 7.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+132} \lor \neg \left(b \leq 16000\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 < -8.49999999999999969e132 or 16000 < b

    1. Initial program 99.9%

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

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

    if -8.49999999999999969e132 < b < 16000

    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 b around 0 82.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified48.7%

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

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

Alternative 10: 51.9% accurate, 8.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.80000000000000015e101 or 3.70000000000000004e112 < a

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    7. Simplified61.9%

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

    if -1.80000000000000015e101 < a < 3.70000000000000004e112

    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 b around 0 78.5%

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified48.7%

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

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

Alternative 11: 64.4% accurate, 9.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.02e15 < 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. Step-by-step derivation
      1. add-cube-cbrt98.0%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.6% accurate, 9.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 5.59999999999999999e26 < 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 y around inf 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(1 + \left(\color{blue}{\mathsf{fma}\left(b, \frac{a + -0.5}{y}, \frac{z}{y}\right)} + \left(\frac{x}{y} - \frac{z \cdot \log t}{y}\right)\right)\right) \]
      9. associate-/l*99.8%

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

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

      \[\leadsto y \cdot \left(1 + \color{blue}{\frac{a \cdot b}{y}}\right) \]
    7. Step-by-step derivation
      1. associate-/l*65.5%

        \[\leadsto y \cdot \left(1 + \color{blue}{a \cdot \frac{b}{y}}\right) \]
    8. Simplified65.5%

      \[\leadsto y \cdot \left(1 + \color{blue}{a \cdot \frac{b}{y}}\right) \]
    9. Taylor expanded in y around 0 65.5%

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

        \[\leadsto y + \color{blue}{b \cdot a} \]
    11. Simplified65.5%

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

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

Alternative 13: 52.3% accurate, 11.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+163}:\\
\;\;\;\;x + y\\

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


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

    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 b around 0 90.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified76.7%

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

    if -2.5e163 < x

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{y \cdot \left(\left(1 + \left(\frac{x}{y} + \left(\frac{z}{y} + \frac{b \cdot \left(a - 0.5\right)}{y}\right)\right)\right) - \frac{z \cdot \log t}{y}\right)} \]
    4. Step-by-step derivation
      1. associate--l+78.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(1 + \left(\color{blue}{\mathsf{fma}\left(b, \frac{a + -0.5}{y}, \frac{z}{y}\right)} + \left(\frac{x}{y} - \frac{z \cdot \log t}{y}\right)\right)\right) \]
      9. associate-/l*73.8%

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

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

      \[\leadsto y \cdot \left(1 + \color{blue}{\frac{a \cdot b}{y}}\right) \]
    7. Step-by-step derivation
      1. associate-/l*48.4%

        \[\leadsto y \cdot \left(1 + \color{blue}{a \cdot \frac{b}{y}}\right) \]
    8. Simplified48.4%

      \[\leadsto y \cdot \left(1 + \color{blue}{a \cdot \frac{b}{y}}\right) \]
    9. Taylor expanded in y around 0 52.4%

      \[\leadsto \color{blue}{y + a \cdot b} \]
    10. Step-by-step derivation
      1. *-commutative52.4%

        \[\leadsto y + \color{blue}{b \cdot a} \]
    11. Simplified52.4%

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

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

Alternative 14: 79.1% accurate, 12.8× speedup?

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

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

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

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

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

Alternative 15: 27.9% accurate, 19.1× speedup?

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

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

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


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

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

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

    if 2.1e15 < y

    1. Initial program 99.8%

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

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

Alternative 16: 21.4% accurate, 115.0× speedup?

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

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

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

Developer target: 99.5% accurate, 0.4× speedup?

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

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

Reproduce

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

  :alt
  (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))

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