summaryrefslogtreecommitdiff
path: root/src/mongo/platform/decimal128.cpp
AgeCommit message (Collapse)Author
2024-06-29SERVER-91223 NumberDecimal $log should use ln(input)/ln(base) for generic ↵Matthew Boros
base value (#23865) GitOrigin-RevId: 6fed8cf3abd121fff0ba63f5259009ea71262b77
2023-11-14SERVER-82604 implement StringData with a std::string_view memberBilly Donahue
2023-10-06SERVER-78480 Eliminate redundant copies in Decimal128 string parsingPatrick Freed
2023-09-23SERVER-81059 bulk-revert of include of boost iif.hppBilly Donahue
2023-07-01SERVER-77049 SERVER-77050 IWYU automated changes up to 1.0Daniel Moody
2023-02-18SERVER-73892 Disallow includes to start with third_partyDaniel Moody
2022-11-11SERVER-69668 FLE2 range float precision: update OSTType algorithmMark Benvenuto
2022-04-16SERVER-63439 Add ColumnStore encoder for SBE valuesJustin Seyster
Note: unit tests are in a follow-on commit
2021-04-29SERVER-56326 Add a round() method to the Decimal128 classDrew Paroski
2020-10-13SERVER-50917 util/ctype.h to replace <cctype> & <ctype.h> funcsBilly Donahue
2019-10-02SERVER-43175 platform/endian.h refreshBilly Donahue
This is a very low-level bare metal header, and should ideally #include only std headers. - Remove Decimal128 dependency from endian.h. Decimal128 doesn't need endian conversions, and makes endian.h transitively include several higher-level mongo specifics. Current conversions are underspecified and mathematically incorrect or at least ambiguous. They swap the order within each of the low64 and high64 fields, but don't swap them with each other. This is behavior needed only by one spot in db/pipeline/value.cpp to deserialize NumberDecimal, so we can just inline the behavior there and remove it from endian.h. - Remove MONGO_CONFIG_BYTE_ORDER from config.h. The running compiler holds the ultimate truth on what the target endianness is (available via _BYTE_ORDER_). We should not read it from a config header. The names exported into C++ code for the endian possibilities can be changed to line up with those in C++20's std::endian {big,little,native} enum. This eliminates the Scons<=>C++ bridge protocol of "1234" and "4321" magic numbers. Scons will talk to the compiler, not directly to the code. - Use enum expressions (including if constexpr) rather than #if for branching on endianness. This makes bit-rot of unexecuted paths less likely, and is just cleaner C++. - Remove bswap_slow variants. All supported compilers have builtin bswap operations. Can reduce to a simple MSVC vs GCC branching. All compilers have a builtin, so remove the bswap_slow" implementation. - Don't need all the push_macro / pop_macro stuff, or really any macros at all. Just rely on inline C++ functions. These optimize to the same thing. - Don't need ByteOrderConverter or IntegralTypeMap traits either. Simpler metaprogramming based only on sizeof will work fine. All in all we can remove about 400 lines of old code here and shave some low-level edges off of the dependency graph. - benchmark
2019-06-27SERVER-24374 Make Decimal128 integer ctors constexprBilly Donahue
- avoid signed overflow and integer promotion - no std::signbit, avoid cast warnings in abs - restore libbase->intelfp dependency back to public LIDEP - volatile test
2019-06-27SERVER-7143 replace standard library number parsing with custom NumberParserNathan Brown
2019-06-16Revert "SERVER-24374 Make Decimal128 integer ctors constexpr"Billy Donahue
This reverts commit e039271638d6dba34e5b64834e3f12e87aeb6455.
2019-06-16SERVER-24374 Make Decimal128 integer ctors constexprBilly Donahue
reverts fab9fde6ba which reverted 668100df79
2019-06-13Revert "SERVER-24374 Make Decimal128 integer ctors constexpr"Blake Oler
This reverts commit 668100df7982fd1ae3777fcf069de13253a05133.
2019-06-13SERVER-24374 Make Decimal128 integer ctors constexprA. Jesse Jiryu Davis
2019-06-06SERVER-23077 Support Decimal128 with representAs().A. Jesse Jiryu Davis
2019-04-11SERVER-40476 merge contents of utils/stringutils into utils/str.Billy Donahue
2019-02-20SERVER-39487 Decimal128::squareRoot() returns result for ↵James Wahlin
Decimal128::exponential()
2019-02-14SERVER-15926: Implement $round function and allow a precision argument for ↵Patrick Meredith
$trunc Closes #1297 Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
2019-02-13SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue
Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
2018-12-22SERVER-32930 Add trigonometric expressions to aggregationPatrick Meredith
Closes #1287 Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
2018-10-22SERVER-37651 Update header files with new licenseRamon Fernandez
2017-10-20SERVER-17414 Enable Warnings As Errors on Windows, and disable/fix warningsMark Benvenuto
2016-09-29SERVER-26193 Fix incorrect rounding in double to decimal conversionGeert Bosch
2016-09-09SERVER-22973 use mongo macros for static assertMatt Cotter
2016-06-08SERVER-24276 Add decimal test suites from driver specsVincent Do
2016-06-06SERVER-19735: Add new Decimal128 operations needed by aggregationGeert Bosch
2016-05-31SERVER-23263 - Make Decimal128 toString() conform to new specVincent Do
2016-05-28SERVER-23971 Clang-Format codeMark Benvenuto
2016-05-27SERVER-23703 Make NumberDecimal accepts only valid stringsVincent Do
2016-05-24SERVER-23702 Fix server crashing on invalid decimal toString invariant checkVincent Do
2016-04-22SERVER-19703 Add KeyString support for NumberDecimalGeert Bosch
2016-04-12SERVER-19703 Add a few new Decimal128 methods/constructors for usage by ↵Geert Bosch
KeyString Make conversions explicit and allow control over precision in conversion from double. Update uses to the new interface.
2016-02-08SERVER-10568 SafeNum should be written in terms of explicitly sized typesWaley
2015-08-07SERVER-19623 Add C++ wrapper for Decimal128 typeRaymond Jacobson