Average Error: 0.3 → 0.3
Time: 4.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 r33010 = x;
        double r33011 = log(r33010);
        double r33012 = r33010 * r33011;
        return r33012;
}

double f(double x) {
        double r33013 = x;
        double r33014 = sqrt(r33013);
        double r33015 = log(r33014);
        double r33016 = r33013 * r33015;
        double r33017 = r33016 + r33016;
        return r33017;
}

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