MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / digits

Function digits

src/common/DecFloat.cpp:136–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134const CDecimal128 c1(1);
135
136unsigned digits(const unsigned pMax, unsigned char* const coeff, int& exp)
137{
138 for (unsigned i = 0; i < pMax; ++i)
139 {
140 if (coeff[i])
141 {
142 if (i)
143 {
144 memmove(coeff, &coeff[i], pMax - i);
145 memset(&coeff[pMax - i], 0, i);
146 exp -= i;
147 }
148
149 i = pMax - i;
150
151 while (!coeff[i - 1])
152 {
153 fb_assert(i > 0);
154 --i;
155 }
156
157 return i;
158 }
159 }
160
161 return 0;
162}
163
164// offsets down from MAX_SLONG
165const ULONG OFF_inf = 3;

Callers 2

makeFunction · 0.70
makeBcdKeyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected