dconv 2.0
C++14 library for printing and parsing floating point numbers
Loading...
Searching...
No Matches
digits.hpp File Reference
#include <cstdint>
Include dependency graph for digits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  dconv
 
namespace  dconv::details
 

Functions

int dconv::details::countTrailingZeros (uint32_t group) noexcept
 count the trailing zeros of a four digits group.
 
int dconv::details::countDigits (uint64_t digits) noexcept
 count the digits of a decimal significand.
 
int dconv::details::writeDigits (char *buffer, uint64_t digits, int length) noexcept
 write the digits of a decimal significand.
 

Variables

constexpr uint32_t dconv::details::pow10 [] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}
 powers of ten that fit in 32 bits.
 
constexpr char dconv::details::digitPairs []
 two digits decimal representations of 0 to 99.
 
constexpr uint8_t dconv::details::pairZeros []
 trailing zeros of the two digits decimal representations of 0 to 99.