/** \file \brief Defines miscellaneous MathUtils static variables. \who \kpr */ #include "mutils/Exception.h" #include "mutils/util.h" namespace mutils { // Static variables declared in . bool Exception::errors = false; // Static variables declared in . int Log::level = Log::WARN; FILE *Log::stream = stderr; std::string Log::file = "!"; // Namespace variables declared in . std::string::size_type npos = std::string::npos; const std::string nullStr(1, 0); /** Prefix | Name | Value | | Prefix | Name | Value :----: | :--: | :---- | | :----: | :--: | :---- Y | yotta | 1024 | | y | yocto | 10-24 Z | zetta | 1021 | | z | zepto | 10-21 E | exa | 1018 | | a | atto | 10-18 P | peta | 1015 | | f | femto | 10-15 T | tera | 1012 | | p | pico | 10-12 G | giga | 109 | | n | nano | 10-9 M | mega | 106 | | u | micro | 10-6 k | kilo | 103 | | m | milli | 10-3 h | hetco | 102 | | c | centi | 10-2 D | deka | 101 | | d | deci | 10-1 \see siScale(), siHasPrefix() */ const std::string siPrefixes("YZEPTGMkhDdcmunpfazy"); const std::map siScaleMap{ {'Y', "1e24"}, {'Z', "1e21"}, {'E', "1e18"}, {'P', "1e15"}, {'T', "1e12"}, {'G', "1e9"}, {'M', "1e6"}, {'k', "1e3"}, {'h', "1e2"}, {'D', "1e1"}, {'d', "1e-1"}, {'c', "1e-2"}, {'m', "1e-3"}, {'u', "1e-6"}, {'n', "1e-9"}, {'p', "1e-12"}, {'f', "1e-15"}, {'a', "1e-18"}, {'z', "1e-21"}, {'y', "1e-24"} }; } // namespace mutils