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

Percentage Accurate: 99.9% → 99.9%
Time: 13.6s
Alternatives: 23
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 23 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} \\ \mathsf{fma}\left(a + -0.5, b, \left(y + \left(x + z\right)\right) - z \cdot \log t\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (+ a -0.5) b (- (+ y (+ x z)) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma((a + -0.5), b, ((y + (x + z)) - (z * log(t))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(a + -0.5), b, Float64(Float64(y + Float64(x + z)) - Float64(z * log(t))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a + -0.5), $MachinePrecision] * b + N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.9% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+214}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5 \cdot 10^{+249}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.5999999999999998e203 or 2.4999999999999998e227 < z < 4.9999999999999996e249

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -1.5999999999999998e203 < z < 1.2999999999999999e133

    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. add-cube-cbrt99.9%

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

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

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

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

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

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

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

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

    if 1.2999999999999999e133 < z < 1.75e214 or 4.9999999999999996e249 < z

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(1 - \log t\right) \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg87.4%

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

        \[\leadsto x + \color{blue}{\left(\left(-\log t\right) + 1\right)} \cdot z \]
      3. distribute-rgt1-in87.5%

        \[\leadsto x + \color{blue}{\left(z + \left(-\log t\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv87.5%

        \[\leadsto x + \color{blue}{\left(z - \log t \cdot z\right)} \]
    6. Simplified87.5%

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

    if 1.75e214 < z < 2.4999999999999998e227

    1. Initial program 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+203}:\\ \;\;\;\;y + z \cdot \left(1 - \log t\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+133}:\\ \;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+214}:\\ \;\;\;\;x + \left(z - z \cdot \log t\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+227}:\\ \;\;\;\;\left(y + x\right) + \left(a + -0.5\right) \cdot b\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+249}:\\ \;\;\;\;y + z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - z \cdot \log t\right)\\ \end{array} \]

Alternative 3: 74.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y + x \leq 2 \cdot 10^{+61}:\\ \;\;\;\;\left(\left(x + z\right) + b \cdot \left(a - 0.5\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a + -0.5, b, y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (+ y x) 2e+61)
   (- (+ (+ x z) (* b (- a 0.5))) (* z (log t)))
   (fma (+ a -0.5) b y)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y + x) <= 2e+61) {
		tmp = ((x + z) + (b * (a - 0.5))) - (z * log(t));
	} else {
		tmp = fma((a + -0.5), b, y);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(y + x) <= 2e+61)
		tmp = Float64(Float64(Float64(x + z) + Float64(b * Float64(a - 0.5))) - Float64(z * log(t)));
	else
		tmp = fma(Float64(a + -0.5), b, y);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], 2e+61], N[(N[(N[(x + z), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * b + y), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

    if 1.9999999999999999e61 < (+.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. Step-by-step derivation
      1. associate--l+99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y\right)} \]
      2. sub-neg68.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{a + \left(-0.5\right)}, b, y\right) \]
      3. metadata-eval68.0%

        \[\leadsto \mathsf{fma}\left(a + \color{blue}{-0.5}, b, y\right) \]
    7. Simplified68.0%

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

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

Alternative 4: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 5: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 6: 99.9% accurate, 1.0× speedup?

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

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

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

