Re: Re: Re: Re: Re: Bug Report - Two numerical values for a same variable
- To: mathgroup at smc.vnet.net
- Subject: [mg54488] Re: [mg54411] Re: [mg54350] Re: [mg54300] Re: [mg54271] Re: Bug Report - Two numerical values for a same variable
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 21 Feb 2005 03:45:04 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
The answer is that actually is is as you expected:
FullForm[Hold[2 + 3*I]]
FullForm[Hold[2 + 3*I]]
What happens is that 2+3 I is not an atom when it is entered
but after evaluation its FullForm becomes Complex[2,3] and it becomes
There are several plausible reasons for this. The one that convinces me
most is as I described: so that you can treat all numbers in the same
when using pattern matching or functions that admit level
specifications. The other is indeed to do with performance: Real and
Complex certainly are analogous to types, particularly when you use
Compile. I am not however sure that this actually needs Complex[2,3] to
be an atom; pattern matching and levels seems to me a more convincing
On 20 Feb 2005, at 06:08, Murray Eisenberg wrote:
> I understand everything you say. Here's the crux, I think, of my not
> being able to "rationalize" Mathematica's definition of what is or is
> not an atom:
> Why is FullForm[2 + 3 I] not Plus[2, Times[3, I]]?
> Why is FullForm[2/3] not Times[2, Power[3, -1]] ?
> My suspicion is that this was simply a design decision made for reasons
> of efficiency, and that therefore not much more can be said about it.
> That's what makes it hard for me to swallow and explain to others.
> P.S. Unlike some others, I have no difficulty with Mathematica counting
> such things as Complex[E, Pi] as meaningless (although syntactically
> Andrzej Kozlowski wrote:
>> Complex[Pi,E] does not have any meaning in Mathemaitca at all. Neither
>> does Complex[Sqrt,Sqrt] etc. Complex[a,b] only has a meaning
>> a and b are real numbers (exact or approximate).
>> 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.
> Murray Eisenberg murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower phone 413 549-1020 (H)
> University of Massachusetts 413 545-2859 (W)
> 710 North Pleasant Street fax 413 545-1801
> Amherst, MA 01003-9305
Prev by Date:
Re: how to find packages when using NETLINK
Next by Date:
Solving a weakly singular integral equation - Take 2.
Previous by thread:
Re: Bug Report - Two numerical values for a same variable
Next by thread:
Is the answer for this Integral correct???