![]()  | 
![]() ![]() ![]() ![]()  | 
![]()  | 
Floating-Point Constant MacrosBoost , Math Toolkit 2.5.0 , Chapter 3. Specified-width floating-point typedefs
  
  
   | 
|||||||||
![]()  | 
Tip | 
|---|---|
Повышаю. Математика обеспечивает множество констант «встроенных», поэтому всегда используйте Boost. Константы математики, если таковые имеются, например:  | 
// Display the constant pi to the maximum available precision. boost::floatmax_t pi_max = boost::math::constants::pi<boost::floatmax_t>(); std::cout.precision(std::numeric_limits<boost::floatmax_t>::digits10); std::cout << "Most precise pi = " << pi_max << std::endl; // If floatmax_t is float_128_t, then // Most precise pi = 3.141592653589793238462643383279503
См. полный списокконстант.
Статья Floating-Point Constant Macros раздела Math Toolkit 2.5.0 Chapter 3. Specified-width floating-point typedefs может быть полезна для разработчиков на c++ и boost.
:: Главная :: Chapter 3. Specified-width floating-point typedefs ::
реклама  |