Commit 908e583b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

change operand of isnan to floating type

parent 3d47d7ef
......@@ -177,12 +177,12 @@ void *Cond(void *argument)
if ( operatorID == IFTHEN )
{
for ( i = 0; i < gridsize; i++ )
array3[i] = !DBL_IS_EQUAL(array1[i], missval1) && !DBL_IS_EQUAL(array1[i], 0) ? array2[i] : missval2;
array3[i] = !DBL_IS_EQUAL(array1[i], missval1) && !DBL_IS_EQUAL(array1[i], 0.) ? array2[i] : missval2;
}
else if ( operatorID == IFNOTTHEN )
{
for ( i = 0; i < gridsize; i++ )
array3[i] = !DBL_IS_EQUAL(array1[i], missval1) && DBL_IS_EQUAL(array1[i], 0) ? array2[i] : missval2;
array3[i] = !DBL_IS_EQUAL(array1[i], missval1) && DBL_IS_EQUAL(array1[i], 0.) ? array2[i] : missval2;
}
else
{
......
......@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-2008 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-2009 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
......@@ -191,7 +191,7 @@ void *Cond2(void *argument)
{
for ( i = 0; i < gridsize; i++ )
array4[i] = DBL_IS_EQUAL(array1[i], missval1) ?
missval2 : !DBL_IS_EQUAL(array1[i], 0) ? array2[i] : array3[i];
missval2 : !DBL_IS_EQUAL(array1[i], 0.) ? array2[i] : array3[i];
}
else
{
......
......@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-2006 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-2009 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
......@@ -97,12 +97,12 @@ void *Condc(void *argument)
if ( operatorID == IFTHENC )
{
for ( i = 0; i < gridsize; i++ )
array2[i] = !DBL_IS_EQUAL(array1[i], missval) && !DBL_IS_EQUAL(array1[i], 0) ? rc : missval;
array2[i] = !DBL_IS_EQUAL(array1[i], missval) && !DBL_IS_EQUAL(array1[i], 0.) ? rc : missval;
}
else if ( operatorID == IFNOTTHENC )
{
for ( i = 0; i < gridsize; i++ )
array2[i] = !DBL_IS_EQUAL(array1[i], missval) && DBL_IS_EQUAL(array1[i], 0) ? rc : missval;
array2[i] = !DBL_IS_EQUAL(array1[i], missval) && DBL_IS_EQUAL(array1[i], 0.) ? rc : missval;
}
else
{
......
......@@ -243,7 +243,7 @@ void *Eofcoeff(void * argument)
out.ptr[0] += tmp;
}
}
if ( ! DBL_IS_EQUAL(out.ptr[0],0) ) nmiss=0;
if ( ! DBL_IS_EQUAL(out.ptr[0],0.) ) nmiss=0;
else { nmiss=1; out.ptr[0]=missval2; }
streamDefRecord(streamIDs[eofID], varID, levelID);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment