X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=math.lisp;h=682cd74027776f7dfc5a3d4346c7a0ab2be55f50;hp=9a6862bad3f6168196b2838b69ef8eed1505f092;hb=e83a72f1e88062d7e17ac77c17cc9c32d51f3c13;hpb=d1e9c5969a0eecb7923dc350754ea9ab50417a1e diff --git a/math.lisp b/math.lisp index 9a6862b..682cd74 100644 --- a/math.lisp +++ b/math.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Nov 2002 ;;;; -;;;; $Id: math.lisp,v 1.2 2003/04/28 16:07:42 kevin Exp $ +;;;; $Id: math.lisp,v 1.4 2003/06/06 21:59:29 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -17,7 +17,7 @@ ;;;; ************************************************************************* -(in-package :kmrcl) +(in-package #:kmrcl) (defun deriv (f dx) #'(lambda (x) @@ -28,3 +28,9 @@ (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))