Hi Feodor, #include <iostream> using std::cout; using std::endl; template <typename FP> int MantissaBitSize(FP one) { int rv = 1; FP fXeno = one / 2; FP fLast = one; FP f = one + fXeno; while(f != fLast) { fLast = f; fXeno = fXeno / 2; fLast = f + fXeno; ++rv; } return rv; } int main() { cout << "float : " << MantissaBitSize(1.0f) << endl; cout << "double : " << MantissaBitSize(1.0 ) << endl; cout << "long double: " << MantissaBitSize(1.0l) << endl; } HTH, --Eljay [Non-HTML encoded, this time. Sorry about that.]