This does get back to the issue of how to interface with Common Lisp numbers.
We could have a category, in Maxima, of
"Common Lisp Numbers" which would include #c(1.2 0.5),
which is considered to be an atom by lisp.
a+b*%i is not a numeric constant, nor is 1.2+0.5%i, meaning...
((mplus) 1.2 ((mtimes) 0.5 $%i)). This is a lisp list.
This also happens with rational numbers, available in CL.
We could have a program that attempts to common-lispify all
possible numbers, and then do arithmetic using the common-lisp
programs like sin, cos, .. when possible.
Caution, though. In Allegro common lisp,
(sin 1/2) returns a float 0.47942555
(sin 0.5d0) returns 0.479425538604203d0.
RJF
Raymond Toy wrote:
>>>>>>"Stavros" == Stavros Macrakis writes:
>
>
> Stavros> Hmm. I guess I was too terse. If you want to be completely consistent
> Stavros> with base Maxima, it should not give a numerical value, since
> Stavros> sin(0.5*%i+1.2),numer doesn't, either. But that can be argued to be
> Stavros> wrong. So it seems fine to me that gamma(1+1/2*%i),numer should give a
> Stavros> complex float, and maybe sin should be changed, too....
>
> Oh, right. I see what you're getting at. And yes, it does annoy me
> that sin(1.2+0.5*%i) doesn't give a number, and it would be nice if
> that were changed.
>
> Ray
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima