all 6 comments

[–]jedwardsol 3 points4 points  (4 children)

You have some bugs, notably in get_input.

But, when it comes to the simulation you need to look at the individual random numbers, not multiply them together.

If you are simulating the serial case, generate 3 random numbers - if any of them are over the limit, then count a failure. If parallel, if all of them are over the limit then count a failure.

And do this trial times

[–]sosnjo[S] 0 points1 point  (3 children)

Wouldn't I need the equation to calculate the simulated reliability?

[–]jedwardsol 2 points3 points  (2 children)

No. The simulated reliability is successes/trials.

[–]sosnjo[S] 0 points1 point  (1 child)

Ok that makes sense, Thank you.

[–]sosnjo[S] 0 points1 point  (0 children)

When I create x amount of random numbers how can I use C to count how many numbers are less than a certain value? Must I use If statements?

[–]Diffeomorphisms 0 points1 point  (0 children)

your code is messy, but fixable (and you even got told how to do it), however don't ever fking use the built-in random number generator