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

Percentage Accurate: 99.8% → 99.8%
Time: 14.0s
Alternatives: 21
Speedup: N/A×

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 21 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} \\ \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (+ z (- (+ x y) (* z (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (z + ((x + y) - (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 = (z + ((x + y) - (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 (z + ((x + y) - (z * Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (z + ((x + y) - (z * math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(z + Float64(Float64(x + y) - Float64(z * log(t)))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (z + ((x + y) - (z * log(t)))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(N[(x + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

Alternative 2: 39.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(b, -0.5, x\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;z + y\\

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


\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)) < -1.9999999999999999e305 or 2e303 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

    1. Initial program 100.0%

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

          \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} + x \]
        3. accelerator-lowering-fma.f6443.1

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]
      4. Simplified43.1%

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

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
        2. *-lowering-*.f6490.2

          \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
      7. Simplified90.2%

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

        \[\leadsto \left(z + \color{blue}{y}\right) + b \cdot a \]
      9. Step-by-step derivation
        1. Simplified39.4%

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

          \[\leadsto \color{blue}{y + z} \]
        3. Step-by-step derivation
          1. +-lowering-+.f6428.1

            \[\leadsto \color{blue}{y + z} \]
        4. Simplified28.1%

          \[\leadsto \color{blue}{y + z} \]
      10. Recombined 3 regimes into one program.
      11. Final simplification43.3%

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

      Alternative 3: 45.3% accurate, 0.5× speedup?

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

        1. Initial program 100.0%

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

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

            \[\leadsto \color{blue}{b \cdot a} \]
          2. *-lowering-*.f64100.0

            \[\leadsto \color{blue}{b \cdot a} \]
        5. Simplified100.0%

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

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

        1. Initial program 99.8%

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

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

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

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

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

              \[\leadsto \color{blue}{b \cdot \frac{-1}{2}} + x \]
            3. accelerator-lowering-fma.f6442.1

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, -0.5, x\right)} \]
          4. Simplified42.1%

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

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

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
            2. *-lowering-*.f6490.7

              \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
          7. Simplified90.7%

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

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

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

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

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

                \[\leadsto \color{blue}{b \cdot a} + y \]
              3. accelerator-lowering-fma.f6446.8

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \]
            4. Simplified46.8%

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \]
          10. Recombined 3 regimes into one program.
          11. Final simplification47.9%

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

          Alternative 4: 92.9% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

            if -6e111 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.99999999999999997e88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b \]
            5. 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} \]
            6. Step-by-step derivation
              1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 89.5% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

            if -6e111 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.00000000000000003e141

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
            4. Step-by-step derivation
              1. 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 91.4% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

            if -5e12 < (-.f64 a #s(literal 1/2 binary64)) < 9.99999999999999977e37

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.99999999999999977e37 < (-.f64 a #s(literal 1/2 binary64))

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
              2. *-lowering-*.f64100.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{a \cdot b + y}\right) \]
              17. accelerator-lowering-fma.f6484.6

                \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{\mathsf{fma}\left(a, b, y\right)}\right) \]
            10. Simplified84.6%

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

          Alternative 7: 70.2% accurate, 0.9× speedup?

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

              if -9.9999999999999997e106 < (+.f64 x y) < 1e16

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b \]
              5. 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} \]
              6. Step-by-step derivation
                1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(z, 1 - \log t, b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right)\right) \]
                8. +-lowering-+.f6487.2

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

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

              if 1e16 < (+.f64 x y)

              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                2. *-lowering-*.f6494.8

                  \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
              7. Simplified94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{a \cdot b + y}\right) \]
                17. accelerator-lowering-fma.f6462.8

                  \[\leadsto \mathsf{fma}\left(z, 1 - \log t, \color{blue}{\mathsf{fma}\left(a, b, y\right)}\right) \]
              10. Simplified62.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(a, b, y\right)\right)} \]
            7. Recombined 3 regimes into one program.
            8. Final simplification73.5%

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

            Alternative 8: 21.8% accurate, 1.0× speedup?

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

              1. Initial program 99.9%

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

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

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

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

                1. Initial program 99.9%

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

                  \[\leadsto \color{blue}{y} \]
                4. Step-by-step derivation
                  1. Simplified22.6%

                    \[\leadsto \color{blue}{y} \]
                5. Recombined 2 regimes into one program.
                6. Final simplification23.4%

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

                Alternative 9: 57.8% accurate, 1.0× speedup?

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

                  1. Initial program 99.9%

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x\right)} \]
                      3. sub-negN/A

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

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

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

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

                    if -1.9999999999999999e-151 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, y\right)} \]
                      3. sub-negN/A

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

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

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

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

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

                  Alternative 10: 78.9% accurate, 1.0× speedup?

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

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.9999999999999999e-151 < (+.f64 x y)

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b \]
                    5. 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} \]
                    6. Step-by-step derivation
                      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 85.4% accurate, 1.0× speedup?

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

                    1. Initial program 99.7%

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

                      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
                    4. Step-by-step derivation
                      1. 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -3.19999999999999995e158 < z < 8.7999999999999997e159

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

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

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

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

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

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

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

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

                    if 8.7999999999999997e159 < z

                    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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - \log t}, x\right) \]
                      4. log-lowering-log.f6480.4

                        \[\leadsto \mathsf{fma}\left(z, 1 - \color{blue}{\log t}, x\right) \]
                    8. Simplified80.4%

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

                  Alternative 12: 85.7% accurate, 1.0× speedup?

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

                    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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - \log t}, x\right) \]
                      4. log-lowering-log.f6471.8

                        \[\leadsto \mathsf{fma}\left(z, 1 - \color{blue}{\log t}, x\right) \]
                    8. Simplified71.8%

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

                    if -3.70000000000000001e169 < z < 6.9999999999999999e159

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

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

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

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

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

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

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

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

                  Alternative 13: 83.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

                        \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \color{blue}{\log t}\right)\right) + \left(a - 0.5\right) \cdot b \]
                    4. Applied egg-rr99.5%

                      \[\leadsto \color{blue}{\left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b \]
                    5. 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} \]
                    6. Step-by-step derivation
                      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto z \cdot \color{blue}{\left(\log \left(\frac{1}{t}\right) + 1\right)} \]
                      4. distribute-lft-inN/A

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

                        \[\leadsto z \cdot \log \left(\frac{1}{t}\right) + \color{blue}{z} \]
                      6. accelerator-lowering-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \log \left(\frac{1}{t}\right), z\right)} \]
                      7. log-recN/A

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\log t\right)}, z\right) \]
                      8. neg-lowering-neg.f64N/A

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\log t\right)}, z\right) \]
                      9. log-lowering-log.f6474.9

                        \[\leadsto \mathsf{fma}\left(z, -\color{blue}{\log t}, z\right) \]
                    10. Simplified74.9%

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

                    if -1.65000000000000001e247 < z < 1.79999999999999992e181

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

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

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

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

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

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

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

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

                    if 1.79999999999999992e181 < z

                    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 inf

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

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

                        \[\leadsto z \cdot \left(1 + \color{blue}{\log \left(\frac{1}{t}\right)}\right) \]
                      3. distribute-lft-inN/A

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

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

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

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

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

                        \[\leadsto \color{blue}{z - -1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)} \]
                      9. mul-1-negN/A

                        \[\leadsto z - \color{blue}{\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)} \]
                      10. distribute-rgt-neg-inN/A

                        \[\leadsto z - \color{blue}{z \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right)} \]
                      11. log-recN/A

                        \[\leadsto z - z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right)\right) \]
                      12. remove-double-negN/A

                        \[\leadsto z - z \cdot \color{blue}{\log t} \]
                      13. *-lowering-*.f64N/A

                        \[\leadsto z - \color{blue}{z \cdot \log t} \]
                      14. log-lowering-log.f6476.2

                        \[\leadsto z - z \cdot \color{blue}{\log t} \]
                    5. Simplified76.2%

                      \[\leadsto \color{blue}{z - z \cdot \log t} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 14: 83.6% accurate, 1.0× speedup?

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

                    1. Initial program 99.7%

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

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

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

                        \[\leadsto z \cdot \left(1 + \color{blue}{\log \left(\frac{1}{t}\right)}\right) \]
                      3. distribute-lft-inN/A

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

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

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

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

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

                        \[\leadsto \color{blue}{z - -1 \cdot \left(z \cdot \log \left(\frac{1}{t}\right)\right)} \]
                      9. mul-1-negN/A

                        \[\leadsto z - \color{blue}{\left(\mathsf{neg}\left(z \cdot \log \left(\frac{1}{t}\right)\right)\right)} \]
                      10. distribute-rgt-neg-inN/A

                        \[\leadsto z - \color{blue}{z \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{t}\right)\right)\right)} \]
                      11. log-recN/A

                        \[\leadsto z - z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log t\right)\right)}\right)\right) \]
                      12. remove-double-negN/A

                        \[\leadsto z - z \cdot \color{blue}{\log t} \]
                      13. *-lowering-*.f64N/A

                        \[\leadsto z - \color{blue}{z \cdot \log t} \]
                      14. log-lowering-log.f6475.6

                        \[\leadsto z - z \cdot \color{blue}{\log t} \]
                    5. Simplified75.6%

                      \[\leadsto \color{blue}{z - z \cdot \log t} \]

                    if -1.7500000000000001e247 < z < 5.2e181

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

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

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

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

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

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

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

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

                  Alternative 15: 57.3% accurate, 3.7× speedup?

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

                    1. Initial program 100.0%

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

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

                        \[\leadsto \color{blue}{b \cdot a} \]
                      2. *-lowering-*.f6472.5

                        \[\leadsto \color{blue}{b \cdot a} \]
                    5. Simplified72.5%

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

                    if -4.00000000000000007e234 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2.0000000000000001e209

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
                    4. Step-by-step derivation
                      1. 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x + y} \]
                    7. Step-by-step derivation
                      1. +-lowering-+.f6454.0

                        \[\leadsto \color{blue}{x + y} \]
                    8. Simplified54.0%

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

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

                  Alternative 16: 49.9% accurate, 4.7× speedup?

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

                    1. Initial program 99.9%

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

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

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

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

                          \[\leadsto x + \color{blue}{b \cdot a} \]
                        2. *-lowering-*.f6450.8

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

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

                      if -6.0000000000000003e-33 < (+.f64 x y) < 1e16

                      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. *-lowering-*.f64N/A

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

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

                          \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                        4. +-lowering-+.f6458.7

                          \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                      5. Simplified58.7%

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

                      if 1e16 < (+.f64 x y)

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                        2. *-lowering-*.f6494.8

                          \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                      7. Simplified94.8%

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

                        \[\leadsto \left(z + \color{blue}{y}\right) + b \cdot a \]
                      9. Step-by-step derivation
                        1. Simplified48.0%

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

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

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

                            \[\leadsto \color{blue}{b \cdot a} + y \]
                          3. accelerator-lowering-fma.f6447.3

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \]
                        4. Simplified47.3%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \]
                      10. Recombined 3 regimes into one program.
                      11. Final simplification51.4%

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

                      Alternative 17: 71.3% accurate, 5.7× speedup?

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

                        1. Initial program 99.9%

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

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

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

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

                            \[\leadsto b \cdot \left(a + \color{blue}{\frac{-1}{2}}\right) \]
                          4. +-lowering-+.f6483.7

                            \[\leadsto b \cdot \color{blue}{\left(a + -0.5\right)} \]
                        5. Simplified83.7%

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

                        if -2.75000000000000008e150 < b < 1.79999999999999989e163

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                          2. *-lowering-*.f6495.2

                            \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                        7. Simplified95.2%

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

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

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

                            \[\leadsto \color{blue}{a \cdot b + \left(x + y\right)} \]
                          3. accelerator-lowering-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(a, b, x + y\right)} \]
                          4. +-lowering-+.f6468.8

                            \[\leadsto \mathsf{fma}\left(a, b, \color{blue}{x + y}\right) \]
                        10. Simplified68.8%

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

                      Alternative 18: 65.2% accurate, 7.9× speedup?

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

                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                          2. *-lowering-*.f6490.8

                            \[\leadsto \left(z + \left(\left(x + y\right) - z \cdot \log t\right)\right) + \color{blue}{b \cdot a} \]
                        7. Simplified90.8%

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

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

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

                            \[\leadsto \color{blue}{a \cdot b + \left(x + y\right)} \]
                          3. accelerator-lowering-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(a, b, x + y\right)} \]
                          4. +-lowering-+.f6477.7

                            \[\leadsto \mathsf{fma}\left(a, b, \color{blue}{x + y}\right) \]
                        10. Simplified77.7%

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

                        if -7.59999999999999988e-33 < x

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - \frac{1}{2}, y\right)} \]
                          3. sub-negN/A

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

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

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

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

                      Alternative 19: 78.3% accurate, 9.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 20: 41.9% accurate, 31.5× speedup?

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

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

                        \[\leadsto \color{blue}{\left(x + \left(y + z\right)\right) - z \cdot \log t} \]
                      4. Step-by-step derivation
                        1. 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{x + y} \]
                      7. Step-by-step derivation
                        1. +-lowering-+.f6443.0

                          \[\leadsto \color{blue}{x + y} \]
                      8. Simplified43.0%

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

                      Alternative 21: 21.5% accurate, 126.0× speedup?

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

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

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

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

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

                        \[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (+
                          (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
                          (* (- a 0.5) b)))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                        }
                        
                        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 2024198 
                        (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)))