Eggs that float to the surface of water are no longer fresh and may not be safe to eat so I would advise against eating the eggs that float.
An older egg will have it's air cell enlarged sufficiently to keep it buoyant which means the egg is most times not safe to eat but sometimes they can.
However just to be safe and prevent myself from getting sick I would not eat an egg that floats in the water.
Eggs that are fresh will sink to the bottom and are okay to eat.