MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / nonzero

Method nonzero

Source/external/fast_float.h:1959–1967  ·  view source on GitHub ↗

check if any limbs are non-zero after the given index. this needs to be done in reverse order, since the index is relative to the most significant limbs.

Source from the content-addressed store, hash-verified

1957 // this needs to be done in reverse order, since the index
1958 // is relative to the most significant limbs.
1959 FASTFLOAT_CONSTEXPR14 bool nonzero(size_t index) const noexcept {
1960 while (index < len()) {
1961 if (rindex(index) != 0) {
1962 return true;
1963 }
1964 index++;
1965 }
1966 return false;
1967 }
1968 // normalize the big integer, so most-significant zero limbs are removed.
1969 FASTFLOAT_CONSTEXPR14 void normalize() noexcept {
1970 while (len() > 0 && rindex(0) == 0) {

Callers 1

hi64Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected