123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(**************************************************************************)(* *)(* OCaml *)(* *)(* The OCaml programmers *)(* *)(* Copyright 2018 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)typet=intletzero=0letone=1letminus_one=-1externalneg:int->int="%negint"externaladd:int->int->int="%addint"externalsub:int->int->int="%subint"externalmul:int->int->int="%mulint"externaldiv:int->int->int="%divint"externalrem:int->int->int="%modint"externalsucc:int->int="%succint"externalpred:int->int="%predint"letabsx=ifx>=0thenxelse-xletmax_int=(-1)lsr1letmin_int=max_int+1externallogand:int->int->int="%andint"externallogor:int->int->int="%orint"externallogxor:int->int->int="%xorint"letlognotx=logxorx(-1)externalshift_left:int->int->int="%lslint"externalshift_right:int->int->int="%asrint"externalshift_right_logical:int->int->int="%lsrint"letequal:int->int->bool=(=)letcompare:int->int->int=Stdlib.compareletminxy:t=ifx<=ythenxelseyletmaxxy:t=ifx>=ythenxelseyexternalto_float:int->float="%floatofint"externalof_float:float->int="%intoffloat"(*
external int_of_string : string -> int = "caml_int_of_string"
let of_string s = try Some (int_of_string s) with Failure _ -> None
*)externalformat_int:string->int->string="caml_format_int"letto_stringx=format_int"%d"xexternalseeded_hash_param:int->int->int->'a->int="caml_hash"[@@noalloc]letseeded_hashseedx=seeded_hash_param10100seedxlethashx=seeded_hash_param101000x