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

*To*: mathgroup at smc.vnet.net*Subject*: [mg54415] Re: Bug Report - Two numerical values for a same variable*From*: Richard Fateman <fateman at cs.berkeley.edu>*Date*: Sun, 20 Feb 2005 00:08:44 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Andrzej Kozlowski wrote: > To make this absolutely precise: the distinction is that between syntax > and semantics. For example 1[2, 3] is a "legal" Mathematica expression Yes but I think the issue is the difference is between Mathematica and Mathematics. The notion of Real (mathematica) is a subset of real (mathematics). Complex[] is a constructor that takes two Real mathematica numbers, like 3,4,1/2, 0.7, ... and makes a small expression. If you use it as Complex[r,s], with r,s unknown, mathematica accepts it essentially on the promise that before you use it, r and s will be bound to Real numbers. Complex[E,Pi], under these circumstances is not going to work, since E and Pi are protected and cannot easily be bound. The fact that these are stand-ins for well-known mathematically real quantities is irrelevant to Mathematica, since it only understands Real, and Real is a subset of mathematical real. In the case of Complex[E,Pi] Mathematica returns it unevaluated, as Complex[E,Pi]. This is arguably a bug, but it is not clear when to report it... It might make sense to report an error when it is evaluated. Or it could return E+Pi*I, which is, of course, a complex number (mathematically) but not a Complex Number (mathematica-lly). Note that Complex[3,4] returns 3+4*I. I suspect that most of the statements concerning evaluation to high precision to see if something has a zero imaginary part are irrelevant to the thoughts behind this program. This "what does a complex constructor" do is a common problem, I think, in CAS. That is, should a complex number be "a pair of floats, integers, rationals" or should it be anything1+anything2*Complex[0,1]? Similar issues hold for Rational, Interval, and some other places where one might think numerical and symbolic could be used, but cause problems. How would you like to allow floating point numbers like 123r.s678? After all, you might later decide that r=4 and s=5? RJF