Average Error: 0.3 → 0.2
Time: 5.7s
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 r30343 = x;
        double r30344 = log(r30343);
        double r30345 = r30343 * r30344;
        return r30345;
}

double f(double x) {
        double r30346 = x;
        double r30347 = 2.0;
        double r30348 = cbrt(r30346);
        double r30349 = log(r30348);
        double r30350 = r30347 * r30349;
        double r30351 = r30348 * r30348;
        double r30352 = cbrt(r30351);
        double r30353 = log(r30352);
        double r30354 = r30346 * r30353;
        double r30355 = cbrt(r30348);
        double r30356 = log(r30355);
        double r30357 = r30346 * r30356;
        double r30358 = r30354 + r30357;
        double r30359 = fma(r30346, r30350, r30358);
        return r30359;
}

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 2020081 +o rules:numerics
(FPCore (x)
  :name "Statistics.Distribution.Binomial:directEntropy from math-functions-0.1.5.2"
  :precision binary64
  (* x (log x)))