Dear Fortran experts,
I have found a rather strange behavior in one of our dlls generated with Intel Fortran compiler (Intel(R) Visual Fortran Compiler XE 14.0.0.103 [IA-32]). I have a routine in which the following code is written.
if (INDIC == 4 .or. INDIC == INDIC_ALL) CJOULE = -DHP*RCONST/CP
The variables DHP, RCONST and CP are of type real (double precison) and RCONST and CP are positive values. Some lines above, the following code is setting the value of DHP to zero.
DHP = 0.D0
When I look at the value of the variable CJOULE in the debugger it displays 0.0000000D+00, however in hexadecimal display it shows #80000000 meaning that the bit of sign is set to 1.
The dll is used into Excel through the COM layer and what I found is that in an previous version of the dll the value displayed in Excel was 0 and now Excel displays -0 ! The only changes I did between the two versions was simply to perform a rebuild instead of a simple build to generate the dll (the build was necessary because of a change in a source code which as nothing to do with the source code above).
Do you have any comment about that ?
Thanks and best regards.
Phil.