;;; PLT Scheme Science Collection
;;; machine.ss
;;; Copyright (c) 2004 M. Douglas Williams
;;;
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
;;; License as published by the Free Software Foundation; either
;;; version 2.1 of the License, or (at your option) any later version.
;;;
;;; This library is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; Lesser General Public License for more details.
;;;
;;; You should have received a copy of the GNU Lesser General Public
;;; License along with this library; if not, write to the Free
;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;;; 02111-1307 USA.
;;;
;;; -------------------------------------------------------------------
;;;
;;; This code is based on the machine precision and limits constants
;;; in the GNU Scientific Library (GSL), which is also licensed under
;;; the GPL.
;;;
;;; Version Date Description
;;; 0.1.0 08/14/04 This is the initial release of the machine
;;; constants ported from GSL. (Doug Williams)
;;; 1.0.0 09/20/04 Marked as ready for Release 1.0 (Doug
;;; Williams)
(modulemachinemzscheme
(provide
(all-defined))
;; Magic constants; mostly for the benefit of the implementation
(definedouble-epsilon2.2204460492503131e-16)
(definesqrt-double-epsilon1.4901161193847656e-08)
(defineroot3-double-epsilon6.0554544523933429e-06)
(defineroot4-double-epsilon1.2207031250000000e-04)
(defineroot5-double-epsilon7.4009597974140505e-04)
(defineroot6-double-epsilon2.4607833005759251e-03)
(definelog-double-epsilon-3.6043653389117154e+01)
(definedouble-min2.2250738585072014e-308)
(definesqrt-double-min1.4916681462400413e-154)
(defineroot3-double-min2.8126442852362996e-103)
(defineroot4-double-min1.2213386697554620e-77)
(defineroot5-double-min2.9476022969691763e-62)
(defineroot6-double-min5.3034368905798218e-52)
(definelog-double-min-7.0839641853226408e+02)
(definedouble-max1.7976931348623157e+308)
(definesqrt-double-max1.3407807929942596e+154)
(defineroot3-double-max5.6438030941222897e+102)
(defineroot4-double-max1.1579208923731620e+77)
(defineroot5-double-max4.4765466227572707e+61)
(defineroot6-double-max2.3756689782295612e+51)
(definelog-double-max7.0978271289338397e+02)
;; I'm not sure about the next ones - MDW.
;; a little internal backwards compatibility
(definemachine-epsdouble-epsilon)
;; Here are constants related to or derived from
;; machine constants. These are not to be confused with
;; the constants that define various precision levels
;; for the precision/error system.
;;
;; This information is determined at configure time
;; and is platform dependent. Edit at your own risk.
;; machine precision constants
;; (define machine-eps 1.0e-15)
(definesqrt-machine-eps3.2e-08)
(defineroot3-machine-eps1.0e-05)
(defineroot4-machine-eps0.000178)
(defineroot5-machine-eps0.00100)
(defineroot6-machine-eps0.00316)
(definelog-machine-eps-34.54)
)