let of_q q =
  if Mpa.Q.is_integer q then Int else Nonint