1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
6 ;;;; Purpose: General purpose math functions
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Nov 2002
10 ;;;; $Id: math.lisp,v 1.3 2003/04/28 23:51:59 kevin Exp $
12 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
14 ;;;; KMRCL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
24 (/ (- (funcall f (+ x dx)) (funcall f x))
28 (funcall (deriv #'sin 1d-8) x))
32 (defmacro ensure-integer (obj)
33 "Ensure object is an integer. If it is a string, then parse it"