let to_int v =
    try int_of_big_int v
    with Failure "int_of_big_int" -> assert false