Lines Matching +full:long +full:- +full:term
1 // SPDX-License-Identifier: GPL-2.0
8 unsigned long num, den;
9 unsigned long max_num, max_den;
10 unsigned long exp_num, exp_den;
16 { 1230, 10, 100, 20, 100, 1, "Exceeds bounds, semi-convergent term > 1/2 last term" },
17 { 34567,100, 120, 20, 120, 1, "Exceeds bounds, semi-convergent term < 1/2 last term" },
19 { 1, 19, 100, 10, 1, 10, "Closest to smallest non-zero" },
28 strscpy(desc, param->name, KUNIT_PARAM_DESC_SIZE); in get_desc()
36 const struct rational_test_param *param = (const struct rational_test_param *)test->param_value; in rational_test()
37 unsigned long n = 0, d = 0; in rational_test()
39 rational_best_approximation(param->num, param->den, param->max_num, param->max_den, &n, &d); in rational_test()
40 KUNIT_EXPECT_EQ(test, n, param->exp_num); in rational_test()
41 KUNIT_EXPECT_EQ(test, d, param->exp_den); in rational_test()