cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float mchepf (float x); extern double mchep (double x); extern long double mchepl (long double x); extern __float80 mchepw (__float80 x); extern __float128 mchepq (__float128 x); extern long_long_double mchepll (long_long_double x); extern decimal_float mchepdf (decimal_float x); extern decimal_double mchepd (decimal_double x); extern decimal_long_double mchepdl (decimal_long_double x); extern decimal_long_long_double mchepdll (decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
Because the floating-point representation has a logarithmic distribution, the relative spacing of three successive values changes abruptly when the middle one is an integral power of the base. In particular, this means that mchep(x) == FLT_RADIX * mchep(-x), since mchep(-x) is the smallest positive number that can be subtracted from x with the difference not equal to x. Some authors call mchep(x) the big epsilon, and mchep(-x) the small epsilon.
mchep(x) is also called an ulp (unit in the last place).
mchep(1.0) is exactly equal to the base to the power 1 - t when there are t digits in the significand. Thus, in type double, mchep(1.0) == ldexp(1.0, 1 - DBL_MANT_DIG) exactly.
mchep(0.0) is the smallest representable floating-point number. Depending on the host system, it may be a normal number, or a subnormal number.