Average Error: 0.3 → 0.2
Time: 5.4s
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 r30949 = x;
        double r30950 = log(r30949);
        double r30951 = r30949 * r30950;
        return r30951;
}

double f(double x) {
        double r30952 = x;
        double r30953 = 2.0;
        double r30954 = cbrt(r30952);
        double r30955 = log(r30954);
        double r30956 = r30953 * r30955;
        double r30957 = r30954 * r30954;
        double r30958 = cbrt(r30957);
        double r30959 = log(r30958);
        double r30960 = r30952 * r30959;
        double r30961 = cbrt(r30954);
        double r30962 = log(r30961);
        double r30963 = r30952 * r30962;
        double r30964 = r30960 + r30963;
        double r30965 = fma(r30952, r30956, r30964);
        return r30965;
}

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