Average Error: 0.3 → 0.2
Time: 13.2s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \left(2 \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right) \cdot x + \log \left(\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, \left(2 \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right) \cdot x + \log \left(\sqrt[3]{\sqrt[3]{x}}\right) \cdot x\right)
double f(double x) {
        double r33432 = x;
        double r33433 = log(r33432);
        double r33434 = r33432 * r33433;
        return r33434;
}

double f(double x) {
        double r33435 = 2.0;
        double r33436 = x;
        double r33437 = cbrt(r33436);
        double r33438 = log(r33437);
        double r33439 = r33435 * r33438;
        double r33440 = cbrt(r33437);
        double r33441 = log(r33440);
        double r33442 = r33435 * r33441;
        double r33443 = r33442 * r33436;
        double r33444 = r33441 * r33436;
        double r33445 = r33443 + r33444;
        double r33446 = fma(r33439, r33436, r33445);
        return r33446;
}

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

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)}\right)\]
  11. Applied log-prod0.2

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \color{blue}{\left(\log \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) + \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)}\right)\]
  12. Applied distribute-lft-in0.2

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \color{blue}{x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) + x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)}\right)\]
  13. Simplified0.2

    \[\leadsto \mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \color{blue}{\left(2 \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right) \cdot x} + x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)\]
  14. Simplified0.2

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

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

Reproduce

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