|
|
|
|
| Re: IEEE-denorm problem [message #75 is a reply to message #71] |
Mon, 25 January 2010 09:07   |
joukj Messages: 9 Registered: January 2010 Location: the Netherlands |
Junior Member |
|
|
Volker
A quick example:
hopak-jj) ty test.c
#include <stdio.h>
#define METRIC_CONVERSION_CONSTANT (1/25.4)
#define mm2twips (METRIC_CONVERSION_CONSTANT*1440)
#define mm2twips2 (METRIC_CONVERSION_CONSTANT*1440.0)
main()
{
double mm = 25.4 , res;
double c = 1440.0;
int c1 = 1440;
res = c / mm ;
printf( "test real / real : %f\n" , res );
res = c1 / mm;
printf( "test int / real : %f\n" , res );
res = mm2twips2;
printf( "test2 real / real : %f\n" , res );
res = mm2twips;
printf( "test2 int / real : %f\n" , res );
}
hopak-jj) cc/float=ieee/ieee=denorm test.c
res = mm2twips;
.........^
%CC-W-UNDERFLOW, In this statement, underflow occurs in evaluating the expressio
n "1/25.4".
at line number 19 in file $DISK7:[joukj.test]test.c;29
hopak-jj) link test
%LINK-W-WRNERS, compilation warnings
in module TEST file $DISK7:[joukj.test]test.OBJ;36
hopak-jj) run test
test real / real : 56.692913
test int / real : 0.000000
test2 real / real : 56.692913
test2 int / real : 0.000000
hopak-jj)
A correct result would be that all 4 tests result in 56.692913, which occurs on a real Alpha, but not on the NCE-version of stromasys running on a linux system (Fedora12 & Centos5.4)
Presently I do not have Pesonal Alpha installed.
Jouk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: IEEE-denorm problem [message #97 is a reply to message #96] |
Wed, 03 February 2010 10:34   |
volker Messages: 40 Registered: November 2009 Location: Germany |
Member |
|
|
Jouk,
the following instruction stream inside the HP C compiler seems to trigger this problem:
DBG> exa/ins 806878:806890
00806878: LDQ R21,#X0A50(FP)
0080687C: LDT F10,(R21) <<< load int value
00806880: CVTQT/SUIP F10,F11 <<< convert
00806884: TRAPB
00806888: BIS R31,R31,R0
0080688C: STT F11,(R3) <<< store FP value
00806890: BR R31,#X00162E
The value loaded into F11 somehow is being corrupted. This later causes the %CC-W-UNDERFLOW warning message to be displayed.
SDA/DEBUG do not correctly display the decoded instruction. According to the AARM (Alpha Architecture Reference Manual), this instruction should be displayed as:
CVTQT/SUID F10,F11 (opcode.function is 16.7FE)
Volker.
|
|
|
| Re: IEEE-denorm problem [message #100 is a reply to message #97] |
Thu, 11 February 2010 08:15  |
volker Messages: 40 Registered: November 2009 Location: Germany |
Member |
|
|
Jouk,
the problem has been identified and resolved. The solution will show up in a future release.
Thanks you very much for reporting this problem,
Volker.
|
|
|