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

double f(double x) {
        double r47539 = 2.0;
        double r47540 = x;
        double r47541 = cbrt(r47540);
        double r47542 = log(r47541);
        double r47543 = r47539 * r47542;
        double r47544 = 1.0;
        double r47545 = r47544 / r47540;
        double r47546 = -0.3333333333333333;
        double r47547 = pow(r47545, r47546);
        double r47548 = log(r47547);
        double r47549 = r47540 * r47548;
        double r47550 = fma(r47543, r47540, r47549);
        return r47550;
}

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

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

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

Reproduce

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