From -2631886975908555514
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7b33df5790e7ad92
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: complex design flaw (#1)
Date: 1999/03/15
Message-ID: <36EC342F.D806DD0F@wizard.net>#1/1
X-Deja-AN: 455095823
X-NNTP-Posting-Host: 209.8.153.32
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <x88pv6fok3r.fsf@nbeckerpc.hns.com> <xaj3e3be4pu.fsf@korrigan.inria.fr> <01be6e30$aeae59e0$7d9cd4c7@danielp.interlog.com>
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
X-Trace: news6.ispnews.com 921449366 209.8.153.32 (Sun, 14 Mar 1999 17:09:26 EDT)
Organization: Not Enough
Mime-Version: 1.0
NNTP-Posting-Date: Sun, 14 Mar 1999 17:09:26 EDT
Newsgroups: comp.std.c++
Originator: clamage@taumet


Daniel Parker wrote:
....
> Incidently, I'm a little rusty on the bit layout of a floating point
> number; can I rely on
> 
> double x = 0.0;
> double y;
> 
> memset( &y, 0, sizeof(double) );
> 
> x == y ?
> memcmp( &x, &y, sizeof(double) ) == 0 ?

For IEEE formats, yes, but those aren't required by the C++ standard.


[ 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              ]




