Wargentin, Pehr Wilhelm, Swedish mathematician and astronomer