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

Percentage Accurate: 99.9% → 99.9%
Time: 13.4s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.9% 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 \log \left(\frac{e}{t}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (* z (log (/ E t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
	return (z * log((((double) M_E) / t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b)
	return Float64(Float64(z * log(Float64(exp(1) / t))) + fma(Float64(a + -0.5), b, Float64(x + y)))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[Log[N[(E / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

      \[\leadsto z \cdot \log \left(\frac{e^{1}}{\color{blue}{t}}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \]
  6. Applied egg-rr99.9%

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

    \[\leadsto z \cdot \log \left(\frac{e}{t}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \]
  8. Add Preprocessing

Alternative 2: 99.9% accurate, 0.5× speedup?

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

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

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

    \[\leadsto \mathsf{fma}\left(a + -0.5, b, x + y\right) + z \cdot \left(1 - \log t\right) \]
  6. Add Preprocessing

Alternative 3: 88.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 -1.7 \cdot 10^{+168}:\\ \;\;\;\;\left(x + y\right) + t\_2\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+162}:\\ \;\;\;\;\left(x + y\right) + t\_1\\ \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 -1.7e+168)
     (+ (+ x y) t_2)
     (if (<= z 6.6e+162) (+ (+ x y) t_1) (+ 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 <= -1.7e+168) {
		tmp = (x + y) + t_2;
	} else if (z <= 6.6e+162) {
		tmp = (x + y) + t_1;
	} 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 <= (-1.7d+168)) then
        tmp = (x + y) + t_2
    else if (z <= 6.6d+162) then
        tmp = (x + y) + t_1
    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 <= -1.7e+168) {
		tmp = (x + y) + t_2;
	} else if (z <= 6.6e+162) {
		tmp = (x + y) + t_1;
	} 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 <= -1.7e+168:
		tmp = (x + y) + t_2
	elif z <= 6.6e+162:
		tmp = (x + y) + t_1
	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 <= -1.7e+168)
		tmp = Float64(Float64(x + y) + t_2);
	elseif (z <= 6.6e+162)
		tmp = Float64(Float64(x + y) + t_1);
	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 <= -1.7e+168)
		tmp = (x + y) + t_2;
	elseif (z <= 6.6e+162)
		tmp = (x + y) + t_1;
	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, -1.7e+168], N[(N[(x + y), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[z, 6.6e+162], N[(N[(x + y), $MachinePrecision] + t$95$1), $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 -1.7 \cdot 10^{+168}:\\
\;\;\;\;\left(x + y\right) + t\_2\\

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

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


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

    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.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-def99.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 86.2%

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

    if -1.70000000000000001e168 < z < 6.59999999999999975e162

    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. Step-by-step derivation
      1. add-cbrt-cube42.5%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr42.5%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 94.5%

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

    if 6.59999999999999975e162 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(--1\right) \cdot z - \color{blue}{\log t \cdot z}\right) + \left(\left(a - 0.5\right) \cdot b + \left(x + y\right)\right) \]
      8. distribute-rgt-out--99.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-def99.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 99.9%

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

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

Alternative 4: 83.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;x + y \leq 10^{+121}:\\ \;\;\;\;\left(x + \left(z + t\_1\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))))
   (if (<= (+ x y) 1e+121) (- (+ x (+ z t_1)) (* z (log t))) (+ (+ x 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 ((x + y) <= 1e+121) {
		tmp = (x + (z + t_1)) - (z * log(t));
	} else {
		tmp = (x + y) + t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a - 0.5d0)
    if ((x + y) <= 1d+121) then
        tmp = (x + (z + t_1)) - (z * log(t))
    else
        tmp = (x + y) + t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double tmp;
	if ((x + y) <= 1e+121) {
		tmp = (x + (z + t_1)) - (z * Math.log(t));
	} else {
		tmp = (x + y) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	tmp = 0
	if (x + y) <= 1e+121:
		tmp = (x + (z + t_1)) - (z * math.log(t))
	else:
		tmp = (x + 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 (Float64(x + y) <= 1e+121)
		tmp = Float64(Float64(x + Float64(z + t_1)) - Float64(z * log(t)));
	else
		tmp = Float64(Float64(x + 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 ((x + y) <= 1e+121)
		tmp = (x + (z + t_1)) - (z * log(t));
	else
		tmp = (x + 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[N[(x + y), $MachinePrecision], 1e+121], N[(N[(x + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 99.9%

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

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

    if 1.00000000000000004e121 < (+.f64 x y)

    1. Initial program 99.9%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube9.5%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr9.5%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 90.4%

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

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

Alternative 5: 79.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

    if -9.99999999999999982e-200 < (+.f64 x y)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

Alternative 6: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+168}:\\ \;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+173}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right) + -0.5 \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -3e+168)
   (+ (* z (log (/ E t))) y)
   (if (<= z 5.5e+173)
     (+ (+ x y) (* b (- a 0.5)))
     (+ (* z (- 1.0 (log t))) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -3e+168) {
		tmp = (z * log((((double) M_E) / t))) + y;
	} else if (z <= 5.5e+173) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = (z * (1.0 - log(t))) + (-0.5 * b);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -3e+168) {
		tmp = (z * Math.log((Math.E / t))) + y;
	} else if (z <= 5.5e+173) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = (z * (1.0 - Math.log(t))) + (-0.5 * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -3e+168:
		tmp = (z * math.log((math.e / t))) + y
	elif z <= 5.5e+173:
		tmp = (x + y) + (b * (a - 0.5))
	else:
		tmp = (z * (1.0 - math.log(t))) + (-0.5 * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -3e+168)
		tmp = Float64(Float64(z * log(Float64(exp(1) / t))) + y);
	elseif (z <= 5.5e+173)
		tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5)));
	else
		tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(-0.5 * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -3e+168)
		tmp = (z * log((2.71828182845904523536 / t))) + y;
	elseif (z <= 5.5e+173)
		tmp = (x + y) + (b * (a - 0.5));
	else
		tmp = (z * (1.0 - log(t))) + (-0.5 * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3e+168], N[(N[(z * N[Log[N[(E / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 5.5e+173], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+168}:\\
\;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\

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

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


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

    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.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-def99.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. Step-by-step derivation
      1. add-log-exp99.8%

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

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

        \[\leadsto z \cdot \log \left(\frac{e^{1}}{\color{blue}{t}}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \]
    6. Applied egg-rr99.9%

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

      \[\leadsto z \cdot \log \left(\frac{e^{1}}{t}\right) + \color{blue}{y} \]
    8. Step-by-step derivation
      1. expm1-log1p-u70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e^{1}}{t}\right)\right)\right)} + y \]
      2. expm1-udef50.3%

        \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e^{1}}{t}\right)} - 1\right)} + y \]
      3. exp-1-e50.3%

        \[\leadsto z \cdot \log \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{e}}{t}\right)} - 1\right) + y \]
    9. Applied egg-rr50.3%

      \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e}{t}\right)} - 1\right)} + y \]
    10. Step-by-step derivation
      1. expm1-def70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e}{t}\right)\right)\right)} + y \]
      2. expm1-log1p70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\frac{e}{t}\right)} + y \]
    11. Simplified70.0%

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

    if -2.9999999999999998e168 < z < 5.50000000000000049e173

    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. Step-by-step derivation
      1. add-cbrt-cube42.2%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr42.2%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 93.6%

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

    if 5.50000000000000049e173 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{1} - \log t\right) + \left(\left(a - 0.5\right) \cdot b + \left(x + y\right)\right) \]
      10. fma-def99.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 inf 99.8%

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

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

        \[\leadsto y + \color{blue}{b \cdot -0.5} \]
    8. Simplified86.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+168}:\\ \;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+173}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right) + -0.5 \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+170}:\\ \;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+164}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right) + a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -2.25e+170)
   (+ (* z (log (/ E t))) y)
   (if (<= z 7e+164)
     (+ (+ x y) (* b (- a 0.5)))
     (+ (* z (- 1.0 (log t))) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.25e+170) {
		tmp = (z * log((((double) M_E) / t))) + y;
	} else if (z <= 7e+164) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = (z * (1.0 - log(t))) + (a * b);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.25e+170) {
		tmp = (z * Math.log((Math.E / t))) + y;
	} else if (z <= 7e+164) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = (z * (1.0 - Math.log(t))) + (a * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -2.25e+170:
		tmp = (z * math.log((math.e / t))) + y
	elif z <= 7e+164:
		tmp = (x + y) + (b * (a - 0.5))
	else:
		tmp = (z * (1.0 - math.log(t))) + (a * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -2.25e+170)
		tmp = Float64(Float64(z * log(Float64(exp(1) / t))) + y);
	elseif (z <= 7e+164)
		tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5)));
	else
		tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(a * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -2.25e+170)
		tmp = (z * log((2.71828182845904523536 / t))) + y;
	elseif (z <= 7e+164)
		tmp = (x + y) + (b * (a - 0.5));
	else
		tmp = (z * (1.0 - log(t))) + (a * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.25e+170], N[(N[(z * N[Log[N[(E / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 7e+164], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+170}:\\
\;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\

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

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


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

    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.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-def99.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. Step-by-step derivation
      1. add-log-exp99.8%

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

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

        \[\leadsto z \cdot \log \left(\frac{e^{1}}{\color{blue}{t}}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \]
    6. Applied egg-rr99.9%

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

      \[\leadsto z \cdot \log \left(\frac{e^{1}}{t}\right) + \color{blue}{y} \]
    8. Step-by-step derivation
      1. expm1-log1p-u70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e^{1}}{t}\right)\right)\right)} + y \]
      2. expm1-udef50.3%

        \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e^{1}}{t}\right)} - 1\right)} + y \]
      3. exp-1-e50.3%

        \[\leadsto z \cdot \log \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{e}}{t}\right)} - 1\right) + y \]
    9. Applied egg-rr50.3%

      \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e}{t}\right)} - 1\right)} + y \]
    10. Step-by-step derivation
      1. expm1-def70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e}{t}\right)\right)\right)} + y \]
      2. expm1-log1p70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\frac{e}{t}\right)} + y \]
    11. Simplified70.0%

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

    if -2.25000000000000011e170 < z < 6.9999999999999995e164

    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. Step-by-step derivation
      1. add-cbrt-cube42.5%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr42.5%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 94.5%

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

    if 6.9999999999999995e164 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(--1\right) \cdot z - \color{blue}{\log t \cdot z}\right) + \left(\left(a - 0.5\right) \cdot b + \left(x + y\right)\right) \]
      8. distribute-rgt-out--99.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-def99.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 93.6%

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

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

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

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

