/[cl-gsl]/cl-gsl/test/tolerance.lisp
ViewVC logotype

Contents of /cl-gsl/test/tolerance.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sun Mar 13 00:52:44 2005 UTC (9 years, 1 month ago) by edenny
Branch: MAIN
CVS Tags: HEAD
Initial checkin.
1 ;;;; -*- Mode: Lisp; Synatx: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;;
3 ;;;; Copyright (C) 2005 Edgar Denny <edgardenny@comcast.net>
4 ;;;; This file is part of CL-GSL.
5 ;;;;
6 ;;;; This program is free software; you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation; either version 2 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; This program is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with this program; if not, write to the Free Software
18 ;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 (in-package #:cl-gsl-test)
21
22 (defconstant +dbl-epsilon+ 2.2204460492503131d-16)
23
24 (defconstant +tol0+ (/ +dbl-epsilon+ 2.0d0))
25 (defconstant +tol+1+ (* +tol0+ 10.0d0))
26 (defconstant +tol-1+ (/ +tol0+ 10.0d0))
27 (defconstant +tol+2+ (* +tol0+ 100.0d0))
28 (defconstant +tol-2+ (/ +tol0+ 100.0d0))
29 (defconstant +tol+3+ (* +tol0+ 1000.0d0))
30 (defconstant +tol-3+ (/ +tol0+ 1000.0d0))
31
32 (defun tol< (x y tol)
33 (< (abs (- x y)) tol))

  ViewVC Help
Powered by ViewVC 1.1.5