Preventing lossy cast for new float dtypes ?
18 Aug
2012
18 Aug
'12
1:28 p.m.
Hi, I have started toying with implementing a quad precision dtype for numpy on supported platforms, using the __float128 + quadmath lib from gcc. I have noticed invalid (and unexpected) downcast to long double in some cases, especially for ufuncs (e.g. when I don't define my own ufunc for a given operation). Looking down in numpy ufunc machinery, I can see that the issue is coming from the assumption that long double is the highest precision possible for a float type, and the only way I can 'fix' this is to define kind to a value != 'f' in my dtype definition (in which case I get an expected invalid cast exception). Is there a way to still avoid those casts while keeping the 'f' kind ? thanks, David
4238
Age (days ago)
4240
Last active (days ago)
1 comments
2 participants
participants (2)
-
David Cournapeau
-
Frédéric Bastien