Lines Matching refs:nd
122 prec = max(digs.nd-1, 0)
124 prec = max(digs.nd-digs.dp, 0)
126 prec = digs.nd
163 digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
167 prec = digs.nd - 1
169 prec = max(digs.nd-digs.dp, 0)
171 prec = digs.nd
186 digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
200 if eprec > digs.nd && digs.nd >= digs.dp {
201 eprec = digs.nd
211 if prec > digs.nd {
212 prec = digs.nd
217 prec = digs.nd
231 d.nd = 0
242 // The closest shorter number is at least 10^(dp-nd) away.
246 // So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits),
247 // or equivalently log2(10)*(dp-nd) > exp-mantbits.
248 // It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32).
250 if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) {
288 for i := 0; i < d.nd; i++ {
290 if i < lower.nd {
296 if i < upper.nd {
304 okdown := l != m || (inclusive && l == m && i+1 == lower.nd)
308 okup := m != u && (inclusive || m+1 < u || i+1 < upper.nd)
328 nd, dp int
341 if d.nd != 0 {
350 m := min(d.nd, prec+1)
363 if d.nd == 0 { // special case: 0 has exponent 0
396 m := min(d.nd, d.dp)
410 if j := d.dp + i; 0 <= j && j < d.nd {