Average Error: 0.3 → 0.3
Time: 4.4s
Precision: 64
\[x \cdot \log x\]
\[x \cdot \log \left(\sqrt{x}\right) + x \cdot \log \left(\sqrt{x}\right)\]
x \cdot \log x
x \cdot \log \left(\sqrt{x}\right) + x \cdot \log \left(\sqrt{x}\right)
double f(double x) {
        double r20880 = x;
        double r20881 = log(r20880);
        double r20882 = r20880 * r20881;
        return r20882;
}

double f(double x) {
        double r20883 = x;
        double r20884 = sqrt(r20883);
        double r20885 = log(r20884);
        double r20886 = r20883 * r20885;
        double r20887 = r20886 + r20886;
        return r20887;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[x \cdot \log x\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.3

    \[\leadsto x \cdot \log \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\]
  4. Applied log-prod0.3

    \[\leadsto x \cdot \color{blue}{\left(\log \left(\sqrt{x}\right) + \log \left(\sqrt{x}\right)\right)}\]
  5. Applied distribute-lft-in0.3

    \[\leadsto \color{blue}{x \cdot \log \left(\sqrt{x}\right) + x \cdot \log \left(\sqrt{x}\right)}\]
  6. Final simplification0.3

    \[\leadsto x \cdot \log \left(\sqrt{x}\right) + x \cdot \log \left(\sqrt{x}\right)\]

Reproduce

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