Lines Matching refs:cx
12 const T cx(1); in BOOST_AUTO_TEST_CASE_TEMPLATE() local
13 auto f = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
28 const T cx = 2.0; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
29 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
35 BOOST_CHECK_CLOSE_FRACTION(y.derivative(i), exp(cx), in BOOST_AUTO_TEST_CASE_TEMPLATE()
46 const T cx = 2.0; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
48 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
51 BOOST_CHECK_EQUAL(z0.derivative(0u), pow(cx, cy)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
52 BOOST_CHECK_EQUAL(z0.derivative(1u), cy * pow(cx, cy - 1)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
53 BOOST_CHECK_EQUAL(z0.derivative(2u), cy * (cy - 1) * pow(cx, cy - 2)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
55 cy * (cy - 1) * (cy - 2) * pow(cx, cy - 3)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
58 auto z1 = pow(cx, y); in BOOST_AUTO_TEST_CASE_TEMPLATE()
59 BOOST_CHECK_CLOSE(z1.derivative(0u, 0u), pow(cx, cy), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
61 BOOST_CHECK_CLOSE(z1.derivative(0u, j), pow(log(cx), j) * pow(cx, cy), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
73 BOOST_CHECK_CLOSE(z2.derivative(0u, j), pow(cx, cy) * pow(log(cx), j), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
77 pow(cx, cy - 1) * pow(log(cx), static_cast<int>(j) - 1) * in BOOST_AUTO_TEST_CASE_TEMPLATE()
78 (cy * log(cx) + j), in BOOST_AUTO_TEST_CASE_TEMPLATE()
81 BOOST_CHECK_CLOSE(z2.derivative(2u, 0u), pow(cx, cy - 2) * cy * (cy - 1), in BOOST_AUTO_TEST_CASE_TEMPLATE()
84 pow(cx, cy - 2) * (cy * (cy - 1) * log(cx) + 2 * cy - 1), in BOOST_AUTO_TEST_CASE_TEMPLATE()
88 pow(cx, cy - 2) * pow(log(cx), j - 2) * in BOOST_AUTO_TEST_CASE_TEMPLATE()
89 (j * (2 * cy - 1) * log(cx) + (j - 1) * j + in BOOST_AUTO_TEST_CASE_TEMPLATE()
90 (cy - 1) * cy * pow(log(cx), 2)), in BOOST_AUTO_TEST_CASE_TEMPLATE()
94 pow(cx, cy - 2) * pow(log(cx), 2) * in BOOST_AUTO_TEST_CASE_TEMPLATE()
95 (4 * (2 * cy - 1) * log(cx) + (4 - 1) * 4 + in BOOST_AUTO_TEST_CASE_TEMPLATE()
96 (cy - 1) * cy * pow(log(cx), 2)), in BOOST_AUTO_TEST_CASE_TEMPLATE()
106 const T cx = 2; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
108 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
213 const T cx = 4.0; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
214 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
216 BOOST_CHECK_CLOSE_FRACTION(y.derivative(0u), sqrt(cx), in BOOST_AUTO_TEST_CASE_TEMPLATE()
218 BOOST_CHECK_CLOSE_FRACTION(y.derivative(1u), 0.5 * pow(cx, -0.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
220 BOOST_CHECK_CLOSE_FRACTION(y.derivative(2u), -0.5 * 0.5 * pow(cx, -1.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
222 BOOST_CHECK_CLOSE_FRACTION(y.derivative(3u), 0.5 * 0.5 * 1.5 * pow(cx, -2.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
225 -0.5 * 0.5 * 1.5 * 2.5 * pow(cx, -3.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
228 0.5 * 0.5 * 1.5 * 2.5 * 3.5 * pow(cx, -4.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
244 const T cx = 2.0; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
245 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
247 BOOST_CHECK_CLOSE_FRACTION(y.derivative(0u), log(cx), in BOOST_AUTO_TEST_CASE_TEMPLATE()
249 BOOST_CHECK_CLOSE_FRACTION(y.derivative(1u), 1 / cx, in BOOST_AUTO_TEST_CASE_TEMPLATE()
251 BOOST_CHECK_CLOSE_FRACTION(y.derivative(2u), -1 / pow(cx, 2), in BOOST_AUTO_TEST_CASE_TEMPLATE()
253 BOOST_CHECK_CLOSE_FRACTION(y.derivative(3u), 2 / pow(cx, 3), in BOOST_AUTO_TEST_CASE_TEMPLATE()
255 BOOST_CHECK_CLOSE_FRACTION(y.derivative(4u), -6 / pow(cx, 4), in BOOST_AUTO_TEST_CASE_TEMPLATE()
257 BOOST_CHECK_CLOSE_FRACTION(y.derivative(5u), 24 / pow(cx, 5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
275 const T cx = 2.0; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
277 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
280 BOOST_CHECK_EQUAL(z.derivative(0u, 0u), cy * log(cx)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
281 BOOST_CHECK_EQUAL(z.derivative(0u, 1u), log(cx)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
288 pow(cx, i), in BOOST_AUTO_TEST_CASE_TEMPLATE()
292 pow(-1, i - 1) * boost::math::factorial<T>(i - 1) / pow(cx, i), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
301 pow(cx, cy - 2) * pow(log(cx), 2) * in BOOST_AUTO_TEST_CASE_TEMPLATE()
302 (4 * (2 * cy - 1) * log(cx) + (4 - 1) * 4 + in BOOST_AUTO_TEST_CASE_TEMPLATE()
303 (cy - 1) * cy * pow(log(cx), 2)), in BOOST_AUTO_TEST_CASE_TEMPLATE()
311 const T cx = 3.5; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
312 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
315 BOOST_CHECK_EQUAL(y.derivative(0u), frexp(cx, &testexp)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
326 const T cx = 3.5; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
327 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
330 BOOST_CHECK_EQUAL(y.derivative(0u), ldexp(cx, exponent)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
341 const T cx = boost::math::constants::third_pi<T>(); in BOOST_AUTO_TEST_CASE_TEMPLATE() local
342 const auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
344 BOOST_CHECK_CLOSE(cos5.derivative(0u), cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
345 BOOST_CHECK_CLOSE(cos5.derivative(1u), -sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
346 BOOST_CHECK_CLOSE(cos5.derivative(2u), -cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
347 BOOST_CHECK_CLOSE(cos5.derivative(3u), sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
348 BOOST_CHECK_CLOSE(cos5.derivative(4u), cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
349 BOOST_CHECK_CLOSE(cos5.derivative(5u), -sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
351 BOOST_CHECK_CLOSE(sin5.derivative(0u), sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
352 BOOST_CHECK_CLOSE(sin5.derivative(1u), cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
353 BOOST_CHECK_CLOSE(sin5.derivative(2u), -sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
354 BOOST_CHECK_CLOSE(sin5.derivative(3u), -cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
355 BOOST_CHECK_CLOSE(sin5.derivative(4u), sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
356 BOOST_CHECK_CLOSE(sin5.derivative(5u), cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
358 auto cos0 = cos(make_fvar<T, 0>(cx)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
359 BOOST_CHECK_CLOSE(cos0.derivative(0u), cos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
360 auto sin0 = sin(make_fvar<T, 0>(cx)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
361 BOOST_CHECK_CLOSE(sin0.derivative(0u), sin(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
370 const T cx = 0.5; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
371 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
373 BOOST_CHECK_CLOSE(y.derivative(0u), acos(cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
374 BOOST_CHECK_CLOSE(y.derivative(1u), -1 / sqrt(1 - cx * cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
375 BOOST_CHECK_CLOSE(y.derivative(2u), -cx / pow(1 - cx * cx, 1.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
377 -(2 * cx * cx + 1) / pow(1 - cx * cx, 2.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
379 -3 * cx * (2 * cx * cx + 3) / pow(1 - cx * cx, 3.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
381 -(24 * (cx * cx + 3) * cx * cx + 9) / pow(1 - cx * cx, 4.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
389 const T cx = 2; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
390 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
414 const T cx = 0.5; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
415 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
418 BOOST_CHECK_CLOSE(y.derivative(1u), 1 / sqrt(1 - cx * cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
419 BOOST_CHECK_CLOSE(y.derivative(2u), cx / pow(1 - cx * cx, 1.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
420 BOOST_CHECK_CLOSE(y.derivative(3u), (2 * cx * cx + 1) / pow(1 - cx * cx, 2.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
423 3 * cx * (2 * cx * cx + 3) / pow(1 - cx * cx, 3.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
425 (24 * (cx * cx + 3) * cx * cx + 9) / pow(1 - cx * cx, 4.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
446 const T cx(0.5); in BOOST_AUTO_TEST_CASE_TEMPLATE() local
447 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
449 BOOST_CHECK_EQUAL(y.derivative(0u), 1 - cx * cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
450 BOOST_CHECK_EQUAL(y.derivative(1u), -2 * cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()
455 BOOST_CHECK_EQUAL(y.derivative(0u), sqrt(1 - cx * cx)); in BOOST_AUTO_TEST_CASE_TEMPLATE()
456 BOOST_CHECK_CLOSE(y.derivative(1u), -cx / sqrt(1 - cx * cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
457 BOOST_CHECK_CLOSE(y.derivative(2u), -1 / pow(1 - cx * cx, 1.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
458 BOOST_CHECK_CLOSE(y.derivative(3u), -3 * cx / pow(1 - cx * cx, 2.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
460 -(12 * cx * cx + 3) / pow(1 - cx * cx, 3.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
462 BOOST_CHECK_CLOSE(y.derivative(0u), 1 / sqrt(1 - cx * cx), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
463 BOOST_CHECK_CLOSE(y.derivative(1u), cx / pow(1 - cx * cx, 1.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
464 BOOST_CHECK_CLOSE(y.derivative(2u), (2 * cx * cx + 1) / pow(1 - cx * cx, 2.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
467 3 * cx * (2 * cx * cx + 3) / pow(1 - cx * cx, 3.5), eps); in BOOST_AUTO_TEST_CASE_TEMPLATE()
469 (24 * (cx * cx + 3) * cx * cx + 9) / pow(1 - cx * cx, 4.5), in BOOST_AUTO_TEST_CASE_TEMPLATE()
477 const T cx = 1; in BOOST_AUTO_TEST_CASE_TEMPLATE() local
478 auto x = make_fvar<T, m>(cx); in BOOST_AUTO_TEST_CASE_TEMPLATE()