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

Percentage Accurate: 99.8% → 99.8%
Time: 10.7s
Alternatives: 15
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 15 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.8% accurate, 1.0× speedup?

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

\\
b \cdot \left(a - 0.5\right) + \left(\left(z + \left(y + x\right)\right) - \log t \cdot z\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 b \cdot \left(a - 0.5\right) + \left(\left(z + \left(y + x\right)\right) - \log t \cdot z\right) \]
  4. Add Preprocessing

Alternative 2: 92.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := \mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, x\right) + \mathsf{fma}\left(1 - \log t, z, y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000004e95 or 5.0000000000000002e147 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
      7. lower-+.f6493.5

        \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
    5. Applied rewrites93.5%

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

    if -2.00000000000000004e95 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000002e147

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) - z \cdot \log t} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) - \color{blue}{\log t \cdot z} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
      3. log-recN/A

        \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
      5. +-commutativeN/A

        \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(y + \left(z + \frac{-1}{2} \cdot b\right)\right) + x\right)} \]
      7. associate-+r+N/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \left(\color{blue}{\left(\left(y + z\right) + \frac{-1}{2} \cdot b\right)} + x\right) \]
      8. associate-+l+N/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(y + z\right) + \left(\frac{-1}{2} \cdot b + x\right)\right)} \]
      9. associate-+r+N/A

        \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + \left(y + z\right)\right) + \left(\frac{-1}{2} \cdot b + x\right)} \]
      10. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(y + z\right) + z \cdot \log \left(\frac{1}{t}\right)\right)} + \left(\frac{-1}{2} \cdot b + x\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(y + z\right) + \color{blue}{\log \left(\frac{1}{t}\right) \cdot z}\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
      12. log-recN/A

        \[\leadsto \left(\left(y + z\right) + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)} \cdot z\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
      13. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(y + z\right) - \log t \cdot z\right)} + \left(\frac{-1}{2} \cdot b + x\right) \]
      14. *-commutativeN/A

        \[\leadsto \left(\left(y + z\right) - \color{blue}{z \cdot \log t}\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
      15. lower-+.f64N/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.1%

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

Alternative 3: 90.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := \mathsf{fma}\left(a - 0.5, b, y + x\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+60}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, y + x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000004e95 or 4.99999999999999975e60 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
      7. lower-+.f6490.5

        \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
    5. Applied rewrites90.5%

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

    if -2.00000000000000004e95 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999975e60

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \log t} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
      3. log-recN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
      5. +-commutativeN/A

        \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(z + b \cdot \left(a - \frac{1}{2}\right)\right) + x\right)} \]
      7. associate-+l+N/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
      8. associate-+r+N/A

        \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
      9. *-rgt-identityN/A

        \[\leadsto \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{z \cdot 1}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      10. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \left(\log \left(\frac{1}{t}\right) + 1\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      11. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(1 + \log \left(\frac{1}{t}\right)\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      12. log-recN/A

        \[\leadsto z \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      13. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(1 - \log t\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      14. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      15. sub-negN/A

        \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      16. mul-1-negN/A

        \[\leadsto \left(1 + \color{blue}{-1 \cdot \log t}\right) \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      17. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t} \]
      2. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(x + y\right) + z\right)} + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t \]
      3. associate-+l+N/A

        \[\leadsto \color{blue}{\left(x + y\right) + \left(z + \left(\mathsf{neg}\left(z\right)\right) \cdot \log t\right)} \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \left(x + y\right) + \color{blue}{\left(z - z \cdot \log t\right)} \]
      5. *-rgt-identityN/A

        \[\leadsto \left(x + y\right) + \left(\color{blue}{z \cdot 1} - z \cdot \log t\right) \]
      6. distribute-lft-out--N/A

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

        \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right) + \left(x + y\right)} \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} + \left(x + y\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, x + y\right)} \]
      10. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \log t}, z, x + y\right) \]
      11. lower-log.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - \color{blue}{\log t}, z, x + y\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \color{blue}{y + x}\right) \]
      13. lower-+.f6491.6

        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \color{blue}{y + x}\right) \]
    8. Applied rewrites91.6%

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

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

