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

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

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

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

Alternative 2: 58.0% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\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)) < -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. lower-*.f6495.2

        \[\leadsto \color{blue}{i \cdot y} \]
    5. Applied rewrites95.2%

      \[\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)) < 1e308

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

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

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

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

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

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

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

        \[\leadsto \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a \]
      3. Step-by-step derivation
        1. Applied rewrites51.2%

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

        if 1e308 < (+.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 t around -inf

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\right) \]
        7. Step-by-step derivation
          1. Applied rewrites94.2%

            \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\right) \]
        8. Recombined 3 regimes into one program.
        9. Final simplification57.7%

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

        Alternative 3: 42.4% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 10^{+308}:\\ \;\;\;\;1 \cdot z + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1
                 (+
                  (* i y)
                  (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x))))))))
           (if (<= t_1 (- INFINITY))
             (* i y)
             (if (<= t_1 1e+308) (+ (* 1.0 z) a) (fma (/ (* i y) t) t t)))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
        	double tmp;
        	if (t_1 <= -((double) INFINITY)) {
        		tmp = i * y;
        	} else if (t_1 <= 1e+308) {
        		tmp = (1.0 * z) + a;
        	} else {
        		tmp = fma(((i * y) / t), t, t);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x))))))
        	tmp = 0.0
        	if (t_1 <= Float64(-Inf))
        		tmp = Float64(i * y);
        	elseif (t_1 <= 1e+308)
        		tmp = Float64(Float64(1.0 * z) + a);
        	else
        		tmp = fma(Float64(Float64(i * y) / t), t, t);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], N[(N[(1.0 * z), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[(i * y), $MachinePrecision] / t), $MachinePrecision] * t + t), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\
        \mathbf{if}\;t\_1 \leq -\infty:\\
        \;\;\;\;i \cdot y\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+308}:\\
        \;\;\;\;1 \cdot z + a\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\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)) < -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. lower-*.f6495.2

              \[\leadsto \color{blue}{i \cdot y} \]
          5. Applied rewrites95.2%

            \[\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)) < 1e308

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

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

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

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

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

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

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

              \[\leadsto z \cdot \left(1 + \left(\frac{x \cdot \log y}{z} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{z}\right)\right) + a \]
            3. Step-by-step derivation
              1. Applied rewrites53.5%

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

                \[\leadsto 1 \cdot z + a \]
              3. Step-by-step derivation
                1. Applied rewrites30.5%

                  \[\leadsto 1 \cdot z + a \]

                if 1e308 < (+.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 t around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\right) \]
                7. Step-by-step derivation
                  1. Applied rewrites94.2%

                    \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{t}, t, t\right) \]
                8. Recombined 3 regimes into one program.
                9. Final simplification40.0%

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

                Alternative 4: 42.4% accurate, 0.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 10^{+308}:\\ \;\;\;\;1 \cdot z + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1
                         (+
                          (* i y)
                          (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x))))))))
                   (if (<= t_1 (- INFINITY))
                     (* i y)
                     (if (<= t_1 1e+308) (+ (* 1.0 z) a) (* i y)))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
                	double tmp;
                	if (t_1 <= -((double) INFINITY)) {
                		tmp = i * y;
                	} else if (t_1 <= 1e+308) {
                		tmp = (1.0 * z) + a;
                	} else {
                		tmp = i * y;
                	}
                	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 = (i * y) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (Math.log(y) * x)))));
                	double tmp;
                	if (t_1 <= -Double.POSITIVE_INFINITY) {
                		tmp = i * y;
                	} else if (t_1 <= 1e+308) {
                		tmp = (1.0 * z) + a;
                	} else {
                		tmp = i * y;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = (i * y) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (math.log(y) * x)))))
                	tmp = 0
                	if t_1 <= -math.inf:
                		tmp = i * y
                	elif t_1 <= 1e+308:
                		tmp = (1.0 * z) + a
                	else:
                		tmp = i * y
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x))))))
                	tmp = 0.0
                	if (t_1 <= Float64(-Inf))
                		tmp = Float64(i * y);
                	elseif (t_1 <= 1e+308)
                		tmp = Float64(Float64(1.0 * z) + a);
                	else
                		tmp = Float64(i * y);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
                	tmp = 0.0;
                	if (t_1 <= -Inf)
                		tmp = i * y;
                	elseif (t_1 <= 1e+308)
                		tmp = (1.0 * z) + a;
                	else
                		tmp = i * y;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], N[(N[(1.0 * z), $MachinePrecision] + a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\
                \mathbf{if}\;t\_1 \leq -\infty:\\
                \;\;\;\;i \cdot y\\
                
                \mathbf{elif}\;t\_1 \leq 10^{+308}:\\
                \;\;\;\;1 \cdot z + a\\
                
                \mathbf{else}:\\
                \;\;\;\;i \cdot y\\
                
                
                \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 1e308 < (+.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. lower-*.f6492.3

                      \[\leadsto \color{blue}{i \cdot y} \]
                  5. Applied rewrites92.3%

                    \[\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)) < 1e308

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

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

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

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

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

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

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

                      \[\leadsto z \cdot \left(1 + \left(\frac{x \cdot \log y}{z} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{z}\right)\right) + a \]
                    3. Step-by-step derivation
                      1. Applied rewrites53.5%

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

                        \[\leadsto 1 \cdot z + a \]
                      3. Step-by-step derivation
                        1. Applied rewrites30.5%

                          \[\leadsto 1 \cdot z + a \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification39.6%

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

                      Alternative 5: 94.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -2.85000000000000002e144 < x < 5.7999999999999998e155

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 92.2% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(i, y, \mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, z\right)\right)\right) + a\\ \mathbf{if}\;x \leq -4.8 \cdot 10^{+144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+104}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(b - 0.5, \log c, z\right) + t\right) + a\right) + i \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (+ (fma i y (fma -0.5 (log c) (fma (log y) x z))) a)))
                         (if (<= x -4.8e+144)
                           t_1
                           (if (<= x 1.5e+104)
                             (+ (+ (+ (fma (- b 0.5) (log c) z) t) a) (* i y))
                             t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fma(i, y, fma(-0.5, log(c), fma(log(y), x, z))) + a;
                      	double tmp;
                      	if (x <= -4.8e+144) {
                      		tmp = t_1;
                      	} else if (x <= 1.5e+104) {
                      		tmp = ((fma((b - 0.5), log(c), z) + t) + a) + (i * y);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(fma(i, y, fma(-0.5, log(c), fma(log(y), x, z))) + a)
                      	tmp = 0.0
                      	if (x <= -4.8e+144)
                      		tmp = t_1;
                      	elseif (x <= 1.5e+104)
                      		tmp = Float64(Float64(Float64(fma(Float64(b - 0.5), log(c), z) + t) + a) + Float64(i * y));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y + N[(-0.5 * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -4.8e+144], t$95$1, If[LessEqual[x, 1.5e+104], N[(N[(N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(i, y, \mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, z\right)\right)\right) + a\\
                      \mathbf{if}\;x \leq -4.8 \cdot 10^{+144}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 1.5 \cdot 10^{+104}:\\
                      \;\;\;\;\left(\left(\mathsf{fma}\left(b - 0.5, \log c, z\right) + t\right) + a\right) + i \cdot y\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.8000000000000001e144 or 1.49999999999999984e104 < 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 t around 0

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(i, y, z + \left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)\right) + a \]
                        7. Step-by-step derivation
                          1. Applied rewrites79.5%

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

                          if -4.8000000000000001e144 < x < 1.49999999999999984e104

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 90.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

                            if -7.00000000000000026e232 < x < 2e185

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 89.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

                                \[\leadsto \left(z + \left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)\right) + a \]
                              3. Step-by-step derivation
                                1. Applied rewrites89.1%

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

                                if -1.99999999999999995e233 < x < 4.4000000000000002e185

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

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

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

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

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

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

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

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

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

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

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

                                if 4.4000000000000002e185 < x

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

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

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

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

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

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

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

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

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

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

                                  Alternative 9: 89.5% accurate, 1.0× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, -0.5 + b, \mathsf{fma}\left(\log y, x, a\right)\right)\\ \mathbf{if}\;x \leq -2.7 \cdot 10^{+234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+185}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(b - 0.5, \log c, z\right) + t\right) + a\right) + i \cdot y\\ \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) (+ -0.5 b) (fma (log y) x a))))
                                     (if (<= x -2.7e+234)
                                       t_1
                                       (if (<= x 4.4e+185)
                                         (+ (+ (+ (fma (- b 0.5) (log c) z) t) a) (* i y))
                                         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), (-0.5 + b), fma(log(y), x, a));
                                  	double tmp;
                                  	if (x <= -2.7e+234) {
                                  		tmp = t_1;
                                  	} else if (x <= 4.4e+185) {
                                  		tmp = ((fma((b - 0.5), log(c), z) + t) + a) + (i * y);
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	t_1 = fma(log(c), Float64(-0.5 + b), fma(log(y), x, a))
                                  	tmp = 0.0
                                  	if (x <= -2.7e+234)
                                  		tmp = t_1;
                                  	elseif (x <= 4.4e+185)
                                  		tmp = Float64(Float64(Float64(fma(Float64(b - 0.5), log(c), z) + t) + a) + Float64(i * y));
                                  	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] * N[(-0.5 + b), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+234], t$95$1, If[LessEqual[x, 4.4e+185], N[(N[(N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \mathsf{fma}\left(\log c, -0.5 + b, \mathsf{fma}\left(\log y, x, a\right)\right)\\
                                  \mathbf{if}\;x \leq -2.7 \cdot 10^{+234}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;x \leq 4.4 \cdot 10^{+185}:\\
                                  \;\;\;\;\left(\left(\mathsf{fma}\left(b - 0.5, \log c, z\right) + t\right) + a\right) + i \cdot y\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -2.7000000000000002e234 or 4.4000000000000002e185 < x

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

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

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

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

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

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

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

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

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

                                        if -2.7000000000000002e234 < x < 4.4000000000000002e185

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(b - 0.5, \log c, z\right) + t\right) + a\right)} + y \cdot i \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification90.8%

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

                                      Alternative 10: 84.3% accurate, 1.0× speedup?

                                      \[\begin{array}{l} \\ \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\right) + a \end{array} \]
                                      (FPCore (x y z t a b c i)
                                       :precision binary64
                                       (+ (fma i y (fma (log y) x (fma (- b 0.5) (log c) z))) a))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	return fma(i, y, fma(log(y), x, fma((b - 0.5), log(c), z))) + a;
                                      }
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	return Float64(fma(i, y, fma(log(y), x, fma(Float64(b - 0.5), log(c), z))) + a)
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\right) + a
                                      \end{array}
                                      
                                      Derivation
                                      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 t around 0

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

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

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

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

                                      Alternative 11: 85.8% accurate, 1.7× speedup?

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\log y \cdot x} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\log y \cdot x} \]
                                          3. lower-log.f6475.8

                                            \[\leadsto \color{blue}{\log y} \cdot x \]
                                        8. Applied rewrites75.8%

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

                                        if -5.79999999999999972e234 < x < 1.30000000000000001e145

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

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

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

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

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

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

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

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

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

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

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

                                        if 1.30000000000000001e145 < x

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

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

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

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

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

                                          \[\leadsto i \cdot \left(y + \left(\frac{z}{i} + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) + a \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites72.1%

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

                                            \[\leadsto \left(\frac{x \cdot \log y}{i} + y\right) \cdot i + a \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites61.5%

                                              \[\leadsto \left(\frac{\log y \cdot x}{i} + y\right) \cdot i + a \]
                                          4. Recombined 3 regimes into one program.
                                          5. Final simplification87.6%

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

                                          Alternative 12: 88.1% accurate, 1.7× speedup?

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              3. lower-log.f6469.6

                                                \[\leadsto \color{blue}{\log y} \cdot x \]
                                            8. Applied rewrites69.6%

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

                                            if -5.79999999999999972e234 < x < 8.59999999999999975e226

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 13: 88.1% accurate, 1.7× speedup?

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              3. lower-log.f6469.6

                                                \[\leadsto \color{blue}{\log y} \cdot x \]
                                            8. Applied rewrites69.6%

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

                                            if -5.79999999999999972e234 < x < 8.59999999999999975e226

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 14: 73.3% accurate, 1.8× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{+234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{+226}:\\ \;\;\;\;\mathsf{fma}\left(\log c, -0.5 + b, a\right) + \mathsf{fma}\left(i, y, z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a b c i)
                                           :precision binary64
                                           (let* ((t_1 (* (log y) x)))
                                             (if (<= x -5.8e+234)
                                               t_1
                                               (if (<= x 8.6e+226) (+ (fma (log c) (+ -0.5 b) a) (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 = log(y) * x;
                                          	double tmp;
                                          	if (x <= -5.8e+234) {
                                          		tmp = t_1;
                                          	} else if (x <= 8.6e+226) {
                                          		tmp = fma(log(c), (-0.5 + b), a) + fma(i, y, z);
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t, a, b, c, i)
                                          	t_1 = Float64(log(y) * x)
                                          	tmp = 0.0
                                          	if (x <= -5.8e+234)
                                          		tmp = t_1;
                                          	elseif (x <= 8.6e+226)
                                          		tmp = Float64(fma(log(c), Float64(-0.5 + b), a) + 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[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -5.8e+234], t$95$1, If[LessEqual[x, 8.6e+226], N[(N[(N[Log[c], $MachinePrecision] * N[(-0.5 + b), $MachinePrecision] + a), $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \log y \cdot x\\
                                          \mathbf{if}\;x \leq -5.8 \cdot 10^{+234}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;x \leq 8.6 \cdot 10^{+226}:\\
                                          \;\;\;\;\mathsf{fma}\left(\log c, -0.5 + b, a\right) + \mathsf{fma}\left(i, y, z\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if x < -5.79999999999999972e234 or 8.59999999999999975e226 < x

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                              3. lower-log.f6469.6

                                                \[\leadsto \color{blue}{\log y} \cdot x \]
                                            8. Applied rewrites69.6%

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

                                            if -5.79999999999999972e234 < x < 8.59999999999999975e226

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

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

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

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

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

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

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

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

                                            Alternative 15: 23.5% accurate, 39.0× speedup?

                                            \[\begin{array}{l} \\ i \cdot y \end{array} \]
                                            (FPCore (x y z t a b c i) :precision binary64 (* i y))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	return i * y;
                                            }
                                            
                                            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 = i * y
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	return i * y;
                                            }
                                            
                                            def code(x, y, z, t, a, b, c, i):
                                            	return i * y
                                            
                                            function code(x, y, z, t, a, b, c, i)
                                            	return Float64(i * y)
                                            end
                                            
                                            function tmp = code(x, y, z, t, a, b, c, i)
                                            	tmp = i * y;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            i \cdot y
                                            \end{array}
                                            
                                            Derivation
                                            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 inf

                                              \[\leadsto \color{blue}{i \cdot y} \]
                                            4. Step-by-step derivation
                                              1. lower-*.f6423.7

                                                \[\leadsto \color{blue}{i \cdot y} \]
                                            5. Applied rewrites23.7%

                                              \[\leadsto \color{blue}{i \cdot y} \]
                                            6. Add Preprocessing

                                            Reproduce

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