Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/units/systems/si/prefixes.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
0002 // unit/quantity manipulation and conversion
0003 //
0004 // Copyright (C) 2003-2008 Matthias Christian Schabel
0005 // Copyright (C) 2007-2008 Steven Watanabe
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See
0008 // accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_UNITS_SI_PREFIXES_HPP
0012 #define BOOST_UNITS_SI_PREFIXES_HPP
0013 
0014 #include <boost/units/static_constant.hpp>
0015 
0016 #include <boost/units/make_scaled_unit.hpp>
0017 #include <boost/units/systems/si/dimensionless.hpp>
0018 
0019 namespace boost {
0020 
0021 namespace units { 
0022 
0023 namespace si {
0024 
0025 #define BOOST_UNITS_METRIC_PREFIX(exponent, name)                                                       \
0026     typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
0027     BOOST_UNITS_STATIC_CONSTANT(name, name ## _type)
0028 
0029 BOOST_UNITS_METRIC_PREFIX(-24, yocto);
0030 BOOST_UNITS_METRIC_PREFIX(-21, zepto);
0031 BOOST_UNITS_METRIC_PREFIX(-18, atto);
0032 BOOST_UNITS_METRIC_PREFIX(-15, femto);
0033 BOOST_UNITS_METRIC_PREFIX(-12, pico);
0034 BOOST_UNITS_METRIC_PREFIX(-9, nano);
0035 BOOST_UNITS_METRIC_PREFIX(-6, micro);
0036 BOOST_UNITS_METRIC_PREFIX(-3, milli);
0037 BOOST_UNITS_METRIC_PREFIX(-2, centi);
0038 BOOST_UNITS_METRIC_PREFIX(-1, deci);
0039 BOOST_UNITS_METRIC_PREFIX(1, deka);
0040 BOOST_UNITS_METRIC_PREFIX(2, hecto);
0041 BOOST_UNITS_METRIC_PREFIX(3, kilo);
0042 BOOST_UNITS_METRIC_PREFIX(6, mega);
0043 BOOST_UNITS_METRIC_PREFIX(9, giga);
0044 BOOST_UNITS_METRIC_PREFIX(12, tera);
0045 BOOST_UNITS_METRIC_PREFIX(15, peta);
0046 BOOST_UNITS_METRIC_PREFIX(18, exa);
0047 BOOST_UNITS_METRIC_PREFIX(21, zetta);
0048 BOOST_UNITS_METRIC_PREFIX(24, yotta);
0049 
0050 /*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24);       ///< metric prefix for 1.0e-24
0051 BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21);       ///< metric prefix for 1.0e-21
0052 BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18);        ///< metric prefix for 1.0e-18
0053 BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15);       ///< metric prefix for 1.0e-15
0054 BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12);        ///< metric prefix for 1.0e-12
0055 BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9);         ///< metric prefix for 1.0e-9
0056 BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6);        ///< metric prefix for 1.0e-6
0057 BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3);        ///< metric prefix for 1.0e-3
0058 BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2);        ///< metric prefix for 1.0e-2
0059 BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1);         ///< metric prefix for 1.0e-1
0060 BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1);          ///< metric prefix for 1.0e+1
0061 BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2);         ///< metric prefix for 1.0e+2
0062 BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3);          ///< metric prefix for 1.0e+3
0063 BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6);          ///< metric prefix for 1.0e+6
0064 BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9);          ///< metric prefix for 1.0e+9
0065 BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12);         ///< metric prefix for 1.0e+12
0066 BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15);         ///< metric prefix for 1.0e+15
0067 BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18);          ///< metric prefix for 1.0e+18
0068 BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21);        ///< metric prefix for 1.0e+21
0069 BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24);        ///< metric prefix for 1.0e+24 */ 
0070 
0071 } // namespace si
0072 
0073 } // namespace units
0074 
0075 } // namespace boost
0076 
0077 #endif // BOOST_UNITS_SI_PREFIXES_HPP