Average Error: 0.3 → 0.3
Time: 5.5s
Precision: 64
\[x \cdot \log x\]
\[\mathsf{fma}\left(x, 2 \cdot \log \left(\sqrt[3]{x}\right), x \cdot \log \left(\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]{x}\right)\right)
double f(double x) {
        double r30535 = x;
        double r30536 = log(r30535);
        double r30537 = r30535 * r30536;
        return r30537;
}

double f(double x) {
        double r30538 = x;
        double r30539 = 2.0;
        double r30540 = cbrt(r30538);
        double r30541 = log(r30540);
        double r30542 = r30539 * r30541;
        double r30543 = r30538 * r30541;
        double r30544 = fma(r30538, r30542, r30543);
        return r30544;
}

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. Final simplification0.3

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

Reproduce

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