From: SourceForge.net <no...@so...> - 2003-05-13 03:20:04
|
Bugs item #736538, was opened at 2003-05-12 12:26 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=736538&group_id=4933 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Barton Willis (willisb) >Assigned to: Raymond Toy (rtoy) Summary: bessel_j with floating point argument Initial Comment: The function bessel_j misbehaves with a floating point argument (C1) bessel_j(0.2,3); Error: #C(0.20000000000000001 0.0) is not of type (OR RATIONAL LISP:FLOAT). Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by MACSYMA-TOP-LEVEL. Broken at MACSYMA-TOP-LEVEL. Type :H for Help. MAXIMA>>:q (C2) build_info(); Maxima version: 5.9.0 Maxima build date: 19:10 2/9/2003 host type: i686-pc-mingw32 lisp-implementation-type: Kyoto Common Lisp lisp-implementation-version: GCL-2-5.0 Evaluation took 0.00 seconds (0.00 elapsed) This is caused by $bessel receiving a lisp complex number as its first argument -- it expects a Maxima number instead. A possible fix is to change (defun $bessel_j (arg order) (if (and (numberp order) (numberp ($realpart arg)) (numberp ($imagpart arg))) ($bessel (complex ($realpart arg) ($imagpart arg)) order) (subfunmakes '$bessel_j (ncons order) (ncons arg)))) to (defun $bessel_j (arg order) (if (and (numberp order) (numberp ($realpart arg)) (numberp ($imagpart arg))) ($bessel arg order) (subfunmakes '$bessel_j (ncons order) (ncons arg)))) Barton ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2003-05-12 23:20 Message: Logged In: YES user_id=28849 This should be fixed now, in the way you suggest. This brings up an important issue: What is the right way to call Bessel_J? Is it bessel_j(x, n) or bessel_j[n](x) Discussion moved to mailing list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=736538&group_id=4933 |