Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for Digits (0.14 sec)

  1. src/strconv/decimal.go

    package strconv
    
    type decimal struct {
    	d     [800]byte // digits, big-endian representation
    	nd    int       // number of digits used
    	dp    int       // decimal point
    	neg   bool      // negative flag
    	trunc bool      // discarded nonzero digits beyond d[:nd]
    }
    
    func (a *decimal) String() string {
    	n := 10 + a.nd
    	if a.dp > 0 {
    		n += a.dp
    	}
    	if a.dp < 0 {
    		n += -a.dp
    	}
    
    	buf := make([]byte, n)
    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/math/big/natconv.go

    //	prefix    = "0" [ "b" | "B" | "o" | "O" | "x" | "X" ] .
    //	mantissa  = digits "." [ digits ] | digits | "." digits .
    //	pmantissa = [ "_" ] digits "." [ digits ] | [ "_" ] digits | "." digits .
    //	digits    = digit { [ "_" ] digit } .
    //	digit     = "0" ... "9" | "a" ... "z" | "A" ... "Z" .
    //
    // Unless fracOk is set, the base argument must be 0 or a value between
    // 2 and MaxBase. If fracOk is set, the base argument must be one of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 14.6K bytes
    - Viewed (0)
  3. test/fixedbugs/issue30722.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that we only get one error per invalid integer literal.
    
    package p
    
    const (
    	_ = 1_       // ERROR "'_' must separate successive digits"
    	_ = 0b       // ERROR "binary literal has no digits|invalid numeric literal"
    	_ = 0o       // ERROR "octal literal has no digits|invalid numeric literal"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 15 02:35:59 UTC 2020
    - 623 bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/mod/module/pseudo.go

    	// Scan right to left turning 9s to 0s until you find a digit to increment.
    	digits := []byte(decimal)
    	i := len(digits) - 1
    	for ; i >= 0 && digits[i] == '9'; i-- {
    		digits[i] = '0'
    	}
    	if i >= 0 {
    		digits[i]++
    	} else {
    		// digits is all zeros
    		digits[0] = '1'
    		digits = append(digits, '0')
    	}
    	return string(digits)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  5. src/fmt/format.go

    				}
    				// Count significant digits after the first non-zero digit.
    				if sawNonzeroDigit {
    					digits--
    				}
    			}
    		}
    		if !hasDecimalPoint {
    			// Leading digit 0 should contribute once to digits.
    			if len(num) == 2 && num[1] == '0' {
    				digits--
    			}
    			num = append(num, '.')
    		}
    		for digits > 0 {
    			num = append(num, '0')
    			digits--
    		}
    		num = append(num, tail...)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  6. src/math/big/decimal.go

    // with the most-significant mantissa digit at index 0. For the zero decimal, the
    // mantissa length and exponent are 0.
    // The zero value for decimal represents a ready-to-use 0.0.
    type decimal struct {
    	mant []byte // mantissa ASCII digits, big-endian
    	exp  int    // exponent
    }
    
    // at returns the i'th mantissa digit, starting with the most significant digit at 0.
    func (d *decimal) at(i int) byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 29 22:45:29 UTC 2020
    - 6.6K bytes
    - Viewed (0)
  7. src/strconv/itoa.go

    // as the second result value.
    func formatBits(dst []byte, u uint64, base int, neg, append_ bool) (d []byte, s string) {
    	if base < 2 || base > len(digits) {
    		panic("strconv: illegal AppendInt/FormatInt base")
    	}
    	// 2 <= base && base <= len(digits)
    
    	var a [64 + 1]byte // +1 for sign of 64bit value in base 2
    	i := len(a)
    
    	if neg {
    		u = -u
    	}
    
    	// convert bits
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. src/math/big/natdiv.go

    The first step divides n digits by n digits to ensure that it produces only a
    single digit.
    
    Each subsequent step appends the next digit from u to the remainder and divides
    those n+1 digits by the n digits of v, producing another quotient digit and a
    new n-digit remainder.
    
    Subsequent steps divide n+1 digits by n digits, an operation that in general
    might produce two digits. However, as used in the algorithm, that division is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 17:02:38 UTC 2024
    - 34.4K bytes
    - Viewed (0)
  9. src/internal/gover/gover.go

    	// Scan right to left turning 0s to 9s until you find a digit to decrement.
    	digits := []byte(decimal)
    	i := len(digits) - 1
    	for ; i >= 0 && digits[i] == '0'; i-- {
    		digits[i] = '9'
    	}
    	if i < 0 {
    		// decimal is all zeros
    		return ""
    	}
    	if i == 0 && digits[i] == '1' && len(digits) > 1 {
    		digits = digits[1:]
    	} else {
    		digits[i]--
    	}
    	return string(digits)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  10. common-protos/k8s.io/apimachinery/pkg/api/resource/generated.proto

    //
    // ```
    // <quantity>        ::= <signedNumber><suffix>
    //
    // 	(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
    //
    // <digit>           ::= 0 | 1 | ... | 9
    // <digits>          ::= <digit> | <digit><digits>
    // <number>          ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
    // <sign>            ::= "+" | "-"
    // <signedNumber>    ::= <number> | <sign><number>
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top