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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.00000000000000004e121 or 1.00000000000000002e100 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000004e121 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e100

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+123} \lor \neg \left(z \leq 7.6 \cdot 10^{+82}\right):\\
\;\;\;\;t\_1 + \left(\left(z + x\right) - z \cdot \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.99999999999999999e123 or 7.60000000000000067e82 < z

    1. Initial program 99.6%

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

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

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

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

    if -6.99999999999999999e123 < z < 7.60000000000000067e82

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999994e126 < z < 2.8000000000000001e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e112 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+194} \lor \neg \left(z \leq 1.75 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.60000000000000021e194 or 1.7500000000000001e111 < 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. +-commutative99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.60000000000000021e194 < z < 1.7500000000000001e111

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.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.7 \cdot 10^{+188}:\\ \;\;\;\;t\_1 + a \cdot b\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+112}:\\ \;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- 1.0 (log t)))))
   (if (<= z -2.7e+188)
     (+ t_1 (* a b))
     (if (<= z 7e+112) (+ (+ x y) (* b (- a 0.5))) (+ t_1 x)))))
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.7e+188) {
		tmp = t_1 + (a * b);
	} else if (z <= 7e+112) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = t_1 + 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 = z * (1.0d0 - log(t))
    if (z <= (-2.7d+188)) then
        tmp = t_1 + (a * b)
    else if (z <= 7d+112) then
        tmp = (x + y) + (b * (a - 0.5d0))
    else
        tmp = t_1 + 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 = z * (1.0 - Math.log(t));
	double tmp;
	if (z <= -2.7e+188) {
		tmp = t_1 + (a * b);
	} else if (z <= 7e+112) {
		tmp = (x + y) + (b * (a - 0.5));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - math.log(t))
	tmp = 0
	if z <= -2.7e+188:
		tmp = t_1 + (a * b)
	elif z <= 7e+112:
		tmp = (x + y) + (b * (a - 0.5))
	else:
		tmp = t_1 + x
	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.7e+188)
		tmp = Float64(t_1 + Float64(a * b));
	elseif (z <= 7e+112)
		tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5)));
	else
		tmp = Float64(t_1 + x);
	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.7e+188)
		tmp = t_1 + (a * b);
	elseif (z <= 7e+112)
		tmp = (x + y) + (b * (a - 0.5));
	else
		tmp = t_1 + x;
	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.7e+188], N[(t$95$1 + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+112], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e188 < z < 6.99999999999999994e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999994e112 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000011e134 < z < 1.74999999999999998e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.74999999999999998e112 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 9: 82.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+197} \lor \neg \left(z \leq 7 \cdot 10^{+112}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.70000000000000022e197 or 6.99999999999999994e112 < 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. +-commutative99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000022e197 < z < 6.99999999999999994e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 11: 49.1% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+59} \lor \neg \left(x + y \leq 5 \cdot 10^{+18}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -9.99999999999999972e58 or 5e18 < (+.f64 x y)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999972e58 < (+.f64 x y) < 5e18

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.8% accurate, 7.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.65 \cdot 10^{-46} \lor \neg \left(b \leq 3.2 \cdot 10^{+35}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.65000000000000009e-46 or 3.19999999999999983e35 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.2%

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000009e-46 < b < 3.19999999999999983e35

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 58.3% accurate, 8.2× speedup?

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000004e-131 < (+.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 29.5% accurate, 8.8× speedup?

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

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

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-286}:\\
\;\;\;\;a \cdot b\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999995e59 < x < -6.5000000000000004e-286

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000004e-286 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 62.9% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.7999999999999998e124 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 78.9% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 28.5% accurate, 19.1× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.6000000000000003e31 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 22.7% accurate, 115.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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

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

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