2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Coverage: spherical_harmonic tests.

This commit is contained in:
jzmaddock
2025-05-08 18:58:21 +01:00
parent 022dbe979b
commit 9a1c19d127

View File

@@ -179,6 +179,15 @@ void test_spots(T, const char* t)
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(40, -15, static_cast<T>(0.75), static_cast<T>(2.25)), static_cast<T>(0.2806904825045745687343492963236868973484L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_i(40, -15, static_cast<T>(0.75), static_cast<T>(2.25)), static_cast<T>(0.2933918444656603582282372590387544902135L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(40, -15, static_cast<T>(-0.75), static_cast<T>(2.25))), static_cast<T>(-0.2806904825045745687343492963236868973484L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(40, -15, static_cast<T>(-0.75), static_cast<T>(2.25))), static_cast<T>(-0.2933918444656603582282372590387544902135L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(40, -15, static_cast<T>(-0.75), static_cast<T>(-2.25))), static_cast<T>(-0.2806904825045745687343492963236868973484L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(40, -15, static_cast<T>(-0.75), static_cast<T>(-2.25))), static_cast<T>(0.2933918444656603582282372590387544902135L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(40, -15, static_cast<T>(0.75), static_cast<T>(-2.25))), static_cast<T>(0.2806904825045745687343492963236868973484L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(40, -15, static_cast<T>(0.75), static_cast<T>(-2.25))), static_cast<T>(-0.2933918444656603582282372590387544902135L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(40, -15, static_cast<T>(0.75), static_cast<T>(2.25))), static_cast<T>(0.2806904825045745687343492963236868973484L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(40, -15, static_cast<T>(0.75), static_cast<T>(2.25))), static_cast<T>(0.2933918444656603582282372590387544902135L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(20, -14, static_cast<T>(-0.75), static_cast<T>(2.25)), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_i(20, -14, static_cast<T>(-0.75), static_cast<T>(2.25)), static_cast<T>(-0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(20, -14, static_cast<T>(-0.75), static_cast<T>(-2.25)), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
@@ -188,6 +197,15 @@ void test_spots(T, const char* t)
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(20, -14, static_cast<T>(0.75), static_cast<T>(2.25)), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_i(20, -14, static_cast<T>(0.75), static_cast<T>(2.25)), static_cast<T>(-0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(20, -14, static_cast<T>(-0.75), static_cast<T>(2.25))), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(20, -14, static_cast<T>(-0.75), static_cast<T>(2.25))), static_cast<T>(-0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(20, -14, static_cast<T>(-0.75), static_cast<T>(-2.25))), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(20, -14, static_cast<T>(-0.75), static_cast<T>(-2.25))), static_cast<T>(0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(20, -14, static_cast<T>(0.75), static_cast<T>(-2.25))), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(20, -14, static_cast<T>(0.75), static_cast<T>(-2.25))), static_cast<T>(0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(real(::boost::math::spherical_harmonic(20, -14, static_cast<T>(0.75), static_cast<T>(2.25))), static_cast<T>(0.3479218186133435466692822481919867452442L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(imag(::boost::math::spherical_harmonic(20, -14, static_cast<T>(0.75), static_cast<T>(2.25))), static_cast<T>(-0.0293201066685263879566422194539567289974L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(20, 14, static_cast<T>(-4), static_cast<T>(2.25)), static_cast<T>(0.5253373768014719124617844890495875474590L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_i(20, 14, static_cast<T>(-4), static_cast<T>(2.25)), static_cast<T>(0.0442712905622650144694916590407495495699L), tolerance);
BOOST_CHECK_CLOSE_FRACTION(::boost::math::spherical_harmonic_r(20, 14, static_cast<T>(-4), static_cast<T>(-2.25)), static_cast<T>(0.5253373768014719124617844890495875474590L), tolerance);