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

Percentage Accurate: 99.9% → 99.9%
Time: 7.8s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

\\
\left(y + x\right) + \left(z - \mathsf{fma}\left(0.5 - a, b, \log t \cdot z\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 \color{blue}{\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - \frac{1}{2}\right) \cdot b} \]
    2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+57} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+127}\right):\\ \;\;\;\;\left(y + x\right) + \left(z - \left(0.5 - a\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- a 0.5) b)))
   (if (or (<= t_1 -5e+57) (not (<= t_1 2e+127)))
     (+ (+ y x) (- z (* (- 0.5 a) b)))
     (+ (fma (- 1.0 (log t)) z y) (fma -0.5 b x)))))
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+57) || !(t_1 <= 2e+127)) {
		tmp = (y + x) + (z - ((0.5 - a) * b));
	} else {
		tmp = fma((1.0 - log(t)), z, y) + fma(-0.5, b, x);
	}
	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+57) || !(t_1 <= 2e+127))
		tmp = Float64(Float64(y + x) + Float64(z - Float64(Float64(0.5 - a) * b)));
	else
		tmp = Float64(fma(Float64(1.0 - log(t)), z, y) + fma(-0.5, b, x));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+57], N[Not[LessEqual[t$95$1, 2e+127]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] + N[(z - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision] + N[(-0.5 * b + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right) + \mathsf{fma}\left(-0.5, b, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.99999999999999972e57 or 1.99999999999999991e127 < (*.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 \color{blue}{\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - \frac{1}{2}\right) \cdot b} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + x\right) + \left(z - \left(\left(-1 \cdot b\right) \cdot a - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \frac{1}{2}\right)\right) \]
      4. fp-cancel-sign-subN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + x\right) + \left(z - \color{blue}{\left(\frac{1}{2} - a\right) \cdot b}\right) \]
      13. lower--.f6492.5

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

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

    if -4.99999999999999972e57 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999991e127

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+57} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+127}\right):\\ \;\;\;\;\left(y + x\right) + \left(z - \left(0.5 - a\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, x + y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- a 0.5) b)))
   (if (or (<= t_1 -5e+57) (not (<= t_1 2e+127)))
     (+ (+ y x) (- z (* (- 0.5 a) b)))
     (fma (- 1.0 (log t)) z (+ x y)))))
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+57) || !(t_1 <= 2e+127)) {
		tmp = (y + x) + (z - ((0.5 - a) * b));
	} else {
		tmp = fma((1.0 - log(t)), z, (x + y));
	}
	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+57) || !(t_1 <= 2e+127))
		tmp = Float64(Float64(y + x) + Float64(z - Float64(Float64(0.5 - a) * b)));
	else
		tmp = fma(Float64(1.0 - log(t)), z, Float64(x + y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+57], N[Not[LessEqual[t$95$1, 2e+127]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] + N[(z - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.99999999999999972e57 or 1.99999999999999991e127 < (*.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 \color{blue}{\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - \frac{1}{2}\right) \cdot b} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + x\right) + \left(z - \left(\left(-1 \cdot b\right) \cdot a - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \frac{1}{2}\right)\right) \]
      4. fp-cancel-sign-subN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + x\right) + \left(z - \color{blue}{\left(\frac{1}{2} - a\right) \cdot b}\right) \]
      13. lower--.f6492.5

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

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

    if -4.99999999999999972e57 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999991e127

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -0.5 \cdot \color{blue}{b} \]
      2. Taylor expanded in b around 0

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

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

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

      Alternative 4: 57.4% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(x + y\right) + z\right) - z \cdot \log t \leq -5 \cdot 10^{-58}:\\ \;\;\;\;\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) (* z (log t))) -5e-58)
         (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) - (z * log(t))) <= -5e-58) {
      		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(z * log(t))) <= -5e-58)
      		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[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-58], 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) - z \cdot \log t \leq -5 \cdot 10^{-58}:\\
      \;\;\;\;\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))) < -4.99999999999999977e-58

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

          if -4.99999999999999977e-58 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 83.4% accurate, 1.0× speedup?

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

            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-+.f6487.6

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

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

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

              if -5e52 < (+.f64 x y)

              1. Initial program 99.8%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Add Preprocessing
              3. 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 + \color{blue}{\left(b \cdot \left(a - \frac{1}{2}\right) + z\right)}\right) - z \cdot \log t \]
                2. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 84.0% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+267} \lor \neg \left(z \leq 4.6 \cdot 10^{+97}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) + \left(z - \left(0.5 - a\right) \cdot b\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= z -6.2e+267) (not (<= z 4.6e+97)))
               (fma (- 1.0 (log t)) z y)
               (+ (+ y x) (- z (* (- 0.5 a) b)))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((z <= -6.2e+267) || !(z <= 4.6e+97)) {
            		tmp = fma((1.0 - log(t)), z, y);
            	} else {
            		tmp = (y + x) + (z - ((0.5 - a) * b));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((z <= -6.2e+267) || !(z <= 4.6e+97))
            		tmp = fma(Float64(1.0 - log(t)), z, y);
            	else
            		tmp = Float64(Float64(y + x) + Float64(z - Float64(Float64(0.5 - a) * b)));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+267], N[Not[LessEqual[z, 4.6e+97]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(z - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -6.2 \cdot 10^{+267} \lor \neg \left(z \leq 4.6 \cdot 10^{+97}\right):\\
            \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(y + x\right) + \left(z - \left(0.5 - a\right) \cdot b\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -6.20000000000000002e267 or 4.60000000000000011e97 < z

              1. Initial program 99.5%

                \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in 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 + \color{blue}{\left(b \cdot \left(a - \frac{1}{2}\right) + z\right)}\right) - z \cdot \log t \]
                2. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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 rewrites77.3%

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

                if -6.20000000000000002e267 < z < 4.60000000000000011e97

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \left(\left(-1 \cdot b\right) \cdot a - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \frac{1}{2}\right)\right) \]
                  4. fp-cancel-sign-subN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \color{blue}{\left(\frac{1}{2} - a\right) \cdot b}\right) \]
                  13. lower--.f6491.4

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

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

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

              Alternative 7: 82.4% accurate, 1.0× speedup?

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

                1. Initial program 99.5%

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

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

                    \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} \]
                  2. 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.f6469.9

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

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

                if -6.20000000000000002e267 < z < 1.40000000000000004e103

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \left(\left(-1 \cdot b\right) \cdot a - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \frac{1}{2}\right)\right) \]
                  4. fp-cancel-sign-subN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \color{blue}{\left(\frac{1}{2} - a\right) \cdot b}\right) \]
                  13. lower--.f6491.4

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

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

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

              Alternative 8: 37.5% accurate, 5.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a - 0.5 \leq -10 \lor \neg \left(a - 0.5 \leq -0.4\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot b\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (or (<= (- a 0.5) -10.0) (not (<= (- a 0.5) -0.4))) (* b a) (* -0.5 b)))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (((a - 0.5) <= -10.0) || !((a - 0.5) <= -0.4)) {
              		tmp = b * a;
              	} else {
              		tmp = -0.5 * b;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: tmp
                  if (((a - 0.5d0) <= (-10.0d0)) .or. (.not. ((a - 0.5d0) <= (-0.4d0)))) then
                      tmp = b * a
                  else
                      tmp = (-0.5d0) * b
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (((a - 0.5) <= -10.0) || !((a - 0.5) <= -0.4)) {
              		tmp = b * a;
              	} else {
              		tmp = -0.5 * b;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	tmp = 0
              	if ((a - 0.5) <= -10.0) or not ((a - 0.5) <= -0.4):
              		tmp = b * a
              	else:
              		tmp = -0.5 * b
              	return tmp
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if ((Float64(a - 0.5) <= -10.0) || !(Float64(a - 0.5) <= -0.4))
              		tmp = Float64(b * a);
              	else
              		tmp = Float64(-0.5 * b);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	tmp = 0.0;
              	if (((a - 0.5) <= -10.0) || ~(((a - 0.5) <= -0.4)))
              		tmp = b * a;
              	else
              		tmp = -0.5 * b;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -10.0], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(-0.5 * b), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a - 0.5 \leq -10 \lor \neg \left(a - 0.5 \leq -0.4\right):\\
              \;\;\;\;b \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;-0.5 \cdot b\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (-.f64 a #s(literal 1/2 binary64)) < -10 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64))

                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-*.f6451.2

                    \[\leadsto \color{blue}{b \cdot a} \]
                5. Applied rewrites51.2%

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

                if -10 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;a - 0.5 \leq -10 \lor \neg \left(a - 0.5 \leq -0.4\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot b\\ \end{array} \]
                10. Add Preprocessing

                Alternative 9: 79.6% accurate, 7.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \left(\left(-1 \cdot b\right) \cdot a - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \frac{1}{2}\right)\right) \]
                  4. fp-cancel-sign-subN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) + \left(z - \color{blue}{\left(\frac{1}{2} - a\right) \cdot b}\right) \]
                  13. lower--.f6479.0

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

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

                Alternative 10: 78.8% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 58.1% accurate, 12.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 38.0% accurate, 14.0× speedup?

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

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

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

                        \[\leadsto \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} \]
                      3. lower--.f6439.4

                        \[\leadsto \color{blue}{\left(a - 0.5\right)} \cdot b \]
                    5. Applied rewrites39.4%

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

                    Alternative 13: 14.0% accurate, 21.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto -0.5 \cdot \color{blue}{b} \]
                      2. 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 2024320 
                      (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)))