dimanche 3 avril 2016

Chance of randomly generated float equality?

Short version:

How big is chance that floats generated randomly <0,1> will be equal? I can imagine the number is quite big, but cannot quite do the math myself.

Long version:

I am working on evolutionary algorithm for "Rectilinear Crossing Number" problem , where I represent vertex of graph as a set of [x,y] coordinates defined as floats. I want to justify the absurdity of testing for graph edge parallelism to my task supervisor, but I don't want to do so without proper numbers (not to look like an idiot). Or should I consider giving up performance to the "anything can happen" situation handling?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire