Average Error: 0.6 → 0.6
Time: 2.3s
Precision: binary64
\[\frac{x - y}{\log x - \log y}\]
\[\frac{x - y}{\log x - \log y}\]
\frac{x - y}{\log x - \log y}
\frac{x - y}{\log x - \log y}
double code(double x, double y) {
	return ((double) (((double) (x - y)) / ((double) (((double) log(x)) - ((double) log(y))))));
}
double code(double x, double y) {
	return ((double) (((double) (x - y)) / ((double) (((double) log(x)) - ((double) log(y))))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[\frac{x - y}{\log x - \log y}\]
  2. Final simplification0.6

    \[\leadsto \frac{x - y}{\log x - \log y}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x y)
  :name "(/ (- x y) (- (log x) (log y)))"
  :precision binary64
  (/ (- x y) (- (log x) (log y))))