Average Error: 0.3 → 0.2
Time: 20.9s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \log x \cdot \left(x \cdot \frac{1}{3}\right)\right)\]
x \cdot \log x
\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \log x \cdot \left(x \cdot \frac{1}{3}\right)\right)
double f(double x) {
        double r39573 = x;
        double r39574 = log(r39573);
        double r39575 = r39573 * r39574;
        return r39575;
}

double f(double x) {
        double r39576 = 2.0;
        double r39577 = x;
        double r39578 = cbrt(r39577);
        double r39579 = log(r39578);
        double r39580 = r39576 * r39579;
        double r39581 = log(r39577);
        double r39582 = 0.3333333333333333;
        double r39583 = r39577 * r39582;
        double r39584 = r39581 * r39583;
        double r39585 = fma(r39580, r39577, r39584);
        return r39585;
}

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. Taylor expanded around inf 0.3

    \[\leadsto \left(2 \cdot \log \left(\sqrt[3]{x}\right)\right) \cdot x + \color{blue}{\log \left({\left(\frac{1}{x}\right)}^{\frac{-1}{3}}\right) \cdot x}\]
  9. Simplified0.3

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, \left(x \cdot \frac{-1}{3}\right) \cdot \left(-\log x\right)\right)}\]
  12. Using strategy rm
  13. Applied pow10.2

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

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

Reproduce

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