return number of significant digits
- Examples:
- writetest.cc.
Definition at line 49 of file util.cc.
Referenced by main(), ntrailingdigits(), and datrw::su::ScalCoo::set().
51 const double epsilon=1.e-30;
54 std::cerr <<
"DEBUG (nsignificantdigits): " 55 <<
"entered function for value:" << v << std::endl;
65 double basefactor=pow(10.,-floor(log10(v)));
69 std::cerr <<
"DEBUG (nsignificantdigits): " 70 <<
"basefactor: " << basefactor <<
" " 76 double factor=basefactor*pow(10.,n);
82 std::cerr <<
"DEBUG (nsignificantdigits): " 83 <<
"factor: " << factor <<
" " 85 <<
"v1: " << v1 <<
" " 86 <<
"v2: " << v2 <<
" "