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

double f(double x) {
        double r31864 = x;
        double r31865 = 2.0;
        double r31866 = cbrt(r31864);
        double r31867 = log(r31866);
        double r31868 = r31865 * r31867;
        double r31869 = 1.0;
        double r31870 = r31869 / r31864;
        double r31871 = -0.3333333333333333;
        double r31872 = pow(r31870, r31871);
        double r31873 = log(r31872);
        double r31874 = r31873 * r31864;
        double r31875 = fma(r31864, r31868, r31874);
        return r31875;
}

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}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{x}\right)\right)} + x \cdot \log \left(\sqrt[3]{x}\right)\]
  7. Taylor expanded around inf 0.3

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

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

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

Reproduce

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