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

double f(double x) {
        double r44525 = 2.0;
        double r44526 = x;
        double r44527 = cbrt(r44526);
        double r44528 = log(r44527);
        double r44529 = r44525 * r44528;
        double r44530 = 1.0;
        double r44531 = r44530 / r44526;
        double r44532 = -0.3333333333333333;
        double r44533 = pow(r44531, r44532);
        double r44534 = log(r44533);
        double r44535 = r44534 * r44526;
        double r44536 = fma(r44529, r44526, r44535);
        return r44536;
}

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

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

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

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

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

Reproduce

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