Re: Re: Re: Bug Report - Two numerical values for a same variable
- To: mathgroup at smc.vnet.net
- Subject: [mg54354] Re: [mg54300] Re: [mg54271] Re: Bug Report - Two numerical values for a same variable
- From: DrBob <drbob at bigfoot.com>
- Date: Sat, 19 Feb 2005 02:31:55 -0500 (EST)
- References: <00ed01c512b0$2f242850$6400a8c0@Main> <curpbn$r28$1@smc.vnet.net> <200502150438.XAA29728@smc.vnet.net> <200502161936.OAA19223@smc.vnet.net> <d3d3aacf7f18939828890ce85676bd26@mimuw.edu.pl> <opsmcn3rqciz9bcq@monster> <07c9f53bde86ce72650298f7c2a6ccbc@mimuw.edu.pl> <opsmcqckt8iz9bcq@monster> <ede82a021e2cd1f6f2eb6181c05014d8@mimuw.edu.pl>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
I see your point, but it's beyond me why I should have seen it without seeing it documented or explained anywhere. Where documentation says, "You can enter a complex number in the form x + I y", it could also say, "Constructs entered in the form Complex[a,b] are meaningless unless a and b are real constants, not to include symbolic quantities such as E and Pi." I take your point (not entirely explicit) that otherwise, every use of a Complex number would require checking its parts, with large performance implications. Still, your explanation is unofficial and hence (so far as I know) legitimately subject to question by anyone who doesn't understand it or isn't convinced. My apologies, if you believe otherwise. Bobby On Thu, 17 Feb 2005 19:38:51 +0100, Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote: > *This message was transferred with a trial version of CommuniGate(tm) Pro* > O.K. I will try to explain it very slowly. Sigh. > > Complex[Pi,E] does not have any meaning in Mathemaitca at all. Neither > does Complex[Sqrt[2],Sqrt[3]] etc. Complex[a,b] only has a meaning when > a and b are real numbers (exact or approximate). > > The reason, that I tried to explain was this. There is no point > defining just Complex[Pi,E] and a few other obvious cases. Either you > are going to allow all real numerics or you have to disallow all of > them except those that are actually real numbers. This is the crucial > point. If you were to allow real numeric expressions in Complex[a,b] > then you would have to be able to determine whether an arbitrary > numeric expression is real or not. While it is easy to do for Pi and E > it is equally easy to produce a radical (for example), of which it is > highly not trivial to decide if it is real or not. If you don't believe > it I can construct one for you, but really ... > So, in the case of such a radical m there would be no way to decide > whether Complex[m,m] is meaningful or meaningless. Further more as you > started manipulating such expressions things would get worse and worse. > So, the only thing to do is to disallow all non-numbers in > Complex[a,b]. I am therefore not just saying that Complex[Pi,E] is not > numeric, I am saying it has no meaning in Mathematica at all, it is > just a compound symbol. On the other hand Pi+I E is numeric but is not > a complex number in Mathematica's sense. It is not a complex number > just as Pi is not a number, but both are numeric. All numbers in > Mathematica are atoms, but not all numerics are Stoms. Pi is a numeric > but it is also a Symbol, and hence it is an Atom. On the other hand > Pi+I E is numeric but it is not an Atom because it is not a Symbol and > is not a number; it is an expression with Head Plus. > > > Of course all of these statements refer to the design of the language. > To me they seem perfectly logical and natural. To you presumably not. > Well, then there is nothing else to say. > > > Andrzej Kozlowski > > > On 17 Feb 2005, at 18:18, DrBob wrote: > >> All that was very puzzling. You're saying Pi+E I is numeric but >> Complex[Pi,E] isn't because... >> >> Umm... >> >> I've got no idea what your reasoning is. >> >>>> Complex[a,b] when a and b are numeric quantities, such >>>> as Pi or E or others is not numeric >> >> Because... because why? >> >>>> Complex[a,b] where a and b are non real is meaningless >> >> But Pi and E _are_ real. >> >> Are you saying Mathematica doesn't know that? >> >>>> Complex[Pi,E] (unlike Pi+ I E to which it is not equal [to] >> >> Why aren't they equal? >> >> We're really back to "things fall down" to explain gravity. >> >> Bobby >> >> On Thu, 17 Feb 2005 17:50:28 +0100, Andrzej Kozlowski >> <akoz at mimuw.edu.pl> wrote: >> >>> *This message was transferred with a trial version of CommuniGate(tm) >>> Pro* >>> On 17 Feb 2005, at 17:29, DrBob wrote: >>> >>>> Your "structure" argument is too vague to be useful. >>> >>> Whether useful or not it is true. >>> >>> >>>> NumericQ[Pi + E*I] >>>> NumericQ[Complex[Pi, E]] >>>> True >>>> False >>>> >>>> The last result, at least, seems unambiguously wrong. >>> >>> >>> It is not only right but it is the only sensible possibility. >>> In Mathematica Complex[a,b] when a and b are numeric quantities, such >>> as Pi or E or others is not numeric but meaningless. It has to be >>> meaningless because Complex[a,b] where a and b are non real is >>> meaningless. However, if a and b are numeric but not numbers >>> Mathematica would have to use FullSimplify or high precision >>> arithmetic >>> to determine if they are real or have non zero imaginary parts (and it >>> may not be able to do so anyway). >>> So until it was determined that a and b have zero imaginary parts >>> Complex[a,b] would have to be like the Schroedinger cat that is >>> neither >>> dead nor alive: neither meaningful nor meaningless. That's is >>> definitely not the way to make a computer algebra program work. So >>> Complex[Pi,E] (unlike Pi+ I E to which it is not equal >>> >>> In[24]:= >>> Complex[Pi, E] == Pi + I*E >>> >>> Out[24]= >>> Complex[Pi, E] == I*E + Pi ) >>> >>> is meaningless. Hence it is not numeric and it is you and not >>> Mathematica that is "unambiguously wrong". >>> >>> Andrzej Kozlowski >>> >>> >>> >>> >> >> >> >> -- >> DrBob at bigfoot.com >> www.eclecticdreams.net >> >> > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Re: Bug Report - Two numerical values for a same variable
- From: Scott Hemphill <hemphill@hemphills.net>
- Re: Re: Bug Report - Two numerical values for a same variable
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Bug Report - Two numerical values for a same variable