Re: Re: O in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg96011] Re: [mg95977] Re: O in Mathematica
- From: Francois Fayard <fayard.newsgroup at gmail.com>
- Date: Sun, 1 Feb 2009 04:40:55 -0500 (EST)
- References: <gls1vl$hl1$1@smc.vnet.net> <200901310614.BAA28514@smc.vnet.net>
> 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? Hello, 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]] gives SeriesData[n,DirectedInfinity[1],List[],0,0,1] 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. Francois