=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3dx9_36/tests: Make sure NaN and negative NaN have the correct sign bits.
Alexandre Julliard
julliard at winehq.org
Wed Sep 21 13:35:13 CDT 2011
Module: wine
Branch: master
Commit: b97b577e9fde609c7c9644e6f189ef84c3a530b1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b97b577e9fde609c7c9644e6f189ef84c3a530b1
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Sep 20 22:10:28 2011 +0200
d3dx9_36/tests: Make sure NaN and negative NaN have the correct sign bits.
---
dlls/d3dx9_36/tests/math.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index c26a523..fcf0a99 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -2219,7 +2219,9 @@ static void test_D3DXVec_Array(void)
static void test_D3DXFloat_Array(void)
{
static const float z = 0.0f;
- float nnan = 0.0f/z;
+ /* Compilers set different sign bits on 0.0 / 0.0, pick the right ones for NaN and -NaN */
+ float tmpnan = 0.0f/z;
+ float nnan = copysignf(1, tmpnan) < 0.0f ? tmpnan : -tmpnan;
float nan = -nnan;
unsigned int i;
void *out = NULL;
More information about the wine-cvs
mailing list