Gottfried Wilhelm Leibniz (1646–1715) was a German philosopher, scientist, mathematician, and historian famous for his metaphysical idealism as well as his epistemological rationalism. In addition, he made contributions to the fields of astronomy, biology (including embryology), engineering, information technology, law, logic, medicine, paleontology, philology, Sinology, social science, and topology. The calculating machine he invented could add, subtract and calculate square roots; his plans for invading Egypt are said to have been used by Napoleon. Leibniz also kept up a voluminous correspondence throughout his life.