On 2/19/12, ???? <yasuaki.honda at gmail.com> wrote:
> (%i1) zeta(%i-1),numer;
> BIGFLOAT: unable to convert #C(2.0 -1.0) to a CL or BIGFLOAT number.
Looks like BIGFLOAT:TO is called w/ a Lisp complex as its
argument, and it doesn't know what to do with that.
I suppose it should just return it unmodified.
I've attached a patch to do that; comments, anyone?
This seems to fix the bug reported.
best
Robert Dodier
PS.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index bd136f7..397ced2 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -1548,7 +1548,7 @@
(setf im (float im re))))
(complex re im)))
(t
- (cond ((cl:realp maxima-num)
+ (cond ((or (cl:realp maxima-num) (cl:complexp maxima-num))
maxima-num)
((eq maxima-num 'maxima::$%i)
;; Convert %i to an exact complex cl:rational.