From: Kai T. <Kai...@on...> - 2009-02-25 15:34:58
|
David Cournapeau <cou...@gm...> wrote on 23.02.2009 15:00:35: > On Mon, Feb 23, 2009 at 6:08 PM, Kai Tietz <kti...@go...> wrote: > > 2009/2/22 Erik de Castro Lopo <ml...@me...>: > >> David Cournapeau wrote: > >> > >>> This goes into the invalid branch on linux and windows (32 bits), but > >>> not with mingw-w64. Is this a bug, or is this expected ? > >> > >> David, > >> > >> This *may* be related to the fact the FP stuff on x86_64 is done in > >> SSE instructions. Your problem could be related to issue like these: > >> > >> http://www.flamingspork.com/blog/2009/02/18/fun-with-387/ > >> http://www.flamingspork.com/blog/2009/02/18/floating-point-is-not-fun/ > >> > >> Cheers, > >> Erik > >> -- > >> ----------------------------------------------------------------- > >> Erik de Castro Lopo > >> ----------------------------------------------------------------- > >> When aiming for the common denominator, be prepared for the > >> occasional division by zero. > >> > > > > Yes, this fpu functionality isn't working on SSE instruction. There > > isn't any exception raised by the system for them. So you have to > > check by __fpclassify, isfinite, isinf, etc. > > I don't see the link between __fpclassify/isfinite/isinf and FPU > exception: they are totally different features. > > I tried the code from BSD for fesetexcept and fetestexcept, and it > works when build with mingw-w64 - I am by no mean knowledgeable about > assembly, but it looks like the main difference is indeed taking into > account SSE FPU. It seems quite easy to adapt the mingw-w64 fenv code > to fix this, > > cheers, > > David Hi David, thanks for reporting this. I adjusted our code to support SSE2, too. It is at the moment pretty experimental, therefore I would be happy, if you could test it a bit. (See trunk rev. 651). Cheers, Kai | (\_/) This is Bunny. Copy and paste Bunny | (='.'=) into your signature to help him gain | (")_(") world domination. |