
03-18-2005, 10:38 AM
|
Hill Giant
|
|
Join Date: Feb 2005
Posts: 163
|
|
This might be irrelevant to the problem in VS2k3 but an interesting read, seems microsoft crippled the c compilers a long time ago due to a marketing decision.
Link
Jack Klein wrote:
Quote:
Re: Error C2177 Constant too big when compiling Gammal.c
On 3 Mar 2004 15:51:34 -0500, Antoun Kanawati <antounk@comcast.net> wrote in
comp.lang.c++.moderated:
Quote:
The constant is a "long double". VC++ 4.0 predates civilization and did not know about such types (long-double and long-long).
|
This is just plain wrong, at least about long double. Microsoft knew very well what long double was, from version 3.0 of their MS-DOS only Microsoft C compiler. They supported the Intel coprocessor/FPU 80 bit extended precision type.
This support continued through all of their 16-bit compilers (Microsoft C and C++ 7.0, and Visual C++ 1.52). It was only when they introduced Windows NT and 32 bit compilers that they made a marketing decision to drop extended precision type.
Their stated reason was that some of the processors for which they were planning to sell Windows NT did not have hardware support for floating point types wider than 64 bits. Their decision was that portability to other processors running Windows NT was more important than the programmer's decision whether or not to choose precision over compatibility.
You can see this on Microsoft's web site at the following link:
http://support.microsoft.com/support.../Q129/2/09.asp
Quote:
Try with a current gcc/g++ or VC++. I don't recall if VC++ 6.x has long doubles, but it's worth a try.
|
Visual C++ 4, 5, and 6 all supported long doubles. But they all implement long double as 64 bit FPU floating point types, identical with double. The last version of Visual C++ that supported 80 bit Intel FPU extended precision 80 bit types for long double was the last 16 bit compiler,
Visual C++ 1.52.
I wouldn't know if they have brought this support back in 7.0 or 7.1, but I doubt it.
Their marketing decision seriously cripples Visual C++ on the x86 for some types of serious numerical and engineering programming. Others, such as Borland and GCC, do not have this limitation.
|
.
__________________
Sysadmin.
Last edited by sysadmin; 03-18-2005 at 11:19 PM..
|