Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for RatString (0.17 sec)

  1. src/math/big/rat_test.go

    		t.Errorf("got x = %s, want 0/1", s)
    	}
    
    	if s := x.RatString(); s != "0" {
    		t.Errorf("got x = %s, want 0", s)
    	}
    
    	z.Add(&x, &y)
    	if s := z.RatString(); s != "0" {
    		t.Errorf("got x+y = %s, want 0", s)
    	}
    
    	z.Sub(&x, &y)
    	if s := z.RatString(); s != "0" {
    		t.Errorf("got x-y = %s, want 0", s)
    	}
    
    	z.Mul(&x, &y)
    	if s := z.RatString(); s != "0" {
    		t.Errorf("got x*y = %s, want 0", s)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 00:15:59 UTC 2022
    - 18.9K bytes
    - Viewed (0)
  2. src/math/big/ratconv_test.go

    		x, ok := new(Rat).SetString(test.in)
    
    		if ok {
    			if !test.ok {
    				t.Errorf("#%d SetString(%q) expected failure", i, test.in)
    			} else if x.RatString() != test.out {
    				t.Errorf("#%d SetString(%q) got %s want %s", i, test.in, x.RatString(), test.out)
    			}
    		} else {
    			if test.ok {
    				t.Errorf("#%d SetString(%q) expected success", i, test.in)
    			} else if x != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  3. src/math/big/ratconv.go

    	buf = append(buf, '/')
    	if len(x.b.abs) != 0 {
    		buf = x.b.Append(buf, 10)
    	} else {
    		buf = append(buf, '1')
    	}
    	return buf
    }
    
    // RatString returns a string representation of x in the form "a/b" if b != 1,
    // and in the form "a" if b == 1.
    func (x *Rat) RatString() string {
    	if x.IsInt() {
    		return x.a.String()
    	}
    	return x.String()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Rat).IsInt", Method, 0},
    		{"(*Rat).MarshalText", Method, 3},
    		{"(*Rat).Mul", Method, 0},
    		{"(*Rat).Neg", Method, 0},
    		{"(*Rat).Num", Method, 0},
    		{"(*Rat).Quo", Method, 0},
    		{"(*Rat).RatString", Method, 0},
    		{"(*Rat).Scan", Method, 0},
    		{"(*Rat).Set", Method, 0},
    		{"(*Rat).SetFloat64", Method, 1},
    		{"(*Rat).SetFrac", Method, 0},
    		{"(*Rat).SetFrac64", Method, 0},
    		{"(*Rat).SetInt", Method, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  5. api/go1.txt

    pkg math/big, method (*Rat) Mul(*Rat, *Rat) *Rat
    pkg math/big, method (*Rat) Neg(*Rat) *Rat
    pkg math/big, method (*Rat) Num() *Int
    pkg math/big, method (*Rat) Quo(*Rat, *Rat) *Rat
    pkg math/big, method (*Rat) RatString() string
    pkg math/big, method (*Rat) Scan(fmt.ScanState, int32) error
    pkg math/big, method (*Rat) Set(*Rat) *Rat
    pkg math/big, method (*Rat) SetFrac(*Int, *Int) *Rat
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top