diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-10-01 03:26:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-10-01 03:26:28 +0000 |
commit | 9912b9e939bff35a134c9558093991297990ee53 (patch) | |
tree | 371f920fb62e8253f09d8d8888e813cef122e642 /lib/util | |
parent | 789a373c953d99d93b16e4568e96face686d59fd (diff) | |
download | netpbm-mirror-9912b9e939bff35a134c9558093991297990ee53.tar.gz netpbm-mirror-9912b9e939bff35a134c9558093991297990ee53.tar.xz netpbm-mirror-9912b9e939bff35a134c9558093991297990ee53.zip |
Deal properly with NaN
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1327 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/pm_c_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util/pm_c_util.h b/lib/util/pm_c_util.h index 07913f30..f17d1e03 100644 --- a/lib/util/pm_c_util.h +++ b/lib/util/pm_c_util.h @@ -1,6 +1,11 @@ #ifndef PM_C_UTIL_INCLUDED #define PM_C_UTIL_INCLUDED +/* Note that for MAX and MIN, if either of the operands is a floating point + Not-A-Number, the result is the second operand. So if you're computing a + running maximum and want to ignore the NaNs in the computation, put the + running maximum variable second. +*/ #undef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #undef MIN |