MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Bug Report - Two numerical values for a same variable


On Feb 16, 2005, at 2:36 PM, Murray Eisenberg wrote:

> The manipulations below are precisely what's so confusing about 
> Rational
> objects (and Complex objects) being atoms.  If
>
>    1/2 /. Rational[x_, 2] -> Rational[x, 7]
>
> works, then why not the following?
>
>    Part[Rational[1, 2], 2]

Because by definition you cannot use Part on an atom, actually the Help 
Browser says you specifically can't use Map, but I assume Part is 
treated like Map with respect to Atoms.  On the other hand /. 
apparently doesn't have the same restriction.  I know it sounds pat, I 
don't have a good reason for asserting Replace works differently from 
Part with respect to atoms except for the fact that it does.

Regards,

Ssezi


  • Prev by Date: Re: Apply on MultipleListPlot using pure functions
  • Next by Date: Re: Apply on MultipleListPlot using pure functions
  • Previous by thread: Re: Re: Bug Report - Two numerical values for a same variable
  • Next by thread: Re: Re: Re: Re: Bug Report - Two numerical values for a same variable