Home
last modified time | relevance | path

Searched refs:log2 (Results 1 – 25 of 198) sorted by relevance

12345678

/external/v8/test/mjsunit/es6/
Dmath-log2-log10.js30 [Math.log10, Math.log2].forEach( function(fun) {
47 if (i != -0.5 && i != 0.5) assertEquals(i, Math.log2(Math.pow(2, i)));
61 assertEquals(n, Math.log2(x));
67 assertEquals(n, Math.log2(x));
74 assertEquals(n, Math.log2(x));
79 assertEquals(0.5000000000000001, Math.log2(Math.SQRT2));
82 assertEquals(-0.4999999999999999, Math.log2(Math.SQRT1_2));
84 assertEquals(3.321928094887362, Math.log2(10));
85 assertEquals(6.643856189774724, Math.log2(100));
90 var y = Math.abs(Math.log2(x) + Math.log2(1/x));
[all …]
/external/guava/guava-tests/test/com/google/common/math/
DDoubleMathTest.java320 int log2 = DoubleMath.log2(d, FLOOR); in testRoundLog2Floor() local
321 assertTrue(StrictMath.pow(2.0, log2) <= d); in testRoundLog2Floor()
322 assertTrue(StrictMath.pow(2.0, log2 + 1) > d); in testRoundLog2Floor()
329 int log2 = DoubleMath.log2(d, CEILING); in testRoundLog2Ceiling() local
330 assertTrue(StrictMath.pow(2.0, log2) >= d); in testRoundLog2Ceiling()
331 double z = StrictMath.pow(2.0, log2 - 1); in testRoundLog2Ceiling()
339 int log2 = DoubleMath.log2(d, DOWN);
341 assertTrue(log2 >= 0);
342 assertTrue(StrictMath.pow(2.0, log2) <= d);
343 assertTrue(StrictMath.pow(2.0, log2 + 1) > d);
[all …]
DBigIntegerMathTest.java72 BigIntegerMath.log2(ZERO, mode); in testLog2ZeroAlwaysThrows()
81 BigIntegerMath.log2(BigInteger.valueOf(-1), mode); in testLog2NegativeAlwaysThrows()
90 int result = BigIntegerMath.log2(x, mode); in testLog2Floor()
100 int result = BigIntegerMath.log2(x, mode); in testLog2Ceiling()
113 assertEquals(x, ZERO.setBit(BigIntegerMath.log2(x, UNNECESSARY))); in testLog2Exact()
123 int result = BigIntegerMath.log2(x, HALF_UP); in testLog2HalfUp()
134 int result = BigIntegerMath.log2(x, HALF_DOWN); in testLog2HalfDown()
146 int halfEven = BigIntegerMath.log2(x, HALF_EVEN); in testLog2HalfEven()
149 boolean floorWasEven = (BigIntegerMath.log2(x, FLOOR) & 1) == 0; in testLog2HalfEven()
150 assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog2HalfEven()
/external/valgrind/memcheck/tests/
Dunit_libcbase.c439 CHECK( -1 == VG_(log2)(0) ); in test_log2()
440 CHECK( 0 == VG_(log2)(1) ); in test_log2()
441 CHECK( 1 == VG_(log2)(2) ); in test_log2()
442 CHECK( -1 == VG_(log2)(3) ); in test_log2()
443 CHECK( 2 == VG_(log2)(4) ); in test_log2()
444 CHECK( -1 == VG_(log2)(5) ); in test_log2()
445 CHECK( -1 == VG_(log2)(6) ); in test_log2()
446 CHECK( -1 == VG_(log2)(7) ); in test_log2()
447 CHECK( 3 == VG_(log2)(8) ); in test_log2()
449 CHECK( -1 == VG_(log2)( 15) ); in test_log2()
[all …]
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DBigIntegerMathTest.java60 BigIntegerMath.log2(ZERO, mode); in testLog2ZeroAlwaysThrows()
69 BigIntegerMath.log2(BigInteger.valueOf(-1), mode); in testLog2NegativeAlwaysThrows()
78 int result = BigIntegerMath.log2(x, mode); in testLog2Floor()
88 int result = BigIntegerMath.log2(x, mode); in testLog2Ceiling()
101 assertEquals(x, ZERO.setBit(BigIntegerMath.log2(x, UNNECESSARY))); in testLog2Exact()
111 int result = BigIntegerMath.log2(x, HALF_UP); in testLog2HalfUp()
122 int result = BigIntegerMath.log2(x, HALF_DOWN); in testLog2HalfDown()
134 int halfEven = BigIntegerMath.log2(x, HALF_EVEN); in testLog2HalfEven()
137 boolean floorWasEven = (BigIntegerMath.log2(x, FLOOR) & 1) == 0; in testLog2HalfEven()
138 assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog2HalfEven()
DLongMathTest.java62 LongMath.log2(0L, mode); in testLog2ZeroAlwaysThrows()
72 LongMath.log2(x, mode); in testLog2NegativeAlwaysThrows()
84 assertEquals(BigIntegerMath.log2(valueOf(x), mode), LongMath.log2(x, mode)); in testLog2MatchesBigInteger()
95 assertEquals(x, 1L << LongMath.log2(x, UNNECESSARY)); in testLog2Exact()
DIntMathTest.java61 IntMath.log2(0, mode); in testLog2ZeroAlwaysThrows()
71 IntMath.log2(x, mode); in testLog2NegativeAlwaysThrows()
82 assertEquals(BigIntegerMath.log2(valueOf(x), mode), IntMath.log2(x, mode)); in testLog2MatchesBigInteger()
93 assertEquals(x, 1 << IntMath.log2(x, UNNECESSARY)); in testLog2Exact()
/external/mesa3d/src/glsl/builtins/ir/
Dlog2.ir1 ((function log2
5 ((return (expression float log2 (var_ref arg0)))))
10 ((return (expression vec2 log2 (var_ref arg0)))))
15 ((return (expression vec3 log2 (var_ref arg0)))))
20 ((return (expression vec4 log2 (var_ref arg0)))))
/external/guava/guava/src/com/google/common/math/
DBigIntegerMath.java69 public static int log2(BigInteger x, RoundingMode mode) { in log2() method in BigIntegerMath
135 int approxLog10 = (int) (log2(x, FLOOR) * LN_2 / LN_10); in log10()
263 int log2 = log2(x, FLOOR); in sqrtFloor() local
264 if (log2 < Double.MAX_EXPONENT) { in sqrtFloor()
267 int shift = (log2 - DoubleUtils.SIGNIFICAND_BITS) & ~1; // even! in sqrtFloor()
325 int approxSize = IntMath.divide(n * IntMath.log2(n, CEILING), Long.SIZE, CEILING); in factorial()
336 int productBits = LongMath.log2(product, FLOOR) + 1; in factorial()
337 int bits = LongMath.log2(startingNumber, FLOOR) + 1; in factorial()
361 productBits = LongMath.log2(product, FLOOR) + 1; in factorial()
416 int bits = LongMath.log2(n, RoundingMode.CEILING); in binomial()
/external/valgrind/auxprogs/
Dcompare-build-logs51 my $log2 = $ARGV[1];
55 my %cmd2 = read_log_file($log2);
61 print "*** $file missing in $log2\n";
117 print "*** '$k' is missing in compilation of '$file' in $log2\n";
/external/llvm/test/CodeGen/AMDGPU/
Dllvm.log2.ll16 %0 = call float @llvm.log2.f32(float %in)
39 %0 = call <2 x float> @llvm.log2.v2f32(<2 x float> %in)
73 %0 = call <4 x float> @llvm.log2.v4f32(<4 x float> %in)
78 declare float @llvm.log2.f32(float) readnone
79 declare <2 x float> @llvm.log2.v2f32(<2 x float>) readnone
80 declare <4 x float> @llvm.log2.v4f32(<4 x float>) readnone
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/
DBigIntegerMath.java67 public static int log2(BigInteger x, RoundingMode mode) { in log2() method in BigIntegerMath
142 int approxSize = IntMath.divide(n * IntMath.log2(n, CEILING), Long.SIZE, CEILING); in factorial()
153 int productBits = LongMath.log2(product, FLOOR) + 1; in factorial()
154 int bits = LongMath.log2(startingNumber, FLOOR) + 1; in factorial()
178 productBits = LongMath.log2(product, FLOOR) + 1; in factorial()
233 int bits = LongMath.log2(n, RoundingMode.CEILING); in binomial()
/external/llvm/test/CodeGen/ARM/
Dlog2_not_readnone.ll6 declare double @log2(double)
10 ; CHECK: bl log2
11 %1 = call double @log2(double 0.000000e+00)
Dvfloatintrinsics.ll62 ; CHECK: test_v2f32.log2:
63 define %v2f32 @test_v2f32.log2(%v2f32 %a) {
65 %1 = call %v2f32 @llvm.log2.v2f32(%v2f32 %a)
120 declare %v2f32 @llvm.log2.v2f32(%v2f32) #0
186 ; CHECK: test_v4f32.log2:
187 define %v4f32 @test_v4f32.log2(%v4f32 %a) {
189 %1 = call %v4f32 @llvm.log2.v4f32(%v4f32 %a)
244 declare %v4f32 @llvm.log2.v4f32(%v4f32) #0
310 ; CHECK: test_v2f64.log2:
311 define %v2f64 @test_v2f64.log2(%v2f64 %a) {
[all …]
/external/llvm/test/CodeGen/X86/
Dlog2_not_readnone.ll6 declare double @log2(double)
10 ; CHECK: calll log2
11 %1 = call double @log2(double 0.000000e+00)
/external/llvm/test/CodeGen/XCore/
Dfloat-intrinsics.ll7 declare double @llvm.log2.f64(double)
93 define double @log2(double %F) {
94 ; CHECK-LABEL: log2:
95 ; CHECK: bl log2
96 %result = call double @llvm.log2.f64(double %F)
100 declare float @llvm.log2.f32(float)
105 %result = call float @llvm.log2.f32(float %F)
/external/vulkan-validation-layers/libs/glm/detail/
D_fixes.hpp52 #ifdef log2
53 #undef log2
/external/llvm/test/CodeGen/AArch64/
Darm64-vfloatintrinsics.ll60 ; CHECK: test_v2f32.log2:
61 define %v2f32 @test_v2f32.log2(%v2f32 %a) {
63 %1 = call %v2f32 @llvm.log2.v2f32(%v2f32 %a)
118 declare %v2f32 @llvm.log2.v2f32(%v2f32) #0
184 ; CHECK: test_v4f32.log2:
185 define %v4f32 @test_v4f32.log2(%v4f32 %a) {
187 %1 = call %v4f32 @llvm.log2.v4f32(%v4f32 %a)
242 declare %v4f32 @llvm.log2.v4f32(%v4f32) #0
308 ; CHECK: test_v2f64.log2:
309 define %v2f64 @test_v2f64.log2(%v2f64 %a) {
[all …]
Dillegal-float-ops.ll95 declare float @llvm.log2.f32(float)
96 declare double @llvm.log2.f64(double)
97 declare fp128 @llvm.log2.f128(fp128)
102 %log2float = call float @llvm.log2.f32(float %float)
106 %log2double = call double @llvm.log2.f64(double %double)
108 ; CHECK: bl log2
110 %log2fp128 = call fp128 @llvm.log2.f128(fp128 %fp128)
Darm64-illegal-float-ops.ll95 declare float @llvm.log2.f32(float)
96 declare double @llvm.log2.f64(double)
97 declare fp128 @llvm.log2.f128(fp128)
102 %log2float = call float @llvm.log2.f32(float %float)
106 %log2double = call double @llvm.log2.f64(double %double)
108 ; CHECK: bl log2
110 %log2fp128 = call fp128 @llvm.log2.f128(fp128 %fp128)
/external/mockito/cglib-and-asm/src/org/mockito/cglib/core/
DTinyBitSet.java45 private static int log2(int i) { in log2() method in TinyBitSet
54 return log2(topbit(value)); in length()
/external/mesa3d/src/gallium/auxiliary/gallivm/
Df.cpp67 boost::math::ntl::RR log2(const boost::math::ntl::RR& x) in log2() function
80 return log2((1.0 + sqrt(x))/(1.0 - sqrt(x)))/sqrt(x); in f()
/external/slf4j/slf4j-api/src/test/java/org/slf4j/helpers/
DSubstituteLoggerFactoryTest.java41 Logger log2 = factory.getLogger("foo"); in testFactory() local
42 assertTrue("Loggers with same name must be same", log == log2); in testFactory()
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/layout/
DTaggedRecord.java54 int log2 = Utility.highBit(count); in search() local
55 int power = 1 << log2; in search()
/external/libvpx/libvpx/vp9/common/
Dvp9_tile_common.c18 static int get_tile_offset(int idx, int mis, int log2) { in get_tile_offset() argument
20 const int offset = ((idx * sb_cols) >> log2) << MI_BLOCK_SIZE_LOG2; in get_tile_offset()

12345678