Average Error: 0.3 → 0.2
Time: 15.9s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left({x}^{\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({x}^{\frac{1}{3}}\right)\right)
double f(double x) {
        double r42710 = x;
        double r42711 = log(r42710);
        double r42712 = r42710 * r42711;
        return r42712;
}

double f(double x) {
        double r42713 = 2.0;
        double r42714 = x;
        double r42715 = cbrt(r42714);
        double r42716 = log(r42715);
        double r42717 = r42713 * r42716;
        double r42718 = 0.3333333333333333;
        double r42719 = pow(r42714, r42718);
        double r42720 = log(r42719);
        double r42721 = r42714 * r42720;
        double r42722 = fma(r42717, r42714, r42721);
        return r42722;
}

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 pow1/30.3

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{x}\right), x, x \cdot \log \left({x}^{\frac{1}{3}}\right)\right)}\]
  11. Using strategy rm
  12. Applied *-un-lft-identity0.2

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

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

Reproduce

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