Average Error: 0.3 → 0.3
Time: 16.8s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \log \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot x\right)\]
x \cdot \log x
\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \log \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot x\right)
double f(double x) {
        double r42890 = x;
        double r42891 = log(r42890);
        double r42892 = r42890 * r42891;
        return r42892;
}

double f(double x) {
        double r42893 = 2.0;
        double r42894 = x;
        double r42895 = cbrt(r42894);
        double r42896 = log(r42895);
        double r42897 = r42893 * r42896;
        double r42898 = cbrt(r42895);
        double r42899 = r42898 * r42898;
        double r42900 = r42899 * r42898;
        double r42901 = log(r42900);
        double r42902 = r42901 * r42894;
        double r42903 = fma(r42897, r42894, r42902);
        return r42903;
}

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. Using strategy rm
  11. Applied add-cube-cbrt0.3

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

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

Reproduce

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