Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for Nd (0.02 sec)

  1. src/strconv/decimal.go

    	return a.d[nd] >= '5'
    }
    
    // Round a to nd digits (or fewer).
    // If nd is zero, it means we're rounding
    // just to the left of the digits, as in
    // 0.09 -> 0.1.
    func (a *decimal) Round(nd int) {
    	if nd < 0 || nd >= a.nd {
    		return
    	}
    	if shouldRoundUp(a, nd) {
    		a.RoundUp(nd)
    	} else {
    		a.RoundDown(nd)
    	}
    }
    
    // Round a down to nd digits (or fewer).
    func (a *decimal) RoundDown(nd int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jul 15 19:41:25 UTC 2017
    - 11K bytes
    - Viewed (0)
  2. src/strconv/ftoa.go

    	shortest := prec < 0
    	if shortest {
    		roundShortest(d, mant, exp, flt)
    		digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
    		// Precision for shortest representation mode.
    		switch fmt {
    		case 'e', 'E':
    			prec = digs.nd - 1
    		case 'f':
    			prec = max(digs.nd-digs.dp, 0)
    		case 'g', 'G':
    			prec = digs.nd
    		}
    	} else {
    		// Round appropriately.
    		switch fmt {
    		case 'e', 'E':
    			d.Round(prec + 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/strconv/ftoaryu.go

    		d.dp += 9
    	} else {
    		d.nd = 0
    		// emit high part
    		n := uint(9)
    		for v := chi; v > 0; {
    			v1, v2 := v/10, v%10
    			v = v1
    			n--
    			d.d[n] = byte(v2 + '0')
    		}
    		d.d = d.d[n:]
    		d.nd = int(9 - n)
    		// emit low part
    		ryuDigits32(d, llo, clo, ulo,
    			c0, cup, d.nd+8)
    	}
    	// trim trailing zeros
    	for d.nd > 0 && d.d[d.nd-1] == '0' {
    		d.nd--
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 00:28:56 UTC 2022
    - 15.7K bytes
    - Viewed (0)
  4. src/strconv/atof.go

    		case s[i] == '.':
    			if sawdot {
    				return
    			}
    			sawdot = true
    			b.dp = b.nd
    			continue
    
    		case '0' <= s[i] && s[i] <= '9':
    			sawdigits = true
    			if s[i] == '0' && b.nd == 0 { // ignore leading zeros
    				b.dp--
    				continue
    			}
    			if b.nd < len(b.d) {
    				b.d[b.nd] = s[i]
    				b.nd++
    			} else if s[i] != '0' {
    				b.trunc = true
    			}
    			continue
    		}
    		break
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 06 18:50:50 UTC 2022
    - 15.9K bytes
    - Viewed (0)
  5. src/regexp/testdata/re2-search.txt

    strings
    ""
    "abc123²³¼½¾₀₉"
    regexps
    "\\p{Nd}+"
    -;-;-;-
    -;3-6;-;3-6
    "^(?:\\p{Nd}+)$"
    -;-;-;-
    -;-;-;-
    "^(?:\\p{Nd}+)"
    -;-;-;-
    -;-;-;-
    "(?:\\p{Nd}+)$"
    -;-;-;-
    -;-;-;-
    strings
    ""
    "abc123²³¼½¾₀₉"
    regexps
    "\\p{^Nd}+"
    -;-;-;-
    -;0-3;-;0-3
    "^(?:\\p{^Nd}+)$"
    -;-;-;-
    -;-;-;-
    "^(?:\\p{^Nd}+)"
    -;-;-;-
    -;0-3;-;0-3
    "(?:\\p{^Nd}+)$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 13 14:52:20 UTC 2021
    - 42.4K bytes
    - Viewed (0)
  6. src/runtime/profbuf.go

    		return false
    	}
    
    	// room for data?
    	nd := countSub(br.dataCount(), bw.dataCount()) + len(b.data)
    	want := 2 + int(b.hdrsize) + nstk
    	i := int(bw.dataCount() % uint32(len(b.data)))
    	if i+want > len(b.data) {
    		// Can't fit in trailing fragment of slice.
    		// Skip over that and start over at beginning of slice.
    		nd -= len(b.data) - i
    	}
    	return nd >= want
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/test/testflag.go

    				packageNames = []string{}
    			}
    
    			if nd.RawArg == "-args" || nd.RawArg == "--args" {
    				// -args or --args signals that everything that follows
    				// should be passed to the test.
    				explicitArgs = append(explicitArgs, remainingArgs...)
    				break
    			}
    
    			if firstUnknownFlag == "" {
    				firstUnknownFlag = nd.RawArg
    			}
    
    			explicitArgs = append(explicitArgs, nd.RawArg)
    			args = remainingArgs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 19:25:24 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/inline/inlheur/funcprops_test.go

    		}
    
    		// Consume all existing comments.
    		if strings.HasPrefix(line, "//") {
    			continue
    		}
    		ues.newgolines = append(ues.newgolines, line)
    	}
    
    	if didx != nd {
    		t.Logf("didx=%d wanted %d", didx, nd)
    	}
    
    	// Open new Go file and write contents.
    	of, err := os.OpenFile(newgopath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
    	if err != nil {
    		t.Fatalf("opening %s: %v", newgopath, err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 15K bytes
    - Viewed (0)
  9. src/encoding/pem/pem_test.go

    	{"abc", "abc", ""},
    	{"abc\r", "abc\r", ""},
    	{"abc\n", "abc", ""},
    	{"abc\r\n", "abc", ""},
    	{"abc\nd", "abc", "d"},
    	{"abc\r\nd", "abc", "d"},
    	{"\nabc", "", "abc"},
    	{"\r\nabc", "", "abc"},
    	{"abc\t \nd", "abc", "d"},
    	{"\t abc\nd", "\t abc", "d"},
    	{"abc\n\t d", "abc", "\t d"},
    	{"abc\nd\t ", "abc", "d\t "},
    }
    
    func TestGetLine(t *testing.T) {
    	for i, test := range getLineTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 22:56:00 UTC 2022
    - 23.5K bytes
    - Viewed (0)
  10. src/go/doc/example.go

    					ds = append(ds, d)
    				} else {
    					// Synthesize a GenDecl with just the Specs we need.
    					nd := *d // copy the GenDecl
    					nd.Specs = specs
    					if len(specs) == 1 {
    						// Remove grouping parens if there is only one spec.
    						nd.Lparen = 0
    					}
    					ds = append(ds, &nd)
    				}
    			}
    		}
    	}
    	return ds, unresolved
    }
    
    func hasIota(s ast.Spec) bool {
    	has := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top