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

Percentage Accurate: 99.8% → 99.8%
Time: 11.3s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
b \cdot \left(a - 0.5\right) + \left(\left(\left(y + x\right) + z\right) - \log t \cdot z\right)
\end{array}
Derivation
  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. Final simplification99.8%

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

Alternative 2: 45.9% accurate, 0.3× speedup?

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

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

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

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

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


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

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    4. Step-by-step derivation
      1. lower-*.f6493.8

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

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

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

    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. associate--l+N/A

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

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

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

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

      \[\leadsto \frac{-1}{2} \cdot b + x \]
    7. Step-by-step derivation
      1. Applied rewrites33.3%

        \[\leadsto -0.5 \cdot b + x \]

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

      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. associate--l+N/A

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

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

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

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

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

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

          \[\leadsto y + \frac{-1}{2} \cdot \color{blue}{b} \]
        3. Step-by-step derivation
          1. Applied rewrites43.6%

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

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

        Alternative 3: 42.4% accurate, 0.5× speedup?

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

          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 inf

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

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

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

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

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

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

          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. associate--l+N/A

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

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

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

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

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

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

              \[\leadsto y + \frac{-1}{2} \cdot \color{blue}{b} \]
            3. Step-by-step derivation
              1. Applied rewrites43.6%

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

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

              1. Initial program 100.0%

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

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

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

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

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

            Alternative 4: 92.8% accurate, 0.9× speedup?

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

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -5.0000000000000001e172 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000002e191

              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. associate--l+N/A

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

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

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

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

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

            Alternative 5: 92.2% accurate, 0.9× speedup?

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

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.0000000000000002e220 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000006e136

                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. associate--l+N/A

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

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

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

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

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 88.1% accurate, 0.9× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -5.0000000000000001e172 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999991e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 88.6% accurate, 0.9× speedup?

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                  if -1.9999999999999999e200 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999991e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 85.2% accurate, 1.0× speedup?

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

                  1. Initial program 99.5%

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

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

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

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

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

                    \[\leadsto z \cdot \left(1 - \log t\right) + x \]
                  7. Step-by-step derivation
                    1. Applied rewrites69.5%

                      \[\leadsto \left(1 - \log t\right) \cdot z + x \]

                    if -1.15000000000000007e193 < z < 1.09999999999999999e126

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

                  Alternative 9: 82.2% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+280}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+86}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (fma (- 1.0 (log t)) z y)))
                     (if (<= z -1.3e+280)
                       t_1
                       (if (<= z 2.3e+86) (+ (fma (- a 0.5) b y) x) t_1))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = fma((1.0 - log(t)), z, y);
                  	double tmp;
                  	if (z <= -1.3e+280) {
                  		tmp = t_1;
                  	} else if (z <= 2.3e+86) {
                  		tmp = fma((a - 0.5), b, y) + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = fma(Float64(1.0 - log(t)), z, y)
                  	tmp = 0.0
                  	if (z <= -1.3e+280)
                  		tmp = t_1;
                  	elseif (z <= 2.3e+86)
                  		tmp = Float64(fma(Float64(a - 0.5), b, y) + x);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[z, -1.3e+280], t$95$1, If[LessEqual[z, 2.3e+86], N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(1 - \log t, z, y\right)\\
                  \mathbf{if}\;z \leq -1.3 \cdot 10^{+280}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 2.3 \cdot 10^{+86}:\\
                  \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.3e280 or 2.2999999999999999e86 < 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 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. associate--l+N/A

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

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

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

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

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

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

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

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

                        if -1.3e280 < z < 2.2999999999999999e86

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                      Alternative 10: 83.1% accurate, 1.0× speedup?

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

                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.3e280 < z < 4.99999999999999954e186

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                      Alternative 11: 71.8% accurate, 3.3× speedup?

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

                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -5.0000000000000001e172 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000002e191

                          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. associate--l+N/A

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

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

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

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

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

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

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

                          Alternative 12: 77.8% accurate, 4.2× speedup?

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

                            1. Initial program 99.9%

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

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

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

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

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

                              \[\leadsto \left(y + x\right) + \color{blue}{a \cdot b} \]
                            7. Step-by-step derivation
                              1. lower-*.f6478.3

                                \[\leadsto \left(y + x\right) + \color{blue}{a \cdot b} \]
                            8. Applied rewrites78.3%

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

                            if -4e16 < (-.f64 a #s(literal 1/2 binary64)) < 1e12

                            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. associate--l+N/A

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

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

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

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

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

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

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

                            Alternative 13: 36.9% accurate, 5.2× speedup?

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

                              1. Initial program 99.9%

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

                                \[\leadsto \color{blue}{a \cdot b} \]
                              4. Step-by-step derivation
                                1. lower-*.f6444.8

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

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

                              if -0.50000000000000067 < (-.f64 a #s(literal 1/2 binary64)) < 1.9999999999999999e45

                              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. associate--l+N/A

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;a - 0.5 \leq -0.5000000000000007:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;a - 0.5 \leq 2 \cdot 10^{+45}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 14: 49.6% accurate, 6.6× speedup?

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

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{a \cdot b} \]
                                4. Step-by-step derivation
                                  1. lower-*.f6448.6

                                    \[\leadsto \color{blue}{a \cdot b} \]
                                5. Applied rewrites48.6%

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

                                if -4.60000000000000004e49 < a < 3.50000000000000023e45

                                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. associate--l+N/A

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

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

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

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

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

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

                                    \[\leadsto y + \frac{-1}{2} \cdot \color{blue}{b} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites53.1%

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+49}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+45}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 15: 52.0% accurate, 6.6× speedup?

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

                                    1. Initial program 99.9%

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

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

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

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

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

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

                                      \[\leadsto \frac{-1}{2} \cdot b + x \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites35.2%

                                        \[\leadsto -0.5 \cdot b + x \]

                                      if -4.0000000000000003e54 < (+.f64 x y)

                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 16: 78.7% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

                                      Alternative 17: 14.6% accurate, 21.0× speedup?

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

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

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

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

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

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

                                          \[\leadsto -0.5 \cdot \color{blue}{b} \]
                                        2. Add Preprocessing

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

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

                                        Reproduce

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