Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

80-bit long double support?

Status
Not open for further replies.

tdatgod

Programmer
Jul 21, 2001
601
0
0
US
Hi,
Does anyone know how to access the 80-bit floating point number from C/C++? I have seen reference to a __float80 type but I can't find any documentation on it.

Microsoft has 'double' and 'long double' but they are both 64-bit quantities. According to the Visuall C++ help, win16 supported 80-bit floating point operations but it was removed in win32.

Currently we are accessing the Intel 80-bit FLT instructions from Inline assembly but this is cumbersome as we port to other platforms like Itanium.


Thanks.

Dennis.

 
Greetinx!

Why long double has 64bit!?? Just long double has 80-bit! (exactly in BCB). Happy programming!))
 
Hi,
say HUH? what is BCB? the Borland C compiler? Could you elaborate on you message since it doesn't seem to be clear.

Ansi 'C' makes no distinction that LONG double must be 80 Bits and therefore Microsoft has decided LONG DOUBLE should represent a 64-0bit quantity since not all CHIP vendors support Native 80 bit operations like Intel does.

--
 
Greetinx!

So...you should use assembly instructions!)) Happy programming!))
 
Greetinx!

Following text is from Microsoft Visual C++ 6 Help

Topic - long double
Microsoft Specific —>

The long double contains 80 bits: 1 for sign, 15 for exponent, and 64 for mantissa. Its range is +/–1.2E4932 with at least 19 digits of precision. Although long double and double are separate types, the representation of long double and double is identical.

END Microsoft Specific


Happy programming!))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top