In 1786 Mascheroni became professor of algebra and geometry at the University of Pavia, mainly on the strength of his excellent work on statics Nuove ricerche su l'equilibrio delle volte which he had published one year earlier. Later, in 1789, he became rector of the university, holding the appointment for four years. During the years 1788 to 1791 he was head of the Accademia degli Affidati.
In Adnotationes ad calculum integrale Euleri (1790) Mascheroni calculated Euler's constant to 32 decimal places. In fact only the first 19 places were correct but the remaining places were corrected by Johann von Soldner in 1809. Despite the error in the calculation, Mascheroni's work shows a deep understanding of Euler's calculus.
Mascheroni is also known as a poet and he dedicated one of his books Geometria del compasso (published in Pavia in 1797) to Napoleon Bonaparte in verse. In this work Mascheroni proved that all Euclidean constructions can be made with compasses alone, so a straight edge in not needed. In fact this had been (unknown to Mascheroni) proved in 1672 by a little known Danish mathematician Georg Mohr. In the preface to Geometria del compasso Mascheroni explains how he approached the problem :-
He was moved initially by a desire to make a contribution to elementary geometry. It occurred to him that ruler and compass could perhaps be separated, as water can into two gases; but he was assailed by doubts and fears often attendant upon research. He then chanced to reread an article on the way Graham and Bird had divided their great astronomical quadrant, and he realised that the division had been made by compass alone, although, to be sure, by trial and error. This encouraged him and he continued his work with two purposes in mind: to give a theoretical solution to the problem of constructions with compasses alone and to offer practical constructions that might be of help in making precision instruments.The article  gives an idea of the content of Mascheroni's book. In it he shows how, with compasses alone, to bisect a given circular arc, to add and subtract given segments, to find a fourth proportional to three given segments, to find the point of intersection of two given lines, and to find the points in which a given line meets a given circle. From the solution to these problems he is able to prove theoretically that any construction which can be made using a ruler and compasses can be made with compasses alone.
For his excellent contributions Mascheroni received a number of honours such as election to the Academy of Padua, the Royal Academy of Mantua and to the Società Italiana delle Scienze.
Mascheroni was appointed as a deputy in the governing legislative assembly in Milan in 1797. The French had been working on the introduction of the metric system of weights and measures and on 7 April 1795 the National Convention had passed a law introducing the metric system putting Legendre in charge of the transition to the new system. Mascheroni was sent to Paris to study the new system and to report to the governing body in Milan. He published his report in 1798 but the War of the Second Coalition began in 1799 while Napoleon Bonaparte was in Egypt and the French government was in crisis. Austria took the opportunity to secure Russia as an ally and then attack the French on several fronts including the north of Italy. Mascheroni was unable to return to Milan due to the war and the Austrian occupation of the city in 1799. He remained in Paris where he died in the following year after a brief illness resulting from complications after catching a cold.
One is left with asking whether Mascheroni deserves the credit for proving a result which Mohr proved 125 years earlier. The first question we must ask is whether Mascheroni might have known of Mohr's result. If one examines the two proofs it is seen that they approach the problem in very different ways. One is certainly led to believe that Mascheroni could not have known Mohr's proof but it is still possible that he had heard that the result had been proved earlier. This does not seem particularly likely and even if he had seen the result stated it detracts little from his achievement. It is clear to me [EFR] that both Mascheroni and Mohr deserve equal credit.
Article by: J J O'Connor and E F Robertson