18 #ifndef MAGICKCORE_STATISTIC_PRIVATE_H 19 #define MAGICKCORE_STATISTIC_PRIVATE_H 21 #if defined(__cplusplus) || defined(c_plusplus) 25 static inline MagickBooleanType MagickSafeSignificantError(
const double error,
28 double threshold = (fuzz > 0.0 ? fuzz : MagickEpsilon)*(1.0+MagickEpsilon);
29 return(error > threshold ? MagickTrue : MagickFalse);
32 static inline double MagickSafeLog10(
const double x)
34 if (x < MagickEpsilon)
35 return(log10(MagickEpsilon));
36 if (fabs(x-1.0) < MagickEpsilon)
41 static inline double MagickSafeReciprocal(
const double x)
43 if ((x > -MagickEpsilon) && (x < MagickEpsilon))
44 return(1.0/MagickEpsilon);
48 #if defined(__cplusplus) || defined(c_plusplus)