From 211e54296532a5ecb18d948e257bfdb07913e72c Mon Sep 17 00:00:00 2001 From: Eric Norige Date: Thu, 31 Jan 2008 09:32:15 -0600 Subject: [PATCH] * add pi constant to pervasives --- stdlib/pervasives.ml | 2 ++ stdlib/pervasives.mli | 3 +++ 2 files changed, 5 insertions(+) diff --git a/stdlib/pervasives.ml b/stdlib/pervasives.ml index 9e34cf2fd..417bbd102 100644 --- a/stdlib/pervasives.ml +++ b/stdlib/pervasives.ml @@ -9,6 +9,7 @@ (* under the terms of the GNU Library General Public License, with *) (* the special exception on linking described in file ../LICENSE. *) (* *) +(* (C) Flying Frog Consultancy Ltd., 2006 *) (***********************************************************************) (* $Id$ *) @@ -120,6 +121,7 @@ let min_float = float_of_bits 0x00_10_00_00_00_00_00_00L let epsilon_float = float_of_bits 0x3C_B0_00_00_00_00_00_00L +let pi = 4. *. atan 1. type fpclass = FP_normal diff --git a/stdlib/pervasives.mli b/stdlib/pervasives.mli index 3ff3f4041..dc5a639f6 100644 --- a/stdlib/pervasives.mli +++ b/stdlib/pervasives.mli @@ -363,6 +363,9 @@ val min_float : float val epsilon_float : float (** The smallest positive float [x] such that [1.0 +. x <> 1.0]. *) +val pi : float +(** The constant pi (3.14159...) *) + type fpclass = FP_normal (** Normal number, none of the below *) | FP_subnormal (** Number very close to 0.0, has reduced precision *) -- 2.11.4.GIT