Alternative 8: 87.5% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot b\\


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

    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.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-def99.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 86.2%

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

    if -7.00000000000000038e169 < z < 6.1999999999999999e167

    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. Step-by-step derivation
      1. add-cbrt-cube42.5%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr42.5%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 94.5%

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

    if 6.1999999999999999e167 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(--1\right) \cdot z - \color{blue}{\log t \cdot z}\right) + \left(\left(a - 0.5\right) \cdot b + \left(x + y\right)\right) \]
      8. distribute-rgt-out--99.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-def99.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 93.6%

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

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

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

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

Alternative 9: 84.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+240} \lor \neg \left(z \leq 7.2 \cdot 10^{+175}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.09999999999999976e240 or 7.20000000000000067e175 < z

    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.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-def99.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 91.0%

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

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

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

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

    if -5.09999999999999976e240 < z < 7.20000000000000067e175

    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. Step-by-step derivation
      1. add-cbrt-cube39.3%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr39.3%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 90.3%

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

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

Alternative 10: 84.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+169}:\\ \;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+176}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -2.7e+169)
   (+ (* z (log (/ E t))) y)
   (if (<= z 1.25e+176) (+ (+ x y) (* b (- a 0.5))) (* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.7e+169) {
		tmp = (z * log((((double) M_E) / t))) + y;
	} else if (z <= 1.25e+176) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = z * (1.0 - log(t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.7e+169) {
		tmp = (z * Math.log((Math.E / t))) + y;
	} else if (z <= 1.25e+176) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = z * (1.0 - Math.log(t));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -2.7e+169:
		tmp = (z * math.log((math.e / t))) + y
	elif z <= 1.25e+176:
		tmp = (x + y) + (b * (a - 0.5))
	else:
		tmp = z * (1.0 - math.log(t))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -2.7e+169)
		tmp = Float64(Float64(z * log(Float64(exp(1) / t))) + y);
	elseif (z <= 1.25e+176)
		tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5)));
	else
		tmp = Float64(z * Float64(1.0 - log(t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -2.7e+169)
		tmp = (z * log((2.71828182845904523536 / t))) + y;
	elseif (z <= 1.25e+176)
		tmp = (x + y) + (b * (a - 0.5));
	else
		tmp = z * (1.0 - log(t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.7e+169], N[(N[(z * N[Log[N[(E / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 1.25e+176], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+169}:\\
\;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\

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

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


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

    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.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-def99.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. Step-by-step derivation
      1. add-log-exp99.8%

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

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

        \[\leadsto z \cdot \log \left(\frac{e^{1}}{\color{blue}{t}}\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right) \]
    6. Applied egg-rr99.9%

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

      \[\leadsto z \cdot \log \left(\frac{e^{1}}{t}\right) + \color{blue}{y} \]
    8. Step-by-step derivation
      1. expm1-log1p-u70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e^{1}}{t}\right)\right)\right)} + y \]
      2. expm1-udef50.3%

        \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e^{1}}{t}\right)} - 1\right)} + y \]
      3. exp-1-e50.3%

        \[\leadsto z \cdot \log \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{e}}{t}\right)} - 1\right) + y \]
    9. Applied egg-rr50.3%

      \[\leadsto z \cdot \log \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{e}{t}\right)} - 1\right)} + y \]
    10. Step-by-step derivation
      1. expm1-def70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e}{t}\right)\right)\right)} + y \]
      2. expm1-log1p70.0%

        \[\leadsto z \cdot \log \color{blue}{\left(\frac{e}{t}\right)} + y \]
    11. Simplified70.0%

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

    if -2.69999999999999991e169 < z < 1.25e176

    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. Step-by-step derivation
      1. add-cbrt-cube42.2%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr42.2%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 93.6%

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

    if 1.25e176 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{1} - \log t\right) + \left(\left(a - 0.5\right) \cdot b + \left(x + y\right)\right) \]
      10. fma-def99.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 92.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+169}:\\ \;\;\;\;z \cdot \log \left(\frac{e}{t}\right) + y\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+176}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 99.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 12: 62.1% accurate, 4.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+32} \lor \neg \left(b \leq 1.45 \cdot 10^{+57} \lor \neg \left(b \leq 1.4 \cdot 10^{+80}\right) \land b \leq 9 \cdot 10^{+106}\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 < -1.7999999999999998e32 or 1.4500000000000001e57 < b < 1.39999999999999992e80 or 8.9999999999999994e106 < b

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -1.7999999999999998e32 < b < 1.4500000000000001e57 or 1.39999999999999992e80 < b < 8.9999999999999994e106

    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. Step-by-step derivation
      1. add-cbrt-cube30.3%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr30.3%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 68.5%

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified58.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.8 \cdot 10^{+32} \lor \neg \left(b \leq 1.45 \cdot 10^{+57} \lor \neg \left(b \leq 1.4 \cdot 10^{+80}\right) \land b \leq 9 \cdot 10^{+106}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.1% accurate, 5.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+34} \lor \neg \left(b \leq 1.8 \cdot 10^{+57}\right) \land \left(b \leq 2.9 \cdot 10^{+80} \lor \neg \left(b \leq 1.7 \cdot 10^{+107}\right)\right):\\
\;\;\;\;a \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.99999999999999978e34 or 1.8000000000000001e57 < b < 2.89999999999999986e80 or 1.6999999999999998e107 < b

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot a} \]
    8. Simplified53.2%

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

    if -3.99999999999999978e34 < b < 1.8000000000000001e57 or 2.89999999999999986e80 < b < 1.6999999999999998e107

    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. Step-by-step derivation
      1. add-cbrt-cube30.3%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr30.3%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 68.5%

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

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

        \[\leadsto \color{blue}{y + x} \]
    8. Simplified58.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+34} \lor \neg \left(b \leq 1.8 \cdot 10^{+57}\right) \land \left(b \leq 2.9 \cdot 10^{+80} \lor \neg \left(b \leq 1.7 \cdot 10^{+107}\right)\right):\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 28.7% accurate, 8.8× speedup?

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

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

\mathbf{elif}\;y \leq 8 \cdot 10^{+131}:\\
\;\;\;\;a \cdot b\\

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


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

    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-def99.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 45.4%

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

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

    if 7.4999999999999999e-208 < y < 7.9999999999999993e131

    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 x around 0 70.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot b} \]
    7. Step-by-step derivation
      1. *-commutative23.4%

        \[\leadsto \color{blue}{b \cdot a} \]
    8. Simplified23.4%

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

    if 7.9999999999999993e131 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.3% accurate, 9.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr39.6%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 76.8%

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

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

    if 4.3e107 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{b \cdot -0.5} \]
    9. Simplified59.7%

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

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

Alternative 16: 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 5.6 \cdot 10^{+61}:\\ \;\;\;\;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 5.6e+61) (+ 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 <= 5.6e+61) {
		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 <= 5.6d+61) 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 <= 5.6e+61) {
		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 <= 5.6e+61:
		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 <= 5.6e+61)
		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 <= 5.6e+61)
		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, 5.6e+61], 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 5.6 \cdot 10^{+61}:\\
\;\;\;\;x + t\_1\\

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube39.8%

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{{\left(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-rr39.8%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 78.3%

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

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

    if 5.6000000000000003e61 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 78.5% accurate, 12.8× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube35.0%

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

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

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

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

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

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

      \[\leadsto \sqrt[3]{{\left(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-rr35.0%

    \[\leadsto \color{blue}{\sqrt[3]{{\left(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 0 78.1%

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

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

Alternative 18: 28.5% accurate, 19.1× speedup?

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

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

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


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

    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-def99.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 48.1%

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

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

    if 2.99999999999999998e53 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 19: 22.3% accurate, 115.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 99.6% accurate, 0.4× speedup?

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

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

Reproduce

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

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

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