|
From: Paul A B. <pbr...@us...> - 2007-03-28 11:46:09
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/math/tools In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18818/boost-sandbox/boost/math/tools Modified Files: Tag: math_toolkit precision.hpp Log Message: Aded comments Index: precision.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/math/tools/Attic/precision.hpp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- precision.hpp 19 Mar 2007 18:48:49 -0000 1.1.2.10 +++ precision.hpp 28 Mar 2007 11:46:08 -0000 1.1.2.11 @@ -20,6 +20,17 @@ { namespace tools { +// If T is not specialized, the functions digits, max_value and min_value, +// all get synthesised automatically from std::numeric_limits. +// However, if numeric_limits is not specialised for type RealType, +// for example with NTL::RR type, then you will get a compiler error +// when code tries to use these functions, unless you explicitly specialise them. + +// For example if the precision of RealType varies at runtime, +// then numeric_limits support may not be appropriate, +// see boost/math/tools/ntl.hpp for examples like +// template <> NTL::RR max_value<NTL::RR> ... +// See Conceptual Requirements for Real Number Types. template <class T> inline int digits(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) |