[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: underflow on alpha



On Fri, Apr 09, 1999 at 03:14:03PM +0200, Renato Tognaccini wrote:
> Hi, I have the a problem running the following very simple C program on
> alpha (Debian Linux):
> 
> int main() {
> double a,b;
> a=1.e-314
> b=1.;
> a=a*b;
> }
> 
> during the execution of the program, the system returns floating point
> exception and stops the execution of the program.
> This is a kind of underflow, better say denormalized operand error.
> Do you know how can I manage this problem on alpha? On Intel there is no
> problem and the result of the floating point operation is zero.
> 

Except for the typo on a=... (need to add a ;  )

gcc -mieee file.c should do it.

$ cat test.c
int main() {
double a,b;
a=1.e-314;
b=1.;
a=a*b;
}

$ gcc -mieee -o t test.c
$ ./t
$ uname -a
Linux faure 2.0.35 #1 Wed Feb 17 15:20:33 CST 1999 alpha unknown


HTH,

B.


Reply to: