Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Aug. 27, 2012, 5:36 p.m.
FORMAT:
Text only
SIZE:
300 Bytes
Raw
Download
Tweet
HITS:
1674
Go to comments
Report
#include <math.h>
double AttackerSuccessProbability (double q, int z)
{
double p = 1.0 - q;
double lambda = z * (q / p);
double sum = 1.0;
int i,k;
for (k = 0; k <= z; k++) {
double poisson = exp(-lambda);
for (i = 0; i <= k; i++) {
poisson = lambda / i;
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus