Average Error: 0.3 → 0.2
Time: 5.8s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{x}\right), x \cdot \log \left(\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right) + x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)\]
x \cdot \log x
\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{x}\right), x \cdot \log \left(\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right) + x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)
double f(double x) {
        double r32443 = x;
        double r32444 = log(r32443);
        double r32445 = r32443 * r32444;
        return r32445;
}

double f(double x) {
        double r32446 = x;
        double r32447 = 2.0;
        double r32448 = cbrt(r32446);
        double r32449 = log(r32448);
        double r32450 = r32447 * r32449;
        double r32451 = r32448 * r32448;
        double r32452 = cbrt(r32451);
        double r32453 = log(r32452);
        double r32454 = r32446 * r32453;
        double r32455 = cbrt(r32448);
        double r32456 = log(r32455);
        double r32457 = r32446 * r32456;
        double r32458 = r32454 + r32457;
        double r32459 = fma(r32446, r32450, r32458);
        return r32459;
}

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. Using strategy rm
  8. Applied fma-def0.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{x}\right), x \cdot \log \left(\sqrt[3]{x}\right)\right)}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt0.3

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

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

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

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

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

Reproduce

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