Fix setPrimArray for Float & Double#433
Conversation
Add tests for `Float` & `Double`
|
This looks correct to me. And also, it looks like the tests suite would catch a mistake in the implementation of Prim for Float or Double. Are you alright with me merging this? |
Yes, I added
Yes, go ahead! |
Should that be considered a bug in |
|
|
That QuickCheck ticket is old enough to go to kindergarten. |
Fix the bug mentioned in #265 by generating different functions for
FloatandDoublethat checkx == 0.0 && !signbit(x)to ensure that we only usememsetfor+0.0(and not-0.0).I also removed the special case for
sizeof(Hs ## TYPE) == sizeof(int)*2since it didn't yield better performance in my benchmark. I also don't see why one would expect performance improvements from that in the first place, since a single access should be faster than two.