Is that the case for all platforms and C libraries? Also, isn't seeding with the current time a way to guarantee deterministic behavior? An attacker of such an algorithm probably knows what time it is, and users probably don't expect all invocations within a given second to return the same results.
No reason on the divide. Just because. That is probably a reasonable guess on the big O value. Clearly O(rand) is cheeky but in accurate. And the PRNG will walk the number space so it will eventually succeed, but computing how long it will take for 'n' numbers eludes my math reasoning skills.
Are you sure? What if there's an infinite amount of tries to get to a certain number? You can of course reason about the average case, but maybe the worst case (when there's an input number which is never found by the PRNG) does never halt.
> O(rand)
For sorting algorithms we usually compare in the number of input elements. You can reason about the average case where the numbers are found in average time so you can consider the number of iterations to find the correct number a constant (a very large constant but a constant nonetheless).