simple arithmetic analyzer