let cast_int_to_float ~with_alarms rounding_mode v =
   unary_arithmetic_function ~with_alarms "integer conversion to float"
     (fun i ->
       let ok, r = Ival.cast_int_to_float rounding_mode i in
       if not ok then
         Kernel.warning ~current:true ~once:true
           "TODO: overflow in integer conversion to float";
       r)
     v