Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 107 for powx (0.04 sec)

  1. src/crypto/aes/aes_test.go

    package aes
    
    import (
    	"testing"
    )
    
    // See const.go for overview of math here.
    
    // Test that powx is initialized correctly.
    // (Can adapt this code to generate it too.)
    func TestPowx(t *testing.T) {
    	p := 1
    	for i := 0; i < len(powx); i++ {
    		if powx[i] != byte(p) {
    			t.Errorf("powx[%d] = %#x, want %#x", i, powx[i], p)
    		}
    		p <<= 1
    		if p&0x100 != 0 {
    			p ^= poly
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 14:58:19 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. src/crypto/aes/block.go

    // Their rcon[i] is our powx[i-1] << 24.
    func expandKeyGo(key []byte, enc, dec []uint32) {
    	// Encryption key setup.
    	var i int
    	nk := len(key) / 4
    	for i = 0; i < nk; i++ {
    		enc[i] = byteorder.BeUint32(key[4*i:])
    	}
    	for ; i < len(enc); i++ {
    		t := enc[i-1]
    		if i%nk == 0 {
    			t = subw(rotw(t)) ^ (uint32(powx[i/nk-1]) << 24)
    		} else if nk > 6 && i%nk == 4 {
    			t = subw(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. src/crypto/aes/const.go

    // Reducing mod poly corresponds to binary xor with poly every
    // time a 0x100 bit appears.
    const poly = 1<<8 | 1<<4 | 1<<3 | 1<<1 | 1<<0 // x⁸ + x⁴ + x³ + x + 1
    
    // Powers of x mod poly in GF(2).
    var powx = [16]byte{
    	0x01,
    	0x02,
    	0x04,
    	0x08,
    	0x10,
    	0x20,
    	0x40,
    	0x80,
    	0x1b,
    	0x36,
    	0x6c,
    	0xd8,
    	0xab,
    	0x4d,
    	0x9a,
    	0x2f,
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 01 21:52:00 UTC 2018
    - 29.3K bytes
    - Viewed (0)
  4. src/math/pow.go

    //	Pow(±0, y) = +0 for finite y > 0 and not an odd integer
    //	Pow(-1, ±Inf) = 1
    //	Pow(x, +Inf) = +Inf for |x| > 1
    //	Pow(x, -Inf) = +0 for |x| > 1
    //	Pow(x, +Inf) = +0 for |x| < 1
    //	Pow(x, -Inf) = +Inf for |x| < 1
    //	Pow(+Inf, y) = +Inf for y > 0
    //	Pow(+Inf, y) = +0 for y < 0
    //	Pow(-Inf, y) = Pow(-0, -y)
    //	Pow(x, y) = NaN for finite x < 0 and finite non-integer y
    func Pow(x, y float64) float64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 19:10:58 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. src/math/cmplx/pow.go

    //    IEEE      -10,+10     30000       9.4e-15     1.5e-15
    
    // Pow returns x**y, the base-x exponential of y.
    // For generalized compatibility with [math.Pow]:
    //
    //	Pow(0, ±0) returns 1+0i
    //	Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i.
    func Pow(x, y complex128) complex128 {
    	if x == 0 { // Guaranteed also true for x == -0.
    		if IsNaN(y) {
    			return NaN()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. src/strconv/fp_test.go

    		}
    		v := float64(n)
    		// We expect that v*pow2(e) fits in a float64,
    		// but pow2(e) by itself may not. Be careful.
    		if e <= -1000 {
    			v *= pow2(-1000)
    			e += 1000
    			for e < 0 {
    				v /= 2
    				e++
    			}
    			return v, true
    		}
    		if e >= 1000 {
    			v *= pow2(1000)
    			e -= 1000
    			for e > 0 {
    				v *= 2
    				e--
    			}
    			return v, true
    		}
    		return v * pow2(e), true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  7. src/math/pow_s390x.s

    //      Pow(±0, y) = ±0 for y an odd integer > 0
    //      Pow(±0, y) = +0 for finite y > 0 and not an odd integer
    //      Pow(-1, ±Inf) = 1
    //      Pow(x, +Inf) = +Inf for |x| > 1
    //      Pow(x, -Inf) = +0 for |x| > 1
    //      Pow(x, +Inf) = +0 for |x| < 1
    //      Pow(x, -Inf) = +Inf for |x| < 1
    //      Pow(+Inf, y) = +Inf for y > 0
    //      Pow(+Inf, y) = +0 for y < 0
    //      Pow(-Inf, y) = Pow(-0, -y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java

            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      public void testRoundToDouble_negativeTwoToThe54MinusOne() {
        new RoundToDoubleTester(BigDecimal.valueOf((-1L << 54) - 1))
            .setExpectation(-Math.pow(2, 54), DOWN, CEILING, HALF_DOWN, HALF_UP, HALF_EVEN)
            .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP)
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  9. src/internal/bytealg/bytealg.go

    	hash := uint32(0)
    	for i := 0; i < len(sep); i++ {
    		hash = hash*PrimeRK + uint32(sep[i])
    	}
    	var pow, sq uint32 = 1, PrimeRK
    	for i := len(sep); i > 0; i >>= 1 {
    		if i&1 != 0 {
    			pow *= sq
    		}
    		sq *= sq
    	}
    	return hash, pow
    }
    
    // HashStrRev returns the hash of the reverse of sep and the
    // appropriate multiplicative factor for use in Rabin-Karp algorithm.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 19 19:51:15 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          BigInteger x2 = x.pow(2);
          // x^2 < 10^(2 * result + 1), or else we would have rounded up
          assertTrue(TEN.pow(2 * result + 1).compareTo(x2) > 0);
          // x^2 >= 10^(2 * result - 1), or else we would have rounded down
          assertTrue(result == 0 || TEN.pow(2 * result - 1).compareTo(x2) <= 0);
        }
      }
    
      @GwtIncompatible // TODO
      public void testLog10HalfDown() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 17:58:33 UTC 2024
    - 27.8K bytes
    - Viewed (0)
Back to top