Home
last modified time | relevance | path

Searched refs:lcm (Results 1 – 25 of 54) sorted by relevance

123

/third_party/boost/libs/integer/test/
Dcommon_factor_test.cpp423 using boost::integer::lcm; in lcm_int_test()
430 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(1), static_cast<T>(-1)), static_cast<T>( 1) ); in lcm_int_test()
431 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(-1), static_cast<T>(1)), static_cast<T>( 1) ); in lcm_int_test()
432 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(1), static_cast<T>(1)), static_cast<T>( 1) ); in lcm_int_test()
433 … BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(-1), static_cast<T>(-1)), static_cast<T>( 1) ); in lcm_int_test()
434 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(0), static_cast<T>(0)), static_cast<T>( 0) ); in lcm_int_test()
435 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(6), static_cast<T>(0)), static_cast<T>( 0) ); in lcm_int_test()
436 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(0), static_cast<T>(7)), static_cast<T>( 0) ); in lcm_int_test()
437 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(-5), static_cast<T>(0)), static_cast<T>( 0) ); in lcm_int_test()
438 BOOST_TEST_EQ( boost::integer::lcm(static_cast<T>(0), static_cast<T>(-4)), static_cast<T>( 0) ); in lcm_int_test()
[all …]
Dgcd_constexpr14_test.cpp17 constexpr const boost::int64_t l = boost::integer::lcm(i, j); in test_constexpr1()
29 constexpr const boost::uint64_t l = boost::integer::lcm(i, j); in test_constexpr2()
/third_party/boost/libs/multiprecision/test/
Dtest_cpp_int.cpp215 BOOST_CHECK_EQUAL(mpz_int(lcm(c, d)).str(), test_type(lcm(c1, d1)).str()); in t2()
217 BOOST_CHECK_EQUAL(mpz_int(lcm(-c, d)).str(), test_type(lcm(-c1, d1)).str()); in t2()
219 BOOST_CHECK_EQUAL(mpz_int(lcm(-c, -d)).str(), test_type(lcm(-c1, -d1)).str()); in t2()
221 BOOST_CHECK_EQUAL(mpz_int(lcm(c, -d)).str(), test_type(lcm(c1, -d1)).str()); in t2()
285 BOOST_CHECK_EQUAL(mpz_int(lcm(c, si)).str(), test_type(lcm(c1, si)).str()); in t3()
286 BOOST_CHECK_EQUAL(mpz_int(lcm(si, d)).str(), test_type(lcm(si, d1)).str()); in t3()
289 BOOST_CHECK_EQUAL(mpz_int(lcm(-c, si)).str(), test_type(lcm(-c1, si)).str()); in t3()
290 BOOST_CHECK_EQUAL(mpz_int(lcm(-si, d)).str(), test_type(lcm(-si, d1)).str()); in t3()
293 BOOST_CHECK_EQUAL(mpz_int(lcm(-c, -si)).str(), test_type(lcm(-c1, -si)).str()); in t3()
294 BOOST_CHECK_EQUAL(mpz_int(lcm(-si, -d)).str(), test_type(lcm(-si, -d1)).str()); in t3()
[all …]
Dconstexpr_test_cpp_int_5.cpp290 constexpr int_backend l = lcm(i, j); in main()
291 BOOST_CHECK_EQUAL(l, lcm(ii, jj)); in main()
292 constexpr unsigned_backend ul = lcm(ui, uj); in main()
293 BOOST_CHECK_EQUAL(ul, lcm(uii, ujj)); in main()
Dtest_arithmetic.hpp378 BOOST_CHECK_EQUAL(lcm(a, -45), boost::integer::lcm(400, 45)); in test_signed_integer_ops()
380 BOOST_CHECK_EQUAL(lcm(-400, b), boost::integer::lcm(400, 45)); in test_signed_integer_ops()
392 BOOST_CHECK_EQUAL(lcm(a, b), boost::integer::lcm(-400, 45)); in test_signed_integer_ops()
394 BOOST_CHECK_EQUAL(lcm(a, 45), boost::integer::lcm(-400, 45)); in test_signed_integer_ops()
396 BOOST_CHECK_EQUAL(lcm(-400, b), boost::integer::lcm(-400, 45)); in test_signed_integer_ops()
752 BOOST_CHECK_EQUAL(lcm(a, b), boost::integer::lcm(400, 45)); in test_integer_ops()
754 BOOST_CHECK_EQUAL(lcm(a, 45), boost::integer::lcm(400, 45)); in test_integer_ops()
756 BOOST_CHECK_EQUAL(lcm(a, 45u), boost::integer::lcm(400, 45)); in test_integer_ops()
758 BOOST_CHECK_EQUAL(lcm(400, b), boost::integer::lcm(400, 45)); in test_integer_ops()
760 BOOST_CHECK_EQUAL(lcm(400u, b), boost::integer::lcm(400, 45)); in test_integer_ops()
Dtest_fixed_int.cpp124 BOOST_CHECK_EQUAL(mpz_int(lcm(c, d)).str(), packed_type(lcm(c1, d1)).str()); in main()
/third_party/boost/boost/ratio/detail/mpl/
Dlcm.hpp49 struct lcm struct
55 BOOST_MPL_AUX_LAMBDA_SUPPORT(2, lcm, (N1, N2))
58 BOOST_MPL_AUX_NA_SPEC(2, lcm)
66 : lcm<integral_c<T,n1>,integral_c<T,n2> >
/third_party/boost/libs/container/src/
Ddlmalloc_ext_2_8_6.c427 size_t lcm; in calculate_lcm_and_needs_backwards_lcmed() local
442 lcm = max; in calculate_lcm_and_needs_backwards_lcmed()
449 needs_backwards_lcmed = GET_ROUNDED_PO2_SIZE(needs_backwards, lcm); in calculate_lcm_and_needs_backwards_lcmed()
450 *plcm = lcm; in calculate_lcm_and_needs_backwards_lcmed()
456 lcm = backwards_multiple; in calculate_lcm_and_needs_backwards_lcmed()
461 *plcm = lcm; in calculate_lcm_and_needs_backwards_lcmed()
467 lcm = backwards_multiple*2u; in calculate_lcm_and_needs_backwards_lcmed()
473 assert((needs_backwards_lcmed % lcm) == 0); in calculate_lcm_and_needs_backwards_lcmed()
474 *plcm = lcm; in calculate_lcm_and_needs_backwards_lcmed()
481 lcm = backwards_multiple*4u; in calculate_lcm_and_needs_backwards_lcmed()
[all …]
/third_party/boost/boost/integer/
Dcommon_factor_rt.hpp455 inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Int… in lcm() function
472 inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b, Integer const& c, Args… in lcm() function
474 return lcm(a, lcm(b, c, args...)); in lcm()
483 …tic_cast<Integer>(gcd(a.numerator(), b.numerator())), static_cast<Integer>(lcm(a.denominator(), b.… in gcd()
487 …:numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type lcm(boost::rational<Int… in lcm() function
489 …return boost::rational<Integer>(static_cast<Integer>(lcm(a.numerator(), b.numerator())), static_ca… in lcm()
531 d = lcm(d, *first); in lcm_range()
569 return boost::integer::lcm(a, b); in operator ()()
/third_party/ffmpeg/libavutil/
Drational.c188 int64_t gcd, lcm; in av_gcd_q() local
191 lcm = (a.den / gcd) * b.den; in av_gcd_q()
192 return lcm < max_den ? av_make_q(av_gcd(a.num, b.num), lcm) : def; in av_gcd_q()
/third_party/python/Lib/test/
Dtest_math.py1036 lcm = math.lcm
1037 self.assertEqual(lcm(0, 0), 0)
1038 self.assertEqual(lcm(1, 0), 0)
1039 self.assertEqual(lcm(-1, 0), 0)
1040 self.assertEqual(lcm(0, 1), 0)
1041 self.assertEqual(lcm(0, -1), 0)
1042 self.assertEqual(lcm(7, 1), 7)
1043 self.assertEqual(lcm(7, -1), 7)
1044 self.assertEqual(lcm(-23, 15), 345)
1045 self.assertEqual(lcm(120, 84), 840)
[all …]
/third_party/boost/libs/integer/doc/gcd/
Dmath-gcd.qbk29 constexpr IntegerType lcm( IntegerType const &a, IntegerType const &b );
33 constexpr IntegerType lcm( IntegerType const &a, IntegerType const &b, Args const&... );
135 constexpr IntegerType boost::integer::lcm( IntegerType const &a, IntegerType const &b );
141 constexpr IntegerType lcm( IntegerType const &a, IntegerType const &b, Args const&... );
160 The boost::integer::lcm function template returns the least common
172 [note These functions are deprecated in favor of constexpr `gcd` and `lcm` on C++14 capable compile…
216 << boost::integer::lcm(6, 15) << ", respectively."
/third_party/boost/boost/math/
Dcommon_factor_rt.hpp18 using boost::integer::lcm;
/third_party/boost/libs/rational/test/
Drational_test.cpp479 BOOST_CHECK_EQUAL( boost::lcm<T>( 1, -1), static_cast<T>( 1) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
480 BOOST_CHECK_EQUAL( boost::lcm<T>( -1, 1), static_cast<T>( 1) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
481 BOOST_CHECK_EQUAL( boost::lcm<T>( 1, 1), static_cast<T>( 1) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
482 BOOST_CHECK_EQUAL( boost::lcm<T>( -1, -1), static_cast<T>( 1) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
483 BOOST_CHECK_EQUAL( boost::lcm<T>( 0, 0), static_cast<T>( 0) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
484 BOOST_CHECK_EQUAL( boost::lcm<T>( 6, 0), static_cast<T>( 0) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
485 BOOST_CHECK_EQUAL( boost::lcm<T>( 0, 7), static_cast<T>( 0) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
486 BOOST_CHECK_EQUAL( boost::lcm<T>( -5, 0), static_cast<T>( 0) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
487 BOOST_CHECK_EQUAL( boost::lcm<T>( 0, -4), static_cast<T>( 0) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
488 BOOST_CHECK_EQUAL( boost::lcm<T>( 18, 30), static_cast<T>(90) ); in BOOST_AUTO_TEST_CASE_TEMPLATE()
[all …]
/third_party/boost/boost/interprocess/detail/
Dmath_functions.hpp62 inline Integer lcm(const Integer & A, const Integer & B) in lcm() function
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DTargetSchedule.cpp57 static unsigned lcm(unsigned A, unsigned B) { in lcm() function
75 ResourceLCM = lcm(ResourceLCM, NumUnits); in init()
/third_party/boost/boost/container/detail/
Dmath_functions.hpp65 inline Integer lcm(const Integer & A, const Integer & B) in lcm() function
Dnode_pool_impl.hpp77 , m_real_node_size(lcm(node_size, size_type(alignment_of<node_t>::value))) in private_node_pool_impl()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNFRuleSet.java634 leastCommonMultiple = lcm(leastCommonMultiple, rules[i].getBaseValue()); in findFractionRuleSetRule()
692 private static long lcm(long x, long y) { in lcm() method in NFRuleSet
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DNFRuleSet.java635 leastCommonMultiple = lcm(leastCommonMultiple, rules[i].getBaseValue()); in findFractionRuleSetRule()
693 private static long lcm(long x, long y) { in lcm() method in NFRuleSet
/third_party/mindspore/mindspore/numpy/
D__init__.py53 cross, ceil, trapz, gcd, lcm, convolve, log1p, logaddexp, log2,
/third_party/boost/boost/
Drational.hpp108 IntType lcm(IntType n, IntType m) in lcm() function
111 return integer::lcm( n, m ); in lcm()
1024 integer::lcm(a.denominator(), b.denominator())); in operator ()()
1037 return result_type(integer::lcm(a.numerator(), b.numerator()), in operator ()()
/third_party/vk-gl-cts/framework/delibs/decpp/
DdeDefs.hpp93 T lcm (T x, T y) in lcm() function
/third_party/skia/third_party/externals/angle2/src/third_party/ceval/
DREADME.md39 `pow()`, `atan2()`, `gcd()`, `hcf()`, `lcm()`, `log()` (generalized log(b, x) to any base `b`)
/third_party/openssl/test/recipes/04-test_pem_data/
Dcert-threecolumn.pem107 lcm

123