projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r7061: initial property settings
[kmrcl.git]
/
math.lisp
diff --git
a/math.lisp
b/math.lisp
index 9772b7a52df849bfee3b40b4eebb4f5a6162c541..be89825d27890bc0e6268a751fe363832662ad18 100644
(file)
--- a/
math.lisp
+++ b/
math.lisp
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Nov 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Nov 2002
;;;;
-;;;; $Id
: math.lisp,v 1.1 2002/11/08 06:43:34 kevin Exp
$
+;;;; $Id$
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-17,8
+17,7
@@
;;;; *************************************************************************
;;;; *************************************************************************
-(in-package :kmrcl)
-(declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))
+(in-package #:kmrcl)
(defun deriv (f dx)
#'(lambda (x)
(defun deriv (f dx)
#'(lambda (x)
@@
-29,3
+28,9
@@
(funcall (deriv #'sin 1d-8) x))
;;; (sin^ pi)
(funcall (deriv #'sin 1d-8) x))
;;; (sin^ pi)
+
+(defmacro ensure-integer (obj)
+ "Ensure object is an integer. If it is a string, then parse it"
+ `(if (stringp ,obj)
+ (parse-integer ,obj)
+ ,obj))