(** Conversions between floats and unsigned ints can be defined in terms of conversions between floats and signed ints. (Most processors provide only the latter, forcing the compiler to emulate the former.)   *)
Definition ox8000_0000 := Int.repr Int.half_modulus.  (**r [0x8000_0000] *)

(* Specifications: *)
Theorem of_intu_of_int_1:
forall x,
Int.ltu x ox8000_0000 = true ->
of_intu x = of_int x.
Theorem of_intu_of_int_2:
forall x,
Int.ltu x ox8000_0000 = false ->
of_intu x = add (of_int (Int.sub x ox8000_0000)) (of_intu ox8000_0000).
Theorem to_intu_to_int_1:
forall x n,
cmp Clt x (of_intu ox8000_0000) = true ->
to_intu x = Some n ->
to_int x = Some n.
Theorem to_intu_to_int_2:
forall x n,
cmp Clt x (of_intu ox8000_0000) = false ->
to_intu x = Some n ->
to_int (sub x (of_intu ox8000_0000)) = Some (Int.sub n ox8000_0000).
Theorem of_intu_of_int_1:
forall x,
Int.ltu x ox8000_0000 = true ->
of_intu x = of_int x.
Theorem of_intu_of_int_2:
forall x,
Int.ltu x ox8000_0000 = false ->
of_intu x = add (of_int (Int.sub x ox8000_0000)) (of_intu ox8000_0000).
Theorem to_intu_to_int_1:
forall x n,
cmp Clt x (of_intu ox8000_0000) = true ->
to_intu x = Some n ->
to_int x = Some n.
Theorem to_intu_to_int_2:
forall x n,
cmp Clt x (of_intu ox8000_0000) = false ->
to_intu x = Some n ->
to_int (sub x (of_intu ox8000_0000)) = Some (Int.sub n ox8000_0000).