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

Percentage Accurate: 99.9% → 99.9%
Time: 12.3s
Alternatives: 16
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 16 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.9% 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.9% accurate, 1.0× speedup?

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

\\
\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)
\end{array}
Derivation
  1. Initial program 99.8%

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

      \[\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. Add Preprocessing

Alternative 2: 22.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{z}{y} \cdot y\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{a}{y} \cdot y\\

\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)) < -1e308 or 1.9999999999999999e304 < (+.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.2

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{y} \cdot y \]
      3. Step-by-step derivation
        1. Applied rewrites7.5%

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

        if -5.00000000000000027e31 < (+.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.9999999999999999e304

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

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

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

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

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

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

            \[\leadsto \frac{a}{y} \cdot y \]
          3. Step-by-step derivation
            1. Applied rewrites14.1%

              \[\leadsto \frac{a}{y} \cdot y \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 3: 36.8% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+304}\right):\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1
                   (+
                    (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                    (* y i))))
             (if (or (<= t_1 -1e+308) (not (<= t_1 2e+304))) (* i y) (fma (/ a z) z z))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
          	double tmp;
          	if ((t_1 <= -1e+308) || !(t_1 <= 2e+304)) {
          		tmp = i * y;
          	} else {
          		tmp = fma((a / z), z, z);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
          	tmp = 0.0
          	if ((t_1 <= -1e+308) || !(t_1 <= 2e+304))
          		tmp = Float64(i * y);
          	else
          		tmp = fma(Float64(a / z), z, z);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+308], N[Not[LessEqual[t$95$1, 2e+304]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+304}\right):\\
          \;\;\;\;i \cdot y\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1e308 or 1.9999999999999999e304 < (+.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.2

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

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

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

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

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

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

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

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

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

              \[\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, t\right)\right)\right) + a}{z}, z, z\right)} \]
            6. Taylor expanded in a around inf

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

                \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]
            8. Recombined 2 regimes into one program.
            9. Final simplification39.0%

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

            Alternative 4: 41.1% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

                if -1.99999999999999989e119 < (+.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 t around 0

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

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

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

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

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

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

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

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

                  Alternative 5: 90.7% accurate, 1.0× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      if -1.00000000000000009e56 < x < 5.59999999999999964e173

                      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.f6497.1

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

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

                      if 5.59999999999999964e173 < 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 rewrites92.5%

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

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

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

                      Alternative 6: 83.2% accurate, 1.0× speedup?

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

                        1. Initial program 99.8%

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

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\right) + a} \]
                        6. Taylor expanded in 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 rewrites83.2%

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

                          if 4.3999999999999998e-84 < 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 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.f6488.6

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

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

                        Alternative 7: 84.8% accurate, 1.0× speedup?

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

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

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

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

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

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

                        Alternative 8: 88.6% accurate, 1.7× speedup?

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

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

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

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

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

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

                            \[\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.1

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

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

                          if -5.4000000000000003e234 < x < 1.35000000000000009e249

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

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

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

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

                        Alternative 9: 87.5% accurate, 1.7× speedup?

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                              if -2.99999999999999991e200 < x < 1.35000000000000009e249

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

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

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

                              if 1.35000000000000009e249 < 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. 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.6

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

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

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

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

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

                                \[\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.f6486.2

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

                                \[\leadsto \color{blue}{\log y \cdot x} \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification89.8%

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

                            Alternative 10: 74.4% accurate, 1.8× speedup?

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

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

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

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

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

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

                                \[\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.1

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

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

                              if -5.4000000000000003e234 < x < 1.35000000000000009e249

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

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

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

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

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

                              Alternative 11: 51.0% accurate, 2.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+169} \lor \neg \left(b \leq 1.5 \cdot 10^{+140}\right):\\ \;\;\;\;\log c \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b c i)
                               :precision binary64
                               (if (or (<= b -1.7e+169) (not (<= b 1.5e+140)))
                                 (* (log c) b)
                                 (+ (* (+ (/ z i) y) i) a)))
                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if ((b <= -1.7e+169) || !(b <= 1.5e+140)) {
                              		tmp = log(c) * b;
                              	} else {
                              		tmp = (((z / i) + y) * i) + a;
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(x, y, z, t, a, b, c, i)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8), intent (in) :: b
                                  real(8), intent (in) :: c
                                  real(8), intent (in) :: i
                                  real(8) :: tmp
                                  if ((b <= (-1.7d+169)) .or. (.not. (b <= 1.5d+140))) then
                                      tmp = log(c) * b
                                  else
                                      tmp = (((z / i) + y) * i) + a
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if ((b <= -1.7e+169) || !(b <= 1.5e+140)) {
                              		tmp = Math.log(c) * b;
                              	} else {
                              		tmp = (((z / i) + y) * i) + a;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i):
                              	tmp = 0
                              	if (b <= -1.7e+169) or not (b <= 1.5e+140):
                              		tmp = math.log(c) * b
                              	else:
                              		tmp = (((z / i) + y) * i) + a
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0
                              	if ((b <= -1.7e+169) || !(b <= 1.5e+140))
                              		tmp = Float64(log(c) * b);
                              	else
                              		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0;
                              	if ((b <= -1.7e+169) || ~((b <= 1.5e+140)))
                              		tmp = log(c) * b;
                              	else
                              		tmp = (((z / i) + y) * i) + a;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.7e+169], N[Not[LessEqual[b, 1.5e+140]], $MachinePrecision]], N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;b \leq -1.7 \cdot 10^{+169} \lor \neg \left(b \leq 1.5 \cdot 10^{+140}\right):\\
                              \;\;\;\;\log c \cdot b\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if b < -1.70000000000000014e169 or 1.49999999999999998e140 < b

                                1. Initial program 99.6%

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

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

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

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

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

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

                                if -1.70000000000000014e169 < b < 1.49999999999999998e140

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

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

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

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

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

                                      \[\leadsto \left(\frac{z}{i} + y\right) \cdot i + a \]
                                  4. Recombined 2 regimes into one program.
                                  5. Final simplification57.4%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+169} \lor \neg \left(b \leq 1.5 \cdot 10^{+140}\right):\\ \;\;\;\;\log c \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 12: 51.7% accurate, 2.0× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+230} \lor \neg \left(x \leq 1.6 \cdot 10^{+220}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i)
                                   :precision binary64
                                   (if (or (<= x -3.5e+230) (not (<= x 1.6e+220)))
                                     (* (log y) x)
                                     (+ (* (+ (/ z i) y) i) a)))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	double tmp;
                                  	if ((x <= -3.5e+230) || !(x <= 1.6e+220)) {
                                  		tmp = log(y) * x;
                                  	} else {
                                  		tmp = (((z / i) + y) * i) + a;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(x, y, z, t, a, b, c, i)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: c
                                      real(8), intent (in) :: i
                                      real(8) :: tmp
                                      if ((x <= (-3.5d+230)) .or. (.not. (x <= 1.6d+220))) then
                                          tmp = log(y) * x
                                      else
                                          tmp = (((z / i) + y) * i) + a
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	double tmp;
                                  	if ((x <= -3.5e+230) || !(x <= 1.6e+220)) {
                                  		tmp = Math.log(y) * x;
                                  	} else {
                                  		tmp = (((z / i) + y) * i) + a;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b, c, i):
                                  	tmp = 0
                                  	if (x <= -3.5e+230) or not (x <= 1.6e+220):
                                  		tmp = math.log(y) * x
                                  	else:
                                  		tmp = (((z / i) + y) * i) + a
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	tmp = 0.0
                                  	if ((x <= -3.5e+230) || !(x <= 1.6e+220))
                                  		tmp = Float64(log(y) * x);
                                  	else
                                  		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                                  	tmp = 0.0;
                                  	if ((x <= -3.5e+230) || ~((x <= 1.6e+220)))
                                  		tmp = log(y) * x;
                                  	else
                                  		tmp = (((z / i) + y) * i) + a;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.5e+230], N[Not[LessEqual[x, 1.6e+220]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq -3.5 \cdot 10^{+230} \lor \neg \left(x \leq 1.6 \cdot 10^{+220}\right):\\
                                  \;\;\;\;\log y \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -3.5e230 or 1.59999999999999994e220 < 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. 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.7

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

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

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

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

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

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

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

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

                                    if -3.5e230 < x < 1.59999999999999994e220

                                    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 rewrites86.4%

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+230} \lor \neg \left(x \leq 1.6 \cdot 10^{+220}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 13: 46.2% accurate, 8.1× speedup?

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

                                        1. Initial program 99.9%

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

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

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

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

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

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

                                          \[\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, t\right)\right)\right) + a}{z}, z, z\right)} \]
                                        6. Taylor expanded in a around inf

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

                                            \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]

                                          if -7.5000000000000004e174 < z

                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                                            Alternative 14: 36.4% accurate, 9.0× speedup?

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

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

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

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

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

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

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

                                                \[\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, t\right)\right)\right) + a}{z}, z, z\right)} \]
                                              6. Taylor expanded in a around inf

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]

                                                if -1.6e134 < z

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

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

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

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

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

                                                    \[\leadsto \left(\frac{a}{y} + i\right) \cdot y \]
                                                8. Recombined 2 regimes into one program.
                                                9. Add Preprocessing

                                                Alternative 15: 25.4% accurate, 10.2× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 2.4 \cdot 10^{+208}:\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b c i)
                                                 :precision binary64
                                                 (if (<= a 2.4e+208) (* i y) (* (/ a y) y)))
                                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                	double tmp;
                                                	if (a <= 2.4e+208) {
                                                		tmp = i * y;
                                                	} else {
                                                		tmp = (a / y) * 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 (a <= 2.4d+208) then
                                                        tmp = i * y
                                                    else
                                                        tmp = (a / y) * 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 (a <= 2.4e+208) {
                                                		tmp = i * y;
                                                	} else {
                                                		tmp = (a / y) * y;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a, b, c, i):
                                                	tmp = 0
                                                	if a <= 2.4e+208:
                                                		tmp = i * y
                                                	else:
                                                		tmp = (a / y) * y
                                                	return tmp
                                                
                                                function code(x, y, z, t, a, b, c, i)
                                                	tmp = 0.0
                                                	if (a <= 2.4e+208)
                                                		tmp = Float64(i * y);
                                                	else
                                                		tmp = Float64(Float64(a / y) * y);
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                	tmp = 0.0;
                                                	if (a <= 2.4e+208)
                                                		tmp = i * y;
                                                	else
                                                		tmp = (a / y) * y;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.4e+208], N[(i * y), $MachinePrecision], N[(N[(a / y), $MachinePrecision] * y), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;a \leq 2.4 \cdot 10^{+208}:\\
                                                \;\;\;\;i \cdot y\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{a}{y} \cdot y\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if a < 2.39999999999999987e208

                                                  1. Initial program 99.8%

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

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

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

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

                                                  if 2.39999999999999987e208 < a

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

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

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

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

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

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

                                                      \[\leadsto \frac{a}{y} \cdot y \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites58.5%

                                                        \[\leadsto \frac{a}{y} \cdot y \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 16: 24.0% accurate, 39.0× speedup?

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

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

                                                      \[\leadsto \color{blue}{i \cdot y} \]
                                                    4. Step-by-step derivation
                                                      1. lower-*.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 2024339 
                                                    (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)))