]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 2 Feb 2014 15:10:22 +0000 (15:10 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 2 Feb 2014 15:10:22 +0000 (15:10 +0000)
MagickCore/compare.c

index 7be23e66d002e9bb8e79b839f6c1a2abb602b066..7763cd1ee37134f3f0ed9eda03dd84ab3365829b 100644 (file)
 #include "MagickCore/utility.h"
 #include "MagickCore/version.h"
 \f
-/*
-  Define declarations.
-*/
-#define LogEpsilon  (1.0e-15)
-\f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
@@ -1097,9 +1092,7 @@ static inline double MagickLog10(const double x)
 {
 #define Log10Epsilon  (1.0e-20)
 
- if (fabs(x) < Log10Epsilon)
-   return(log10(fabs(Log10Epsilon)));
- return(log10(fabs(x)));
+ return(log10(fabs(x)+Log10Epsilon));
 }
 
 static MagickBooleanType GetPeakSignalToNoiseRatio(const Image *image,