Average Error: 0.3 → 0.2
Time: 17.0s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left({\left(\frac{1}{x}\right)}^{\frac{-1}{3}}\right)\right)\]
x \cdot \log x
\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left({\left(\frac{1}{x}\right)}^{\frac{-1}{3}}\right)\right)
double f(double x) {
        double r49590 = x;
        double r49591 = log(r49590);
        double r49592 = r49590 * r49591;
        return r49592;
}

double f(double x) {
        double r49593 = 2.0;
        double r49594 = x;
        double r49595 = cbrt(r49594);
        double r49596 = log(r49595);
        double r49597 = r49593 * r49596;
        double r49598 = 1.0;
        double r49599 = r49598 / r49594;
        double r49600 = -0.3333333333333333;
        double r49601 = pow(r49599, r49600);
        double r49602 = log(r49601);
        double r49603 = r49594 * r49602;
        double r49604 = fma(r49597, r49594, r49603);
        return r49604;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.3

    \[x \cdot \log x\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.3

    \[\leadsto x \cdot \log \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)}\]
  4. Applied log-prod0.4

    \[\leadsto x \cdot \color{blue}{\left(\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \log \left(\sqrt[3]{x}\right)\right)}\]
  5. Applied distribute-lft-in0.4

    \[\leadsto \color{blue}{x \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + x \cdot \log \left(\sqrt[3]{x}\right)}\]
  6. Simplified0.4

    \[\leadsto \color{blue}{\left(2 \cdot \log \left(\sqrt[3]{x}\right)\right) \cdot x} + x \cdot \log \left(\sqrt[3]{x}\right)\]
  7. Using strategy rm
  8. Applied fma-def0.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left(\sqrt[3]{x}\right)\right)}\]
  9. Taylor expanded around inf 0.2

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \color{blue}{\left({\left(\frac{1}{x}\right)}^{\frac{-1}{3}}\right)}\right)\]
  10. Final simplification0.2

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left({\left(\frac{1}{x}\right)}^{\frac{-1}{3}}\right)\right)\]

Reproduce

herbie shell --seed 2019235 +o rules:numerics
(FPCore (x)
  :name "Statistics.Distribution.Binomial:directEntropy from math-functions-0.1.5.2"
  :precision binary64
  (* x (log x)))