Average Error: 40.1 → 40.1
Time: 2.5s
Precision: binary64
\[\frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}\]
\[\frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}\]
\frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}
\frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}
double code(double x) {
	return ((double) (((double) (((double) (1.0 - x)) * ((double) log(((double) (1.0 - x)))))) / x));
}
double code(double x) {
	return ((double) (((double) (((double) (1.0 - x)) * ((double) log(((double) (1.0 - x)))))) / x));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 40.1

    \[\frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}\]
  2. Final simplification40.1

    \[\leadsto \frac{\left(1 - x\right) \cdot \log \left(1 - x\right)}{x}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(/ (* (- 1.0 x) (log (- 1.0 x))) x)"
  :precision binary64
  (/ (* (- 1.0 x) (log (- 1.0 x))) x))