- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for powx (0.05 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
src/cmd/cgo/internal/test/issue8756/issue8756.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package issue8756 /* #cgo !darwin LDFLAGS: -lm #include <math.h> */ import "C" func Pow() { C.pow(1, 2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 269 bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
if (d >= 1.0) { assertTrue(log2 >= 0); assertTrue(StrictMath.pow(2.0, log2) <= d); assertTrue(StrictMath.pow(2.0, log2 + 1) > d); } else { assertTrue(log2 <= 0); assertTrue(StrictMath.pow(2.0, log2) >= d); assertTrue(StrictMath.pow(2.0, log2 - 1) < d); } } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 28.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} } } @GwtIncompatible // 2147483646^2 expected=4 public void testPow() { for (int i : ALL_INTEGER_CANDIDATES) { for (int pow : EXPONENTS) { assertEquals(i + "^" + pow, BigInteger.valueOf(i).pow(pow).intValue(), IntMath.pow(i, pow)); } } } @AndroidIncompatible // slow public void testDivNonZero() { for (int p : NONZERO_INTEGER_CANDIDATES) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 24.5K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/arith_test.go
} if want, got := int8(i)%int8(pow2[2]) == 0, divisible_int8_2to2(int8(i)); got != want { t.Errorf("divisible_int8_2to2(%d) = %v want %v", i, got, want) } if want, got := int8(i)%int8(pow2[3]) == 0, divisible_int8_2to3(int8(i)); got != want { t.Errorf("divisible_int8_2to3(%d) = %v want %v", i, got, want) } if want, got := int8(i)%int8(pow2[4]) == 0, divisible_int8_2to4(int8(i)); got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 01 19:30:59 UTC 2023 - 43.5K bytes - Viewed (0)