Alternative 4: 85.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y + x \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, b \cdot \left(a - 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -4.99999999999999999e97 or 5e16 < (+.f64 x 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. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
      7. lower-+.f6491.9

        \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
    5. Applied rewrites91.9%

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

    if -4.99999999999999999e97 < (+.f64 x y) < 5e16

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \log t} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
      3. log-recN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
      5. +-commutativeN/A

        \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(z + b \cdot \left(a - \frac{1}{2}\right)\right) + x\right)} \]
      7. associate-+l+N/A

        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
      8. associate-+r+N/A

        \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
      9. *-rgt-identityN/A

        \[\leadsto \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{z \cdot 1}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      10. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \left(\log \left(\frac{1}{t}\right) + 1\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      11. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(1 + \log \left(\frac{1}{t}\right)\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      12. log-recN/A

        \[\leadsto z \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      13. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(1 - \log t\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      14. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      15. sub-negN/A

        \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      16. mul-1-negN/A

        \[\leadsto \left(1 + \color{blue}{-1 \cdot \log t}\right) \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
      17. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(1 - \log t, \color{blue}{z}, b \cdot \left(a - 0.5\right)\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification92.6%

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

    Alternative 5: 58.9% accurate, 1.0× speedup?

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

      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

        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
      4. Step-by-step derivation
        1. associate-+r+N/A

          \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
        2. +-commutativeN/A

          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
        3. *-commutativeN/A

          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
        4. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
        5. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
        6. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
        7. lower-+.f6479.9

          \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
      5. Applied rewrites79.9%

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

        \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites55.8%

          \[\leadsto \mathsf{fma}\left(b, \color{blue}{a - 0.5}, x\right) \]

        if -4.99999999999999989e-121 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

        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

          \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
        4. Step-by-step derivation
          1. associate-+r+N/A

            \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
          3. *-commutativeN/A

            \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
          4. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
          5. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
          6. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
          7. lower-+.f6481.2

            \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
        5. Applied rewrites81.2%

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

          \[\leadsto y + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
        7. Step-by-step derivation
          1. Applied rewrites60.9%

            \[\leadsto \mathsf{fma}\left(b, \color{blue}{a - 0.5}, y\right) \]
        8. Recombined 2 regimes into one program.
        9. Final simplification58.6%

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

        Alternative 6: 85.6% accurate, 1.0× speedup?

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

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \log t} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
            2. cancel-sign-sub-invN/A

              \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
            3. log-recN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
            4. *-commutativeN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
            5. +-commutativeN/A

              \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
            6. +-commutativeN/A

              \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(z + b \cdot \left(a - \frac{1}{2}\right)\right) + x\right)} \]
            7. associate-+l+N/A

              \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
            8. associate-+r+N/A

              \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
            9. *-rgt-identityN/A

              \[\leadsto \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{z \cdot 1}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            10. distribute-lft-inN/A

              \[\leadsto \color{blue}{z \cdot \left(\log \left(\frac{1}{t}\right) + 1\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            11. +-commutativeN/A

              \[\leadsto z \cdot \color{blue}{\left(1 + \log \left(\frac{1}{t}\right)\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            12. log-recN/A

              \[\leadsto z \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            13. sub-negN/A

              \[\leadsto z \cdot \color{blue}{\left(1 - \log t\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            14. *-commutativeN/A

              \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            15. sub-negN/A

              \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            16. mul-1-negN/A

              \[\leadsto \left(1 + \color{blue}{-1 \cdot \log t}\right) \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            17. lower-fma.f64N/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(a - 0.5, b, x\right)\right)} \]

          if 1.25e18 < y

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
          4. Step-by-step derivation
            1. associate-+r+N/A

              \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
            3. *-commutativeN/A

              \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
            4. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
            5. lower--.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
            7. lower-+.f6491.5

              \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
          5. Applied rewrites91.5%

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

        Alternative 7: 85.7% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+185}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (fma (- 1.0 (log t)) z x)))
           (if (<= z -1.9e+208) t_1 (if (<= z 2e+185) (fma (- a 0.5) b (+ y x)) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma((1.0 - log(t)), z, x);
        	double tmp;
        	if (z <= -1.9e+208) {
        		tmp = t_1;
        	} else if (z <= 2e+185) {
        		tmp = fma((a - 0.5), b, (y + x));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = fma(Float64(1.0 - log(t)), z, x)
        	tmp = 0.0
        	if (z <= -1.9e+208)
        		tmp = t_1;
        	elseif (z <= 2e+185)
        		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -1.9e+208], t$95$1, If[LessEqual[z, 2e+185], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(1 - \log t, z, x\right)\\
        \mathbf{if}\;z \leq -1.9 \cdot 10^{+208}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 2 \cdot 10^{+185}:\\
        \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.9000000000000001e208 or 2e185 < z

          1. Initial program 99.6%

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

            \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - z \cdot \log t} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
            2. cancel-sign-sub-invN/A

              \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
            3. log-recN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
            4. *-commutativeN/A

              \[\leadsto \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
            5. +-commutativeN/A

              \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
            6. +-commutativeN/A

              \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(z + b \cdot \left(a - \frac{1}{2}\right)\right) + x\right)} \]
            7. associate-+l+N/A

              \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)\right)} \]
            8. associate-+r+N/A

              \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + z\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right)} \]
            9. *-rgt-identityN/A

              \[\leadsto \left(z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{z \cdot 1}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            10. distribute-lft-inN/A

              \[\leadsto \color{blue}{z \cdot \left(\log \left(\frac{1}{t}\right) + 1\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            11. +-commutativeN/A

              \[\leadsto z \cdot \color{blue}{\left(1 + \log \left(\frac{1}{t}\right)\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            12. log-recN/A

              \[\leadsto z \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right) + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            13. sub-negN/A

              \[\leadsto z \cdot \color{blue}{\left(1 - \log t\right)} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            14. *-commutativeN/A

              \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            15. sub-negN/A

              \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            16. mul-1-negN/A

              \[\leadsto \left(1 + \color{blue}{-1 \cdot \log t}\right) \cdot z + \left(b \cdot \left(a - \frac{1}{2}\right) + x\right) \]
            17. lower-fma.f64N/A

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

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

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

              \[\leadsto \mathsf{fma}\left(1 - \log t, \color{blue}{z}, x\right) \]

            if -1.9000000000000001e208 < z < 2e185

            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

              \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

                \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
              3. *-commutativeN/A

                \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
              5. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
              7. lower-+.f6490.2

                \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
            5. Applied rewrites90.2%

              \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 8: 83.9% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+257}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- 1.0 (log t)) z)))
             (if (<= z -3.1e+208)
               t_1
               (if (<= z 1.2e+257) (fma (- a 0.5) b (+ y x)) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (1.0 - log(t)) * z;
          	double tmp;
          	if (z <= -3.1e+208) {
          		tmp = t_1;
          	} else if (z <= 1.2e+257) {
          		tmp = fma((a - 0.5), b, (y + x));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(1.0 - log(t)) * z)
          	tmp = 0.0
          	if (z <= -3.1e+208)
          		tmp = t_1;
          	elseif (z <= 1.2e+257)
          		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.1e+208], t$95$1, If[LessEqual[z, 1.2e+257], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(1 - \log t\right) \cdot z\\
          \mathbf{if}\;z \leq -3.1 \cdot 10^{+208}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1.2 \cdot 10^{+257}:\\
          \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -3.09999999999999981e208 or 1.2e257 < z

            1. Initial program 99.5%

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

              \[\leadsto \color{blue}{z \cdot \left(1 - \log t\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} \]
              2. sub-negN/A

                \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(\log t\right)\right)\right)} \cdot z \]
              3. mul-1-negN/A

                \[\leadsto \left(1 + \color{blue}{-1 \cdot \log t}\right) \cdot z \]
              4. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(1 + -1 \cdot \log t\right) \cdot z} \]
              5. mul-1-negN/A

                \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right) \cdot z \]
              6. sub-negN/A

                \[\leadsto \color{blue}{\left(1 - \log t\right)} \cdot z \]
              7. lower--.f64N/A

                \[\leadsto \color{blue}{\left(1 - \log t\right)} \cdot z \]
              8. lower-log.f6482.7

                \[\leadsto \left(1 - \color{blue}{\log t}\right) \cdot z \]
            5. Applied rewrites82.7%

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

            if -3.09999999999999981e208 < z < 1.2e257

            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

              \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

                \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
              3. *-commutativeN/A

                \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
              5. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
              7. lower-+.f6488.2

                \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
            5. Applied rewrites88.2%

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

          Alternative 9: 58.8% accurate, 2.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^{+233}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+297}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* b (- a 0.5))))
             (if (<= t_1 -5e+233)
               (* b a)
               (if (<= t_1 5e+43) (+ y x) (if (<= t_1 4e+297) (fma b -0.5 x) (* b a))))))
          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+233) {
          		tmp = b * a;
          	} else if (t_1 <= 5e+43) {
          		tmp = y + x;
          	} else if (t_1 <= 4e+297) {
          		tmp = fma(b, -0.5, x);
          	} else {
          		tmp = b * a;
          	}
          	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+233)
          		tmp = Float64(b * a);
          	elseif (t_1 <= 5e+43)
          		tmp = Float64(y + x);
          	elseif (t_1 <= 4e+297)
          		tmp = fma(b, -0.5, x);
          	else
          		tmp = Float64(b * a);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+233], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 5e+43], N[(y + x), $MachinePrecision], If[LessEqual[t$95$1, 4e+297], N[(b * -0.5 + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := b \cdot \left(a - 0.5\right)\\
          \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+233}:\\
          \;\;\;\;b \cdot a\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\
          \;\;\;\;y + x\\
          
          \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+297}:\\
          \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;b \cdot a\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000009e233 or 4.0000000000000001e297 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 a around inf

              \[\leadsto \color{blue}{a \cdot b} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{b \cdot a} \]
              2. lower-*.f6482.7

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

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

            if -5.00000000000000009e233 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000004e43

            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

              \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

                \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
              3. *-commutativeN/A

                \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
              5. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
              7. lower-+.f6473.1

                \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
            5. Applied rewrites73.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites64.1%

                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
              2. Taylor expanded in b around inf

                \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites12.9%

                  \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                2. Taylor expanded in b around 0

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

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

                  if 5.0000000000000004e43 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.0000000000000001e297

                  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

                    \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                  4. Step-by-step derivation
                    1. associate-+r+N/A

                      \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                    3. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                    5. lower--.f64N/A

                      \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                    6. +-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                    7. lower-+.f6485.5

                      \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                  5. Applied rewrites85.5%

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

                    \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites72.7%

                      \[\leadsto \mathsf{fma}\left(b, \color{blue}{a - 0.5}, x\right) \]
                    2. Taylor expanded in a around 0

                      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, x\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites50.6%

                        \[\leadsto \mathsf{fma}\left(b, -0.5, x\right) \]
                    4. Recombined 3 regimes into one program.
                    5. Final simplification60.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a - 0.5\right) \leq -5 \cdot 10^{+233}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 5 \cdot 10^{+43}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;b \cdot \left(a - 0.5\right) \leq 4 \cdot 10^{+297}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \]
                    6. Add Preprocessing

                    Alternative 10: 66.1% accurate, 3.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+122}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 10^{+149}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* b (- a 0.5))))
                       (if (<= t_1 -5e+122) t_1 (if (<= t_1 1e+149) (+ y x) t_1))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = b * (a - 0.5);
                    	double tmp;
                    	if (t_1 <= -5e+122) {
                    		tmp = t_1;
                    	} else if (t_1 <= 1e+149) {
                    		tmp = y + x;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a, b)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = b * (a - 0.5d0)
                        if (t_1 <= (-5d+122)) then
                            tmp = t_1
                        else if (t_1 <= 1d+149) then
                            tmp = y + x
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = b * (a - 0.5);
                    	double tmp;
                    	if (t_1 <= -5e+122) {
                    		tmp = t_1;
                    	} else if (t_1 <= 1e+149) {
                    		tmp = y + x;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = b * (a - 0.5)
                    	tmp = 0
                    	if t_1 <= -5e+122:
                    		tmp = t_1
                    	elif t_1 <= 1e+149:
                    		tmp = y + x
                    	else:
                    		tmp = t_1
                    	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+122)
                    		tmp = t_1;
                    	elseif (t_1 <= 1e+149)
                    		tmp = Float64(y + x);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = b * (a - 0.5);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+122)
                    		tmp = t_1;
                    	elseif (t_1 <= 1e+149)
                    		tmp = y + x;
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+122], t$95$1, If[LessEqual[t$95$1, 1e+149], N[(y + x), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := b \cdot \left(a - 0.5\right)\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+122}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_1 \leq 10^{+149}:\\
                    \;\;\;\;y + x\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.99999999999999989e122 or 1.00000000000000005e149 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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

                        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                      4. Step-by-step derivation
                        1. associate-+r+N/A

                          \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                        3. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                        4. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                        5. lower--.f64N/A

                          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                        6. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                        7. lower-+.f6493.2

                          \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                      5. Applied rewrites93.2%

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

                        \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites85.5%

                          \[\leadsto \mathsf{fma}\left(b, \color{blue}{a - 0.5}, x\right) \]
                        2. Taylor expanded in x around 0

                          \[\leadsto b \cdot \left(a - \color{blue}{\frac{1}{2}}\right) \]
                        3. Step-by-step derivation
                          1. Applied rewrites79.2%

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

                          if -4.99999999999999989e122 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000005e149

                          1. Initial program 99.8%

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

                            \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                          4. Step-by-step derivation
                            1. associate-+r+N/A

                              \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                            3. *-commutativeN/A

                              \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                            4. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                            5. lower--.f64N/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                            6. +-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                            7. lower-+.f6472.4

                              \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                          5. Applied rewrites72.4%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                          6. Step-by-step derivation
                            1. Applied rewrites62.3%

                              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
                            2. Taylor expanded in b around inf

                              \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites9.7%

                                \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                              2. Taylor expanded in b around 0

                                \[\leadsto x + \color{blue}{y} \]
                              3. Step-by-step derivation
                                1. Applied rewrites60.8%

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

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

                              Alternative 11: 58.2% accurate, 3.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(a - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+233}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 10^{+167}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b)
                               :precision binary64
                               (let* ((t_1 (* b (- a 0.5))))
                                 (if (<= t_1 -5e+233) (* b a) (if (<= t_1 1e+167) (+ y x) (* b a)))))
                              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+233) {
                              		tmp = b * a;
                              	} else if (t_1 <= 1e+167) {
                              		tmp = y + x;
                              	} else {
                              		tmp = b * a;
                              	}
                              	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+233)) then
                                      tmp = b * a
                                  else if (t_1 <= 1d+167) then
                                      tmp = y + x
                                  else
                                      tmp = b * a
                                  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+233) {
                              		tmp = b * a;
                              	} else if (t_1 <= 1e+167) {
                              		tmp = y + x;
                              	} else {
                              		tmp = b * a;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b):
                              	t_1 = b * (a - 0.5)
                              	tmp = 0
                              	if t_1 <= -5e+233:
                              		tmp = b * a
                              	elif t_1 <= 1e+167:
                              		tmp = y + x
                              	else:
                              		tmp = b * a
                              	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+233)
                              		tmp = Float64(b * a);
                              	elseif (t_1 <= 1e+167)
                              		tmp = Float64(y + x);
                              	else
                              		tmp = Float64(b * a);
                              	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+233)
                              		tmp = b * a;
                              	elseif (t_1 <= 1e+167)
                              		tmp = y + x;
                              	else
                              		tmp = b * a;
                              	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[t$95$1, -5e+233], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 1e+167], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := b \cdot \left(a - 0.5\right)\\
                              \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+233}:\\
                              \;\;\;\;b \cdot a\\
                              
                              \mathbf{elif}\;t\_1 \leq 10^{+167}:\\
                              \;\;\;\;y + x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;b \cdot a\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000009e233 or 1e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) 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 a around inf

                                  \[\leadsto \color{blue}{a \cdot b} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \color{blue}{b \cdot a} \]
                                  2. lower-*.f6463.7

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

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

                                if -5.00000000000000009e233 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e167

                                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

                                  \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                4. Step-by-step derivation
                                  1. associate-+r+N/A

                                    \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                  3. *-commutativeN/A

                                    \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                  4. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                  5. lower--.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                  6. +-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                  7. lower-+.f6473.8

                                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                5. Applied rewrites73.8%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites62.9%

                                    \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
                                  2. Taylor expanded in b around inf

                                    \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites14.9%

                                      \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                                    2. Taylor expanded in b around 0

                                      \[\leadsto x + \color{blue}{y} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites56.8%

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

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

                                    Alternative 12: 44.4% accurate, 5.2× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y + x \leq -5 \cdot 10^{+29}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y + x \leq 5 \cdot 10^{+28}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (if (<= (+ y x) -5e+29) (+ y x) (if (<= (+ y x) 5e+28) (* -0.5 b) (+ y x))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double tmp;
                                    	if ((y + x) <= -5e+29) {
                                    		tmp = y + x;
                                    	} else if ((y + x) <= 5e+28) {
                                    		tmp = -0.5 * b;
                                    	} else {
                                    		tmp = y + x;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    real(8) function code(x, y, z, t, a, b)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        real(8), intent (in) :: z
                                        real(8), intent (in) :: t
                                        real(8), intent (in) :: a
                                        real(8), intent (in) :: b
                                        real(8) :: tmp
                                        if ((y + x) <= (-5d+29)) then
                                            tmp = y + x
                                        else if ((y + x) <= 5d+28) then
                                            tmp = (-0.5d0) * b
                                        else
                                            tmp = y + x
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t, double a, double b) {
                                    	double tmp;
                                    	if ((y + x) <= -5e+29) {
                                    		tmp = y + x;
                                    	} else if ((y + x) <= 5e+28) {
                                    		tmp = -0.5 * b;
                                    	} else {
                                    		tmp = y + x;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	tmp = 0
                                    	if (y + x) <= -5e+29:
                                    		tmp = y + x
                                    	elif (y + x) <= 5e+28:
                                    		tmp = -0.5 * b
                                    	else:
                                    		tmp = y + x
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b)
                                    	tmp = 0.0
                                    	if (Float64(y + x) <= -5e+29)
                                    		tmp = Float64(y + x);
                                    	elseif (Float64(y + x) <= 5e+28)
                                    		tmp = Float64(-0.5 * b);
                                    	else
                                    		tmp = Float64(y + x);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b)
                                    	tmp = 0.0;
                                    	if ((y + x) <= -5e+29)
                                    		tmp = y + x;
                                    	elseif ((y + x) <= 5e+28)
                                    		tmp = -0.5 * b;
                                    	else
                                    		tmp = y + x;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], -5e+29], N[(y + x), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 5e+28], N[(-0.5 * b), $MachinePrecision], N[(y + x), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;y + x \leq -5 \cdot 10^{+29}:\\
                                    \;\;\;\;y + x\\
                                    
                                    \mathbf{elif}\;y + x \leq 5 \cdot 10^{+28}:\\
                                    \;\;\;\;-0.5 \cdot b\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;y + x\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (+.f64 x y) < -5.0000000000000001e29 or 4.99999999999999957e28 < (+.f64 x 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. Add Preprocessing
                                      3. Taylor expanded in z around 0

                                        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                      4. Step-by-step derivation
                                        1. associate-+r+N/A

                                          \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                        2. +-commutativeN/A

                                          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                        3. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                        4. lower-fma.f64N/A

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                        5. lower--.f64N/A

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                        6. +-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                        7. lower-+.f6488.6

                                          \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                      5. Applied rewrites88.6%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites76.3%

                                          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
                                        2. Taylor expanded in b around inf

                                          \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites25.3%

                                            \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                                          2. Taylor expanded in b around 0

                                            \[\leadsto x + \color{blue}{y} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites61.3%

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

                                            if -5.0000000000000001e29 < (+.f64 x y) < 4.99999999999999957e28

                                            1. Initial program 99.8%

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

                                              \[\leadsto \color{blue}{\left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) - z \cdot \log t} \]
                                            4. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) - \color{blue}{\log t \cdot z} \]
                                              2. cancel-sign-sub-invN/A

                                                \[\leadsto \color{blue}{\left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \left(\mathsf{neg}\left(\log t\right)\right) \cdot z} \]
                                              3. log-recN/A

                                                \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \color{blue}{\log \left(\frac{1}{t}\right)} \cdot z \]
                                              4. *-commutativeN/A

                                                \[\leadsto \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right) + \color{blue}{z \cdot \log \left(\frac{1}{t}\right)} \]
                                              5. +-commutativeN/A

                                                \[\leadsto \color{blue}{z \cdot \log \left(\frac{1}{t}\right) + \left(x + \left(y + \left(z + \frac{-1}{2} \cdot b\right)\right)\right)} \]
                                              6. +-commutativeN/A

                                                \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(y + \left(z + \frac{-1}{2} \cdot b\right)\right) + x\right)} \]
                                              7. associate-+r+N/A

                                                \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \left(\color{blue}{\left(\left(y + z\right) + \frac{-1}{2} \cdot b\right)} + x\right) \]
                                              8. associate-+l+N/A

                                                \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{\left(\left(y + z\right) + \left(\frac{-1}{2} \cdot b + x\right)\right)} \]
                                              9. associate-+r+N/A

                                                \[\leadsto \color{blue}{\left(z \cdot \log \left(\frac{1}{t}\right) + \left(y + z\right)\right) + \left(\frac{-1}{2} \cdot b + x\right)} \]
                                              10. +-commutativeN/A

                                                \[\leadsto \color{blue}{\left(\left(y + z\right) + z \cdot \log \left(\frac{1}{t}\right)\right)} + \left(\frac{-1}{2} \cdot b + x\right) \]
                                              11. *-commutativeN/A

                                                \[\leadsto \left(\left(y + z\right) + \color{blue}{\log \left(\frac{1}{t}\right) \cdot z}\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
                                              12. log-recN/A

                                                \[\leadsto \left(\left(y + z\right) + \color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)} \cdot z\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
                                              13. cancel-sign-sub-invN/A

                                                \[\leadsto \color{blue}{\left(\left(y + z\right) - \log t \cdot z\right)} + \left(\frac{-1}{2} \cdot b + x\right) \]
                                              14. *-commutativeN/A

                                                \[\leadsto \left(\left(y + z\right) - \color{blue}{z \cdot \log t}\right) + \left(\frac{-1}{2} \cdot b + x\right) \]
                                              15. lower-+.f64N/A

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

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

                                              \[\leadsto -1 \cdot \left(y \cdot \left(-1 \cdot \frac{z \cdot \left(1 - \log t\right)}{y} - 1\right)\right) + \mathsf{fma}\left(\color{blue}{\frac{-1}{2}}, b, x\right) \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites47.2%

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

                                                \[\leadsto \frac{-1}{2} \cdot \color{blue}{b} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites26.7%

                                                  \[\leadsto -0.5 \cdot \color{blue}{b} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Final simplification49.8%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y + x \leq -5 \cdot 10^{+29}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y + x \leq 5 \cdot 10^{+28}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
                                              6. Add Preprocessing

                                              Alternative 13: 57.5% accurate, 6.6× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y + x \leq 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a b)
                                               :precision binary64
                                               (if (<= (+ y x) 1e+46) (fma b (- a 0.5) x) (+ y x)))
                                              double code(double x, double y, double z, double t, double a, double b) {
                                              	double tmp;
                                              	if ((y + x) <= 1e+46) {
                                              		tmp = fma(b, (a - 0.5), x);
                                              	} else {
                                              		tmp = y + x;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, y, z, t, a, b)
                                              	tmp = 0.0
                                              	if (Float64(y + x) <= 1e+46)
                                              		tmp = fma(b, Float64(a - 0.5), x);
                                              	else
                                              		tmp = Float64(y + x);
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], 1e+46], N[(b * N[(a - 0.5), $MachinePrecision] + x), $MachinePrecision], N[(y + x), $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;y + x \leq 10^{+46}:\\
                                              \;\;\;\;\mathsf{fma}\left(b, a - 0.5, x\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;y + x\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (+.f64 x y) < 9.9999999999999999e45

                                                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

                                                  \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                                4. Step-by-step derivation
                                                  1. associate-+r+N/A

                                                    \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                                  2. +-commutativeN/A

                                                    \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                                  5. lower--.f64N/A

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                                  6. +-commutativeN/A

                                                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                                  7. lower-+.f6476.5

                                                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                                5. Applied rewrites76.5%

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

                                                  \[\leadsto x + \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites60.0%

                                                    \[\leadsto \mathsf{fma}\left(b, \color{blue}{a - 0.5}, x\right) \]

                                                  if 9.9999999999999999e45 < (+.f64 x y)

                                                  1. Initial program 99.9%

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

                                                    \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                                  4. Step-by-step derivation
                                                    1. associate-+r+N/A

                                                      \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                                    3. *-commutativeN/A

                                                      \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                                    4. lower-fma.f64N/A

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                                    5. lower--.f64N/A

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                                    6. +-commutativeN/A

                                                      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                                    7. lower-+.f6490.6

                                                      \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                                  5. Applied rewrites90.6%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites84.1%

                                                      \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
                                                    2. Taylor expanded in b around inf

                                                      \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites24.6%

                                                        \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                                                      2. Taylor expanded in b around 0

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

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

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

                                                      Alternative 14: 78.7% accurate, 9.7× speedup?

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

                                                        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                                      4. Step-by-step derivation
                                                        1. associate-+r+N/A

                                                          \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                                        2. +-commutativeN/A

                                                          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                                        4. lower-fma.f64N/A

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                                        5. lower--.f64N/A

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                                        6. +-commutativeN/A

                                                          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                                        7. lower-+.f6480.6

                                                          \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                                      5. Applied rewrites80.6%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                                                      6. Add Preprocessing

                                                      Alternative 15: 41.5% accurate, 31.5× speedup?

                                                      \[\begin{array}{l} \\ y + x \end{array} \]
                                                      (FPCore (x y z t a b) :precision binary64 (+ y x))
                                                      double code(double x, double y, double z, double t, double a, double b) {
                                                      	return y + 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 = y + x
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                                      	return y + x;
                                                      }
                                                      
                                                      def code(x, y, z, t, a, b):
                                                      	return y + x
                                                      
                                                      function code(x, y, z, t, a, b)
                                                      	return Float64(y + x)
                                                      end
                                                      
                                                      function tmp = code(x, y, z, t, a, b)
                                                      	tmp = y + x;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_] := N[(y + x), $MachinePrecision]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      y + 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. Add Preprocessing
                                                      3. Taylor expanded in z around 0

                                                        \[\leadsto \color{blue}{x + \left(y + b \cdot \left(a - \frac{1}{2}\right)\right)} \]
                                                      4. Step-by-step derivation
                                                        1. associate-+r+N/A

                                                          \[\leadsto \color{blue}{\left(x + y\right) + b \cdot \left(a - \frac{1}{2}\right)} \]
                                                        2. +-commutativeN/A

                                                          \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right) + \left(x + y\right)} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} + \left(x + y\right) \]
                                                        4. lower-fma.f64N/A

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x + y\right)} \]
                                                        5. lower--.f64N/A

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{a - \frac{1}{2}}, b, x + y\right) \]
                                                        6. +-commutativeN/A

                                                          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                                                        7. lower-+.f6480.6

                                                          \[\leadsto \mathsf{fma}\left(a - 0.5, b, \color{blue}{y + x}\right) \]
                                                      5. Applied rewrites80.6%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y + x\right)} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites68.7%

                                                          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(a, a, -0.25\right)}{a - -0.5}, b, y + x\right) \]
                                                        2. Taylor expanded in b around inf

                                                          \[\leadsto b \cdot \color{blue}{\left(\frac{{a}^{2}}{\frac{1}{2} + a} - \frac{1}{4} \cdot \frac{1}{\frac{1}{2} + a}\right)} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites32.7%

                                                            \[\leadsto \mathsf{fma}\left(a, a, -0.25\right) \cdot \color{blue}{\frac{b}{0.5 + a}} \]
                                                          2. Taylor expanded in b around 0

                                                            \[\leadsto x + \color{blue}{y} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites43.0%

                                                              \[\leadsto y + \color{blue}{x} \]
                                                            2. Add Preprocessing

                                                            Developer Target 1: 99.4% 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 2024296 
                                                            (FPCore (x y z t a b)
                                                              :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
                                                              :precision binary64
                                                            
                                                              :alt
                                                              (! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
                                                            
                                                              (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))