Problems with map.



Well, mapatom(1/2) is true -- does that help?


On Wed, Sep 26, 2012 at 2:38 PM, Christopher Sangwin <c.j.sangwin at bham.ac.uk
> wrote:

> Thank you so much.  That makes perfect sense now.  ****
>
> ** **
>
> Regarding your last point:****
>
> ** **
>
> if atom(1/2) then return ?all my underlying problems would go away.....?;*
> ***
>
> ** **
>
> Chris****
>
> ** **
>
> ** **
>
> *From:* Richard Fateman [mailto:fateman at eecs.berkeley.edu]
> *Sent:* 26 September 2012 19:32
> *To:* Christopher Sangwin
> *Cc:* maxima at math.utexas.edu
> *Subject:* Re: [Maxima] Problems with map.****
>
> ** **
>
> On 9/26/2012 11:17 AM, Christopher Sangwin wrote:****
>
> (%i2) map(f,1/2);****
>
>                         1****
>
> map: improper argument: -****
>
>                         2****
>
> -- an error. To debug this try: debugmode(true);****
>
>
> What result did you want?   f(1)/f(2) ?
>
> The internal operator in 1/2 is 'rat'  which requires 2 integer operands.
> A special case
> could be set to create f(1)/f(2)   which is really f(1) *  f(2)^(-1) in
> this example, but
> I'm not sure that map should do that.
>
> Or did you want f(1/2)?
>
> Or now that you have an explanation, is the behavior OK with you?
>
> ****
>
>  ****
>
> But****
>
>  ****
>
> (%i3) atom(1/2);****
>
> (%o3)                                false****
>
>  ****
>
> Actually, I think that 1/2 is "a number"  and thus atom(1/2) should be
> true.  But this atom
> concept is not very accurately portrayed. Atoms should be
> non-decomposable, except
> by nuclear fission..
> RJF
>
>
> ****
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>