;;; 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 (defconstant %e (exp 1d0) "The number e = exp(1).") (defconstant %i #C(0d0 1d0) "The imaginary unit i=sqrt(-1).") (defconstant -%i #C(0d0 -1d0) "The negative imaginary unit -i=-sqrt(-1).") #| ;;; Type constants ;;; TODO: throw them out or use deftype in stead (defconstant %df 'double-float) (defconstant %cdf '(complex double-float)) (defconstant %sb32 '(signed-byte 32)) (defconstant %ub32 '(unsigned-byte 32)) ;;;; Constants from gsl. ;;; TODO: throw them out (defconstant +lisplab-dbl-epsilon+ 2.2204460492503131d-16) (defconstant +lisplab-sqrt-dbl-epsilon+ 1.4901161193847656d-08) (defconstant +lisplab-root3-dbl-epsilon+ 6.0554544523933429d-06) (defconstant +lisplab-root4-dbl-epsilon+ 1.2207031250000000d-04) (defconstant +lisplab-root5-dbl-epsilon+ 7.4009597974140505d-04) (defconstant +lisplab-root6-dbl-epsilon+ 2.4607833005759251d-03) (defconstant +lisplab-log-dbl-epsilon+ -3.6043653389117154d+01) (defconstant +lisplab-dbl-min+ 2.2250738585072014d-308) (defconstant +lisplab-sqrt-dbl-min+ 1.4916681462400413d-154) (defconstant +lisplab-root3-dbl-min+ 2.8126442852362996d-103) (defconstant +lisplab-root4-dbl-min+ 1.2213386697554620d-77) (defconstant +lisplab-root5-dbl-min+ 2.9476022969691763d-62) (defconstant +lisplab-root6-dbl-min+ 5.3034368905798218d-52) (defconstant +lisplab-log-dbl-min+ -7.0839641853226408d+02) (defconstant +lisplab-dbl-max+ 1.7976931348623157d+308) (defconstant +lisplab-sqrt-dbl-max+ 1.3407807929942596d+154) (defconstant +lisplab-root3-dbl-max+ 5.6438030941222897d+102) (defconstant +lisplab-root4-dbl-max+ 1.1579208923731620d+77) (defconstant +lisplab-root5-dbl-max+ 4.4765466227572707d+61) (defconstant +lisplab-root6-dbl-max+ 2.3756689782295612d+51) (defconstant +lisplab-log-dbl-max+ 7.0978271289338397d+02) |#