/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ctypes/test/ |
H A D | test_libc.py | 13 import math namespace 14 self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
|
H A D | test_byteswap.py | 1 import sys, unittest, struct, math, ctypes namespace 114 s = c_float(math.pi) 115 self.assertEqual(bin(struct.pack("f", math.pi)), bin(s)) 117 self.assertAlmostEqual(s.value, math.pi, 6) 118 s = c_float.__ctype_le__(math.pi) 119 self.assertAlmostEqual(s.value, math.pi, 6) 120 self.assertEqual(bin(struct.pack("<f", math.pi)), bin(s)) 121 s = c_float.__ctype_be__(math.pi) 122 self.assertAlmostEqual(s.value, math.pi, 6) 123 self.assertEqual(bin(struct.pack(">f", math [all...] |
H A D | test_callbacks.py | 78 import math namespace 79 self.check_type(c_float, math.e) 80 self.check_type(c_float, -math.e)
|
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/json/tests/ |
H A D | test_float.py | 1 import math namespace 7 for num in [1617161771.7650001, math.pi, math.pi**100, 8 math.pi**-100, 3.1]:
|
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/ctypes/test/ |
H A D | test_libc.py | 13 import math namespace 14 self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
|
H A D | test_byteswap.py | 1 import sys, unittest, struct, math, ctypes namespace 114 s = c_float(math.pi) 115 self.assertEqual(bin(struct.pack("f", math.pi)), bin(s)) 117 self.assertAlmostEqual(s.value, math.pi, 6) 118 s = c_float.__ctype_le__(math.pi) 119 self.assertAlmostEqual(s.value, math.pi, 6) 120 self.assertEqual(bin(struct.pack("<f", math.pi)), bin(s)) 121 s = c_float.__ctype_be__(math.pi) 122 self.assertAlmostEqual(s.value, math.pi, 6) 123 self.assertEqual(bin(struct.pack(">f", math [all...] |
H A D | test_callbacks.py | 78 import math namespace 79 self.check_type(c_float, math.e) 80 self.check_type(c_float, -math.e)
|
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/json/tests/ |
H A D | test_float.py | 1 import math namespace 7 for num in [1617161771.7650001, math.pi, math.pi**100, 8 math.pi**-100, 3.1]:
|
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/ |
H A D | test_abstract_numbers.py | 3 import math namespace 43 self.assertRaises(AttributeError, math.trunc, c1)
|
H A D | test_long_future.py | 8 import math namespace 50 result = math.ldexp(float(q), exp)
|
H A D | test_cmath.py | 4 import cmath, math namespace 76 if math.isnan(a): 77 if math.isnan(b): 81 if math.isinf(a): 92 if math.copysign(1., a) != math.copysign(1., b): 236 # check that corresponding cmath and math functions are equal 269 float_fn = getattr(math, fn) 280 self.rAssertAlmostEqual(math.log(v, base), z.real) 405 self.assertTrue(math [all...] |
H A D | test_fractions.py | 5 import math namespace 314 self.assertTypedEquals(-1, math.trunc(F(-11, 10))) 316 self.assertTypedEquals(1, math.trunc(F(11, 10))) 506 self.assertFalse(1e23 < float(F(math.trunc(1e23) + 1))) 507 self.assertTrue(1e23 < F(math.trunc(1e23) + 1)) 508 self.assertFalse(1e23 <= F(math.trunc(1e23) - 1)) 509 self.assertTrue(1e23 > F(math.trunc(1e23) - 1)) 510 self.assertFalse(1e23 >= F(math.trunc(1e23) + 1)) 569 self.assertAlmostEqual(math.pi, s) 583 self.assertAlmostEqual(math [all...] |
H A D | test_int.py | 6 import math namespace 288 self.assertEqual(k, 1 + math.floor( 289 math.log(abs(x))/math.log(2) + tiny))
|
H A D | test_struct.py | 384 import math namespace 405 big = math.ldexp(big, 127 - 23) 412 big = math.ldexp(big, 127 - 24)
|
H A D | test_long.py | 5 import math namespace 626 sqrt = int(math.sqrt(sys.maxint)) 751 namespace = {'huge': huge, 'mhuge': mhuge, 'shuge': shuge, 'math': math} 762 "math.sin(huge)", "math.sin(mhuge)", 763 "math.sqrt(huge)", "math.sqrt(mhuge)", # should do better 764 "math.floor(huge)", "math [all...] |
H A D | test_math.py | 1 # Python test set -- math module 6 import math namespace 71 if math.isinf(expected) and got == expected: 143 self.ftest('pi', math.pi, 3.1415926) 144 self.ftest('e', math.e, 2.7182818) 147 self.assertRaises(TypeError, math.acos) 148 self.ftest('acos(-1)', math.acos(-1), math.pi) 149 self.ftest('acos(0)', math.acos(0), math [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/ |
H A D | test_abstract_numbers.py | 3 import math namespace 43 self.assertRaises(AttributeError, math.trunc, c1)
|
H A D | test_long_future.py | 8 import math namespace 50 result = math.ldexp(float(q), exp)
|
H A D | test_cmath.py | 4 import cmath, math namespace 76 if math.isnan(a): 77 if math.isnan(b): 81 if math.isinf(a): 92 if math.copysign(1., a) != math.copysign(1., b): 236 # check that corresponding cmath and math functions are equal 269 float_fn = getattr(math, fn) 280 self.rAssertAlmostEqual(math.log(v, base), z.real) 405 self.assertTrue(math [all...] |
H A D | test_fractions.py | 5 import math namespace 314 self.assertTypedEquals(-1, math.trunc(F(-11, 10))) 316 self.assertTypedEquals(1, math.trunc(F(11, 10))) 506 self.assertFalse(1e23 < float(F(math.trunc(1e23) + 1))) 507 self.assertTrue(1e23 < F(math.trunc(1e23) + 1)) 508 self.assertFalse(1e23 <= F(math.trunc(1e23) - 1)) 509 self.assertTrue(1e23 > F(math.trunc(1e23) - 1)) 510 self.assertFalse(1e23 >= F(math.trunc(1e23) + 1)) 569 self.assertAlmostEqual(math.pi, s) 583 self.assertAlmostEqual(math [all...] |
H A D | test_int.py | 6 import math namespace 288 self.assertEqual(k, 1 + math.floor( 289 math.log(abs(x))/math.log(2) + tiny))
|
H A D | test_struct.py | 384 import math namespace 405 big = math.ldexp(big, 127 - 23) 412 big = math.ldexp(big, 127 - 24)
|
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ |
H A D | fractions.py | 8 import math namespace 180 if math.isnan(f) or math.isinf(f): 419 # Will be math.floor(a / b) in 3.0. 422 # trunc(math.floor(div)) doesn't work if the rational is 427 return math.floor(div) 431 # Will be math.floor(a / b) in 3.0. 434 # trunc(math.floor(div)) doesn't work if the rational is 439 return math.floor(div) 535 if math [all...] |
H A D | aifc.py | 221 import math namespace 232 fmant, expon = math.frexp(x) 240 fmant = math.ldexp(fmant, expon) 243 fmant = math.ldexp(fmant, 32) 244 fsmant = math.floor(fmant) 246 fmant = math.ldexp(fmant - fsmant, 32) 247 fsmant = math.floor(fmant)
|
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/ |
H A D | fractions.py | 8 import math namespace 180 if math.isnan(f) or math.isinf(f): 419 # Will be math.floor(a / b) in 3.0. 422 # trunc(math.floor(div)) doesn't work if the rational is 427 return math.floor(div) 431 # Will be math.floor(a / b) in 3.0. 434 # trunc(math.floor(div)) doesn't work if the rational is 439 return math.floor(div) 535 if math [all...] |