It tells the story of the brilliant Indian mathematician Srinivasa Ramanujan , a lowly clerk in Madras who came to Cambridge to study with the mathematics don G H Hardy shortly before the First World War .