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

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

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

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

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

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

Alternative 2: 46.5% 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 -2 \cdot 10^{+191}:\\ \;\;\;\;x + b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-113}:\\ \;\;\;\;x + -0.5 \cdot b\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+297}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.5 + a\right) \cdot b\\ \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 -2e+191)
     (+ x (* b a))
     (if (<= t_1 -1e-113)
       (+ x (* -0.5 b))
       (if (<= t_1 4e+297) (fma -0.5 b y) (* (+ -0.5 a) b))))))
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 <= -2e+191) {
		tmp = x + (b * a);
	} else if (t_1 <= -1e-113) {
		tmp = x + (-0.5 * b);
	} else if (t_1 <= 4e+297) {
		tmp = fma(-0.5, b, y);
	} else {
		tmp = (-0.5 + a) * b;
	}
	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 <= -2e+191)
		tmp = Float64(x + Float64(b * a));
	elseif (t_1 <= -1e-113)
		tmp = Float64(x + Float64(-0.5 * b));
	elseif (t_1 <= 4e+297)
		tmp = fma(-0.5, b, y);
	else
		tmp = Float64(Float64(-0.5 + a) * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+191], N[(x + N[(b * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-113], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+297], N[(-0.5 * b + y), $MachinePrecision], N[(N[(-0.5 + a), $MachinePrecision] * b), $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 -2 \cdot 10^{+191}:\\
\;\;\;\;x + b \cdot a\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-113}:\\
\;\;\;\;x + -0.5 \cdot b\\

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

\mathbf{else}:\\
\;\;\;\;\left(-0.5 + a\right) \cdot b\\


\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)) < -2.00000000000000015e191

    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 rewrites57.6%

        \[\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. *-commutativeN/A

          \[\leadsto x + \color{blue}{a} \cdot b \]
        2. *-commutativeN/A

          \[\leadsto x + b \cdot \color{blue}{a} \]
        3. lower-*.f6454.8

          \[\leadsto x + b \cdot \color{blue}{a} \]
      4. Applied rewrites54.8%

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

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

      1. Initial program 99.7%

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

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

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

          \[\leadsto x + \color{blue}{\frac{-1}{2} \cdot b} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto x + \color{blue}{\frac{-1}{2}} \cdot b \]
          2. lower-*.f6442.1

            \[\leadsto x + -0.5 \cdot \color{blue}{b} \]
        4. Applied rewrites42.1%

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

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

        1. Initial program 99.9%

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

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

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

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

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

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

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

            if 4.0000000000000001e297 < (+.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. distribute-rgt-out--N/A

                \[\leadsto a \cdot b - \color{blue}{\frac{1}{2} \cdot b} \]
              2. fp-cancel-sub-signN/A

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

                \[\leadsto a \cdot b + \frac{-1}{2} \cdot b \]
              4. distribute-rgt-outN/A

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

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

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

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

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

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

          Alternative 3: 57.2% accurate, 0.5× 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 -2 \cdot 10^{+191}:\\ \;\;\;\;x + b \cdot a\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-113}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5 + a, b, y\right)\\ \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 -2e+191)
               (+ x (* b a))
               (if (<= t_1 -1e-113) (fma -0.5 b (+ x y)) (fma (+ -0.5 a) b y)))))
          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 <= -2e+191) {
          		tmp = x + (b * a);
          	} else if (t_1 <= -1e-113) {
          		tmp = fma(-0.5, b, (x + y));
          	} else {
          		tmp = fma((-0.5 + a), b, y);
          	}
          	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 <= -2e+191)
          		tmp = Float64(x + Float64(b * a));
          	elseif (t_1 <= -1e-113)
          		tmp = fma(-0.5, b, Float64(x + y));
          	else
          		tmp = fma(Float64(-0.5 + a), b, y);
          	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, -2e+191], N[(x + N[(b * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-113], N[(-0.5 * b + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 + a), $MachinePrecision] * b + y), $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 -2 \cdot 10^{+191}:\\
          \;\;\;\;x + b \cdot a\\
          
          \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-113}:\\
          \;\;\;\;\mathsf{fma}\left(-0.5, b, x + y\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-0.5 + a, b, y\right)\\
          
          
          \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)) < -2.00000000000000015e191

            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 rewrites57.6%

                \[\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. *-commutativeN/A

                  \[\leadsto x + \color{blue}{a} \cdot b \]
                2. *-commutativeN/A

                  \[\leadsto x + b \cdot \color{blue}{a} \]
                3. lower-*.f6454.8

                  \[\leadsto x + b \cdot \color{blue}{a} \]
              4. Applied rewrites54.8%

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

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

              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. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, x + y\right) \]
              12. Step-by-step derivation
                1. Applied rewrites63.4%

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

                if -9.99999999999999979e-114 < (+.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 x around 0

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

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

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

                    \[\leadsto \mathsf{fma}\left(-0.5 + a, b, y\right) \]
                7. Recombined 3 regimes into one program.
                8. Final simplification56.7%

                  \[\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 -2 \cdot 10^{+191}:\\ \;\;\;\;x + b \cdot a\\ \mathbf{elif}\;\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \leq -1 \cdot 10^{-113}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5 + a, b, y\right)\\ \end{array} \]
                9. Add Preprocessing

                Alternative 4: 92.5% accurate, 0.9× speedup?

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

                  1. Initial program 99.9%

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} + a, b, z \cdot \left(1 - \log t\right)\right) \]
                  6. Applied rewrites98.2%

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

                  if -4.0000000000000002e206 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e100

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                  7. Applied rewrites90.7%

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

                Alternative 5: 90.2% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-21} \lor \neg \left(t\_1 \leq 10^{+100}\right):\\ \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - \log t, z, 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-21) (not (<= t_1 1e+100)))
                     (- (+ z (+ y x)) (* (- 0.5 a) b))
                     (fma (- 1.0 (log t)) z (+ 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-21) || !(t_1 <= 1e+100)) {
                		tmp = (z + (y + x)) - ((0.5 - a) * b);
                	} else {
                		tmp = fma((1.0 - log(t)), z, (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-21) || !(t_1 <= 1e+100))
                		tmp = Float64(Float64(z + Float64(y + x)) - Float64(Float64(0.5 - a) * b));
                	else
                		tmp = fma(Float64(1.0 - log(t)), z, 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-21], N[Not[LessEqual[t$95$1, 1e+100]], $MachinePrecision]], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + 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^{-21} \lor \neg \left(t\_1 \leq 10^{+100}\right):\\
                \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(1 - \log t, z, 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.99999999999999982e-21 or 1.00000000000000002e100 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                  7. Applied rewrites87.5%

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

                  if -1.99999999999999982e-21 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e100

                  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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                    11. distribute-rgt1-inN/A

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

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                    15. *-lft-identityN/A

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) \cdot \left(\color{blue}{1} - \log t\right)\right) \]
                  5. Applied rewrites95.0%

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

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

                Alternative 6: 90.2% accurate, 0.9× speedup?

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                  7. Applied rewrites87.5%

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

                  if -1.99999999999999982e-21 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000002e100

                  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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                    11. distribute-rgt1-inN/A

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

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                    15. *-lft-identityN/A

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

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

                      \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) \cdot \left(\color{blue}{1} - \log t\right)\right) \]
                  5. Applied rewrites95.0%

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

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

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

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

                      \[\leadsto \left(\left(1 - \log t\right) \cdot z + y\right) + \color{blue}{x} \]
                    5. lower-fma.f6495.0

                      \[\leadsto \mathsf{fma}\left(1 - \log t, z, y\right) + x \]
                  7. Applied rewrites95.0%

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

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

                Alternative 7: 59.3% accurate, 1.0× speedup?

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

                  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} + \left(a - \frac{1}{2}\right) \cdot b \]
                  4. Step-by-step derivation
                    1. Applied rewrites54.1%

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

                    if -9.99999999999999979e-114 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                    1. Initial program 99.9%

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

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

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

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

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

                    Alternative 8: 22.4% 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 -1 \cdot 10^{-113}:\\ \;\;\;\;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)) -1e-113) 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)) <= -1e-113) {
                    		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)) <= (-1d-113)) 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)) <= -1e-113) {
                    		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)) <= -1e-113:
                    		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)) <= -1e-113)
                    		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)) <= -1e-113)
                    		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], -1e-113], 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 -1 \cdot 10^{-113}:\\
                    \;\;\;\;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)) < -9.99999999999999979e-114

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

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

                        if -9.99999999999999979e-114 < (+.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 rewrites22.2%

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

                        Alternative 9: 83.1% accurate, 1.0× speedup?

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

                          1. Initial program 99.8%

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

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

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

                          if 2.00000000000000007e-10 < (+.f64 x y)

                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                          7. Applied rewrites88.2%

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

                        Alternative 10: 86.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                            11. distribute-rgt1-inN/A

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

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

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

                              \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                            15. *-lft-identityN/A

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

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

                              \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) \cdot \left(\color{blue}{1} - \log t\right)\right) \]
                          5. Applied rewrites73.8%

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

                            \[\leadsto \mathsf{fma}\left(1 - \log t, z, x\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites69.2%

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

                            if -1.05e180 < z < 3.89999999999999999e168

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                            7. Applied rewrites90.3%

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

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

                          Alternative 11: 85.2% accurate, 1.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+182} \lor \neg \left(z \leq 1.1 \cdot 10^{+229}\right):\\ \;\;\;\;\left(1 - \log t\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (or (<= z -2.1e+182) (not (<= z 1.1e+229)))
                             (* (- 1.0 (log t)) z)
                             (- (+ z (+ y x)) (* (- 0.5 a) b))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if ((z <= -2.1e+182) || !(z <= 1.1e+229)) {
                          		tmp = (1.0 - log(t)) * z;
                          	} else {
                          		tmp = (z + (y + x)) - ((0.5 - a) * b);
                          	}
                          	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 ((z <= (-2.1d+182)) .or. (.not. (z <= 1.1d+229))) then
                                  tmp = (1.0d0 - log(t)) * z
                              else
                                  tmp = (z + (y + x)) - ((0.5d0 - a) * b)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if ((z <= -2.1e+182) || !(z <= 1.1e+229)) {
                          		tmp = (1.0 - Math.log(t)) * z;
                          	} else {
                          		tmp = (z + (y + x)) - ((0.5 - a) * b);
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	tmp = 0
                          	if (z <= -2.1e+182) or not (z <= 1.1e+229):
                          		tmp = (1.0 - math.log(t)) * z
                          	else:
                          		tmp = (z + (y + x)) - ((0.5 - a) * b)
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if ((z <= -2.1e+182) || !(z <= 1.1e+229))
                          		tmp = Float64(Float64(1.0 - log(t)) * z);
                          	else
                          		tmp = Float64(Float64(z + Float64(y + x)) - Float64(Float64(0.5 - a) * b));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	tmp = 0.0;
                          	if ((z <= -2.1e+182) || ~((z <= 1.1e+229)))
                          		tmp = (1.0 - log(t)) * z;
                          	else
                          		tmp = (z + (y + x)) - ((0.5 - a) * b);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e+182], N[Not[LessEqual[z, 1.1e+229]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 - a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -2.1 \cdot 10^{+182} \lor \neg \left(z \leq 1.1 \cdot 10^{+229}\right):\\
                          \;\;\;\;\left(1 - \log t\right) \cdot z\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -2.0999999999999999e182 or 1.10000000000000002e229 < 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. lower-log.f6466.3

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

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

                            if -2.0999999999999999e182 < z < 1.10000000000000002e229

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                            7. Applied rewrites89.2%

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

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

                          Alternative 12: 65.4% accurate, 3.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+206} \lor \neg \left(t\_1 \leq 10^{+213}\right):\\ \;\;\;\;\left(-0.5 + a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (- a 0.5) b)))
                             (if (or (<= t_1 -4e+206) (not (<= t_1 1e+213))) (* (+ -0.5 a) 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 <= -4e+206) || !(t_1 <= 1e+213)) {
                          		tmp = (-0.5 + a) * b;
                          	} else {
                          		tmp = y + x;
                          	}
                          	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 ((t_1 <= (-4d+206)) .or. (.not. (t_1 <= 1d+213))) then
                                  tmp = ((-0.5d0) + a) * b
                              else
                                  tmp = y + x
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = (a - 0.5) * b;
                          	double tmp;
                          	if ((t_1 <= -4e+206) || !(t_1 <= 1e+213)) {
                          		tmp = (-0.5 + a) * b;
                          	} else {
                          		tmp = y + x;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	t_1 = (a - 0.5) * b
                          	tmp = 0
                          	if (t_1 <= -4e+206) or not (t_1 <= 1e+213):
                          		tmp = (-0.5 + a) * b
                          	else:
                          		tmp = 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 <= -4e+206) || !(t_1 <= 1e+213))
                          		tmp = Float64(Float64(-0.5 + a) * b);
                          	else
                          		tmp = Float64(y + x);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	t_1 = (a - 0.5) * b;
                          	tmp = 0.0;
                          	if ((t_1 <= -4e+206) || ~((t_1 <= 1e+213)))
                          		tmp = (-0.5 + a) * b;
                          	else
                          		tmp = y + x;
                          	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[Or[LessEqual[t$95$1, -4e+206], N[Not[LessEqual[t$95$1, 1e+213]], $MachinePrecision]], N[(N[(-0.5 + a), $MachinePrecision] * b), $MachinePrecision], N[(y + x), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(a - 0.5\right) \cdot b\\
                          \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+206} \lor \neg \left(t\_1 \leq 10^{+213}\right):\\
                          \;\;\;\;\left(-0.5 + a\right) \cdot b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;y + x\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.0000000000000002e206 or 9.99999999999999984e212 < (*.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. distribute-rgt-out--N/A

                                \[\leadsto a \cdot b - \color{blue}{\frac{1}{2} \cdot b} \]
                              2. fp-cancel-sub-signN/A

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

                                \[\leadsto a \cdot b + \frac{-1}{2} \cdot b \]
                              4. distribute-rgt-outN/A

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

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

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

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

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

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

                            if -4.0000000000000002e206 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.99999999999999984e212

                            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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                              11. distribute-rgt1-inN/A

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

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

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

                                \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                              15. *-lft-identityN/A

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

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

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

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

                              \[\leadsto x + \color{blue}{y} \]
                            7. Step-by-step derivation
                              1. +-commutativeN/A

                                \[\leadsto y + x \]
                              2. lower-+.f6459.1

                                \[\leadsto y + x \]
                            8. Applied rewrites59.1%

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

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

                          Alternative 13: 58.9% accurate, 3.7× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+206} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+247}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (- a 0.5) b)))
                             (if (or (<= t_1 -4e+206) (not (<= t_1 4e+247))) (* b a) (+ 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 <= -4e+206) || !(t_1 <= 4e+247)) {
                          		tmp = b * a;
                          	} else {
                          		tmp = y + x;
                          	}
                          	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 ((t_1 <= (-4d+206)) .or. (.not. (t_1 <= 4d+247))) then
                                  tmp = b * a
                              else
                                  tmp = y + x
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = (a - 0.5) * b;
                          	double tmp;
                          	if ((t_1 <= -4e+206) || !(t_1 <= 4e+247)) {
                          		tmp = b * a;
                          	} else {
                          		tmp = y + x;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	t_1 = (a - 0.5) * b
                          	tmp = 0
                          	if (t_1 <= -4e+206) or not (t_1 <= 4e+247):
                          		tmp = b * a
                          	else:
                          		tmp = 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 <= -4e+206) || !(t_1 <= 4e+247))
                          		tmp = Float64(b * a);
                          	else
                          		tmp = Float64(y + x);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	t_1 = (a - 0.5) * b;
                          	tmp = 0.0;
                          	if ((t_1 <= -4e+206) || ~((t_1 <= 4e+247)))
                          		tmp = b * a;
                          	else
                          		tmp = y + x;
                          	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[Or[LessEqual[t$95$1, -4e+206], N[Not[LessEqual[t$95$1, 4e+247]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(y + x), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(a - 0.5\right) \cdot b\\
                          \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+206} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+247}\right):\\
                          \;\;\;\;b \cdot a\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;y + x\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.0000000000000002e206 or 3.99999999999999981e247 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                            1. Initial program 99.9%

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

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

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

                                \[\leadsto b \cdot \color{blue}{a} \]
                            5. Applied rewrites81.4%

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

                            if -4.0000000000000002e206 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 3.99999999999999981e247

                            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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                              11. distribute-rgt1-inN/A

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

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

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

                                \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                              15. *-lft-identityN/A

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

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

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

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

                              \[\leadsto x + \color{blue}{y} \]
                            7. Step-by-step derivation
                              1. +-commutativeN/A

                                \[\leadsto y + x \]
                              2. lower-+.f6456.8

                                \[\leadsto y + x \]
                            8. Applied rewrites56.8%

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

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

                          Alternative 14: 56.4% accurate, 6.6× speedup?

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

                            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} + \left(a - \frac{1}{2}\right) \cdot b \]
                            4. Step-by-step derivation
                              1. Applied rewrites51.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. *-commutativeN/A

                                  \[\leadsto x + \color{blue}{a} \cdot b \]
                                2. *-commutativeN/A

                                  \[\leadsto x + b \cdot \color{blue}{a} \]
                                3. lower-*.f6444.1

                                  \[\leadsto x + b \cdot \color{blue}{a} \]
                              4. Applied rewrites44.1%

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

                              if -2e51 < (+.f64 x y)

                              1. Initial program 99.9%

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

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

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

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

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

                              Alternative 15: 80.6% accurate, 7.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(z + \left(y + x\right)\right) - \left(0.5 - a\right) \cdot b \]
                              7. Applied rewrites79.2%

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

                              Alternative 16: 79.8% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 17: 42.6% accurate, 31.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(z + \left(-1 \cdot \log t\right) \cdot z\right)\right) \]
                                11. distribute-rgt1-inN/A

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

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

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

                                  \[\leadsto 1 \cdot \left(\left(x + y\right) + \left(1 - 1 \cdot \log t\right) \cdot z\right) \]
                                15. *-lft-identityN/A

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

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

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

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

                                \[\leadsto x + \color{blue}{y} \]
                              7. Step-by-step derivation
                                1. +-commutativeN/A

                                  \[\leadsto y + x \]
                                2. lower-+.f6444.6

                                  \[\leadsto y + x \]
                              8. Applied rewrites44.6%

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

                              Alternative 18: 22.8% 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 rewrites24.0%

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

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

                                \[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (+
                                  (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
                                  (* (- a 0.5) b)))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a, b)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
                                }
                                
                                def code(x, y, z, t, a, b):
                                	return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
                                
                                function code(x, y, z, t, a, b)
                                	return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b))
                                end
                                
                                function tmp = code(x, y, z, t, a, b)
                                	tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
                                
                                \begin{array}{l}
                                
                                \\
                                \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
                                \end{array}
                                

                                Reproduce

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