Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestNLZ (0.09 sec)

  1. src/math/big/nat_test.go

    	for _, n := range mulBenchSizes {
    		if isRaceBuilder && n > 1e3 {
    			continue
    		}
    		b.Run(fmt.Sprintf("%d", n), func(b *testing.B) {
    			benchmarkNatMul(b, n)
    		})
    	}
    }
    
    func TestNLZ(t *testing.T) {
    	var x Word = _B >> 1
    	for i := 0; i <= _W; i++ {
    		if int(nlz(x)) != i {
    			t.Errorf("failed at %x: got %d want %d", x, nlz(x), i)
    		}
    		x >>= 1
    	}
    }
    
    type shiftTest struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 15:29:36 UTC 2024
    - 26.2K bytes
    - Viewed (0)
Back to top