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

Percentage Accurate: 99.8% → 99.9%
Time: 13.0s
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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+88} \lor \neg \left(t_1 \leq 2 \cdot 10^{+110}\right):\\
\;\;\;\;t_1 + \left(x + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999997e88 or 2e110 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 100.0%

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

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

    if -4.99999999999999997e88 < (*.f64 (-.f64 a 1/2) b) < 2e110

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -3.55e28 < x

    1. Initial program 99.9%

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

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

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

Alternative 4: 87.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+188} \lor \neg \left(z \leq 3.5 \cdot 10^{+188}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999998e188 or 3.50000000000000008e188 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e188 < z < 3.50000000000000008e188

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

    if -5.5000000000000003e193 < z < 1.7e187

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

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

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

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

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

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

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

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

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

    if 1.7e187 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 87.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{\left(y + z\right)} - z \cdot \log t \]
    5. Step-by-step derivation
      1. +-commutative75.2%

        \[\leadsto \color{blue}{\left(z + y\right)} - z \cdot \log t \]
    6. Simplified75.2%

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

    if -3.7999999999999998e188 < z < 1.4500000000000001e189

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

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

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

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

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

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

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

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

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

    if 1.4500000000000001e189 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 85.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+193} \lor \neg \left(z \leq 2.6 \cdot 10^{+189}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6e193 or 2.59999999999999981e189 < z

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e193 < z < 2.59999999999999981e189

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

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

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

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

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

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

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

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

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

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

Alternative 8: 85.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

    if -1.8e193 < z < 7.20000000000000017e189

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

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

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

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

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

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

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

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

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

    if 7.20000000000000017e189 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 10: 68.7% accurate, 4.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999997e88 or 4e114 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 100.0%

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

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

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

    if -4.99999999999999997e88 < (*.f64 (-.f64 a 1/2) b) < 4e114

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified62.2%

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

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

Alternative 11: 71.3% accurate, 4.6× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+149} \lor \neg \left(t_1 \leq 4 \cdot 10^{+114}\right):\\
\;\;\;\;x + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a 1/2) b) < -2.0000000000000001e149 or 4e114 < (*.f64 (-.f64 a 1/2) b)

    1. Initial program 100.0%

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

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

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

    if -2.0000000000000001e149 < (*.f64 (-.f64 a 1/2) b) < 4e114

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 12: 28.2% accurate, 5.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-232}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-65}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+41}:\\
\;\;\;\;a \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.2e-215 or 1.05e-232 < y < 1.4499999999999999e-65

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2e-215 < y < 1.05e-232 or 1.4499999999999999e-65 < y < 9.0000000000000002e41

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000002e41 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-232}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-65}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+41}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 49.3% accurate, 5.0× speedup?

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

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-136}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-77}:\\
\;\;\;\;-0.5 \cdot b\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+166}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.5e115 or 2.79999999999999996e166 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e115 < a < 4.49999999999999972e-136 or 2.8999999999999999e-77 < a < 2.79999999999999996e166

    1. Initial program 99.9%

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

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

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

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

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

    if 4.49999999999999972e-136 < a < 2.8999999999999999e-77

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot -0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+115}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-136}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-77}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+166}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.0% accurate, 7.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+92} \lor \neg \left(b \leq 4.6 \cdot 10^{+87}\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 < -3.1000000000000002e92 or 4.6000000000000003e87 < b

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000002e92 < b < 4.6000000000000003e87

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified57.4%

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

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

Alternative 15: 78.9% accurate, 10.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 78.0% accurate, 12.8× speedup?

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

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

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

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

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

Alternative 17: 28.7% accurate, 19.1× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000002e69 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 21.6% accurate, 115.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification20.9%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.6% accurate, 0.4× speedup?

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

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

Reproduce

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

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

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