let soff f = 
  let i = int_of_float f in
  if float_of_int i -. f = 0. then soi i else sof f