Alternative 7: 87.0% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -2.1999999999999998e205 < z < 5.14999999999999998e101

    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. add-cube-cbrt99.9%

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

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

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

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

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

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

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

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

    if 5.14999999999999998e101 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 87.9% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

    if -1.08e220 < z < 5.2e101

    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. add-cube-cbrt99.9%

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

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

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

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

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

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

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

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

    if 5.2e101 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 84.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+271}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if -1.6000000000000001e271 < z < 1.85000000000000012e133

    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. add-cube-cbrt99.8%

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

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

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

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

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

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

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

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

    if 1.85000000000000012e133 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 84.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if -1.5e271 < z < 5.7999999999999997e132

    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. add-cube-cbrt99.8%

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

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

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

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

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

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

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

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

    if 5.7999999999999997e132 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(1 - \log t\right) \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg76.4%

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

        \[\leadsto x + \color{blue}{\left(\left(-\log t\right) + 1\right)} \cdot z \]
      3. distribute-rgt1-in76.4%

        \[\leadsto x + \color{blue}{\left(z + \left(-\log t\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv76.4%

        \[\leadsto x + \color{blue}{\left(z - \log t \cdot z\right)} \]
    6. Simplified76.4%

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

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

Alternative 11: 83.7% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5e271 or 4.5e235 < z

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -1.5e271 < z < 4.5e235

    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. add-cube-cbrt99.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(z + \left(y + x\right)\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 -1.5 \cdot 10^{+271} \lor \neg \left(z \leq 4.5 \cdot 10^{+235}\right):\\ \;\;\;\;z \cdot \left(1 - \log t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\ \end{array} \]

Alternative 12: 45.6% accurate, 5.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;y + x \leq -1 \cdot 10^{-98}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{elif}\;y + x \leq 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y + x \leq 9 \cdot 10^{+135}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y + x \leq 5 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))))
   (if (<= (+ y x) -1e-98)
     (+ x (* a b))
     (if (<= (+ y x) 1e+61)
       t_1
       (if (<= (+ y x) 9e+135) (+ y x) (if (<= (+ y x) 5e+185) t_1 y))))))
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 + x) <= -1e-98) {
		tmp = x + (a * b);
	} else if ((y + x) <= 1e+61) {
		tmp = t_1;
	} else if ((y + x) <= 9e+135) {
		tmp = y + x;
	} else if ((y + x) <= 5e+185) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = b * (a - 0.5d0)
    if ((y + x) <= (-1d-98)) then
        tmp = x + (a * b)
    else if ((y + x) <= 1d+61) then
        tmp = t_1
    else if ((y + x) <= 9d+135) then
        tmp = y + x
    else if ((y + x) <= 5d+185) then
        tmp = t_1
    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 t_1 = b * (a - 0.5);
	double tmp;
	if ((y + x) <= -1e-98) {
		tmp = x + (a * b);
	} else if ((y + x) <= 1e+61) {
		tmp = t_1;
	} else if ((y + x) <= 9e+135) {
		tmp = y + x;
	} else if ((y + x) <= 5e+185) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	tmp = 0
	if (y + x) <= -1e-98:
		tmp = x + (a * b)
	elif (y + x) <= 1e+61:
		tmp = t_1
	elif (y + x) <= 9e+135:
		tmp = y + x
	elif (y + x) <= 5e+185:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	tmp = 0.0
	if (Float64(y + x) <= -1e-98)
		tmp = Float64(x + Float64(a * b));
	elseif (Float64(y + x) <= 1e+61)
		tmp = t_1;
	elseif (Float64(y + x) <= 9e+135)
		tmp = Float64(y + x);
	elseif (Float64(y + x) <= 5e+185)
		tmp = t_1;
	else
		tmp = y;
	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 + x) <= -1e-98)
		tmp = x + (a * b);
	elseif ((y + x) <= 1e+61)
		tmp = t_1;
	elseif ((y + x) <= 9e+135)
		tmp = y + x;
	elseif ((y + x) <= 5e+185)
		tmp = t_1;
	else
		tmp = y;
	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[(y + x), $MachinePrecision], -1e-98], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 1e+61], t$95$1, If[LessEqual[N[(y + x), $MachinePrecision], 9e+135], N[(y + x), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 5e+185], t$95$1, y]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y + x \leq 10^{+61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y + x \leq 9 \cdot 10^{+135}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;y + x \leq 5 \cdot 10^{+185}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999939e-99 < (+.f64 x y) < 9.99999999999999949e60 or 9.00000000000000014e135 < (+.f64 x y) < 4.9999999999999999e185

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 9.99999999999999949e60 < (+.f64 x y) < 9.00000000000000014e135

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e185 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y + x \leq -1 \cdot 10^{-98}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{elif}\;y + x \leq 10^{+61}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{elif}\;y + x \leq 9 \cdot 10^{+135}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y + x \leq 5 \cdot 10^{+185}:\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 13: 65.2% accurate, 6.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+196} \lor \neg \left(t_1 \leq 5 \cdot 10^{+190}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- a 0.5))))
   (if (or (<= t_1 -1e+196) (not (<= t_1 5e+190))) t_1 (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a - 0.5);
	double tmp;
	if ((t_1 <= -1e+196) || !(t_1 <= 5e+190)) {
		tmp = t_1;
	} else {
		tmp = y + x;
	}
	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 ((t_1 <= (-1d+196)) .or. (.not. (t_1 <= 5d+190))) then
        tmp = t_1
    else
        tmp = y + x
    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 ((t_1 <= -1e+196) || !(t_1 <= 5e+190)) {
		tmp = t_1;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (a - 0.5)
	tmp = 0
	if (t_1 <= -1e+196) or not (t_1 <= 5e+190):
		tmp = t_1
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a - 0.5))
	tmp = 0.0
	if ((t_1 <= -1e+196) || !(t_1 <= 5e+190))
		tmp = t_1;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a - 0.5);
	tmp = 0.0;
	if ((t_1 <= -1e+196) || ~((t_1 <= 5e+190)))
		tmp = t_1;
	else
		tmp = y + x;
	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[Or[LessEqual[t$95$1, -1e+196], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], t$95$1, N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+196} \lor \neg \left(t_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -9.9999999999999995e195 or 5.00000000000000036e190 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -9.9999999999999995e195 < (*.f64 (-.f64 a 1/2) b) < 5.00000000000000036e190

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 30.1% accurate, 10.2× speedup?

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

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

\mathbf{elif}\;x \leq -2.4 \cdot 10^{-220}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;x \leq 7.2 \cdot 10^{-136}:\\
\;\;\;\;y\\

\mathbf{elif}\;x \leq 2 \cdot 10^{+41}:\\
\;\;\;\;a \cdot b\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e57 < x < -2.4000000000000001e-220 or 7.1999999999999996e-136 < x < 2.00000000000000001e41

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e-220 < x < 7.1999999999999996e-136 or 2.00000000000000001e41 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-220}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-136}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+41}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 15: 66.6% accurate, 10.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.2 \cdot 10^{-62} \lor \neg \left(b \leq 3.4 \cdot 10^{-145}\right):\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.20000000000000017e-62 or 3.3999999999999999e-145 < b

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000017e-62 < b < 3.3999999999999999e-145

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 58.0% accurate, 10.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;y + x \leq 2 \cdot 10^{-19}:\\ \;\;\;\;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 x) 2e-19) (+ 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 + x) <= 2e-19) {
		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 + x) <= 2d-19) 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 + x) <= 2e-19) {
		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 + x) <= 2e-19:
		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 (Float64(y + x) <= 2e-19)
		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 + x) <= 2e-19)
		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[N[(y + x), $MachinePrecision], 2e-19], 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 + x \leq 2 \cdot 10^{-19}:\\
