]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/otherlibs/num/arith_status.mli
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / otherlibs / num / arith_status.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*    Valerie Menissier-Morain, projet Cristal, INRIA Rocquencourt     *)
6 (*                                                                     *)
7 (*  Copyright 1996 Institut National de Recherche en Informatique et   *)
8 (*  en Automatique.  All rights reserved.  This file is distributed    *)
9 (*  under the terms of the GNU Library General Public License, with    *)
10 (*  the special exception on linking described in file ../../LICENSE.  *)
11 (*                                                                     *)
12 (***********************************************************************)
13
14 (* $Id: arith_status.mli 4144 2001-12-07 13:41:02Z xleroy $ *)
15
16 (** Flags that control rational arithmetic. *)
17
18 val arith_status: unit -> unit
19         (** Print the current status of the arithmetic flags. *)
20
21 val get_error_when_null_denominator : unit -> bool
22         (** See {!Arith_status.set_error_when_null_denominator}.*)
23 val set_error_when_null_denominator : bool -> unit
24         (** Get or set the flag [null_denominator]. When on, attempting to 
25            create a rational with a null denominator raises an exception.
26            When off, rationals with null denominators are accepted.
27            Initially: on. *)
28
29 val get_normalize_ratio : unit -> bool
30         (** See {!Arith_status.set_normalize_ratio}.*)
31 val set_normalize_ratio : bool -> unit
32         (** Get or set the flag [normalize_ratio]. When on, rational
33            numbers are normalized after each operation. When off,
34            rational numbers are not normalized until printed.
35            Initially: off. *)
36
37 val get_normalize_ratio_when_printing : unit -> bool
38         (** See {!Arith_status.set_normalize_ratio_when_printing}.*)
39 val set_normalize_ratio_when_printing : bool -> unit
40         (** Get or set the flag [normalize_ratio_when_printing].
41            When on, rational numbers are normalized before being printed.
42            When off, rational numbers are printed as is, without normalization.
43            Initially: on. *)
44
45 val get_approx_printing : unit -> bool
46         (** See {!Arith_status.set_approx_printing}.*)
47 val set_approx_printing : bool -> unit
48         (** Get or set the flag [approx_printing].
49            When on, rational numbers are printed as a decimal approximation.
50            When off, rational numbers are printed as a fraction.
51            Initially: off. *)
52
53 val get_floating_precision : unit -> int
54         (** See {!Arith_status.set_floating_precision}.*)
55 val set_floating_precision : int -> unit
56         (** Get or set the parameter [floating_precision].
57            This parameter is the number of digits displayed when
58            [approx_printing] is on.
59            Initially: 12. *)
60