...and rather inaccurate.In fact, the float test is a well known way to check for fresh eggs. If you find a clutch of eggs that your chickens laid in a hidden area, you can test if they are fresh that way. Put them in fresh water. Those that float to the top are too old. Those that stay on the bottom are okay.
Just because it floats, doesn't mean it's 'bad', just older.
Floating an egg will only tell you how old it might be.
They float due to evaporation when older.
It will not tell you if an egg is 'good' or 'bad'.
Plus then you've wetted the egg so it should be thoroughly washed and refrigerated.
When in doubt....
Open eggs one at a time in a separate dish before adding to pan or recipe,
use your eyes, nose, and common sense to decide if egg is OK to eat.