Searched defs:math (Results 1 - 25 of 98) sorted by relevance

1234

/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ctypes/test/
H A Dtest_libc.py13 import math namespace
14 self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
H A Dtest_byteswap.py1 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 Dtest_callbacks.py78 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 Dtest_float.py1 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 Dtest_libc.py13 import math namespace
14 self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
H A Dtest_byteswap.py1 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 Dtest_callbacks.py78 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 Dtest_float.py1 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 Dtest_abstract_numbers.py3 import math namespace
43 self.assertRaises(AttributeError, math.trunc, c1)
H A Dtest_long_future.py8 import math namespace
50 result = math.ldexp(float(q), exp)
H A Dtest_cmath.py4 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 Dtest_fractions.py5 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 Dtest_int.py6 import math namespace
288 self.assertEqual(k, 1 + math.floor(
289 math.log(abs(x))/math.log(2) + tiny))
H A Dtest_struct.py384 import math namespace
405 big = math.ldexp(big, 127 - 23)
412 big = math.ldexp(big, 127 - 24)
H A Dtest_long.py5 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 Dtest_math.py1 # 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 Dtest_abstract_numbers.py3 import math namespace
43 self.assertRaises(AttributeError, math.trunc, c1)
H A Dtest_long_future.py8 import math namespace
50 result = math.ldexp(float(q), exp)
H A Dtest_cmath.py4 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 Dtest_fractions.py5 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 Dtest_int.py6 import math namespace
288 self.assertEqual(k, 1 + math.floor(
289 math.log(abs(x))/math.log(2) + tiny))
H A Dtest_struct.py384 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 Dfractions.py8 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 Daifc.py221 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 Dfractions.py8 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...]

Completed in 380 milliseconds

1234