Average Error: 0.4 → 0.4
Time: 1.4s
Precision: binary64
\[\frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}\]
\[\frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}\]
\frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}
\frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}
double code(double N, double f) {
	return ((double) (((double) (((double) (2.0 * N)) * ((double) log(f)))) / ((double) log(2.0))));
}
double code(double N, double f) {
	return ((double) (((double) (((double) (2.0 * N)) * ((double) log(f)))) / ((double) log(2.0))));
}

Error

Bits error versus N

Bits error versus f

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

    \[\frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}\]
  2. Final simplification0.4

    \[\leadsto \frac{\left(2 \cdot N\right) \cdot \log f}{\log 2}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (N f)
  :name "(/ (* (* 2 N) (log f)) (log 2))"
  :precision binary64
  (/ (* (* 2.0 N) (log f)) (log 2.0)))