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

Percentage Accurate: 99.8% → 99.8%
Time: 11.2s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Derivation
  1. Initial program 99.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. Add Preprocessing

Alternative 2: 40.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+65}:\\
\;\;\;\;\left(-\left(-z\right)\right) + a\\

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


\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-*.f64100.0

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

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

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

    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 rewrites84.3%

      \[\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 \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + a \]
    7. Step-by-step derivation
      1. Applied rewrites58.6%

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

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

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

          \[\leadsto \left(--1 \cdot z\right) + a \]
        3. Step-by-step derivation
          1. Applied rewrites39.3%

            \[\leadsto \left(-\left(-z\right)\right) + a \]

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

          1. Initial program 99.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 rewrites86.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 x around 0

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

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

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

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

                \[\leadsto \left(--1 \cdot \left(i \cdot y\right)\right) + a \]
              3. Step-by-step derivation
                1. Applied rewrites39.3%

                  \[\leadsto \left(-\left(-y\right) \cdot i\right) + a \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 3: 41.7% accurate, 0.5× speedup?

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

                1. Initial program 99.9%

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

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

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

                  \[\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)) < 9.99999999999999986e306

                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 rewrites84.2%

                  \[\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 \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + a \]
                7. Step-by-step derivation
                  1. Applied rewrites63.9%

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

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

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

                      \[\leadsto \left(--1 \cdot z\right) + a \]
                    3. Step-by-step derivation
                      1. Applied rewrites37.2%

                        \[\leadsto \left(-\left(-z\right)\right) + a \]
                    4. Recombined 2 regimes into one program.
                    5. Final simplification44.2%

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

                    Alternative 4: 80.5% accurate, 0.5× speedup?

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

                      1. Initial program 99.8%

                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 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.f6491.8

                          \[\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 rewrites91.8%

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

                      if -5e163 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4e104

                      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.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 b around 0

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

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

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

                        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 rewrites86.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. Taylor expanded in x around 0

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

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

                        Alternative 5: 90.4% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+175} \lor \neg \left(x \leq 2.4 \cdot 10^{+124}\right):\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (if (or (<= x -5.4e+175) (not (<= x 2.4e+124)))
                           (+ (fma (log y) x (fma (log c) (- b 0.5) z)) a)
                           (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double tmp;
                        	if ((x <= -5.4e+175) || !(x <= 2.4e+124)) {
                        		tmp = fma(log(y), x, fma(log(c), (b - 0.5), z)) + a;
                        	} else {
                        		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i)
                        	tmp = 0.0
                        	if ((x <= -5.4e+175) || !(x <= 2.4e+124))
                        		tmp = Float64(fma(log(y), x, fma(log(c), Float64(b - 0.5), z)) + a);
                        	else
                        		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.4e+175], N[Not[LessEqual[x, 2.4e+124]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq -5.4 \cdot 10^{+175} \lor \neg \left(x \leq 2.4 \cdot 10^{+124}\right):\\
                        \;\;\;\;\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < -5.4000000000000002e175 or 2.40000000000000006e124 < 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 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 z around inf

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

                              \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(z \cdot \log c, \frac{b - 0.5}{z}, z\right)\right)\right) + a \]
                            2. 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)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites78.2%

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

                              if -5.4000000000000002e175 < x < 2.40000000000000006e124

                              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.f6495.7

                                  \[\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 rewrites95.7%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+175} \lor \neg \left(x \leq 2.4 \cdot 10^{+124}\right):\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 6: 75.8% accurate, 1.0× speedup?

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

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

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

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

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

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

                              if -3.5000000000000001e78 < z

                              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.3%

                                \[\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 z around inf

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

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

                                  \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, b \cdot \log c\right)\right) + a \]
                                3. Step-by-step derivation
                                  1. Applied rewrites74.2%

                                    \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \log c \cdot b\right)\right) + a \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification77.1%

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

                                Alternative 7: 84.4% 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 rewrites86.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 8: 55.0% accurate, 1.1× speedup?

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

                                  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 rewrites84.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 b around 0

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites56.3%

                                          \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]

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

                                        1. Initial program 99.7%

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

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

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

                                            \[\leadsto \color{blue}{\log c \cdot b} \]
                                          3. lower-log.f6466.6

                                            \[\leadsto \color{blue}{\log c} \cdot b \]
                                        5. Applied rewrites66.6%

                                          \[\leadsto \color{blue}{\log c \cdot b} \]
                                      4. Recombined 2 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 9: 89.1% accurate, 1.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b c i)
                                       :precision binary64
                                       (if (or (<= x -3.4e+214) (not (<= x 1.8e+70)))
                                         (+ (fma i y (* (log y) x)) a)
                                         (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double tmp;
                                      	if ((x <= -3.4e+214) || !(x <= 1.8e+70)) {
                                      		tmp = fma(i, y, (log(y) * x)) + a;
                                      	} else {
                                      		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	tmp = 0.0
                                      	if ((x <= -3.4e+214) || !(x <= 1.8e+70))
                                      		tmp = Float64(fma(i, y, Float64(log(y) * x)) + a);
                                      	else
                                      		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.4e+214], N[Not[LessEqual[x, 1.8e+70]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\
                                      \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if x < -3.3999999999999998e214 or 1.8e70 < 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 rewrites91.7%

                                          \[\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, \mathsf{fma}\left(\log y, x, z + \frac{-1}{2} \cdot \log c\right)\right) + a \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites84.1%

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

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

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

                                              \[\leadsto \mathsf{fma}\left(i, y, x \cdot \log y\right) + a \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites78.9%

                                                \[\leadsto \mathsf{fma}\left(i, y, \log y \cdot x\right) + a \]

                                              if -3.3999999999999998e214 < x < 1.8e70

                                              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.f6495.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 rewrites95.5%

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]
                                            6. Add Preprocessing

                                            Alternative 10: 76.1% accurate, 1.8× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, -0.5 + b, i \cdot y\right) + z\right) + a\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b c i)
                                             :precision binary64
                                             (if (or (<= x -3.4e+214) (not (<= x 1.8e+70)))
                                               (+ (fma i y (* (log y) x)) a)
                                               (+ (+ (fma (log c) (+ -0.5 b) (* i y)) z) a)))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	double tmp;
                                            	if ((x <= -3.4e+214) || !(x <= 1.8e+70)) {
                                            		tmp = fma(i, y, (log(y) * x)) + a;
                                            	} else {
                                            		tmp = (fma(log(c), (-0.5 + b), (i * y)) + z) + a;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b, c, i)
                                            	tmp = 0.0
                                            	if ((x <= -3.4e+214) || !(x <= 1.8e+70))
                                            		tmp = Float64(fma(i, y, Float64(log(y) * x)) + a);
                                            	else
                                            		tmp = Float64(Float64(fma(log(c), Float64(-0.5 + b), Float64(i * y)) + z) + a);
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.4e+214], N[Not[LessEqual[x, 1.8e+70]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(-0.5 + b), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\
                                            \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(\mathsf{fma}\left(\log c, -0.5 + b, i \cdot y\right) + z\right) + a\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if x < -3.3999999999999998e214 or 1.8e70 < 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 rewrites91.7%

                                                \[\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, \mathsf{fma}\left(\log y, x, z + \frac{-1}{2} \cdot \log c\right)\right) + a \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites84.1%

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(i, y, x \cdot \log y\right) + a \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites78.9%

                                                      \[\leadsto \mathsf{fma}\left(i, y, \log y \cdot x\right) + a \]

                                                    if -3.3999999999999998e214 < x < 1.8e70

                                                    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 rewrites83.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 x around 0

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, -0.5 + b, i \cdot y\right) + z\right) + a\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 11: 76.1% accurate, 1.8× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a b c i)
                                                     :precision binary64
                                                     (if (or (<= x -3.4e+214) (not (<= x 1.8e+70)))
                                                       (+ (fma i y (* (log y) x)) a)
                                                       (+ (fma i y (fma (log c) (- b 0.5) z)) a)))
                                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                    	double tmp;
                                                    	if ((x <= -3.4e+214) || !(x <= 1.8e+70)) {
                                                    		tmp = fma(i, y, (log(y) * x)) + a;
                                                    	} else {
                                                    		tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x, y, z, t, a, b, c, i)
                                                    	tmp = 0.0
                                                    	if ((x <= -3.4e+214) || !(x <= 1.8e+70))
                                                    		tmp = Float64(fma(i, y, Float64(log(y) * x)) + a);
                                                    	else
                                                    		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.4e+214], N[Not[LessEqual[x, 1.8e+70]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\
                                                    \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if x < -3.3999999999999998e214 or 1.8e70 < 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 rewrites91.7%

                                                        \[\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, \mathsf{fma}\left(\log y, x, z + \frac{-1}{2} \cdot \log c\right)\right) + a \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites84.1%

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(i, y, x \cdot \log y\right) + a \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites78.9%

                                                              \[\leadsto \mathsf{fma}\left(i, y, \log y \cdot x\right) + a \]

                                                            if -3.3999999999999998e214 < x < 1.8e70

                                                            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 rewrites83.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 x around 0

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

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+214} \lor \neg \left(x \leq 1.8 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \log y \cdot x\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \end{array} \]
                                                            10. Add Preprocessing

                                                            Alternative 12: 57.8% accurate, 1.9× speedup?

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

                                                              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 rewrites91.7%

                                                                \[\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, \mathsf{fma}\left(\log y, x, z + \frac{-1}{2} \cdot \log c\right)\right) + a \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites80.4%

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

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

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

                                                                    \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites72.1%

                                                                      \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]

                                                                    if -2.4e157 < z

                                                                    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.2%

                                                                      \[\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, \mathsf{fma}\left(\log y, x, z + \frac{-1}{2} \cdot \log c\right)\right) + a \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites70.4%

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

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

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

                                                                          \[\leadsto \mathsf{fma}\left(i, y, x \cdot \log y\right) + a \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites59.1%

                                                                            \[\leadsto \mathsf{fma}\left(i, y, \log y \cdot x\right) + a \]
                                                                        4. Recombined 2 regimes into one program.
                                                                        5. Add Preprocessing

                                                                        Alternative 13: 60.0% accurate, 1.9× speedup?

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

                                                                          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 rewrites84.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 0

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

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

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

                                                                                \[\leadsto \left(\log c \cdot \left(-0.5 + b\right) + z\right) + a \]

                                                                              if 1.9499999999999999e27 < y

                                                                              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 rewrites87.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 b around 0

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

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

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

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

                                                                                    \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites61.5%

                                                                                      \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                  4. Recombined 2 regimes into one program.
                                                                                  5. Add Preprocessing

                                                                                  Alternative 14: 60.0% accurate, 2.0× speedup?

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

                                                                                    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 rewrites84.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 0

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

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

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

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

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

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

                                                                                          if 1.9499999999999999e27 < y

                                                                                          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 rewrites87.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 b around 0

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

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

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

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

                                                                                                \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites61.5%

                                                                                                  \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Add Preprocessing

                                                                                              Alternative 15: 56.2% accurate, 2.0× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+215} \lor \neg \left(x \leq 9.5 \cdot 10^{+245}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, 1 \cdot z\right) + a\\ \end{array} \end{array} \]
                                                                                              (FPCore (x y z t a b c i)
                                                                                               :precision binary64
                                                                                               (if (or (<= x -2.2e+215) (not (<= x 9.5e+245)))
                                                                                                 (* (log y) x)
                                                                                                 (+ (fma i y (* 1.0 z)) a)))
                                                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                              	double tmp;
                                                                                              	if ((x <= -2.2e+215) || !(x <= 9.5e+245)) {
                                                                                              		tmp = log(y) * x;
                                                                                              	} else {
                                                                                              		tmp = fma(i, y, (1.0 * z)) + a;
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              function code(x, y, z, t, a, b, c, i)
                                                                                              	tmp = 0.0
                                                                                              	if ((x <= -2.2e+215) || !(x <= 9.5e+245))
                                                                                              		tmp = Float64(log(y) * x);
                                                                                              	else
                                                                                              		tmp = Float64(fma(i, y, Float64(1.0 * z)) + a);
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.2e+215], N[Not[LessEqual[x, 9.5e+245]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(i * y + N[(1.0 * z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              \mathbf{if}\;x \leq -2.2 \cdot 10^{+215} \lor \neg \left(x \leq 9.5 \cdot 10^{+245}\right):\\
                                                                                              \;\;\;\;\log y \cdot x\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\mathsf{fma}\left(i, y, 1 \cdot z\right) + a\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if x < -2.2000000000000001e215 or 9.49999999999999939e245 < x

                                                                                                1. Initial program 99.5%

                                                                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in 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.0%

                                                                                                  \[\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.f6473.8

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

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

                                                                                                if -2.2000000000000001e215 < x < 9.49999999999999939e245

                                                                                                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 rewrites84.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 b around 0

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

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

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

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

                                                                                                      \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites58.1%

                                                                                                        \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                    5. Final simplification60.2%

                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+215} \lor \neg \left(x \leq 9.5 \cdot 10^{+245}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, 1 \cdot z\right) + a\\ \end{array} \]
                                                                                                    6. Add Preprocessing

                                                                                                    Alternative 16: 51.9% accurate, 15.6× speedup?

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

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

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

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

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

                                                                                                          \[\leadsto \mathsf{fma}\left(i, y, 1 \cdot z\right) + a \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites52.3%

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

                                                                                                          Alternative 17: 24.2% 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-*.f6421.3

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

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

                                                                                                          Reproduce

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