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

double f(double x) {
        double r44168 = 2.0;
        double r44169 = x;
        double r44170 = cbrt(r44169);
        double r44171 = log(r44170);
        double r44172 = r44168 * r44171;
        double r44173 = cbrt(r44170);
        double r44174 = log(r44173);
        double r44175 = r44168 * r44174;
        double r44176 = r44169 * r44175;
        double r44177 = r44169 * r44174;
        double r44178 = r44176 + r44177;
        double r44179 = fma(r44172, r44169, r44178);
        return r44179;
}

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}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)} + x \cdot \log \left(\sqrt[3]{\sqrt[3]{x}}\right)\right)\]
  14. Final simplification0.2

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

Reproduce

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