Article View: borland.public.cppbuilder.migration
Article #181C++ Builder 6 / 2006 floating point differences (and a crash)
From: David M
Date: Wed, 09 Aug 2006 02:53
Date: Wed, 09 Aug 2006 02:53
31 lines
2254 bytes
2254 bytes
Hi,
Recently we converted a large project to C++Builder 2006 from 6, and the
conversion has gone fine and the software works perfectly, except for one
odd issue. Sometimes there are odd floating point exceptions in code that
worked fine with CB6, and isn't code you'd expect to cause an exception.
The specific example I'm trying to figure out at the moment is calling a
getter method on a class which returns a double:
double dMax = foo.GetMax();
where GetMax is defined as:
double FooClass::GetMax() { return m_dMax; }
and using it:
bar->SetGeometry(dMin, dMax);
will throw an EInvalidOp either in the GetMax method or when entering the
SetGeometry method before the first line of code is executed.
The value of dMax in this case is very small, but as far as I know that
shouldn't matter. No maths is being done with it at this stage, it's just
being passed around. So, why is there a EInvalidOp exception? (And what
operation would it be in the first place, that's invalid? Nothing is
actually being done to it...?)
I've googled for similar problems and found a couple of other people who've
reported the same thing, again after transitions to 2006 from 6, but no
answers as to the cause or a solution. If anyone has any insight, it would
be much appreciated!
Cheers,
David
Technical Details
Message-ID:
<44d94e46@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 110f51,d8618f84997f7698,start X-Google-Attributes: gid110f51,public X-Google-Language: ENGLISH,ASCII-7-bit From: "David M" <davidm@sonardata.com> Newsgroups: borland.public.cppbuilder.migration Subject: C++ Builder 6 / 2006 floating point differences (and a crash) Date: Wed, 9 Aug 2006 12:53:57 +1000 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 203.24.135.146 Message-ID: <44d94e46@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1155092038 203.24.135.146 (8 Aug 2006 19:53:58 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail