~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to otherlibs/num/big_int.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2009-02-22 08:49:13 UTC
  • mfrom: (12.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090222084913-3i0uw2bhd0lgw0ok
* Uploading to unstable
* debian/control: bump dh-ocaml to (>= 0.4) to avoid buggy ocamlinit.mk

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: big_int.mli,v 1.10 2002/03/14 20:12:54 xleroy Exp $ *)
 
14
(* $Id: big_int.mli,v 1.11 2008/01/04 13:15:52 xleroy Exp $ *)
15
15
 
16
16
(** Operations on arbitrary-precision integers.
17
17
 
128
128
        (** Convert a big integer to a small integer (type [int]).
129
129
           Raises [Failure "int_of_big_int"] if the big integer
130
130
           is not representable as a small integer. *)
 
131
 
 
132
val big_int_of_int32 : int32 -> big_int
 
133
        (** Convert a 32-bit integer to a big integer. *)
 
134
val big_int_of_nativeint : nativeint -> big_int
 
135
        (** Convert a native integer to a big integer. *)
 
136
val big_int_of_int64 : int64 -> big_int
 
137
        (** Convert a 64-bit integer to a big integer. *)
 
138
val int32_of_big_int : big_int -> int32
 
139
        (** Convert a big integer to a 32-bit integer.
 
140
            Raises [Failure] if the big integer is outside the
 
141
            range [[-2{^31}, 2{^31}-1]]. *)
 
142
val nativeint_of_big_int : big_int -> nativeint
 
143
        (** Convert a big integer to a native integer.
 
144
            Raises [Failure] if the big integer is outside the
 
145
            range [[Nativeint.min_int, Nativeint.max_int]]. *)
 
146
val int64_of_big_int : big_int -> int64
 
147
        (** Convert a big integer to a 64-bit integer.
 
148
            Raises [Failure] if the big integer is outside the
 
149
            range [[-2{^63}, 2{^63}-1]]. *)
 
150
 
131
151
val float_of_big_int : big_int -> float
132
152
        (** Returns a floating-point number approximating the
133
153
           given big integer. *)