Port-alpha archive

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

Re: Bug in libm



coypu%SDF.ORG@localhost a écrit :
Hi,

	Hello,

I was slightly curious about this.
The implementation of lrint for alpha is very simple.
It's some boilerplate, then a call to cvttq which does
a conversion from T_floating to quadword.

Does this code trigger it?

#include <math.h>
#include <stdio.h>

int main() {
	double input = 2.34E20;
	printf("%f %ld\n", input, lrint(input));
}

	Nope.

einstein:[~] > gcc -o test test.c
einstein:[~] > ./test
234000000000000000000.000000 -5807672958224171008

but result is (for me) strange.

I was curious how we can disable the exceptions, but
GCC says the default compilation mode should do it,
and we might need to explicitly change things to
reach another mode.
(the flag seems to be -mfp-trap-mode)

Alternatively, are you using vax float?

	No. Only -mieee that is set by pkgsrc.

	Regards,

	JKB


Home | Main Index | Thread Index | Old Index