\;\;\;\;x + t_1\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e-19 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

Alternative 17: 78.4% accurate, 10.5× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 18: 79.2% accurate, 10.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 78.4% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

Alternative 20: 26.2% accurate, 16.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.65 \cdot 10^{-23}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-222}:\\
\;\;\;\;-0.5 \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.65000000000000021e-23

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000021e-23 < x < -8.00000000000000038e-222

    1. Initial program 99.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot b} \]
    7. Step-by-step derivation
      1. *-commutative28.3%

        \[\leadsto \color{blue}{b \cdot -0.5} \]
    8. Simplified28.3%

      \[\leadsto \color{blue}{b \cdot -0.5} \]

    if -8.00000000000000038e-222 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.65 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-222}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 21: 51.1% accurate, 16.1× speedup?

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

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

\mathbf{elif}\;b \leq 6.6 \cdot 10^{+65}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.0000000000000006e190 or 6.60000000000000046e65 < b

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -8.0000000000000006e190 < b < 6.60000000000000046e65

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{+190}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{+65}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]

Alternative 22: 27.2% accurate, 37.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-75}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.9000000000000001e-75

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9000000000000001e-75 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-75}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 23: 22.2% accurate, 115.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification25.4%

    \[\leadsto x \]

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 2023199 
(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)))