annotate DEPENDENCIES/generic/include/boost/units/systems/si/prefixes.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
Chris@16 2 // unit/quantity manipulation and conversion
Chris@16 3 //
Chris@16 4 // Copyright (C) 2003-2008 Matthias Christian Schabel
Chris@16 5 // Copyright (C) 2007-2008 Steven Watanabe
Chris@16 6 //
Chris@16 7 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 8 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 9 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 10
Chris@16 11 #ifndef BOOST_UNITS_SI_PREFIXES_HPP
Chris@16 12 #define BOOST_UNITS_SI_PREFIXES_HPP
Chris@16 13
Chris@16 14 #include <boost/units/static_constant.hpp>
Chris@16 15
Chris@16 16 #include <boost/units/make_scaled_unit.hpp>
Chris@16 17 #include <boost/units/systems/si/dimensionless.hpp>
Chris@16 18
Chris@16 19 namespace boost {
Chris@16 20
Chris@16 21 namespace units {
Chris@16 22
Chris@16 23 namespace si {
Chris@16 24
Chris@16 25 #define BOOST_UNITS_METRIC_PREFIX(exponent, name) \
Chris@16 26 typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
Chris@16 27 BOOST_UNITS_STATIC_CONSTANT(name, name ## _type)
Chris@16 28
Chris@16 29 BOOST_UNITS_METRIC_PREFIX(-24, yocto);
Chris@16 30 BOOST_UNITS_METRIC_PREFIX(-21, zepto);
Chris@16 31 BOOST_UNITS_METRIC_PREFIX(-18, atto);
Chris@16 32 BOOST_UNITS_METRIC_PREFIX(-15, femto);
Chris@16 33 BOOST_UNITS_METRIC_PREFIX(-12, pico);
Chris@16 34 BOOST_UNITS_METRIC_PREFIX(-9, nano);
Chris@16 35 BOOST_UNITS_METRIC_PREFIX(-6, micro);
Chris@16 36 BOOST_UNITS_METRIC_PREFIX(-3, milli);
Chris@16 37 BOOST_UNITS_METRIC_PREFIX(-2, centi);
Chris@16 38 BOOST_UNITS_METRIC_PREFIX(-1, deci);
Chris@16 39 BOOST_UNITS_METRIC_PREFIX(1, deka);
Chris@16 40 BOOST_UNITS_METRIC_PREFIX(2, hecto);
Chris@16 41 BOOST_UNITS_METRIC_PREFIX(3, kilo);
Chris@16 42 BOOST_UNITS_METRIC_PREFIX(6, mega);
Chris@16 43 BOOST_UNITS_METRIC_PREFIX(9, giga);
Chris@16 44 BOOST_UNITS_METRIC_PREFIX(12, tera);
Chris@16 45 BOOST_UNITS_METRIC_PREFIX(15, peta);
Chris@16 46 BOOST_UNITS_METRIC_PREFIX(18, exa);
Chris@16 47 BOOST_UNITS_METRIC_PREFIX(21, zetta);
Chris@16 48 BOOST_UNITS_METRIC_PREFIX(24, yotta);
Chris@16 49
Chris@16 50 /*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24); ///< metric prefix for 1.0e-24
Chris@16 51 BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21); ///< metric prefix for 1.0e-21
Chris@16 52 BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18); ///< metric prefix for 1.0e-18
Chris@16 53 BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15); ///< metric prefix for 1.0e-15
Chris@16 54 BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12); ///< metric prefix for 1.0e-12
Chris@16 55 BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9); ///< metric prefix for 1.0e-9
Chris@16 56 BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6); ///< metric prefix for 1.0e-6
Chris@16 57 BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3); ///< metric prefix for 1.0e-3
Chris@16 58 BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2); ///< metric prefix for 1.0e-2
Chris@16 59 BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1); ///< metric prefix for 1.0e-1
Chris@16 60 BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1); ///< metric prefix for 1.0e+1
Chris@16 61 BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2); ///< metric prefix for 1.0e+2
Chris@16 62 BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3); ///< metric prefix for 1.0e+3
Chris@16 63 BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6); ///< metric prefix for 1.0e+6
Chris@16 64 BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9); ///< metric prefix for 1.0e+9
Chris@16 65 BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12); ///< metric prefix for 1.0e+12
Chris@16 66 BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15); ///< metric prefix for 1.0e+15
Chris@16 67 BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18); ///< metric prefix for 1.0e+18
Chris@16 68 BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21); ///< metric prefix for 1.0e+21
Chris@16 69 BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24); ///< metric prefix for 1.0e+24 */
Chris@16 70
Chris@16 71 } // namespace si
Chris@16 72
Chris@16 73 } // namespace units
Chris@16 74
Chris@16 75 } // namespace boost
Chris@16 76
Chris@16 77 #endif // BOOST_UNITS_SI_PREFIXES_HPP