From 3777379411408448495
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7b33df5790e7ad92
X-Google-Attributes: gidf78e5,public
From: Gabriel Dos_Reis <gdosreis@korrigan.inria.fr>
Subject: Re: complex design flaw (#1)
Date: 1999/03/14
Message-ID: <xaj7lslx75y.fsf@korrigan.inria.fr>#1/1
X-Deja-AN: 454733581
Content-Transfer-Encoding: 8bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <x88pv6fok3r.fsf@nbeckerpc.hns.com> <xaj3e3be4pu.fsf@korrigan.inria.fr> <01be6cf4$9f3dcc80$7d9cd4c7@danielp.interlog.com>
X-Original-Date: 14 Mar 1999 01:10:33 +0100
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 921383178 32317 128.250.29.16 (14 Mar 1999 03:46:18 GMT)
Organization: I.N.R.I.A Sophia-Antipolis (France)
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANusw7+EDnX0m9pzZAQEQxQF/WEyq3k5GQZReHADicMePRCHn9+XuYSJ2 AeGk0bOLHyAoxOWWbMkY3V2LgtuIR2xS =2T80
Mime-Version: 1.0
NNTP-Posting-Date: 14 Mar 1999 03:46:18 GMT
Newsgroups: comp.std.c++

"Daniel Parker" <danielp@no_spam.com> writes:

[...]

| > that an implementation has special
| > knowledge of entities declared/defined in the C++ standard library and 
| > can do some magic behind the scene. So initialiation of a vector or
| > a valarray of complex<double> may be result in a memset().
| 
| isn't this somewhat irrelevent to the original poster's concern?  

No. IMNSHO.

| ... vector
| and valarray are not all that useful for numerical work insofar as much
| numerical work requires matrix, tensor, or n-dimensional array classes.

The point I was making wasn't whether or not vector or valarray are
useful for numerical work. Mr. Becker stated that because of the way
the class complex is declared

> construction of containers of complex are expensive.


And again, I don't buy his claim for reasons I stated above. 

| > And optimization is a quality of implementation issue. 
| 
| Perfomance depends more on how well basic principles have been thought
| through to achieve that goal.  Being handed unnecessary favors like _FLT r
| = 0, _FLT i = 0 is not what the numerical programmer wants.  And the
| original point is valid:  if that's not how double or int behaves, why
| should it be how complex behaves?

Because it is not int nor double? 

See -- C compitibility.

-- 
Gabriel Dos Reis, dosreis@cmla.ens-cachan.fr
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



