Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for pow10SC (0.14 sec)

  1. src/math/all_test.go

    	309,
    	MaxInt32,
    }
    
    var pow10SC = []float64{
    	0,        // pow10(MinInt32)
    	0,        // pow10(-324)
    	1.0e-323, // pow10(-323)
    	1.0e-50,  // pow10(-50)
    	1.0e-22,  // pow10(-22)
    	1.0e-1,   // pow10(-1)
    	1.0e0,    // pow10(0)
    	1.0e1,    // pow10(1)
    	1.0e22,   // pow10(22)
    	1.0e50,   // pow10(50)
    	1.0e100,  // pow10(100)
    	1.0e200,  // pow10(200)
    	1.0e308,  // pow10(308)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 07 17:39:26 UTC 2023
    - 86.8K bytes
    - Viewed (0)
  2. src/math/pow10.go

    var pow10negtab32 = [...]float64{
    	1e-00, 1e-32, 1e-64, 1e-96, 1e-128, 1e-160, 1e-192, 1e-224, 1e-256, 1e-288, 1e-320,
    }
    
    // Pow10 returns 10**n, the base-10 exponential of n.
    //
    // Special cases are:
    //
    //	Pow10(n) =    0 for n < -323
    //	Pow10(n) = +Inf for n > 308
    func Pow10(n int) float64 {
    	if 0 <= n && n <= 308 {
    		return pow10postab32[uint(n)/32] * pow10tab[uint(n)%32]
    	}
    
    	if -323 <= n && n <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  3. test/float_lit.go

    // Test floating-point literal syntax.
    
    package main
    
    var bad bool
    
    func pow10(pow int) float64 {
    	if pow < 0 {
    		return 1 / pow10(-pow)
    	}
    	if pow > 0 {
    		return pow10(pow-1) * 10
    	}
    	return 1
    }
    
    func close(da float64, ia, ib int64, pow int) bool {
    	db := float64(ia) / float64(ib)
    	db *= pow10(pow)
    
    	if da == 0 || db == 0 {
    		if da == 0 && db == 0 {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 12 18:17:49 UTC 2013
    - 4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/resource/scale_int.go

    	if dif < 0 {
    		return unscaled.Int64() * int64(math.Pow10(-dif))
    	}
    
    	// Handle scale down
    	// We have to be careful about the intermediate operations.
    
    	// fast path when unscaled < max.Int64 and exp(10,dif) < max.Int64
    	const log10MaxInt64 = 19
    	if unscaled.Cmp(maxInt64) < 0 && dif < log10MaxInt64 {
    		divide := int64(math.Pow10(dif))
    		result := unscaled.Int64() / divide
    		mod := unscaled.Int64() % divide
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 29 20:41:44 UTC 2017
    - 2.5K bytes
    - Viewed (0)
  5. src/math/example_test.go

    	c := math.Floor(1.51)
    	fmt.Printf("%.1f", c)
    	// Output: 1.0
    }
    
    func ExamplePow() {
    	c := math.Pow(2, 3)
    	fmt.Printf("%.1f", c)
    	// Output: 8.0
    }
    
    func ExamplePow10() {
    	c := math.Pow10(2)
    	fmt.Printf("%.1f", c)
    	// Output: 100.0
    }
    
    func ExampleRound() {
    	p := math.Round(10.5)
    	fmt.Printf("%.1f\n", p)
    
    	n := math.Round(-10.5)
    	fmt.Printf("%.1f\n", n)
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:09:53 UTC 2021
    - 3.7K bytes
    - Viewed (0)
  6. src/compress/lzw/writer_test.go

    	buf, err := os.ReadFile("../testdata/e.txt")
    	if err != nil {
    		b.Fatal(err)
    	}
    	if len(buf) == 0 {
    		b.Fatalf("test file has no data")
    	}
    
    	for e := 4; e <= 6; e++ {
    		n := int(math.Pow10(e))
    		buf0 := buf
    		buf1 := make([]byte, n)
    		for i := 0; i < n; i += len(buf0) {
    			if len(buf0) > n-i {
    				buf0 = buf0[:n-i]
    			}
    			copy(buf1[i:], buf0)
    		}
    		buf0 = nil
    		runtime.GC()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 12 11:00:47 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		{decQuantity(7*1024*1024, 4, BinarySI), (7 * 1024 * 1024) * 10000},
    		{decQuantity(7*1024*1024, 8, BinarySI), (7 * 1024 * 1024) * 100000000},
    		{decQuantity(7*1024*1024, -1, BinarySI), (7 * 1024 * 1024) * math.Pow10(-1)}, // '* Pow10' and '/ float(10)' do not round the same way
    		{decQuantity(7*1024*1024, -8, BinarySI), (7 * 1024 * 1024) / float64(100000000)},
    
    		{decQuantity(1024, 0, DecimalSI), 1024},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  8. src/compress/lzw/reader_test.go

    		for i := 0; i < n; i += len(buf) {
    			if len(buf) > n-i {
    				buf = buf[:n-i]
    			}
    			w.Write(buf)
    		}
    		w.Close()
    		return compressed.Bytes()
    	}
    
    	for e := 4; e <= 6; e++ {
    		n := int(math.Pow10(e))
    		b.Run(fmt.Sprint("1e", e), func(b *testing.B) {
    			b.StopTimer()
    			b.SetBytes(int64(n))
    			buf1 := getInputBuf(buf, n)
    			runtime.GC()
    			b.StartTimer()
    			for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 16:57:58 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

    		exponent = int(-q.d.Dec.Scale())
    	} else {
    		base = float64(q.i.value)
    		exponent = int(q.i.scale)
    	}
    	if exponent == 0 {
    		return base
    	}
    
    	return base * math.Pow10(exponent)
    }
    
    // AsInt64 returns a representation of the current value as an int64 if a fast conversion
    // is possible. If false is returned, callers must use the inf.Dec form of this quantity.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  10. src/internal/trace/traceviewer/static/trace_viewer_full.html

    function lesserWholeNumber(x){if(x===0)return 0;const pow10=(x<0)?-lesserPower(-x):lesserPower(x);return pow10*Math.floor(x/pow10);}
    function greaterWholeNumber(x){if(x===0)return 0;const pow10=(x<0)?-lesserPower(-x):lesserPower(x);return pow10*Math.ceil(x/pow10);}
    function truncate(value,digits){const pow10=Math.pow(10,digits);return Math.round(value*pow10)/pow10;}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (1)
Back to top