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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

    \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\mathsf{fma}\left(b, a, b \cdot -0.5\right)} \]
  5. Step-by-step derivation
    1. lift-+.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{b \cdot a + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)}\right) \]
    9. lift-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{a \cdot b} + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)\right) \]
    11. lower-fma.f6499.9

      \[\leadsto \mathsf{fma}\left(b, -0.5, \color{blue}{\mathsf{fma}\left(a, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right)}\right) \]
    12. lift--.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \color{blue}{\left(\mathsf{neg}\left(z \cdot \log t\right)\right) + \left(\left(x + y\right) + z\right)}\right)\right) \]
    15. lift-*.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(z\right), \log t, \left(x + y\right) + z\right)}\right)\right) \]
    18. lower-neg.f6499.9

      \[\leadsto \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(a, b, \mathsf{fma}\left(\color{blue}{-z}, \log t, \left(x + y\right) + z\right)\right)\right) \]
    19. lift-+.f64N/A

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

      \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \mathsf{fma}\left(-z, \log t, \color{blue}{z + \left(x + y\right)}\right)\right)\right) \]
    21. lower-+.f6499.9

      \[\leadsto \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(a, b, \mathsf{fma}\left(-z, \log t, \color{blue}{z + \left(x + y\right)}\right)\right)\right) \]
    22. lift-+.f64N/A

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

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

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

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

