of the two leading mathematicians of the first half of the 17th century. According to Peter L. Bernstein, in his book Against the Gods, Fermat "was a mathematician of rare power. He was an independent inventor of analytic geometry, he contributed to the early development of calculus, he did research on the weight of the earth, and he worked on light refraction and optics. In the course of what turned out to be an extended correspondence with Pascal, he made a significant contribution to the theory of probability. But Fermat's crowning achievement was in the theory of numbers."[