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

Conference decwet::visual

Title:Microsoft Visual C++ bug reports and kits
Notice:Register in Topic 2. 5.Last for latest Kit
Moderator:DECWET::THOMASN
Created:Tue May 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:521
Total number of notes:2938

471.0. "Floating Point, Intel vs. Alpha?" by GCUVAX::tunsrv2-tunnel.imc.das.dec.com::Palmer (Life: Eternity's Field Test) Fri Feb 28 1997 07:08

I received the following from one of my customers, and was wondering 
if anyone had a quick comment prior to me requesting the sources to 
reproduce this with.

Thanks,

--Ed

From: Schultz, Russell on Wed, Feb 26, 1997 1:36 PM
Subject: Pentium/Alpha problem or difference
To: Dwight Forbes
Cc: Rahman, Hasan

We're having some problems with code developed on a pentium running 
on an alpha system (windows NT).


In particular, we're sending over an IP connection, a IEEE 4 byte 
floating point number in big endian format.  On the pentium, we use 
(basically) NTOHL on the 4 bytes to move it into the pentium 
architecture floating point--the numbers show up fine.  We're also 
assuming the alpha shares the floating point structure with the 
pentium because they both seem to be little endian machines
(at least under NT).  My guess is this is not the case & an alpha has 
a slightly different floating point structure causing our code to 
produce a "floating point exception" when it uses these numbers 
passed over the IP(and byte shuffled) in a calculation while the 
pentium under the same situation does not.


Any hints, clues or pointers to documentation concerning this?

Russ Schultz

T.RTitleUserPersonal
Name
DateLines
471.1GEMEVN::GLOSSOPOnly the paranoid surviveFri Feb 28 1997 07:196
The representations are identical (Alphas are little endian just like x86.)

The problem may well be that some of the numbers being passed over are
denormal values or NaNs.  If that is the case, the Alpha application
should be compiled with /QAieee to get full IEEE semantics for floating
point operations.
471.2GCUVAX::tunsrv2-tunnel.imc.das.dec.com::PalmerLife: Eternity's Field TestFri Feb 28 1997 11:106
Give that noter a gold star!

Seriously, the compiler switch fixed the problem and all is well for 
the customer.  Many thanks for the help and the quick response.

--Ed
471.3check your performance nowHYDRA::DONSBACHJeff Donsbach, Software Partner Engineering, DTN 297-6862Mon Mar 03 1997 14:347
    
    Yea, but using strict IEEE mode on an Alpha will seriously affect
    performance...
    
    Jeff Donsbach
    Software Partners Engineering @ MRO