Integral lookup and CLISP



> From: David Billinghurst
> 
> > From: Dan Gildea
> > 
> > The defprop macro quotes the lambda expression, but this works:
> > 
> > 
> > ;; Integral of the Bessel function wrt z 
> > (putprop '%bessel_j
> >   `((n z)
> >    nil
> >   ,(lambda (n unused)
> >     (case n
> >           (0
> >            ;; integrate(bessel_j(0,z) 
> >            ;; = (1/2)*z*(%pi*bessel_j(1,z)*hstruve[0](z) 
> >            ;;            +bessel_j(0,z)*(2-%pi*hstruve[1](z))) 
> >            '((mtimes) ((rat) 1 2) z
> >              ((mplus)
> >               ((mtimes) $%pi ((%bessel_j) 1 z)
> >                ((mqapply) (($hstruve array) 0) z))
> >               ((mtimes) ((%bessel_j) 0 z)
> >                ((mplus) 2 ((mtimes) -1 $%pi
> >                            ((mqapply) (($hstruve array) 1) z)))))))
> >           (1
> >            ;; integrate(bessel_j(1,z) = -bessel_j(0,z) 
> >            '((mtimes) -1 ((%bessel_j) 0 z)))
> >           (otherwise nil))))
> >   'integral)
> 
> Aha!!!!  Thank you.  I poked around at this for a while last 
> night and was heading (slowly) in a direction that might have 
> found this.
> 
> I checked in a patch to sin.lisp last night that "solved" the 
> issue in another way.  I will do some testing with the above 
> as I preferred my original code.

It took me a while to realize that you had used the "putprop" 
function to avoid the quoting issues with the "defprop" macro.

The form above works with my original INTEGRALLOOKUPS code 
using gcl, clisp and sbcl.  Thanks again.

This email is confidential and may also be privileged.  If you are not the intended recipient, please notify us immediately and delete this message from your system without first printing or copying it. Any personal data in this email (including any attachments) must be handled in accordance with the Rio Tinto Group Data Protection Policy and all applicable data protection laws.