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

Percentage Accurate: 99.8% → 99.8%
Time: 15.8s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 63.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+39}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\


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

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{z} + y \cdot i \]
    4. Step-by-step derivation
      1. Simplified80.1%

        \[\leadsto \color{blue}{z} + y \cdot i \]

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
        12. +-lowering-+.f6484.0

          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
      5. Simplified84.0%

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

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

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

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

        1. Initial program 99.9%

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

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

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

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

        Alternative 3: 71.6% accurate, 0.4× speedup?

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

          1. Initial program 99.5%

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

            \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
            2. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
            3. log-lowering-log.f6482.2

              \[\leadsto \color{blue}{\log c} \cdot b + y \cdot i \]
          5. Simplified82.2%

            \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]

          if -5.0000000000000002e220 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -100 or 192 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
          5. Simplified86.8%

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

            \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
          7. Step-by-step derivation
            1. Simplified77.5%

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]

            if -100 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 192

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
            7. Step-by-step derivation
              1. Simplified82.9%

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

              if 9.9999999999999994e161 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto a + \color{blue}{\left(-1 \cdot \frac{b \cdot \log c}{x}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
              10. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{b \cdot \log c}{x}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                2. distribute-neg-frac2N/A

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

                  \[\leadsto a + \frac{b \cdot \log c}{\color{blue}{-1 \cdot x}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                4. /-lowering-/.f64N/A

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

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

                  \[\leadsto a + \frac{\color{blue}{\log c \cdot b}}{-1 \cdot x} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                7. log-lowering-log.f64N/A

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

                  \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{\mathsf{neg}\left(x\right)}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                9. neg-lowering-neg.f6444.3

                  \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{-x}} \cdot \left(-x\right) \]
              11. Simplified44.3%

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

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

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

                  \[\leadsto \color{blue}{\log c \cdot b} + a \]
                3. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]
                4. log-lowering-log.f6475.9

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\log c}, b, a\right) \]
              14. Simplified75.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]
            8. Recombined 4 regimes into one program.
            9. Final simplification78.9%

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

            Alternative 4: 70.7% accurate, 0.4× speedup?

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

              1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto a + \color{blue}{\left(-1 \cdot \frac{b \cdot \log c}{x}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
              10. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{b \cdot \log c}{x}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                2. distribute-neg-frac2N/A

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

                  \[\leadsto a + \frac{b \cdot \log c}{\color{blue}{-1 \cdot x}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                4. /-lowering-/.f64N/A

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

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

                  \[\leadsto a + \frac{\color{blue}{\log c \cdot b}}{-1 \cdot x} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                7. log-lowering-log.f64N/A

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

                  \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{\mathsf{neg}\left(x\right)}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                9. neg-lowering-neg.f6443.8

                  \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{-x}} \cdot \left(-x\right) \]
              11. Simplified43.8%

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

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

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

                  \[\leadsto \color{blue}{\log c \cdot b} + a \]
                3. accelerator-lowering-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]
                4. log-lowering-log.f6472.1

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\log c}, b, a\right) \]
              14. Simplified72.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]

              if -1.9999999999999999e197 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -100 or 192 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                12. +-lowering-+.f6486.5

                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
              5. Simplified86.5%

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

                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
              7. Step-by-step derivation
                1. Simplified78.0%

                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]

                if -100 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 192

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                7. Step-by-step derivation
                  1. Simplified82.9%

                    \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                8. Recombined 3 regimes into one program.
                9. Final simplification78.0%

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

                Alternative 5: 40.3% accurate, 0.5× speedup?

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

                  1. Initial program 100.0%

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

                    \[\leadsto \color{blue}{i \cdot y} \]
                  4. Step-by-step derivation
                    1. *-lowering-*.f64100.0

                      \[\leadsto \color{blue}{i \cdot y} \]
                  5. Simplified100.0%

                    \[\leadsto \color{blue}{i \cdot y} \]

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                    12. +-lowering-+.f6483.4

                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                  5. Simplified83.4%

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

                    \[\leadsto a + \color{blue}{z} \]
                  7. Step-by-step derivation
                    1. Simplified34.3%

                      \[\leadsto a + \color{blue}{z} \]

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

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{a} + y \cdot i \]
                    4. Step-by-step derivation
                      1. Simplified29.4%

                        \[\leadsto \color{blue}{a} + y \cdot i \]
                    5. Recombined 3 regimes into one program.
                    6. Final simplification34.8%

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

                    Alternative 6: 42.6% accurate, 0.5× speedup?

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

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      4. Step-by-step derivation
                        1. *-lowering-*.f6496.0

                          \[\leadsto \color{blue}{i \cdot y} \]
                      5. Simplified96.0%

                        \[\leadsto \color{blue}{i \cdot y} \]

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

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                        12. +-lowering-+.f6483.0

                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                      5. Simplified83.0%

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

                        \[\leadsto a + \color{blue}{z} \]
                      7. Step-by-step derivation
                        1. Simplified32.3%

                          \[\leadsto a + \color{blue}{z} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification38.5%

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

                      Alternative 7: 54.1% accurate, 0.7× speedup?

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

                        1. Initial program 99.9%

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

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

                            \[\leadsto \left(\color{blue}{z} + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]

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

                          1. Initial program 99.9%

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

                            \[\leadsto \left(\color{blue}{a} + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                          4. Step-by-step derivation
                            1. Simplified53.6%

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

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

                          Alternative 8: 71.9% accurate, 0.7× speedup?

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

                            1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto a + \color{blue}{\left(-1 \cdot \frac{b \cdot \log c}{x}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                            10. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{b \cdot \log c}{x}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                              2. distribute-neg-frac2N/A

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

                                \[\leadsto a + \frac{b \cdot \log c}{\color{blue}{-1 \cdot x}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                              4. /-lowering-/.f64N/A

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

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

                                \[\leadsto a + \frac{\color{blue}{\log c \cdot b}}{-1 \cdot x} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                              7. log-lowering-log.f64N/A

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

                                \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{\mathsf{neg}\left(x\right)}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                              9. neg-lowering-neg.f6443.8

                                \[\leadsto a + \frac{\log c \cdot b}{\color{blue}{-x}} \cdot \left(-x\right) \]
                            11. Simplified43.8%

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

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

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

                                \[\leadsto \color{blue}{\log c \cdot b} + a \]
                              3. accelerator-lowering-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]
                              4. log-lowering-log.f6472.1

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\log c}, b, a\right) \]
                            14. Simplified72.1%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\log c, b, a\right)} \]

                            if -1.9999999999999999e197 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                              12. +-lowering-+.f6483.0

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                            5. Simplified83.0%

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

                              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                            7. Step-by-step derivation
                              1. Simplified75.0%

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification74.5%

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

                            Alternative 9: 71.0% accurate, 0.7× speedup?

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

                              1. Initial program 99.6%

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

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

                                  \[\leadsto \color{blue}{\log c \cdot b} \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \color{blue}{\log c \cdot b} \]
                                3. log-lowering-log.f6468.5

                                  \[\leadsto \color{blue}{\log c} \cdot b \]
                              5. Simplified68.5%

                                \[\leadsto \color{blue}{\log c \cdot b} \]

                              if -5.0000000000000002e220 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161

                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                12. +-lowering-+.f6483.2

                                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                              5. Simplified83.2%

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

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                              7. Step-by-step derivation
                                1. Simplified74.7%

                                  \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification73.5%

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

                              Alternative 10: 37.7% accurate, 0.9× speedup?

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

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{z} + y \cdot i \]
                                4. Step-by-step derivation
                                  1. Simplified32.1%

                                    \[\leadsto \color{blue}{z} + y \cdot i \]

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

                                  1. Initial program 99.9%

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

                                    \[\leadsto \color{blue}{a} + y \cdot i \]
                                  4. Step-by-step derivation
                                    1. Simplified30.0%

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

                                  Alternative 11: 23.4% accurate, 1.0× speedup?

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

                                    1. Initial program 99.9%

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

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

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

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

                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                        12. +-lowering-+.f6484.2

                                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                      5. Simplified84.2%

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

                                        \[\leadsto a + \color{blue}{t} \]
                                      7. Step-by-step derivation
                                        1. Simplified26.4%

                                          \[\leadsto a + \color{blue}{t} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification21.1%

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

                                      Alternative 12: 16.1% accurate, 1.0× speedup?

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

                                        1. Initial program 99.9%

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

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

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

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

                                          1. Initial program 99.9%

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

                                            \[\leadsto \color{blue}{a} \]
                                          4. Step-by-step derivation
                                            1. Simplified11.8%

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

                                          Alternative 13: 92.6% accurate, 1.0× speedup?

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

                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -2.09999999999999995e111 < x < 6.99999999999999972e87

                                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                              12. +-lowering-+.f6498.9

                                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                            5. Simplified98.9%

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

                                          Alternative 14: 90.8% accurate, 1.0× speedup?

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

                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto a + \left(\color{blue}{\log c \cdot b} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                                              3. log-lowering-log.f6484.3

                                                \[\leadsto a + \left(\color{blue}{\log c} \cdot b + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                                            8. Simplified84.3%

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

                                            if -3.3e200 < x < 1.3e160

                                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                            5. Simplified96.8%

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

                                            if 1.3e160 < x

                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                                            7. Step-by-step derivation
                                              1. Simplified86.0%

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

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

                                            Alternative 15: 90.5% accurate, 1.7× speedup?

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

                                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                                              7. Step-by-step derivation
                                                1. Simplified80.3%

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

                                                if -4.7000000000000002e198 < x < 6.80000000000000006e162

                                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                                5. Simplified96.8%

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

                                              Alternative 16: 72.6% accurate, 1.8× speedup?

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

                                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(x, \log y, t\right)\right) \]
                                                7. Step-by-step derivation
                                                  1. Simplified77.3%

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

                                                  if -7.8000000000000001e114 < x < 1.6499999999999999e156

                                                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                                    12. +-lowering-+.f6498.3

                                                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                                  5. Simplified98.3%

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

                                                    \[\leadsto a + \left(\color{blue}{z} + \mathsf{fma}\left(\log c, b + \frac{-1}{2}, t\right)\right) \]
                                                  7. Step-by-step derivation
                                                    1. Simplified79.6%

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

                                                  Alternative 17: 71.8% accurate, 2.0× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -4.3 \cdot 10^{+198}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b c i)
                                                   :precision binary64
                                                   (let* ((t_1 (* x (log y))))
                                                     (if (<= x -4.3e+198) t_1 (if (<= x 5.8e+243) (+ a (+ t (fma i y z))) t_1))))
                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                  	double t_1 = x * log(y);
                                                  	double tmp;
                                                  	if (x <= -4.3e+198) {
                                                  		tmp = t_1;
                                                  	} else if (x <= 5.8e+243) {
                                                  		tmp = a + (t + fma(i, y, z));
                                                  	} else {
                                                  		tmp = t_1;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a, b, c, i)
                                                  	t_1 = Float64(x * log(y))
                                                  	tmp = 0.0
                                                  	if (x <= -4.3e+198)
                                                  		tmp = t_1;
                                                  	elseif (x <= 5.8e+243)
                                                  		tmp = Float64(a + Float64(t + fma(i, y, z)));
                                                  	else
                                                  		tmp = t_1;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+198], t$95$1, If[LessEqual[x, 5.8e+243], N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := x \cdot \log y\\
                                                  \mathbf{if}\;x \leq -4.3 \cdot 10^{+198}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\
                                                  \;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if x < -4.29999999999999982e198 or 5.80000000000000013e243 < x

                                                    1. Initial program 99.8%

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

                                                      \[\leadsto \color{blue}{x \cdot \log y} \]
                                                    4. Step-by-step derivation
                                                      1. *-lowering-*.f64N/A

                                                        \[\leadsto \color{blue}{x \cdot \log y} \]
                                                      2. log-lowering-log.f6467.2

                                                        \[\leadsto x \cdot \color{blue}{\log y} \]
                                                    5. Simplified67.2%

                                                      \[\leadsto \color{blue}{x \cdot \log y} \]

                                                    if -4.29999999999999982e198 < x < 5.80000000000000013e243

                                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                                      12. +-lowering-+.f6494.7

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                                    5. Simplified94.7%

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

                                                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                                                    7. Step-by-step derivation
                                                      1. Simplified72.7%

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Final simplification71.9%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.3 \cdot 10^{+198}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 18: 67.3% accurate, 18.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                                      12. +-lowering-+.f6484.7

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                                    5. Simplified84.7%

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

                                                      \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                                                    7. Step-by-step derivation
                                                      1. Simplified64.5%

                                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{t}\right) \]
                                                      2. Final simplification64.5%

                                                        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, z\right)\right) \]
                                                      3. Add Preprocessing

                                                      Alternative 19: 30.9% accurate, 58.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                                        12. +-lowering-+.f6484.7

                                                          \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + -0.5}, t\right)\right) \]
                                                      5. Simplified84.7%

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

                                                        \[\leadsto a + \color{blue}{z} \]
                                                      7. Step-by-step derivation
                                                        1. Simplified29.4%

                                                          \[\leadsto a + \color{blue}{z} \]
                                                        2. Final simplification29.4%

                                                          \[\leadsto z + a \]
                                                        3. Add Preprocessing

                                                        Alternative 20: 16.1% accurate, 234.0× speedup?

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

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

                                                          \[\leadsto \color{blue}{a} \]
                                                        4. Step-by-step derivation
                                                          1. Simplified14.4%

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

                                                          Reproduce

                                                          ?
                                                          herbie shell --seed 2024204 
                                                          (FPCore (x y z t a b c i)
                                                            :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
                                                            :precision binary64
                                                            (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))