Mathematical helper