Average Error: 0.3 → 0.3
Time: 4.1s
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 code(double x) {
	return (x * log(x));
}
double code(double x) {
	return ((x * log(sqrt(x))) + (x * log(sqrt(x))));
}

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