Average Error: 0.3 → 0.3
Time: 14.0s
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 r1173718 = x;
        double r1173719 = log(r1173718);
        double r1173720 = r1173718 * r1173719;
        return r1173720;
}

double f(double x) {
        double r1173721 = x;
        double r1173722 = sqrt(r1173721);
        double r1173723 = log(r1173722);
        double r1173724 = r1173721 * r1173723;
        double r1173725 = r1173724 + r1173724;
        return r1173725;
}

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