Goby3  3.1.5a
2024.05.23
prefixes.hpp
Go to the documentation of this file.
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
3 //
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2007-2008 Steven Watanabe
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See
8 // accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10 
11 #ifndef BOOST_UNITS_SI_PREFIXES_HPP
12 #define BOOST_UNITS_SI_PREFIXES_HPP
13 
14 #include <boost/units/static_constant.hpp>
15 
16 #include <boost/units/make_scaled_unit.hpp>
17 #include <boost/units/systems/si/dimensionless.hpp>
18 
19 namespace boost {
20 
21 namespace units {
22 
23 namespace si {
24 
25 #define BOOST_UNITS_METRIC_PREFIX(exponent, name) \
26  typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
27  BOOST_UNITS_STATIC_CONSTANT(name, name ## _type)
28 
29 BOOST_UNITS_METRIC_PREFIX(-24, yocto);
30 BOOST_UNITS_METRIC_PREFIX(-21, zepto);
31 BOOST_UNITS_METRIC_PREFIX(-18, atto);
32 BOOST_UNITS_METRIC_PREFIX(-15, femto);
33 BOOST_UNITS_METRIC_PREFIX(-12, pico);
35 BOOST_UNITS_METRIC_PREFIX(-6, micro);
36 BOOST_UNITS_METRIC_PREFIX(-3, milli);
37 BOOST_UNITS_METRIC_PREFIX(-2, centi);
47 BOOST_UNITS_METRIC_PREFIX(21, zetta);
48 BOOST_UNITS_METRIC_PREFIX(24, yotta);
49 
50 /*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24); ///< metric prefix for 1.0e-24
51 BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21); ///< metric prefix for 1.0e-21
52 BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18); ///< metric prefix for 1.0e-18
53 BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15); ///< metric prefix for 1.0e-15
54 BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12); ///< metric prefix for 1.0e-12
55 BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9); ///< metric prefix for 1.0e-9
56 BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6); ///< metric prefix for 1.0e-6
57 BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3); ///< metric prefix for 1.0e-3
58 BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2); ///< metric prefix for 1.0e-2
59 BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1); ///< metric prefix for 1.0e-1
60 BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1); ///< metric prefix for 1.0e+1
61 BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2); ///< metric prefix for 1.0e+2
62 BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3); ///< metric prefix for 1.0e+3
63 BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6); ///< metric prefix for 1.0e+6
64 BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9); ///< metric prefix for 1.0e+9
65 BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12); ///< metric prefix for 1.0e+12
66 BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15); ///< metric prefix for 1.0e+15
67 BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18); ///< metric prefix for 1.0e+18
68 BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21); ///< metric prefix for 1.0e+21
69 BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24); ///< metric prefix for 1.0e+24 */
70 
71 } // namespace si
72 
73 } // namespace units
74 
75 } // namespace boost
76 
77 #endif // BOOST_UNITS_SI_PREFIXES_HPP
boost
Definition: udp_driver.h:41
boost::units::si::BOOST_UNITS_METRIC_PREFIX
BOOST_UNITS_METRIC_PREFIX(-24, yocto)