[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3482.0. "How is D-float implemented on Alpha/VMS?" by VNASWS::WILFRIED (Wilfried Bergmann, Austria) Mon Mar 10 1997 10:00

Reading the manual "Using DEC C++ on OpenVMS Systems", Apr 96 I found that
the default for double on VAX is D_FLOAT and on Alpha it's G_FLOAT.

If I compile on Alpha and specify /FLOAT=D_FLOAT, what do I get?

On page 1/43, 1.6.2 it says: "... when compiling with this type, all data
transfer is done with the data in D/floating format, but for each arithmetic
operation the data is converted first to G-floating format and then back to
D-floating format when the operation is complete."

Is this really true? I thought D-floating operations would be emulated by
software in this case (/FLOAT=D_FLOAT).

What is ment by "... all data transfer ..."? For example hould scanf() accept
16 decimal digits in this case (/FLOAT=D_FLOAT)? On VAX it does but _not_
on Alpha.!
Could you please clarify?

Thanks,
	/wb
T.RTitleUserPersonal
Name
DateLines
3482.1NotedDECCXX::AMARTINAlan H. MartinMon Mar 10 1997 14:332
I've logged a request for someone to answer your questions.
				/AHM
3482.2D-float support is minimal on AlphaCUJO::SAMPSONMon Mar 10 1997 23:0623
	"Native" D-float support on Alpha is implemented with only two
instructions: CVTDG and CVTGD.  Everything else is done in G-float format,
with G-float instructions.  Like G-float, this provides 53 bits of
mantissa.  It is called D53.  D-float with 56 bits of mantissa (D56)
is implemented in hardware, only on VAX.  D56 is also fully and slowly
emulated in software, only for VEST-translated VAX programs on Alpha.

	As I recently explained to a customer, there are three
advantages to switching from D53 to T-float on Alpha:

(1)	Performance is improved (usually only slightly) by
	eliminating all of the CVTDG and CVTGD instructions.

(2)	The exponent range is increased by about three bits
	(eight times).  This advantage also applies to G-float.

(3)	Support is available (if needed) for generating and using
	IEEE exceptional values (NaNs, Infinities, and Denorms).
	Prior to EV6, this is done mostly by software, so it is slow.
	Starting with EV6, hardware support is available.

	HTH,
	Bob Sampson
3482.3NitWIBBIN::NOYCEPulling weeds, pickin' stonesTue Mar 11 1997 09:545
>	Starting with EV6, hardware support is available.

Starting with EV6, *some* hardware support is available.  The
hardware accepts and produces NaN's and infinities, but still
requires software emulation to process and produce denorms.
3482.4point takenCUJO::SAMPSONTue Mar 11 1997 12:572
    Nit accepted.  I didn't say how much hardware support is
    (will be) available in EV6, because I didn't know.