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

Percentage Accurate: 99.8% → 99.8%
Time: 11.7s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    5. lift-+.f64N/A

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    10. lift-+.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
    13. lift-+.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
    16. lift-+.f64N/A

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

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

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

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

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

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

Alternative 2: 29.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -200:\\
\;\;\;\;\frac{z}{i} \cdot i\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+194}:\\
\;\;\;\;\frac{a}{i} \cdot i\\

\mathbf{elif}\;t\_1 \leq 1.7 \cdot 10^{+308}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{t}, t, t\right)\\

\mathbf{else}:\\
\;\;\;\;i \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 1.6999999999999999e308 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

    1. Initial program 100.0%

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

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

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

      \[\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)) < -200

    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 i around inf

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

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

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

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

      \[\leadsto \frac{z}{i} \cdot i \]
    7. Step-by-step derivation
      1. Applied rewrites9.6%

        \[\leadsto \frac{z}{i} \cdot i \]

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

      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 i around inf

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

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

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

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

        \[\leadsto \frac{a}{i} \cdot i \]
      7. Step-by-step derivation
        1. Applied rewrites10.7%

          \[\leadsto \frac{a}{i} \cdot i \]

        if 4.99999999999999989e194 < (+.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.6999999999999999e308

        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 -inf

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{a}{t}, t, t\right) \]
        7. Step-by-step derivation
          1. Applied rewrites26.5%

            \[\leadsto \mathsf{fma}\left(\frac{a}{t}, t, t\right) \]
        8. Recombined 4 regimes into one program.
        9. Final simplification26.9%

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

        Alternative 3: 23.3% accurate, 0.3× speedup?

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

              \[\leadsto \color{blue}{i \cdot y} \]
          5. Applied rewrites79.9%

            \[\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)) < -200

          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 i around inf

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

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

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

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

            \[\leadsto \frac{z}{i} \cdot i \]
          7. Step-by-step derivation
            1. Applied rewrites9.6%

              \[\leadsto \frac{z}{i} \cdot i \]

            if -200 < (+.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)) < 5e302

            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 i around inf

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

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

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

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

              \[\leadsto \frac{a}{i} \cdot i \]
            7. Step-by-step derivation
              1. Applied rewrites10.1%

                \[\leadsto \frac{a}{i} \cdot i \]
            8. Recombined 3 regimes into one program.
            9. Final simplification21.9%

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

            Alternative 4: 73.6% accurate, 0.7× speedup?

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

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

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

              if -1.2000000000000001e176 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.9999999999999995e201

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 5: 60.3% accurate, 0.7× speedup?

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

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

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

                  if -1.2000000000000001e176 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.9999999999999995e201

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 6: 90.3% accurate, 1.0× speedup?

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

                      1. Initial program 99.7%

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

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

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

                          \[\leadsto \color{blue}{\left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + a} \]
                      5. Applied rewrites93.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 y around 0

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

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

                        if -5.1999999999999997e187 < x < 9.2000000000000001e114

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

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                          5. lift-+.f64N/A

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                          10. lift-+.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                          13. lift-+.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                          16. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 7: 89.4% accurate, 1.0× speedup?

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

                        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\left(\mathsf{fma}\left(\frac{-1}{2}, \log c, \mathsf{fma}\left(\color{blue}{\log y}, x, i \cdot y\right)\right) + z\right) + t\right) + a \]
                          13. lower-*.f6489.8

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

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

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

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

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

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

                            if -7.19999999999999954e254 < x < 2.6999999999999998e171

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                              5. lift-+.f64N/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                              10. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                              13. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                              16. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 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.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 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. Add Preprocessing

                          Alternative 9: 88.1% accurate, 1.6× speedup?

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

                            1. Initial program 99.3%

                              \[\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. Step-by-step derivation
                              1. lift-+.f64N/A

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                              5. lift-+.f64N/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                              10. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                              13. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                              16. lift-+.f64N/A

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

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

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

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

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

                              \[\leadsto \color{blue}{x \cdot \log y} \]
                            6. 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.f6480.2

                                \[\leadsto \color{blue}{\log y} \cdot x \]
                            7. Applied rewrites80.2%

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

                            if -7.8000000000000003e254 < x < 7.99999999999999957e183

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                              5. lift-+.f64N/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                              10. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                              13. lift-+.f64N/A

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                              16. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 7.99999999999999957e183 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\left(\mathsf{fma}\left(\frac{-1}{2}, \log c, \mathsf{fma}\left(\color{blue}{\log y}, x, i \cdot y\right)\right) + z\right) + t\right) + a \]
                              13. lower-*.f6484.3

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

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

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

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

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

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

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

                              Alternative 10: 88.1% accurate, 1.6× speedup?

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

                                1. Initial program 99.3%

                                  \[\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. Step-by-step derivation
                                  1. lift-+.f64N/A

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                  5. lift-+.f64N/A

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                  10. lift-+.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                  13. lift-+.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                  16. lift-+.f64N/A

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

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

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

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

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

                                  \[\leadsto \color{blue}{x \cdot \log y} \]
                                6. 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.f6480.2

                                    \[\leadsto \color{blue}{\log y} \cdot x \]
                                7. Applied rewrites80.2%

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

                                if -7.8000000000000003e254 < x < 7.99999999999999957e183

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

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                  5. lift-+.f64N/A

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                  10. lift-+.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                  13. lift-+.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                  16. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 7.99999999999999957e183 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(\left(\mathsf{fma}\left(\frac{-1}{2}, \log c, \mathsf{fma}\left(\color{blue}{\log y}, x, i \cdot y\right)\right) + z\right) + t\right) + a \]
                                  13. lower-*.f6484.3

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

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

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

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

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

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

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

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

                                    Alternative 11: 88.8% accurate, 1.7× speedup?

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

                                      1. Initial program 99.4%

                                        \[\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. Step-by-step derivation
                                        1. lift-+.f64N/A

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                        5. lift-+.f64N/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                        10. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                        13. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                        16. lift-+.f64N/A

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

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

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

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

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

                                        \[\leadsto \color{blue}{x \cdot \log y} \]
                                      6. 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.f6480.8

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

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

                                      if -7.8000000000000003e254 < x < 3.6e224

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

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                        5. lift-+.f64N/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                        10. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                        13. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                        16. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 12: 88.8% accurate, 1.7× speedup?

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

                                      1. Initial program 99.4%

                                        \[\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. Step-by-step derivation
                                        1. lift-+.f64N/A

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                        5. lift-+.f64N/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                        10. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                        13. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                        16. lift-+.f64N/A

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

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

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

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

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

                                        \[\leadsto \color{blue}{x \cdot \log y} \]
                                      6. 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.f6480.8

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

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

                                      if -7.8000000000000003e254 < x < 3.6e224

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

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

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

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

                                    Alternative 13: 74.1% accurate, 1.8× speedup?

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

                                      1. Initial program 99.4%

                                        \[\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. Step-by-step derivation
                                        1. lift-+.f64N/A

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
                                        5. lift-+.f64N/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, \left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                        10. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{a + \left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                        13. lift-+.f64N/A

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \color{blue}{\left(t + \left(x \cdot \log y + z\right)\right)}\right)\right) \]
                                        16. lift-+.f64N/A

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

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

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

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

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

                                        \[\leadsto \color{blue}{x \cdot \log y} \]
                                      6. 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.f6480.8

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

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

                                      if -7.8000000000000003e254 < x < 3.6e224

                                      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.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 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 rewrites75.8%

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

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

                                      Alternative 14: 28.2% accurate, 10.2× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2500:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b c i)
                                       :precision binary64
                                       (if (<= y 2500.0) (* (/ a i) i) (* i y)))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double tmp;
                                      	if (y <= 2500.0) {
                                      		tmp = (a / i) * i;
                                      	} else {
                                      		tmp = i * y;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      real(8) function code(x, y, z, t, a, b, c, i)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          real(8), intent (in) :: z
                                          real(8), intent (in) :: t
                                          real(8), intent (in) :: a
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: c
                                          real(8), intent (in) :: i
                                          real(8) :: tmp
                                          if (y <= 2500.0d0) then
                                              tmp = (a / i) * i
                                          else
                                              tmp = i * y
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double tmp;
                                      	if (y <= 2500.0) {
                                      		tmp = (a / i) * i;
                                      	} else {
                                      		tmp = i * y;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a, b, c, i):
                                      	tmp = 0
                                      	if y <= 2500.0:
                                      		tmp = (a / i) * i
                                      	else:
                                      		tmp = i * y
                                      	return tmp
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	tmp = 0.0
                                      	if (y <= 2500.0)
                                      		tmp = Float64(Float64(a / i) * i);
                                      	else
                                      		tmp = Float64(i * y);
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                                      	tmp = 0.0;
                                      	if (y <= 2500.0)
                                      		tmp = (a / i) * i;
                                      	else
                                      		tmp = i * y;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2500.0], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision], N[(i * y), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;y \leq 2500:\\
                                      \;\;\;\;\frac{a}{i} \cdot i\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;i \cdot y\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if y < 2500

                                        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 i around inf

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

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

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

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

                                          \[\leadsto \frac{a}{i} \cdot i \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites14.4%

                                            \[\leadsto \frac{a}{i} \cdot i \]

                                          if 2500 < 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 y around inf

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

                                              \[\leadsto \color{blue}{i \cdot y} \]
                                          5. Applied rewrites43.6%

                                            \[\leadsto \color{blue}{i \cdot y} \]
                                        8. Recombined 2 regimes into one program.
                                        9. Add Preprocessing

                                        Alternative 15: 24.6% 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.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-*.f6425.2

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

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

                                        Reproduce

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