[Numpy-discussion] float128 / longdouble on PPC - is it broken?

Pauli Virtanen pav@iki...
Tue Oct 25 04:43:08 CDT 2011


25.10.2011 06:59, Matthew Brett kirjoitti:
> res = np.longdouble(2)**64
> res-1
> 36893488147419103231.0

Can you check if long double works properly (not a given) in C on that
platform:

	long double x;
	x = powl(2, 64);
	x -= 1;
	printf("%g %Lg\n", (double)x, x);

or, in case the platform doesn't have powl:

	long double x;
	x = pow(2, 64);
	x -= 1;
	printf("%g %Lg\n", (double)x, x);



More information about the NumPy-Discussion mailing list