Alternative 2: 51.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -9.9999999999999999e-110

    1. Initial program 99.8%

      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -9.9999999999999999e-110 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 3.99999999999999994e307

        1. Initial program 99.9%

          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-0.5, b, y\right) \]

            if 3.99999999999999994e307 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.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-*.f64100.0

                \[\leadsto \color{blue}{b \cdot a} \]
            5. Applied rewrites100.0%

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

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

          Alternative 3: 57.8% accurate, 1.0× speedup?

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

            1. Initial program 99.8%

              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -9.9999999999999999e-110 < (-.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. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 4: 85.6% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(-0.5, b, y\right)\right)\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+195}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\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 (fma -0.5 b y))))
                   (if (<= z -2.1e+195)
                     t_1
                     (if (<= z 5.8e+186) (fma (- a 0.5) b (+ x y)) 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, fma(-0.5, b, y));
                	double tmp;
                	if (z <= -2.1e+195) {
                		tmp = t_1;
                	} else if (z <= 5.8e+186) {
                		tmp = fma((a - 0.5), b, (x + y));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b)
                	t_1 = fma(Float64(1.0 - log(t)), z, fma(-0.5, b, y))
                	tmp = 0.0
                	if (z <= -2.1e+195)
                		tmp = t_1;
                	elseif (z <= 5.8e+186)
                		tmp = fma(Float64(a - 0.5), b, Float64(x + y));
                	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 + N[(-0.5 * b + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+195], t$95$1, If[LessEqual[z, 5.8e+186], N[(N[(a - 0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \mathsf{fma}\left(1 - \log t, z, \mathsf{fma}\left(-0.5, b, y\right)\right)\\
                \mathbf{if}\;z \leq -2.1 \cdot 10^{+195}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 5.8 \cdot 10^{+186}:\\
                \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -2.10000000000000009e195 or 5.8e186 < 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 x around 0

                    \[\leadsto \color{blue}{\left(y + \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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
                    2. cancel-sub-sign-invN/A

                      \[\leadsto \color{blue}{\left(y + \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(y + \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(y + \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(y + \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) + y\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) + y\right)\right)} \]
                    8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                    if -2.10000000000000009e195 < z < 5.8e186

                    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-+.f6494.3

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

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

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

                  Alternative 5: 79.0% accurate, 1.0× speedup?

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

                    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-sub-sign-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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x\right)}\right) \]
                      19. lower--.f6481.0

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

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

                    if -9.9999999999999999e-110 < (+.f64 x y)

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{\left(y + \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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
                      2. cancel-sub-sign-invN/A

                        \[\leadsto \color{blue}{\left(y + \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(y + \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(y + \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(y + \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) + y\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) + y\right)\right)} \]
                      8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

                  Alternative 6: 82.2% accurate, 1.0× speedup?

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

                    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-sub-sign-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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(1 - \log t, z, \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x\right)}\right) \]
                      19. lower--.f6484.7

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

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

                    if 9.99999999999999955e-7 < (+.f64 x y)

                    1. Initial program 99.9%

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(a \cdot \left(1 - \frac{1}{2} \cdot \frac{1}{a}\right), b, y + x\right) \]
                    9. Step-by-step derivation
                      1. Applied rewrites89.3%

                        \[\leadsto \mathsf{fma}\left(\left(1 - \frac{0.5}{a}\right) \cdot a, b, y + x\right) \]
                    10. Recombined 2 regimes into one program.
                    11. Final simplification86.6%

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

                    Alternative 7: 99.9% accurate, 1.0× speedup?

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

                      \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \color{blue}{\mathsf{fma}\left(b, a, b \cdot -0.5\right)} \]
                    5. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{b \cdot a + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)}\right) \]
                      9. lift-*.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \color{blue}{a \cdot b} + \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right)\right) \]
                      11. lower-fma.f6499.9

                        \[\leadsto \mathsf{fma}\left(b, -0.5, \color{blue}{\mathsf{fma}\left(a, b, \left(\left(x + y\right) + z\right) - z \cdot \log t\right)}\right) \]
                      12. lift--.f64N/A

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

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

                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \color{blue}{\left(\mathsf{neg}\left(z \cdot \log t\right)\right) + \left(\left(x + y\right) + z\right)}\right)\right) \]
                      15. lift-*.f64N/A

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

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

                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(z\right), \log t, \left(x + y\right) + z\right)}\right)\right) \]
                      18. lower-neg.f6499.9

                        \[\leadsto \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(a, b, \mathsf{fma}\left(\color{blue}{-z}, \log t, \left(x + y\right) + z\right)\right)\right) \]
                      19. lift-+.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(b, \frac{-1}{2}, \mathsf{fma}\left(a, b, \mathsf{fma}\left(-z, \log t, \color{blue}{z + \left(x + y\right)}\right)\right)\right) \]
                      21. lower-+.f6499.9

                        \[\leadsto \mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(a, b, \mathsf{fma}\left(-z, \log t, \color{blue}{z + \left(x + y\right)}\right)\right)\right) \]
                      22. lift-+.f64N/A

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, \mathsf{fma}\left(a, b, \mathsf{fma}\left(-z, \log t, z + \left(y + x\right)\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. lift-fma.f64N/A

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(-z, \log t, z + \left(y + x\right)\right) + \left(\color{blue}{b \cdot a} + b \cdot \frac{-1}{2}\right) \]
                      7. distribute-lft-outN/A

                        \[\leadsto \mathsf{fma}\left(-z, \log t, z + \left(y + x\right)\right) + \color{blue}{b \cdot \left(a + \frac{-1}{2}\right)} \]
                      8. metadata-evalN/A

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

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

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

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

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

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

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

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

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

                    Alternative 8: 99.8% accurate, 1.0× speedup?

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

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

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

                    Alternative 9: 84.9% accurate, 1.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\ \mathbf{if}\;z \leq -2.7 \cdot 10^{+195}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+154}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\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 y)))
                       (if (<= z -2.7e+195)
                         t_1
                         (if (<= z 1.1e+154) (fma (- a 0.5) b (+ x y)) 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, y);
                    	double tmp;
                    	if (z <= -2.7e+195) {
                    		tmp = t_1;
                    	} else if (z <= 1.1e+154) {
                    		tmp = fma((a - 0.5), b, (x + y));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = fma(Float64(1.0 - log(t)), z, y)
                    	tmp = 0.0
                    	if (z <= -2.7e+195)
                    		tmp = t_1;
                    	elseif (z <= 1.1e+154)
                    		tmp = fma(Float64(a - 0.5), b, Float64(x + y));
                    	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 + y), $MachinePrecision]}, If[LessEqual[z, -2.7e+195], t$95$1, If[LessEqual[z, 1.1e+154], N[(N[(a - 0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\
                    \mathbf{if}\;z \leq -2.7 \cdot 10^{+195}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 1.1 \cdot 10^{+154}:\\
                    \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -2.7000000000000002e195 or 1.1000000000000001e154 < z

                      1. Initial program 99.7%

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

                        \[\leadsto \color{blue}{\left(y + \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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
                        2. cancel-sub-sign-invN/A

                          \[\leadsto \color{blue}{\left(y + \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(y + \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(y + \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(y + \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) + y\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) + y\right)\right)} \]
                        8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                        if -2.7000000000000002e195 < z < 1.1000000000000001e154

                        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-+.f6495.1

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

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

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

                      Alternative 10: 84.3% 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 \cdot 10^{+241}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+148}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\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 -1e+241)
                           t_1
                           (if (<= z 1.25e+148) (fma (- a 0.5) b (+ x y)) 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 <= -1e+241) {
                      		tmp = t_1;
                      	} else if (z <= 1.25e+148) {
                      		tmp = fma((a - 0.5), b, (x + y));
                      	} 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 <= -1e+241)
                      		tmp = t_1;
                      	elseif (z <= 1.25e+148)
                      		tmp = fma(Float64(a - 0.5), b, Float64(x + y));
                      	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, -1e+241], t$95$1, If[LessEqual[z, 1.25e+148], N[(N[(a - 0.5), $MachinePrecision] * b + N[(x + y), $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 \cdot 10^{+241}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 1.25 \cdot 10^{+148}:\\
                      \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -1.0000000000000001e241 or 1.25000000000000006e148 < z

                        1. Initial program 99.7%

                          \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                        2. 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-sub-sign-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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(1 - \log t, z, \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x\right)}\right) \]
                          19. lower--.f6493.5

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

                          \[\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 rewrites81.9%

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

                          if -1.0000000000000001e241 < z < 1.25000000000000006e148

                          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-+.f6493.8

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

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

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

                        Alternative 11: 83.3% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+241}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+231}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\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 -1.05e+241)
                             t_1
                             (if (<= z 3.5e+231) (fma (- a 0.5) b (+ x y)) 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 <= -1.05e+241) {
                        		tmp = t_1;
                        	} else if (z <= 3.5e+231) {
                        		tmp = fma((a - 0.5), b, (x + y));
                        	} 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 <= -1.05e+241)
                        		tmp = t_1;
                        	elseif (z <= 3.5e+231)
                        		tmp = fma(Float64(a - 0.5), b, Float64(x + y));
                        	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, -1.05e+241], t$95$1, If[LessEqual[z, 3.5e+231], N[(N[(a - 0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(1 - \log t\right) \cdot z\\
                        \mathbf{if}\;z \leq -1.05 \cdot 10^{+241}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;z \leq 3.5 \cdot 10^{+231}:\\
                        \;\;\;\;\mathsf{fma}\left(a - 0.5, b, x + y\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z < -1.05e241 or 3.4999999999999999e231 < 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 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. lower-*.f64N/A

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

                              \[\leadsto \color{blue}{\left(1 - \log t\right)} \cdot z \]
                            4. lower-log.f6481.6

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

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

                          if -1.05e241 < z < 3.4999999999999999e231

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

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

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

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

                        Alternative 12: 59.7% accurate, 2.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+288}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+141}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+128}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (* (- a 0.5) b)))
                           (if (<= t_1 -5e+288)
                             (* a b)
                             (if (<= t_1 -5e+141)
                               (fma -0.5 b y)
                               (if (<= t_1 1e+128)
                                 (+ x y)
                                 (if (<= t_1 2e+277) (fma -0.5 b y) (* a b)))))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (a - 0.5) * b;
                        	double tmp;
                        	if (t_1 <= -5e+288) {
                        		tmp = a * b;
                        	} else if (t_1 <= -5e+141) {
                        		tmp = fma(-0.5, b, y);
                        	} else if (t_1 <= 1e+128) {
                        		tmp = x + y;
                        	} else if (t_1 <= 2e+277) {
                        		tmp = fma(-0.5, b, y);
                        	} else {
                        		tmp = a * b;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(a - 0.5) * b)
                        	tmp = 0.0
                        	if (t_1 <= -5e+288)
                        		tmp = Float64(a * b);
                        	elseif (t_1 <= -5e+141)
                        		tmp = fma(-0.5, b, y);
                        	elseif (t_1 <= 1e+128)
                        		tmp = Float64(x + y);
                        	elseif (t_1 <= 2e+277)
                        		tmp = fma(-0.5, b, y);
                        	else
                        		tmp = Float64(a * b);
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+288], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, -5e+141], N[(-0.5 * b + y), $MachinePrecision], If[LessEqual[t$95$1, 1e+128], N[(x + y), $MachinePrecision], If[LessEqual[t$95$1, 2e+277], N[(-0.5 * b + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(a - 0.5\right) \cdot b\\
                        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+288}:\\
                        \;\;\;\;a \cdot b\\
                        
                        \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+141}:\\
                        \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\
                        
                        \mathbf{elif}\;t\_1 \leq 10^{+128}:\\
                        \;\;\;\;x + y\\
                        
                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+277}:\\
                        \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;a \cdot b\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.0000000000000003e288 or 2.00000000000000001e277 < (*.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-*.f6489.7

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

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

                          if -5.0000000000000003e288 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -5.00000000000000025e141 or 1.0000000000000001e128 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.00000000000000001e277

                          1. Initial program 99.9%

                            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(-0.5, b, y\right) \]

                              if -5.00000000000000025e141 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.0000000000000001e128

                              1. Initial program 99.9%

                                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 13: 65.5% accurate, 3.4× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+138}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 10^{+128}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (let* ((t_1 (* (- a 0.5) b)))
                                   (if (<= t_1 -5e+138) t_1 (if (<= t_1 1e+128) (+ x y) t_1))))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	double t_1 = (a - 0.5) * b;
                                	double tmp;
                                	if (t_1 <= -5e+138) {
                                		tmp = t_1;
                                	} else if (t_1 <= 1e+128) {
                                		tmp = x + y;
                                	} 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 = (a - 0.5d0) * b
                                    if (t_1 <= (-5d+138)) then
                                        tmp = t_1
                                    else if (t_1 <= 1d+128) then
                                        tmp = x + y
                                    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 = (a - 0.5) * b;
                                	double tmp;
                                	if (t_1 <= -5e+138) {
                                		tmp = t_1;
                                	} else if (t_1 <= 1e+128) {
                                		tmp = x + y;
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a, b):
                                	t_1 = (a - 0.5) * b
                                	tmp = 0
                                	if t_1 <= -5e+138:
                                		tmp = t_1
                                	elif t_1 <= 1e+128:
                                		tmp = x + y
                                	else:
                                		tmp = t_1
                                	return tmp
                                
                                function code(x, y, z, t, a, b)
                                	t_1 = Float64(Float64(a - 0.5) * b)
                                	tmp = 0.0
                                	if (t_1 <= -5e+138)
                                		tmp = t_1;
                                	elseif (t_1 <= 1e+128)
                                		tmp = Float64(x + y);
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a, b)
                                	t_1 = (a - 0.5) * b;
                                	tmp = 0.0;
                                	if (t_1 <= -5e+138)
                                		tmp = t_1;
                                	elseif (t_1 <= 1e+128)
                                		tmp = x + y;
                                	else
                                		tmp = t_1;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+138], t$95$1, If[LessEqual[t$95$1, 1e+128], N[(x + y), $MachinePrecision], t$95$1]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \left(a - 0.5\right) \cdot b\\
                                \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+138}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t\_1 \leq 10^{+128}:\\
                                \;\;\;\;x + y\\
                                
                                \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) < -5.00000000000000016e138 or 1.0000000000000001e128 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                                  1. Initial program 99.9%

                                    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -5.00000000000000016e138 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.0000000000000001e128

                                      1. Initial program 99.9%

                                        \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                      2. Add Preprocessing
                                      3. Step-by-step derivation
                                        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 14: 58.1% accurate, 3.7× speedup?

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

                                          1. Initial program 99.9%

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

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

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

                                          if -5.00000000000000016e138 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e205

                                          1. Initial program 99.9%

                                            \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                          2. Add Preprocessing
                                          3. Step-by-step derivation
                                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 15: 78.3% accurate, 9.7× speedup?

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

                                              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                            2. 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-+.f6482.0

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

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

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

                                            Alternative 16: 42.0% accurate, 31.5× speedup?

                                            \[\begin{array}{l} \\ x + y \end{array} \]
                                            (FPCore (x y z t a b) :precision binary64 (+ x y))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	return x + y;
                                            }
                                            
                                            real(8) function code(x, y, z, t, a, b)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8), intent (in) :: a
                                                real(8), intent (in) :: b
                                                code = x + y
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a, double b) {
                                            	return x + y;
                                            }
                                            
                                            def code(x, y, z, t, a, b):
                                            	return x + y
                                            
                                            function code(x, y, z, t, a, b)
                                            	return Float64(x + y)
                                            end
                                            
                                            function tmp = code(x, y, z, t, a, b)
                                            	tmp = x + y;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_] := N[(x + y), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            x + y
                                            \end{array}
                                            
                                            Derivation
                                            1. Initial program 99.9%

                                              \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                            2. Add Preprocessing
                                            3. Step-by-step derivation
                                              1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto y + \color{blue}{x} \]
                                                2. Final simplification41.7%

                                                  \[\leadsto x + y \]
                                                3. Add Preprocessing

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

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

                                                Reproduce

                                                ?
                                                herbie shell --seed 2024298 
                                                (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)))