MathGroup Archive 2009

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

Search the Archive

Re: Re: O in Mathematica

> As you mention, this simply seems to be wrong. There is another
> strange thing about the O function. If you do n O[n,Infinity]  it
> returns O[1/n]^0. Now if you type O[1/n]^0 into Mathematica yourself
> it returns an error saying SeriesData::sdatv: First argument 1/n is
> not a valid variable. But if you copy the output of n O[n,Infinity]
> (which is identical to what I typed in myself) it does not return the
> error. Does  anyone have an explanation for this kind of behaviour?


What you're talking about has an explanation. You are confused because  
of the difference of the Mathematica object and the way it's  
displayed. When you really want to know what object you are dealing  
with, you have to use FullForm. For example :

FullForm[n O[n,Infinity]]



It is displayed as O[1/n]^0 but it's not what Mathematica has in memory.

When you copy and paste an object, it doesn't copy and paste what is  
displayed, but it copy and paste what is in the memory of Mathematica.  
Try for example to copy and paste O[1/n]^0 from Mathematica to an  
external text-editor, you'll see that you won't get O[1/n]^0.


  • Prev by Date: GraphPlot and Feynman graphs
  • Next by Date: Re: Mathematica and LyX - Graphics and equations
  • Previous by thread: Re: O in Mathematica
  • Next by thread: Re: MCMC in Mathematica