Average Error: 0.1 → 0.1
Time: 11.7s
Precision: 64
Internal Precision: 320
\[1 - \frac{n}{N} \cdot \left(1 - \frac{1}{K}\right)\]
\[1 - \left(1 - \frac{1}{K}\right) \cdot \frac{n}{N}\]

Error

Bits error versus n

Bits error versus N

Bits error versus K

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[1 - \frac{n}{N} \cdot \left(1 - \frac{1}{K}\right)\]
  2. Final simplification0.1

    \[\leadsto 1 - \left(1 - \frac{1}{K}\right) \cdot \frac{n}{N}\]

Runtime

Time bar (total: 11.7s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (n N K)
  :name "1 - n/N * (1 - 1/K)"
  (- 1 (* (/ n N) (- 1 (/ 1 K)))))