;;; Lisplab, level0-const.lisp ;;; General purpose constants ;;; Copyright (C) 2009 Joern Inge Vestgaarden ;;; ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2 of the License, or ;;; (at your option) any later version. ;;; ;;; This program 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 General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License along ;;; with this program; if not, write to the Free Software Foundation, Inc., ;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. (in-package :lisplab) ;;; Float and complex constants (define-constant %e (exp 1d0) "The number e = exp(1).") (define-constant %i #C(0d0 1d0) "The imaginary unit i=sqrt(-1).") (define-constant -%i #C(0d0 -1d0) "The negative imaginary unit -i=-sqrt(-1).") ;;; Type constants ;;; TODO: throw them out or use deftype in stead (define-constant %df 'double-float) (define-constant %cdf '(complex double-float)) (define-constant %sb32 '(signed-byte 32)) (define-constant %ub32 '(unsigned-byte 32)) ;;;; Constants from gsl. ;;; TODO: throw them out (define-constant +lisplab-dbl-epsilon+ 2.2204460492503131d-16) (define-constant +lisplab-sqrt-dbl-epsilon+ 1.4901161193847656d-08) (define-constant +lisplab-root3-dbl-epsilon+ 6.0554544523933429d-06) (define-constant +lisplab-root4-dbl-epsilon+ 1.2207031250000000d-04) (define-constant +lisplab-root5-dbl-epsilon+ 7.4009597974140505d-04) (define-constant +lisplab-root6-dbl-epsilon+ 2.4607833005759251d-03) (define-constant +lisplab-log-dbl-epsilon+ -3.6043653389117154d+01) (define-constant +lisplab-dbl-min+ 2.2250738585072014d-308) (define-constant +lisplab-sqrt-dbl-min+ 1.4916681462400413d-154) (define-constant +lisplab-root3-dbl-min+ 2.8126442852362996d-103) (define-constant +lisplab-root4-dbl-min+ 1.2213386697554620d-77) (define-constant +lisplab-root5-dbl-min+ 2.9476022969691763d-62) (define-constant +lisplab-root6-dbl-min+ 5.3034368905798218d-52) (define-constant +lisplab-log-dbl-min+ -7.0839641853226408d+02) (define-constant +lisplab-dbl-max+ 1.7976931348623157d+308) (define-constant +lisplab-sqrt-dbl-max+ 1.3407807929942596d+154) (define-constant +lisplab-root3-dbl-max+ 5.6438030941222897d+102) (define-constant +lisplab-root4-dbl-max+ 1.1579208923731620d+77) (define-constant +lisplab-root5-dbl-max+ 4.4765466227572707d+61) (define-constant +lisplab-root6-dbl-max+ 2.3756689782295612d+51) (define-constant +lisplab-log-dbl-max+ 7.0978271289338397d+02)