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

Percentage Accurate: 99.8% → 99.8%
Time: 8.9s
Alternatives: 12
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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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 12 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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}
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. Add Preprocessing

Alternative 2: 92.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+134} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+128}\right):\\ \;\;\;\;\left(\left(\frac{\left(z + y\right) + x}{b} + a\right) - 0.5\right) \cdot b\\ \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 -1e+134) (not (<= t_1 5e+128)))
     (* (- (+ (/ (+ (+ z y) x) b) a) 0.5) 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 <= -1e+134) || !(t_1 <= 5e+128)) {
		tmp = (((((z + y) + x) / b) + a) - 0.5) * 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 <= -1e+134) || !(t_1 <= 5e+128))
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(z + y) + x) / b) + a) - 0.5) * 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, -1e+134], N[Not[LessEqual[t$95$1, 5e+128]], $MachinePrecision]], N[(N[(N[(N[(N[(N[(z + y), $MachinePrecision] + x), $MachinePrecision] / b), $MachinePrecision] + a), $MachinePrecision] - 0.5), $MachinePrecision] * b), $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 -1 \cdot 10^{+134} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+128}\right):\\
\;\;\;\;\left(\left(\frac{\left(z + y\right) + x}{b} + a\right) - 0.5\right) \cdot b\\

\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) < -9.99999999999999921e133 or 5e128 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
      8. +-commutativeN/A

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

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

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

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

      \[\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 inf

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

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

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

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

      \[\leadsto \left(\left(\frac{\left(z + y\right) + x}{b} + a\right) - \frac{1}{2}\right) \cdot b \]
    10. Step-by-step derivation
      1. Applied rewrites92.1%

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

      if -9.99999999999999921e133 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5e128

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

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

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

    Alternative 3: 89.9% accurate, 0.9× speedup?

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

      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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      if -9.9999999999999995e32 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5e128

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

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

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

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

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

          \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
        8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(y + \left(1 \cdot z - \color{blue}{\log t \cdot z}\right)\right) + x \]
        6. fp-cancel-sub-signN/A

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

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

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

          \[\leadsto \left(y + z \cdot \color{blue}{\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \log t\right)}\right) + x \]
        10. metadata-evalN/A

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

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

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

          \[\leadsto \left(y + \left(\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right) \cdot \left(1 - \log t\right)\right) + x \]
        14. distribute-lft-neg-outN/A

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

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

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

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

          \[\leadsto \color{blue}{\left(y + z \cdot \left(1 - \log t\right)\right) + x} \]
      11. Applied rewrites94.1%

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

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

      1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
        8. +-commutativeN/A

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

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

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

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

        \[\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 inf

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

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

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

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

        \[\leadsto \left(\left(\frac{\left(z + y\right) + x}{b} + a\right) - \frac{1}{2}\right) \cdot b \]
      10. Step-by-step derivation
        1. Applied rewrites92.2%

          \[\leadsto \left(\left(\frac{\left(z + y\right) + x}{b} + a\right) - 0.5\right) \cdot b \]
      11. Recombined 3 regimes into one program.
      12. Add Preprocessing

      Alternative 4: 58.2% accurate, 1.0× speedup?

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

        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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.9999999999999996e-82 < (-.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 x around 0

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

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

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

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

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

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

              \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
            8. +-commutativeN/A

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

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

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

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

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

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

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

          Alternative 5: 85.3% accurate, 1.0× speedup?

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

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.3200000000000001e75 < x

            1. Initial program 99.9%

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

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

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

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

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

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

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

                \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
              8. +-commutativeN/A

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

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

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

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

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

          Alternative 6: 84.9% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+210} \lor \neg \left(z \leq 1.2 \cdot 10^{+243}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= z -1.9e+210) (not (<= z 1.2e+243)))
             (fma (- 1.0 (log t)) z y)
             (fma (- a 0.5) b (+ y x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((z <= -1.9e+210) || !(z <= 1.2e+243)) {
          		tmp = fma((1.0 - log(t)), z, y);
          	} else {
          		tmp = fma((a - 0.5), b, (y + x));
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((z <= -1.9e+210) || !(z <= 1.2e+243))
          		tmp = fma(Float64(1.0 - log(t)), z, y);
          	else
          		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e+210], N[Not[LessEqual[z, 1.2e+243]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1.9 \cdot 10^{+210} \lor \neg \left(z \leq 1.2 \cdot 10^{+243}\right):\\
          \;\;\;\;\mathsf{fma}\left(1 - \log t, z, y\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.90000000000000014e210 or 1.2e243 < 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 + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right) - \color{blue}{\log t \cdot z} \]
              2. fp-cancel-sub-sign-invN/A

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

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

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

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

                \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
              8. +-commutativeN/A

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

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

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

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

              \[\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 rewrites88.6%

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

              if -1.90000000000000014e210 < z < 1.2e243

              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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 84.1% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+210} \lor \neg \left(z \leq 1.2 \cdot 10^{+243}\right):\\ \;\;\;\;\left(1 - \log t\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= z -2.2e+210) (not (<= z 1.2e+243)))
               (* (- 1.0 (log t)) z)
               (fma (- a 0.5) b (+ y x))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((z <= -2.2e+210) || !(z <= 1.2e+243)) {
            		tmp = (1.0 - log(t)) * z;
            	} else {
            		tmp = fma((a - 0.5), b, (y + x));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((z <= -2.2e+210) || !(z <= 1.2e+243))
            		tmp = Float64(Float64(1.0 - log(t)) * z);
            	else
            		tmp = fma(Float64(a - 0.5), b, Float64(y + x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.2e+210], N[Not[LessEqual[z, 1.2e+243]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -2.2 \cdot 10^{+210} \lor \neg \left(z \leq 1.2 \cdot 10^{+243}\right):\\
            \;\;\;\;\left(1 - \log t\right) \cdot z\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y + x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -2.19999999999999987e210 or 1.2e243 < 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.f6483.8

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

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

              if -2.19999999999999987e210 < z < 1.2e243

              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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 50.3% accurate, 3.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+47} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+154}\right):\\ \;\;\;\;b \cdot \left(a - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, 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 -4e+47) (not (<= t_1 5e+154)))
                 (* b (- a 0.5))
                 (fma b -0.5 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 <= -4e+47) || !(t_1 <= 5e+154)) {
            		tmp = b * (a - 0.5);
            	} else {
            		tmp = fma(b, -0.5, 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 <= -4e+47) || !(t_1 <= 5e+154))
            		tmp = Float64(b * Float64(a - 0.5));
            	else
            		tmp = fma(b, -0.5, 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, -4e+47], N[Not[LessEqual[t$95$1, 5e+154]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(b * -0.5 + y), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(a - 0.5\right) \cdot b\\
            \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+47} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+154}\right):\\
            \;\;\;\;b \cdot \left(a - 0.5\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(b, -0.5, 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.0000000000000002e47 or 5.00000000000000004e154 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

              1. Initial program 99.9%

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

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

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

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

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

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

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

                  \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
                8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

                  if -4.0000000000000002e47 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.00000000000000004e154

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

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

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

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

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

                      \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
                    8. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                    Alternative 9: 48.6% accurate, 6.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5700 \lor \neg \left(a \leq 98000000000\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (if (or (<= a -5700.0) (not (<= a 98000000000.0))) (* b a) (fma b -0.5 y)))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if ((a <= -5700.0) || !(a <= 98000000000.0)) {
                    		tmp = b * a;
                    	} else {
                    		tmp = fma(b, -0.5, y);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	tmp = 0.0
                    	if ((a <= -5700.0) || !(a <= 98000000000.0))
                    		tmp = Float64(b * a);
                    	else
                    		tmp = fma(b, -0.5, y);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5700.0], N[Not[LessEqual[a, 98000000000.0]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(b * -0.5 + y), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;a \leq -5700 \lor \neg \left(a \leq 98000000000\right):\\
                    \;\;\;\;b \cdot a\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if a < -5700 or 9.8e10 < a

                      1. Initial program 99.9%

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

                          \[\leadsto \color{blue}{b \cdot a} \]
                      5. Applied rewrites57.1%

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

                      if -5700 < a < 9.8e10

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

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

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

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

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

                          \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
                        8. +-commutativeN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(b, -0.5, y\right) \]
                        4. Recombined 2 regimes into one program.
                        5. Final simplification49.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5700 \lor \neg \left(a \leq 98000000000\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, -0.5, y\right)\\ \end{array} \]
                        6. Add Preprocessing

                        Alternative 10: 79.0% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, \color{blue}{y + x}\right) \]
                          9. 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. Add Preprocessing

                        Alternative 11: 57.7% accurate, 12.6× speedup?

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

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

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

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

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

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

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

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

                            \[\leadsto \left(y + \left(z + b \cdot \left(a - \frac{1}{2}\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(y + \left(z + b \cdot \left(a - \frac{1}{2}\right)\right)\right)} \]
                          8. +-commutativeN/A

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

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

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

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

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

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

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

                          Alternative 12: 25.5% accurate, 21.0× speedup?

                          \[\begin{array}{l} \\ b \cdot a \end{array} \]
                          (FPCore (x y z t a b) :precision binary64 (* b a))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return b * a;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a, b)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8), intent (in) :: b
                              code = b * a
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	return b * a;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	return b * a
                          
                          function code(x, y, z, t, a, b)
                          	return Float64(b * a)
                          end
                          
                          function tmp = code(x, y, z, t, a, b)
                          	tmp = b * a;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(b * a), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          b \cdot a
                          \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 inf

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

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

                              \[\leadsto \color{blue}{b \cdot a} \]
                          5. Applied rewrites28.1%

                            \[\leadsto \color{blue}{b \cdot a} \]
                          6. Add Preprocessing

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

                          \[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (+
                            (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
                            (* (- a 0.5) b)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a, b)
                          use fmin_fmax_functions
                              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 2025016 
                          (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)))