summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/int32.mli11
-rw-r--r--stdlib/int64.mli11
-rw-r--r--stdlib/nativeint.mli11
-rw-r--r--stdlib/printf.mli4
4 files changed, 17 insertions, 20 deletions
diff --git a/stdlib/int32.mli b/stdlib/int32.mli
index 341fb8888..8febf7a40 100644
--- a/stdlib/int32.mli
+++ b/stdlib/int32.mli
@@ -49,16 +49,15 @@ external mul : int32 -> int32 -> int32 = "%int32_mul"
external div : int32 -> int32 -> int32 = "%int32_div"
(** Integer division. Raise [Division_by_zero] if the second
- argument is zero. *)
+ argument is zero. This division rounds the real quotient of
+ its arguments towards zero, as specified for {!Pervasives.(/)}. *)
external rem : int32 -> int32 -> int32 = "%int32_mod"
-(** Integer remainder. If [x >= 0] and [y > 0], the result
+(** Integer remainder. If [y] is not zero, the result
of [Int32.rem x y] satisfies the following properties:
- [0 <= Int32.rem x y < y] and
+ [Int32.zero <= Int32.rem x y < Int32.abs y] and
[x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y)].
- If [y = 0], [Int32.rem x y] raises [Division_by_zero].
- If [x < 0] or [y < 0], the result of [Int32.rem x y] is
- not specified and depends on the platform. *)
+ If [y = 0], [Int32.rem x y] raises [Division_by_zero]. *)
val succ : int32 -> int32
(** Successor. [Int32.succ x] is [Int32.add x Int32.one]. *)
diff --git a/stdlib/int64.mli b/stdlib/int64.mli
index d4767a430..b6287269b 100644
--- a/stdlib/int64.mli
+++ b/stdlib/int64.mli
@@ -50,16 +50,15 @@ external mul : int64 -> int64 -> int64 = "%int64_mul"
external div : int64 -> int64 -> int64 = "%int64_div"
(** Integer division. Raise [Division_by_zero] if the second
- argument is zero. *)
+ argument is zero. This division rounds the real quotient of
+ its arguments towards zero, as specified for {!Pervasives.(/)}. *)
external rem : int64 -> int64 -> int64 = "%int64_mod"
-(** Integer remainder. If [x >= 0] and [y > 0], the result
+(** Integer remainder. If [y] is not zero, the result
of [Int64.rem x y] satisfies the following properties:
- [0 <= Int64.rem x y < y] and
+ [Int64.zero <= Int64.rem x y < Int64.abs y] and
[x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y)].
- If [y = 0], [Int64.rem x y] raises [Division_by_zero].
- If [x < 0] or [y < 0], the result of [Int64.rem x y] is
- not specified and depends on the platform. *)
+ If [y = 0], [Int64.rem x y] raises [Division_by_zero]. *)
val succ : int64 -> int64
(** Successor. [Int64.succ x] is [Int64.add x Int64.one]. *)
diff --git a/stdlib/nativeint.mli b/stdlib/nativeint.mli
index db905a3c5..b845036d8 100644
--- a/stdlib/nativeint.mli
+++ b/stdlib/nativeint.mli
@@ -53,16 +53,15 @@ external mul : nativeint -> nativeint -> nativeint = "%nativeint_mul"
external div : nativeint -> nativeint -> nativeint = "%nativeint_div"
(** Integer division. Raise [Division_by_zero] if the second
- argument is zero. *)
+ argument is zero. This division rounds the real quotient of
+ its arguments towards zero, as specified for {!Pervasives.(/)}. *)
external rem : nativeint -> nativeint -> nativeint = "%nativeint_mod"
-(** Integer remainder. If [x >= 0] and [y > 0], the result
+(** Integer remainder. If [y] is not zero, the result
of [Nativeint.rem x y] satisfies the following properties:
- [0 <= Nativeint.rem x y < y] and
+ [Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y] and
[x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) (Nativeint.rem x y)].
- If [y = 0], [Nativeint.rem x y] raises [Division_by_zero].
- If [x < 0] or [y < 0], the result of [Nativeint.rem x y] is
- not specified and depends on the platform. *)
+ If [y = 0], [Nativeint.rem x y] raises [Division_by_zero]. *)
val succ : nativeint -> nativeint
(** Successor.
diff --git a/stdlib/printf.mli b/stdlib/printf.mli
index df08f05ca..18d7a01c0 100644
--- a/stdlib/printf.mli
+++ b/stdlib/printf.mli
@@ -36,9 +36,9 @@ val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
using uppercase letters.
- [o]: convert an integer argument to unsigned octal.
- [s]: insert a string argument.
- - [S]: insert a string argument as a valid Objective Caml lexical unit.
+ - [S]: insert a string argument in Caml syntax (double quotes, escapes).
- [c]: insert a character argument.
- - [C]: insert a character argument as a valid Objective Caml lexical unit.
+ - [C]: insert a character argument in Caml syntax (single quotes, escapes).
- [f]: convert a floating-point argument to decimal notation,
in the style [dddd.ddd].
- [e] or [E]: convert a floating-point argument to decimal notation,