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

Percentage Accurate: 99.8% → 99.9%
Time: 5.9s
Alternatives: 18
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
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 18 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
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.9% accurate, 1.0× speedup?

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

\\
\left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\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. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;b \cdot a\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, b, x\right)\\

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

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


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

    1. Initial program 100.0%

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

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

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

        \[\leadsto b \cdot \color{blue}{a} \]
    5. Applied rewrites94.8%

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

    if -inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -2e-107

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
      7. lift-log.f6499.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, \left(\left(1 - \log t\right) \cdot z + y\right) + x\right) \]
          3. Applied rewrites92.7%

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

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

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

            if 2e292 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.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 b around inf

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

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

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

                \[\leadsto \left(a - 0.5\right) \cdot b \]
            5. Applied rewrites81.2%

              \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b} \]
          6. Recombined 4 regimes into one program.
          7. Add Preprocessing

          Alternative 3: 45.9% accurate, 0.3× speedup?

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

            1. Initial program 100.0%

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

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

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

                \[\leadsto b \cdot \color{blue}{a} \]
            5. Applied rewrites97.3%

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

            if -inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -2e-107

            1. Initial program 99.8%

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
              7. lift-log.f6499.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -2e-107 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 4.00000000000000007e306

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(-0.5, b, y\right) \]
                  6. Recombined 3 regimes into one program.
                  7. Add Preprocessing

                  Alternative 4: 39.6% accurate, 0.3× speedup?

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

                    1. Initial program 100.0%

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

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

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

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

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

                    if -inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -9.9999999999999992e-72

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                        \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                      7. lift-log.f6499.8

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, \left(\left(1 - \log t\right) \cdot z + y\right) + x\right) \]
                      3. Applied rewrites83.4%

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

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

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

                        if -9.9999999999999992e-72 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 2e292

                        1. Initial program 99.8%

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

                          \[\leadsto \color{blue}{y} \]
                        4. Step-by-step derivation
                          1. Applied rewrites25.8%

                            \[\leadsto \color{blue}{y} \]
                        5. Recombined 3 regimes into one program.
                        6. Add Preprocessing

                        Alternative 5: 33.7% accurate, 0.3× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b))))
                           (if (<= t_1 (- INFINITY))
                             (* b a)
                             (if (<= t_1 -2e-107) x (if (<= t_1 2e+292) y (* b a))))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                        	double tmp;
                        	if (t_1 <= -((double) INFINITY)) {
                        		tmp = b * a;
                        	} else if (t_1 <= -2e-107) {
                        		tmp = x;
                        	} else if (t_1 <= 2e+292) {
                        		tmp = y;
                        	} else {
                        		tmp = b * a;
                        	}
                        	return tmp;
                        }
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
                        	double tmp;
                        	if (t_1 <= -Double.POSITIVE_INFINITY) {
                        		tmp = b * a;
                        	} else if (t_1 <= -2e-107) {
                        		tmp = x;
                        	} else if (t_1 <= 2e+292) {
                        		tmp = y;
                        	} else {
                        		tmp = b * a;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
                        	tmp = 0
                        	if t_1 <= -math.inf:
                        		tmp = b * a
                        	elif t_1 <= -2e-107:
                        		tmp = x
                        	elif t_1 <= 2e+292:
                        		tmp = y
                        	else:
                        		tmp = b * a
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
                        	tmp = 0.0
                        	if (t_1 <= Float64(-Inf))
                        		tmp = Float64(b * a);
                        	elseif (t_1 <= -2e-107)
                        		tmp = x;
                        	elseif (t_1 <= 2e+292)
                        		tmp = y;
                        	else
                        		tmp = Float64(b * a);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
                        	tmp = 0.0;
                        	if (t_1 <= -Inf)
                        		tmp = b * a;
                        	elseif (t_1 <= -2e-107)
                        		tmp = x;
                        	elseif (t_1 <= 2e+292)
                        		tmp = y;
                        	else
                        		tmp = b * a;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, -2e-107], x, If[LessEqual[t$95$1, 2e+292], y, N[(b * a), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\\
                        \mathbf{if}\;t\_1 \leq -\infty:\\
                        \;\;\;\;b \cdot a\\
                        
                        \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-107}:\\
                        \;\;\;\;x\\
                        
                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
                        \;\;\;\;y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;b \cdot a\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -inf.0 or 2e292 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

                          1. Initial program 100.0%

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

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

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

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

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

                          if -inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -2e-107

                          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 inf

                            \[\leadsto \color{blue}{x} \]
                          4. Step-by-step derivation
                            1. Applied rewrites17.7%

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

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

                            1. Initial program 99.8%

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

                              \[\leadsto \color{blue}{y} \]
                            4. Step-by-step derivation
                              1. Applied rewrites26.0%

                                \[\leadsto \color{blue}{y} \]
                            5. Recombined 3 regimes into one program.
                            6. Add Preprocessing

                            Alternative 6: 60.9% accurate, 0.5× speedup?

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

                              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 inf

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

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

                                if -2e9 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 2e292

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 2e292 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.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 b around inf

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

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

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

                                      \[\leadsto \left(a - 0.5\right) \cdot b \]
                                  5. Applied rewrites81.2%

                                    \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification63.5%

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

                                Alternative 7: 45.7% accurate, 0.5× speedup?

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

                                  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 inf

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

                                      \[\leadsto \color{blue}{x} + \left(a - 0.5\right) \cdot b \]
                                    2. Taylor expanded in a around inf

                                      \[\leadsto x + \color{blue}{a} \cdot b \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites42.9%

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

                                      if -9.99999999999999924e-25 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < 2e292

                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, \left(\left(1 - \log t\right) \cdot z + y\right) + x\right) \]
                                        3. Applied rewrites93.0%

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

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

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

                                          if 2e292 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.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 b around inf

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

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

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

                                              \[\leadsto \left(a - 0.5\right) \cdot b \]
                                          5. Applied rewrites81.2%

                                            \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b} \]
                                        6. Recombined 3 regimes into one program.
                                        7. Final simplification48.0%

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

                                        Alternative 8: 91.6% accurate, 0.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+210}:\\ \;\;\;\;\left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + -0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z - z \cdot \log t\right) + t\_1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (let* ((t_1 (* (- a 0.5) b)))
                                           (if (<= t_1 -1e+116)
                                             (+ (fma (- a 0.5) b y) x)
                                             (if (<= t_1 2e+210)
                                               (+ (+ (fma (- 1.0 (log t)) z y) x) (* -0.5 b))
                                               (+ (- z (* z (log t))) t_1)))))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double t_1 = (a - 0.5) * b;
                                        	double tmp;
                                        	if (t_1 <= -1e+116) {
                                        		tmp = fma((a - 0.5), b, y) + x;
                                        	} else if (t_1 <= 2e+210) {
                                        		tmp = (fma((1.0 - log(t)), z, y) + x) + (-0.5 * b);
                                        	} else {
                                        		tmp = (z - (z * log(t))) + t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z, t, a, b)
                                        	t_1 = Float64(Float64(a - 0.5) * b)
                                        	tmp = 0.0
                                        	if (t_1 <= -1e+116)
                                        		tmp = Float64(fma(Float64(a - 0.5), b, y) + x);
                                        	elseif (t_1 <= 2e+210)
                                        		tmp = Float64(Float64(fma(Float64(1.0 - log(t)), z, y) + x) + Float64(-0.5 * b));
                                        	else
                                        		tmp = Float64(Float64(z - Float64(z * log(t))) + t_1);
                                        	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+116], N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+210], N[(N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision] + x), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(a - 0.5\right) \cdot b\\
                                        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\
                                        \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\
                                        
                                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+210}:\\
                                        \;\;\;\;\left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + -0.5 \cdot b\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(z - z \cdot \log t\right) + t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.00000000000000002e116

                                          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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                            2. lower-+.f64N/A

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

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

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

                                              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                            6. lift--.f6495.0

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

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

                                          if -1.00000000000000002e116 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999985e210

                                          1. Initial program 99.8%

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

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

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

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

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

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

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

                                              \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                                            7. lift-log.f6499.8

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

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

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

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

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

                                            1. Initial program 100.0%

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

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

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

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

                                            Alternative 9: 91.6% 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^{+116}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+210}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, \mathsf{fma}\left(1 - \log t, z, y + x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z - z \cdot \log t\right) + t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b)
                                             :precision binary64
                                             (let* ((t_1 (* (- a 0.5) b)))
                                               (if (<= t_1 -1e+116)
                                                 (+ (fma (- a 0.5) b y) x)
                                                 (if (<= t_1 2e+210)
                                                   (fma -0.5 b (fma (- 1.0 (log t)) z (+ y x)))
                                                   (+ (- z (* z (log t))) t_1)))))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	double t_1 = (a - 0.5) * b;
                                            	double tmp;
                                            	if (t_1 <= -1e+116) {
                                            		tmp = fma((a - 0.5), b, y) + x;
                                            	} else if (t_1 <= 2e+210) {
                                            		tmp = fma(-0.5, b, fma((1.0 - log(t)), z, (y + x)));
                                            	} else {
                                            		tmp = (z - (z * log(t))) + t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b)
                                            	t_1 = Float64(Float64(a - 0.5) * b)
                                            	tmp = 0.0
                                            	if (t_1 <= -1e+116)
                                            		tmp = Float64(fma(Float64(a - 0.5), b, y) + x);
                                            	elseif (t_1 <= 2e+210)
                                            		tmp = fma(-0.5, b, fma(Float64(1.0 - log(t)), z, Float64(y + x)));
                                            	else
                                            		tmp = Float64(Float64(z - Float64(z * log(t))) + t_1);
                                            	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+116], N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+210], N[(-0.5 * b + N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := \left(a - 0.5\right) \cdot b\\
                                            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\
                                            \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\
                                            
                                            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+210}:\\
                                            \;\;\;\;\mathsf{fma}\left(-0.5, b, \mathsf{fma}\left(1 - \log t, z, y + x\right)\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(z - z \cdot \log t\right) + t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.00000000000000002e116

                                              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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                                2. lower-+.f64N/A

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                6. lift--.f6495.0

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

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

                                              if -1.00000000000000002e116 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999985e210

                                              1. Initial program 99.8%

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

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

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

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

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

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

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

                                                  \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                                                7. lift-log.f6499.8

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, \left(\left(1 - \log t\right) \cdot z + y\right) + x\right) \]
                                                3. Applied rewrites96.0%

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

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

                                                1. Initial program 100.0%

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

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

                                                    \[\leadsto \left(\color{blue}{z} - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
                                                5. Recombined 3 regimes into one program.
                                                6. Add Preprocessing

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

                                                  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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                                    2. lower-+.f64N/A

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                    6. lift--.f6495.0

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

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

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

                                                  1. Initial program 99.8%

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

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

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

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

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

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

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

                                                      \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                                                    7. lift-log.f6499.8

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 5.00000000000000009e233 < (*.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 b around inf

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

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

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

                                                        \[\leadsto \left(a - 0.5\right) \cdot b \]
                                                    5. Applied rewrites97.4%

                                                      \[\leadsto \color{blue}{\left(a - 0.5\right) \cdot b} \]
                                                  8. Recombined 3 regimes into one program.
                                                  9. Add Preprocessing

                                                  Alternative 11: 89.8% accurate, 0.9× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+22} \lor \neg \left(t\_1 \leq 10^{+84}\right):\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) + \left(z - \log t \cdot z\right)\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b)
                                                   :precision binary64
                                                   (let* ((t_1 (* (- a 0.5) b)))
                                                     (if (or (<= t_1 -5e+22) (not (<= t_1 1e+84)))
                                                       (+ (fma (- a 0.5) b y) x)
                                                       (+ (+ y x) (- z (* (log t) z))))))
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	double t_1 = (a - 0.5) * b;
                                                  	double tmp;
                                                  	if ((t_1 <= -5e+22) || !(t_1 <= 1e+84)) {
                                                  		tmp = fma((a - 0.5), b, y) + x;
                                                  	} else {
                                                  		tmp = (y + x) + (z - (log(t) * z));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	t_1 = Float64(Float64(a - 0.5) * b)
                                                  	tmp = 0.0
                                                  	if ((t_1 <= -5e+22) || !(t_1 <= 1e+84))
                                                  		tmp = Float64(fma(Float64(a - 0.5), b, y) + x);
                                                  	else
                                                  		tmp = Float64(Float64(y + x) + Float64(z - Float64(log(t) * z)));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+22], N[Not[LessEqual[t$95$1, 1e+84]], $MachinePrecision]], N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(z - N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := \left(a - 0.5\right) \cdot b\\
                                                  \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+22} \lor \neg \left(t\_1 \leq 10^{+84}\right):\\
                                                  \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(y + x\right) + \left(z - \log t \cdot z\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.9999999999999996e22 or 1.00000000000000006e84 < (*.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 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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                                      2. lower-+.f64N/A

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

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

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

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

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

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

                                                    if -4.9999999999999996e22 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000006e84

                                                    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 b around 0

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

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

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

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

                                                        \[\leadsto \left(\left(y + x\right) + z\right) - z \cdot \log t \]
                                                      5. lower-+.f64N/A

                                                        \[\leadsto \left(\left(y + x\right) + z\right) - z \cdot \log t \]
                                                      6. *-commutativeN/A

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

                                                        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot \color{blue}{z} \]
                                                      8. lift-log.f6491.3

                                                        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot z \]
                                                    5. Applied rewrites91.3%

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

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

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

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

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

                                                        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot z \]
                                                      6. associate--l+N/A

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(y + x\right) + \left(z - \log t \cdot z\right) \]
                                                      15. lift-*.f6491.3

                                                        \[\leadsto \left(y + x\right) + \left(z - \log t \cdot \color{blue}{z}\right) \]
                                                    7. Applied rewrites91.3%

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

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

                                                  Alternative 12: 58.3% accurate, 1.0× speedup?

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

                                                    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 inf

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

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

                                                      if -2e-107 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                                                      1. Initial program 99.8%

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

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

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

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

                                                      Alternative 13: 22.1% accurate, 1.0× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \leq -2 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b)
                                                       :precision binary64
                                                       (if (<= (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)) -2e-107) x y))
                                                      double code(double x, double y, double z, double t, double a, double b) {
                                                      	double tmp;
                                                      	if (((((x + y) + z) - (z * log(t))) + ((a - 0.5) * b)) <= -2e-107) {
                                                      		tmp = x;
                                                      	} else {
                                                      		tmp = y;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      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
                                                          real(8) :: tmp
                                                          if (((((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)) <= (-2d-107)) then
                                                              tmp = x
                                                          else
                                                              tmp = y
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                                      	double tmp;
                                                      	if (((((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b)) <= -2e-107) {
                                                      		tmp = x;
                                                      	} else {
                                                      		tmp = y;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t, a, b):
                                                      	tmp = 0
                                                      	if ((((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)) <= -2e-107:
                                                      		tmp = x
                                                      	else:
                                                      		tmp = y
                                                      	return tmp
                                                      
                                                      function code(x, y, z, t, a, b)
                                                      	tmp = 0.0
                                                      	if (Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) <= -2e-107)
                                                      		tmp = x;
                                                      	else
                                                      		tmp = y;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x, y, z, t, a, b)
                                                      	tmp = 0.0;
                                                      	if (((((x + y) + z) - (z * log(t))) + ((a - 0.5) * b)) <= -2e-107)
                                                      		tmp = x;
                                                      	else
                                                      		tmp = y;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], -2e-107], x, y]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \leq -2 \cdot 10^{-107}:\\
                                                      \;\;\;\;x\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;y\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)) < -2e-107

                                                        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 inf

                                                          \[\leadsto \color{blue}{x} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites15.4%

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

                                                          if -2e-107 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.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 y around inf

                                                            \[\leadsto \color{blue}{y} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites21.9%

                                                              \[\leadsto \color{blue}{y} \]
                                                          5. Recombined 2 regimes into one program.
                                                          6. Add Preprocessing

                                                          Alternative 14: 85.5% accurate, 1.0× speedup?

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

                                                            1. Initial program 99.7%

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

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

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

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

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

                                                                \[\leadsto \left(\left(y + x\right) + z\right) - z \cdot \log t \]
                                                              5. lower-+.f64N/A

                                                                \[\leadsto \left(\left(y + x\right) + z\right) - z \cdot \log t \]
                                                              6. *-commutativeN/A

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

                                                                \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot \color{blue}{z} \]
                                                              8. lift-log.f6483.0

                                                                \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot z \]
                                                            5. Applied rewrites83.0%

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

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

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

                                                              if -3.6e151 < z < 3.60000000000000036e187

                                                              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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                                                2. lower-+.f64N/A

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                                6. lift--.f6493.0

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

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

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

                                                            Alternative 15: 83.5% accurate, 1.0× speedup?

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

                                                              1. Initial program 99.6%

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

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

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

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

                                                                  \[\leadsto \left(1 - \log t\right) \cdot z \]
                                                                4. lift-log.f6474.2

                                                                  \[\leadsto \left(1 - \log t\right) \cdot z \]
                                                              5. Applied rewrites74.2%

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

                                                              if -8.7999999999999999e161 < z < 9.8e244

                                                              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 \left(y + b \cdot \left(a - \frac{1}{2}\right)\right) + \color{blue}{x} \]
                                                                2. lower-+.f64N/A

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

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

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

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

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

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

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

                                                            Alternative 16: 70.0% accurate, 3.3× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+181} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+210}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y + 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 -2e+181) (not (<= t_1 2e+210))) t_1 (fma -0.5 b (+ y 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 <= -2e+181) || !(t_1 <= 2e+210)) {
                                                            		tmp = t_1;
                                                            	} else {
                                                            		tmp = fma(-0.5, b, (y + 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 <= -2e+181) || !(t_1 <= 2e+210))
                                                            		tmp = t_1;
                                                            	else
                                                            		tmp = fma(-0.5, b, Float64(y + 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, -2e+181], N[Not[LessEqual[t$95$1, 2e+210]], $MachinePrecision]], t$95$1, N[(-0.5 * b + N[(y + x), $MachinePrecision]), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_1 := \left(a - 0.5\right) \cdot b\\
                                                            \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+181} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+210}\right):\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(-0.5, b, y + x\right)\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.9999999999999998e181 or 1.99999999999999985e210 < (*.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 b around inf

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

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

                                                                  \[\leadsto \left(a - \frac{1}{2}\right) \cdot \color{blue}{b} \]
                                                                3. lift--.f6489.9

                                                                  \[\leadsto \left(a - 0.5\right) \cdot b \]
                                                              5. Applied rewrites89.9%

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

                                                              if -1.9999999999999998e181 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999985e210

                                                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 17: 78.7% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 18: 21.6% accurate, 126.0× speedup?

                                                              \[\begin{array}{l} \\ x \end{array} \]
                                                              (FPCore (x y z t a b) :precision binary64 x)
                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                              	return x;
                                                              }
                                                              
                                                              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
                                                              end function
                                                              
                                                              public static double code(double x, double y, double z, double t, double a, double b) {
                                                              	return x;
                                                              }
                                                              
                                                              def code(x, y, z, t, a, b):
                                                              	return x
                                                              
                                                              function code(x, y, z, t, a, b)
                                                              	return x
                                                              end
                                                              
                                                              function tmp = code(x, y, z, t, a, b)
                                                              	tmp = x;
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_] := x
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              x
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 99.9%

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

                                                                \[\leadsto \color{blue}{x} \]
                                                              4. Step-by-step derivation
                                                                1. Applied rewrites17.7%

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

                                                                Reproduce

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