1995-11-06 02:34:19 -08:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-11-06 02:34:19 -08:00
|
|
|
(* *)
|
|
|
|
(* Valerie Menissier-Morain, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
2001-12-07 05:41:02 -08:00
|
|
|
(* under the terms of the GNU Library General Public License, with *)
|
|
|
|
(* the special exception on linking described in file ../../LICENSE. *)
|
1995-11-06 02:34:19 -08:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Flags that control rational arithmetic. *)
|
1995-11-06 02:34:19 -08:00
|
|
|
|
1995-11-29 05:37:49 -08:00
|
|
|
val arith_status: unit -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Print the current status of the arithmetic flags. *)
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
val get_error_when_null_denominator : unit -> bool
|
2001-12-05 09:04:56 -08:00
|
|
|
(** See {!Arith_status.set_error_when_null_denominator}.*)
|
1995-11-06 02:34:19 -08:00
|
|
|
val set_error_when_null_denominator : bool -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Get or set the flag [null_denominator]. When on, attempting to
|
1995-11-06 02:34:19 -08:00
|
|
|
create a rational with a null denominator raises an exception.
|
|
|
|
When off, rationals with null denominators are accepted.
|
|
|
|
Initially: on. *)
|
2001-12-05 09:04:56 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
val get_normalize_ratio : unit -> bool
|
2001-12-05 09:04:56 -08:00
|
|
|
(** See {!Arith_status.set_normalize_ratio}.*)
|
1995-11-06 02:34:19 -08:00
|
|
|
val set_normalize_ratio : bool -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Get or set the flag [normalize_ratio]. When on, rational
|
1995-11-06 02:34:19 -08:00
|
|
|
numbers are normalized after each operation. When off,
|
|
|
|
rational numbers are not normalized until printed.
|
|
|
|
Initially: off. *)
|
2001-12-05 09:04:56 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
val get_normalize_ratio_when_printing : unit -> bool
|
2001-12-05 09:04:56 -08:00
|
|
|
(** See {!Arith_status.set_normalize_ratio_when_printing}.*)
|
1995-11-06 02:34:19 -08:00
|
|
|
val set_normalize_ratio_when_printing : bool -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Get or set the flag [normalize_ratio_when_printing].
|
1995-11-06 02:34:19 -08:00
|
|
|
When on, rational numbers are normalized before being printed.
|
|
|
|
When off, rational numbers are printed as is, without normalization.
|
|
|
|
Initially: on. *)
|
2001-12-05 09:04:56 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
val get_approx_printing : unit -> bool
|
2001-12-05 09:04:56 -08:00
|
|
|
(** See {!Arith_status.set_approx_printing}.*)
|
1995-11-06 02:34:19 -08:00
|
|
|
val set_approx_printing : bool -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Get or set the flag [approx_printing].
|
1995-11-06 02:34:19 -08:00
|
|
|
When on, rational numbers are printed as a decimal approximation.
|
|
|
|
When off, rational numbers are printed as a fraction.
|
|
|
|
Initially: off. *)
|
2001-12-05 09:04:56 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
val get_floating_precision : unit -> int
|
2001-12-05 09:04:56 -08:00
|
|
|
(** See {!Arith_status.set_floating_precision}.*)
|
1995-11-06 02:34:19 -08:00
|
|
|
val set_floating_precision : int -> unit
|
2001-12-05 09:04:56 -08:00
|
|
|
(** Get or set the parameter [floating_precision].
|
1995-11-06 02:34:19 -08:00
|
|
|
This parameter is the number of digits displayed when
|
|
|
|
[approx_printing] is on.
|
|
|
|
Initially: 12. *)
|
1995-11-29 05:37:49 -08:00
|
|
|
|