Generalized uncertainty principle, classical mechanics, and general relativity