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

Percentage Accurate: 99.8% → 99.8%
Time: 11.4s
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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(\mathsf{fma}\left(\log y, x, z\right) + t\right) + a\right)\right) \end{array} \]
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (log c) (- b 0.5) (+ (+ (fma (log y) x z) t) a))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(y, i, fma(log(c), (b - 0.5), ((fma(log(y), x, z) + t) + a)));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(log(c), Float64(b - 0.5), Float64(Float64(fma(log(y), x, z) + t) + a)))
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[(N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(\mathsf{fma}\left(\log y, x, z\right) + t\right) + a\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.0% accurate, 0.5× speedup?

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(-a\right) + y \cdot i \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

            \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(-a\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{y \cdot i} + -1 \cdot \left(-a\right) \]
        3. Applied rewrites39.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(-a\right) \cdot -1\right)} \]
      10. Recombined 3 regimes into one program.
      11. Final simplification41.2%

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

      Alternative 3: 64.5% accurate, 0.9× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;i \cdot y + \left(\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right) \leq -2 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b c i)
       :precision binary64
       (if (<=
            (+ (* i y) (+ (* (- b 0.5) (log c)) (+ (+ (+ (* x (log y)) z) t) a)))
            -2e+52)
         (fma (/ (* i y) z) z z)
         (fma y i (* -1.0 (- a)))))
      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if (((i * y) + (((b - 0.5) * log(c)) + ((((x * log(y)) + z) + t) + a))) <= -2e+52) {
      		tmp = fma(((i * y) / z), z, z);
      	} else {
      		tmp = fma(y, i, (-1.0 * -a));
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
      function code(x, y, z, t, a, b, c, i)
      	tmp = 0.0
      	if (Float64(Float64(i * y) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a))) <= -2e+52)
      		tmp = fma(Float64(Float64(i * y) / z), z, z);
      	else
      		tmp = fma(y, i, Float64(-1.0 * Float64(-a)));
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(i * y), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e+52], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(y * i + N[(-1.0 * (-a)), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;i \cdot y + \left(\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right) \leq -2 \cdot 10^{+52}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\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)) < -2e52

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(-a\right) + y \cdot i \]
            2. Step-by-step derivation
              1. lift-+.f64N/A

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

                \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(-a\right)} \]
              3. lift-*.f64N/A

                \[\leadsto \color{blue}{y \cdot i} + -1 \cdot \left(-a\right) \]
            3. Applied rewrites39.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(-a\right) \cdot -1\right)} \]
          10. Recombined 2 regimes into one program.
          11. Final simplification41.3%

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

          Alternative 4: 91.2% accurate, 1.0× speedup?

          \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, z\right)\right) + a\\ \mathbf{if}\;x \leq -9.2 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{+199}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (+ (fma (log y) x (fma -0.5 (log c) z)) a)))
             (if (<= x -9.2e+209)
               t_1
               (if (<= x 1.65e+199)
                 (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                 t_1))))
          assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = fma(log(y), x, fma(-0.5, log(c), z)) + a;
          	double tmp;
          	if (x <= -9.2e+209) {
          		tmp = t_1;
          	} else if (x <= 1.65e+199) {
          		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(fma(log(y), x, fma(-0.5, log(c), z)) + a)
          	tmp = 0.0
          	if (x <= -9.2e+209)
          		tmp = t_1;
          	elseif (x <= 1.65e+199)
          		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * x + N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -9.2e+209], t$95$1, If[LessEqual[x, 1.65e+199], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, z\right)\right) + a\\
          \mathbf{if}\;x \leq -9.2 \cdot 10^{+209}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;x \leq 1.65 \cdot 10^{+199}:\\
          \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -9.20000000000000038e209 or 1.6499999999999999e199 < x

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                if -9.20000000000000038e209 < x < 1.6499999999999999e199

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 90.5% accurate, 1.0× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, -0.5 + b, \mathsf{fma}\left(\log y, x, a\right)\right)\\ \mathbf{if}\;x \leq -2.6 \cdot 10^{+210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 10^{+199}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (fma (log c) (+ -0.5 b) (fma (log y) x a))))
                 (if (<= x -2.6e+210)
                   t_1
                   (if (<= x 1e+199) (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a)) t_1))))
              assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = fma(log(c), (-0.5 + b), fma(log(y), x, a));
              	double tmp;
              	if (x <= -2.6e+210) {
              		tmp = t_1;
              	} else if (x <= 1e+199) {
              		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
              function code(x, y, z, t, a, b, c, i)
              	t_1 = fma(log(c), Float64(-0.5 + b), fma(log(y), x, a))
              	tmp = 0.0
              	if (x <= -2.6e+210)
              		tmp = t_1;
              	elseif (x <= 1e+199)
              		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(-0.5 + b), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+210], t$95$1, If[LessEqual[x, 1e+199], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(\log c, -0.5 + b, \mathsf{fma}\left(\log y, x, a\right)\right)\\
              \mathbf{if}\;x \leq -2.6 \cdot 10^{+210}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;x \leq 10^{+199}:\\
              \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -2.5999999999999999e210 or 1.0000000000000001e199 < x

                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                    if -2.5999999999999999e210 < x < 1.0000000000000001e199

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 90.7% accurate, 1.0× speedup?

                  \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\ \mathbf{if}\;y \leq 9 \cdot 10^{-62}:\\ \;\;\;\;\mathsf{fma}\left(\log y, x, t\_1\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(t\_1 + t\right) + a\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (fma (log c) (- b 0.5) z)))
                     (if (<= y 9e-62) (+ (fma (log y) x t_1) a) (fma y i (+ (+ t_1 t) a)))))
                  assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = fma(log(c), (b - 0.5), z);
                  	double tmp;
                  	if (y <= 9e-62) {
                  		tmp = fma(log(y), x, t_1) + a;
                  	} else {
                  		tmp = fma(y, i, ((t_1 + t) + a));
                  	}
                  	return tmp;
                  }
                  
                  x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = fma(log(c), Float64(b - 0.5), z)
                  	tmp = 0.0
                  	if (y <= 9e-62)
                  		tmp = Float64(fma(log(y), x, t_1) + a);
                  	else
                  		tmp = fma(y, i, Float64(Float64(t_1 + t) + a));
                  	end
                  	return tmp
                  end
                  
                  NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[y, 9e-62], N[(N[(N[Log[y], $MachinePrecision] * x + t$95$1), $MachinePrecision] + a), $MachinePrecision], N[(y * i + N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                  \\
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\
                  \mathbf{if}\;y \leq 9 \cdot 10^{-62}:\\
                  \;\;\;\;\mathsf{fma}\left(\log y, x, t\_1\right) + a\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(y, i, \left(t\_1 + t\right) + a\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < 9.00000000000000036e-62

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 99.2% accurate, 1.0× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \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} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (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))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    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;
                    }
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    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
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    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}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\right) + a
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.9%

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

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

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

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

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

                    Alternative 8: 87.6% accurate, 1.7× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -3.95 \cdot 10^{+211}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t\_1}{z}, z, z\right)\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* x (log y))))
                       (if (<= x -3.95e+211)
                         (fma (/ t_1 z) z z)
                         (if (<= x 2.7e+208)
                           (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                           t_1))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = x * log(y);
                    	double tmp;
                    	if (x <= -3.95e+211) {
                    		tmp = fma((t_1 / z), z, z);
                    	} else if (x <= 2.7e+208) {
                    		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(x * log(y))
                    	tmp = 0.0
                    	if (x <= -3.95e+211)
                    		tmp = fma(Float64(t_1 / z), z, z);
                    	elseif (x <= 2.7e+208)
                    		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.95e+211], N[(N[(t$95$1 / z), $MachinePrecision] * z + z), $MachinePrecision], If[LessEqual[x, 2.7e+208], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := x \cdot \log y\\
                    \mathbf{if}\;x \leq -3.95 \cdot 10^{+211}:\\
                    \;\;\;\;\mathsf{fma}\left(\frac{t\_1}{z}, z, z\right)\\
                    
                    \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\
                    \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if x < -3.94999999999999979e211

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -3.94999999999999979e211 < x < 2.7e208

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2.7e208 < 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.6

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

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

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

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

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

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

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

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

                      Alternative 9: 88.3% accurate, 1.7× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* x (log y))))
                         (if (<= x -4.5e+254)
                           t_1
                           (if (<= x 2.7e+208)
                             (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                             t_1))))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = x * log(y);
                      	double tmp;
                      	if (x <= -4.5e+254) {
                      		tmp = t_1;
                      	} else if (x <= 2.7e+208) {
                      		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(x * log(y))
                      	tmp = 0.0
                      	if (x <= -4.5e+254)
                      		tmp = t_1;
                      	elseif (x <= 2.7e+208)
                      		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+254], t$95$1, If[LessEqual[x, 2.7e+208], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      \begin{array}{l}
                      t_1 := x \cdot \log y\\
                      \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\
                      \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.4999999999999998e254 or 2.7e208 < 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.6

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

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

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

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

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

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

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

                        if -4.4999999999999998e254 < x < 2.7e208

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 10: 88.3% accurate, 1.7× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right) + \left(t + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* x (log y))))
                         (if (<= x -4.5e+254)
                           t_1
                           (if (<= x 2.7e+208)
                             (+ (fma (- b 0.5) (log c) (fma i y z)) (+ t a))
                             t_1))))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = x * log(y);
                      	double tmp;
                      	if (x <= -4.5e+254) {
                      		tmp = t_1;
                      	} else if (x <= 2.7e+208) {
                      		tmp = fma((b - 0.5), log(c), fma(i, y, z)) + (t + a);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(x * log(y))
                      	tmp = 0.0
                      	if (x <= -4.5e+254)
                      		tmp = t_1;
                      	elseif (x <= 2.7e+208)
                      		tmp = Float64(fma(Float64(b - 0.5), log(c), fma(i, y, z)) + Float64(t + a));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+254], t$95$1, If[LessEqual[x, 2.7e+208], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      \begin{array}{l}
                      t_1 := x \cdot \log y\\
                      \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\
                      \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right) + \left(t + a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.4999999999999998e254 or 2.7e208 < 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.6

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

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

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

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

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

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

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

                        if -4.4999999999999998e254 < x < 2.7e208

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(a + t\right) + \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{i \cdot y + z}\right) \]
                          11. lower-fma.f6492.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 rewrites92.6%

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

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

                      Alternative 11: 87.7% accurate, 1.8× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* x (log y))))
                         (if (<= x -4.5e+254)
                           t_1
                           (if (<= x 2.7e+208) (+ (fma i y (fma (log c) (- b 0.5) z)) a) t_1))))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = x * log(y);
                      	double tmp;
                      	if (x <= -4.5e+254) {
                      		tmp = t_1;
                      	} else if (x <= 2.7e+208) {
                      		tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(x * log(y))
                      	tmp = 0.0
                      	if (x <= -4.5e+254)
                      		tmp = t_1;
                      	elseif (x <= 2.7e+208)
                      		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a);
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+254], t$95$1, If[LessEqual[x, 2.7e+208], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      \begin{array}{l}
                      t_1 := x \cdot \log y\\
                      \mathbf{if}\;x \leq -4.5 \cdot 10^{+254}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 2.7 \cdot 10^{+208}:\\
                      \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.4999999999999998e254 or 2.7e208 < 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.6

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

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

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

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

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

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

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

                        if -4.4999999999999998e254 < x < 2.7e208

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

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

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

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

                        Alternative 12: 76.0% accurate, 1.9× speedup?

                        \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.08 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + \left(t + a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right) + \left(t + a\right)\\ \end{array} \end{array} \]
                        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (if (<= y 1.08e-54)
                           (+ (fma (log c) (- b 0.5) z) (+ t a))
                           (+ (fma -0.5 (log c) (fma i y z)) (+ t a))))
                        assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double tmp;
                        	if (y <= 1.08e-54) {
                        		tmp = fma(log(c), (b - 0.5), z) + (t + a);
                        	} else {
                        		tmp = fma(-0.5, log(c), fma(i, y, z)) + (t + a);
                        	}
                        	return tmp;
                        }
                        
                        x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                        function code(x, y, z, t, a, b, c, i)
                        	tmp = 0.0
                        	if (y <= 1.08e-54)
                        		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + Float64(t + a));
                        	else
                        		tmp = Float64(fma(-0.5, log(c), fma(i, y, z)) + Float64(t + a));
                        	end
                        	return tmp
                        end
                        
                        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.08e-54], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq 1.08 \cdot 10^{-54}:\\
                        \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + \left(t + a\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right) + \left(t + a\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < 1.08000000000000002e-54

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.08000000000000002e-54 < 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.f6489.5

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

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

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

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

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

                            Alternative 13: 68.3% accurate, 1.9× speedup?

                            \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 520000000000:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + \left(t + a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
                            NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (if (<= y 520000000000.0)
                               (+ (fma (log c) (- b 0.5) z) (+ t a))
                               (fma y i (* -1.0 (- a)))))
                            assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double tmp;
                            	if (y <= 520000000000.0) {
                            		tmp = fma(log(c), (b - 0.5), z) + (t + a);
                            	} else {
                            		tmp = fma(y, i, (-1.0 * -a));
                            	}
                            	return tmp;
                            }
                            
                            x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                            function code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0
                            	if (y <= 520000000000.0)
                            		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + Float64(t + a));
                            	else
                            		tmp = fma(y, i, Float64(-1.0 * Float64(-a)));
                            	end
                            	return tmp
                            end
                            
                            NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 520000000000.0], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(-1.0 * (-a)), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;y \leq 520000000000:\\
                            \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + \left(t + a\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < 5.2e11

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 5.2e11 < 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 inf

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

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

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

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

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

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

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

                                    \[\leadsto -1 \cdot \left(-a\right) + y \cdot i \]
                                  2. Step-by-step derivation
                                    1. lift-+.f64N/A

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

                                      \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(-a\right)} \]
                                    3. lift-*.f64N/A

                                      \[\leadsto \color{blue}{y \cdot i} + -1 \cdot \left(-a\right) \]
                                  3. Applied rewrites63.2%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(-a\right) \cdot -1\right)} \]
                                10. Recombined 2 regimes into one program.
                                11. Final simplification68.0%

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

                                Alternative 14: 68.0% accurate, 2.0× speedup?

                                \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 520000000000:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
                                NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (if (<= y 520000000000.0)
                                   (+ (fma (log c) (- b 0.5) z) a)
                                   (fma y i (* -1.0 (- a)))))
                                assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double tmp;
                                	if (y <= 520000000000.0) {
                                		tmp = fma(log(c), (b - 0.5), z) + a;
                                	} else {
                                		tmp = fma(y, i, (-1.0 * -a));
                                	}
                                	return tmp;
                                }
                                
                                x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                                function code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0
                                	if (y <= 520000000000.0)
                                		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a);
                                	else
                                		tmp = fma(y, i, Float64(-1.0 * Float64(-a)));
                                	end
                                	return tmp
                                end
                                
                                NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 520000000000.0], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], N[(y * i + N[(-1.0 * (-a)), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;y \leq 520000000000:\\
                                \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if y < 5.2e11

                                  1. Initial program 99.8%

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

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

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

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

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

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

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

                                      if 5.2e11 < 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 inf

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

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

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

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

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

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

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

                                          \[\leadsto -1 \cdot \left(-a\right) + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-+.f64N/A

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

                                            \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(-a\right)} \]
                                          3. lift-*.f64N/A

                                            \[\leadsto \color{blue}{y \cdot i} + -1 \cdot \left(-a\right) \]
                                        3. Applied rewrites63.2%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(-a\right) \cdot -1\right)} \]
                                      10. Recombined 2 regimes into one program.
                                      11. Final simplification59.5%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 520000000000:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)\\ \end{array} \]
                                      12. Add Preprocessing

                                      Alternative 15: 44.8% accurate, 16.7× speedup?

                                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right) \end{array} \]
                                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                      (FPCore (x y z t a b c i) :precision binary64 (fma y i (* -1.0 (- a))))
                                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	return fma(y, i, (-1.0 * -a));
                                      }
                                      
                                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                                      function code(x, y, z, t, a, b, c, i)
                                      	return fma(y, i, Float64(-1.0 * Float64(-a)))
                                      end
                                      
                                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(-1.0 * (-a)), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                                      \\
                                      \mathsf{fma}\left(y, i, -1 \cdot \left(-a\right)\right)
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

                                          \[\leadsto -1 \cdot \left(-a\right) + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-+.f64N/A

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

                                            \[\leadsto \color{blue}{y \cdot i + -1 \cdot \left(-a\right)} \]
                                          3. lift-*.f64N/A

                                            \[\leadsto \color{blue}{y \cdot i} + -1 \cdot \left(-a\right) \]
                                        3. Applied rewrites42.6%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(-a\right) \cdot -1\right)} \]
                                        4. Final simplification42.6%

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

                                        Alternative 16: 24.1% accurate, 39.0× speedup?

                                        \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ i \cdot y \end{array} \]
                                        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                        (FPCore (x y z t a b c i) :precision binary64 (* i y))
                                        assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	return i * y;
                                        }
                                        
                                        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                        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
                                        
                                        assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	return i * y;
                                        }
                                        
                                        [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                                        def code(x, y, z, t, a, b, c, i):
                                        	return i * y
                                        
                                        x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                                        function code(x, y, z, t, a, b, c, i)
                                        	return Float64(i * y)
                                        end
                                        
                                        x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                                        function tmp = code(x, y, z, t, a, b, c, i)
                                        	tmp = i * y;
                                        end
                                        
                                        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                                        \\
                                        i \cdot y
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 99.9%

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

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

                                            \[\leadsto \color{blue}{i \cdot y} \]
                                        5. Applied rewrites29.4%

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

                                        Reproduce

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