|
|
|
|
@@ -162,94 +162,94 @@ void test_spots5(T, const char* type_name)
|
|
|
|
|
template <class T>
|
|
|
|
|
void test_spots6(T, const char* type_name)
|
|
|
|
|
{
|
|
|
|
|
static const std::array<std::array<T, 4>, 186> hypergeometric_1F1_bugs = { {
|
|
|
|
|
{ { static_cast<double>(17955.561660766602), static_cast<double>(9.6968994205831605e-09), static_cast<double>(-82.406154185533524), SC_(6.98056008378736714088730927132364938220428678e-11) }},
|
|
|
|
|
{ { static_cast<double>(17955.561660766602), static_cast<double>(-9.6968994205831605e-09), static_cast<double>(-82.406154185533524), SC_(-6.98055306629610746072607353939306734740549551e-11) }},
|
|
|
|
|
{ { static_cast<double>(-17955.561660766602), static_cast<double>(-9.6968994205831605e-09), static_cast<double>(82.406154185533524), SC_(-42897094853118832762870100.8669248353530950866) }} ,
|
|
|
|
|
{ { static_cast<double>(17955.561660766602), static_cast<double>(17956.061660766602), static_cast<double>(82.406154185533524), SC_(613117565438499794408370861624072730.553215432) }},
|
|
|
|
|
{ { static_cast<double>(2.9127331452327709e-07), static_cast<double>(-0.99999970872668542), static_cast<double>(0.15018942760070786), SC_(0.987526018990506843793601092932108059727149508) }},
|
|
|
|
|
{ { static_cast<double>(-2.9127331452327709e-07), static_cast<double>(-1.0000002912733146), static_cast<double>(0.15018942760070786), SC_(0.987526120661366412484942089372497015837368389) }},
|
|
|
|
|
{ { static_cast<double>(6.7191087900739423e-13), static_cast<double>(-0.99999999999932809), static_cast<double>(0.0011913633891253994), SC_(0.999999289758605006762757201699750974296453229) }},
|
|
|
|
|
{ { static_cast<double>(6.7191087900739423e-13), static_cast<double>(-0.99999999999932809), static_cast<double>(-0.0011913633891253994), SC_(0.999999290885918468326416221021126912154021802) }},
|
|
|
|
|
{ { static_cast<double>(-6.7191087900739423e-13), static_cast<double>(-1.0000000000006719), static_cast<double>(0.0011913633891253994), SC_(0.999999289758606609651292394510404091049823243) }},
|
|
|
|
|
{ { static_cast<double>(-6.7191087900739423e-13), static_cast<double>(-1.0000000000006719), static_cast<double>(-0.0011913633891253994), SC_(0.999999290885916869252591036674587894145399498) }},
|
|
|
|
|
{ { static_cast<double>(1.2860067365774887e-17), static_cast<double>(6.2442285664031425e-16), static_cast<double>(-2539.60133934021), SC_(0.979404874070484696999110600576068012417904384) }},
|
|
|
|
|
{ { static_cast<double>(1.2860067365774887e-17), static_cast<double>(-6.2442285664031425e-16), static_cast<double>(-2539.60133934021), SC_(1.0205951259295150865252112924093487321207727) }},
|
|
|
|
|
{ { static_cast<double>(-1.2860067365774887e-17), static_cast<double>(6.2442285664031425e-16), static_cast<double>(-2539.60133934021), SC_(1.02059512592951530745923325071510441026202975) }},
|
|
|
|
|
{ { static_cast<double>(-1.2860067365774887e-17), static_cast<double>(-6.2442285664031425e-16), static_cast<double>(-2539.60133934021), SC_(0.979404874070484909016444856299500644331897735) }},
|
|
|
|
|
{ { static_cast<double>(1.2860067365774887e-17), static_cast<double>(1), static_cast<double>(-2539.60133934021), SC_(0.999999999999999891757095137551552220860540801) }},
|
|
|
|
|
{ { static_cast<double>(-1.2860067365774887e-17), static_cast<double>(1), static_cast<double>(-2539.60133934021), SC_(1.00000000000000010824290486244845922375479178) }},
|
|
|
|
|
{ { static_cast<double>(1.2860067365774887e-17), static_cast<double>(0.5), static_cast<double>(-2539.60133934021), SC_(0.999999999999999873931788919689096760455570214) }},
|
|
|
|
|
{ { static_cast<double>(-1.2860067365774887e-17), static_cast<double>(0.5), static_cast<double>(-2539.60133934021), SC_(1.0000000000000001260682110803109183167444166) }},
|
|
|
|
|
{ { static_cast<double>(1.2860067365774887e-17), static_cast<double>(-0.5), static_cast<double>(-2539.60133934021), SC_(0.999999999999999899656990458526368219886894767) }},
|
|
|
|
|
{ { static_cast<double>(-1.2860067365774887e-17), static_cast<double>(-0.5), static_cast<double>(-2539.60133934021), SC_(1.00000000000000010034300954147364037131355735) }},
|
|
|
|
|
{ { static_cast<double>(1.9561377367172441e-13), static_cast<double>(-0.99999999999980438), static_cast<double>(0.53720525559037924), SC_(0.791950585963666119273677451162365759080483409) }},
|
|
|
|
|
{ { static_cast<double>(1.9561377367172441e-13), static_cast<double>(-0.99999999999980438), static_cast<double>(-0.53720525559037924), SC_(0.898314630992769591673208399706587643905527327) }},
|
|
|
|
|
{ { static_cast<double>(-1.9561377367172441e-13), static_cast<double>(-1.0000000000001956), static_cast<double>(0.53720525559037924), SC_(0.791950585964025761367113514279915403442035074) }},
|
|
|
|
|
{ { static_cast<double>(-1.9561377367172441e-13), static_cast<double>(-1.0000000000001956), static_cast<double>(-0.53720525559037924), SC_(0.898314630992646771749564140770704893561753597) }},
|
|
|
|
|
{ { static_cast<double>(5.1851756946064858e-12), static_cast<double>(-0.99999999999481481), static_cast<double>(-774.06985878944397), SC_(1.91306610467163858324476828831735612399803649e-06) }},
|
|
|
|
|
{ { static_cast<double>(-5.1851756946064858e-12), static_cast<double>(-1.0000000000051852), static_cast<double>(-774.06985878944397), SC_(1.91306610479516297551035931150910859922270467e-06) }},
|
|
|
|
|
static const std::array<std::array<T, 4>, 188> hypergeometric_1F1_bugs = { {
|
|
|
|
|
{ { static_cast<T>(17955.561660766602), static_cast<T>(9.6968994205831605e-09), static_cast<T>(-82.406154185533524), SC_(6.98056008378736714088730927132364938220428678e-11) }},
|
|
|
|
|
{ { static_cast<T>(17955.561660766602), static_cast<T>(-9.6968994205831605e-09), static_cast<T>(-82.406154185533524), SC_(-6.98055306629610746072607353939306734740549551e-11) }},
|
|
|
|
|
{ { static_cast<T>(-17955.561660766602), static_cast<T>(-9.6968994205831605e-09), static_cast<T>(82.406154185533524), SC_(-42897094853118832762870100.8669248353530950866) }} ,
|
|
|
|
|
{ { static_cast<T>(17955.561660766602), static_cast<T>(17956.061660766602), static_cast<T>(82.406154185533524), SC_(613117565438499794408370861624072730.553215432) }},
|
|
|
|
|
{ { static_cast<T>(2.9127331452327709e-07), static_cast<T>(-0.99999970872668542), static_cast<T>(0.15018942760070786), SC_(0.987526018990506843793601092932108059727149508) }},
|
|
|
|
|
{ { static_cast<T>(-2.9127331452327709e-07), static_cast<T>(-1.0000002912733146), static_cast<T>(0.15018942760070786), SC_(0.987526120661366412484942089372497015837368389) }},
|
|
|
|
|
{ { static_cast<T>(6.7191087900739423e-13), static_cast<T>(-0.99999999999932809), static_cast<T>(0.0011913633891253994), SC_(0.999999289758605006762757201699750974296453229) }},
|
|
|
|
|
{ { static_cast<T>(6.7191087900739423e-13), static_cast<T>(-0.99999999999932809), static_cast<T>(-0.0011913633891253994), SC_(0.999999290885918468326416221021126912154021802) }},
|
|
|
|
|
{ { static_cast<T>(-6.7191087900739423e-13), static_cast<T>(-1.0000000000006719), static_cast<T>(0.0011913633891253994), SC_(0.999999289758606609651292394510404091049823243) }},
|
|
|
|
|
{ { static_cast<T>(-6.7191087900739423e-13), static_cast<T>(-1.0000000000006719), static_cast<T>(-0.0011913633891253994), SC_(0.999999290885916869252591036674587894145399498) }},
|
|
|
|
|
{ { static_cast<T>(1.2860067365774887e-17), static_cast<T>(6.2442285664031425e-16), static_cast<T>(-2539.60133934021), SC_(0.979404874070484696999110600576068012417904384) }},
|
|
|
|
|
{ { static_cast<T>(1.2860067365774887e-17), static_cast<T>(-6.2442285664031425e-16), static_cast<T>(-2539.60133934021), SC_(1.0205951259295150865252112924093487321207727) }},
|
|
|
|
|
{ { static_cast<T>(-1.2860067365774887e-17), static_cast<T>(6.2442285664031425e-16), static_cast<T>(-2539.60133934021), SC_(1.02059512592951530745923325071510441026202975) }},
|
|
|
|
|
{ { static_cast<T>(-1.2860067365774887e-17), static_cast<T>(-6.2442285664031425e-16), static_cast<T>(-2539.60133934021), SC_(0.979404874070484909016444856299500644331897735) }},
|
|
|
|
|
{ { static_cast<T>(1.2860067365774887e-17), static_cast<T>(1), static_cast<T>(-2539.60133934021), SC_(0.999999999999999891757095137551552220860540801) }},
|
|
|
|
|
{ { static_cast<T>(-1.2860067365774887e-17), static_cast<T>(1), static_cast<T>(-2539.60133934021), SC_(1.00000000000000010824290486244845922375479178) }},
|
|
|
|
|
{ { static_cast<T>(1.2860067365774887e-17), static_cast<T>(0.5), static_cast<T>(-2539.60133934021), SC_(0.999999999999999873931788919689096760455570214) }},
|
|
|
|
|
{ { static_cast<T>(-1.2860067365774887e-17), static_cast<T>(0.5), static_cast<T>(-2539.60133934021), SC_(1.0000000000000001260682110803109183167444166) }},
|
|
|
|
|
{ { static_cast<T>(1.2860067365774887e-17), static_cast<T>(-0.5), static_cast<T>(-2539.60133934021), SC_(0.999999999999999899656990458526368219886894767) }},
|
|
|
|
|
{ { static_cast<T>(-1.2860067365774887e-17), static_cast<T>(-0.5), static_cast<T>(-2539.60133934021), SC_(1.00000000000000010034300954147364037131355735) }},
|
|
|
|
|
{ { static_cast<T>(1.9561377367172441e-13), static_cast<T>(-0.99999999999980438), static_cast<T>(0.53720525559037924), SC_(0.791950585963666119273677451162365759080483409) }},
|
|
|
|
|
{ { static_cast<T>(1.9561377367172441e-13), static_cast<T>(-0.99999999999980438), static_cast<T>(-0.53720525559037924), SC_(0.898314630992769591673208399706587643905527327) }},
|
|
|
|
|
{ { static_cast<T>(-1.9561377367172441e-13), static_cast<T>(-1.0000000000001956), static_cast<T>(0.53720525559037924), SC_(0.791950585964025761367113514279915403442035074) }},
|
|
|
|
|
{ { static_cast<T>(-1.9561377367172441e-13), static_cast<T>(-1.0000000000001956), static_cast<T>(-0.53720525559037924), SC_(0.898314630992646771749564140770704893561753597) }},
|
|
|
|
|
{ { static_cast<T>(5.1851756946064858e-12), static_cast<T>(-0.99999999999481481), static_cast<T>(-774.06985878944397), SC_(1.91306610467163858324476828831735612399803649e-06) }},
|
|
|
|
|
{ { static_cast<T>(-5.1851756946064858e-12), static_cast<T>(-1.0000000000051852), static_cast<T>(-774.06985878944397), SC_(1.91306610479516297551035931150910859922270467e-06) }},
|
|
|
|
|
|
|
|
|
|
{{ static_cast<double>(4.782769898853794e-15), static_cast<double>(1.0000000000000049), static_cast<double>(43.289540141820908), SC_(715.678254892476818206948251991084031658534788) }},
|
|
|
|
|
{ { static_cast<double>(-4.782769898853794e-15), static_cast<double>(0.99999999999999523), static_cast<double>(43.289540141820908), SC_(-713.67825489247727251051792450091274703212426) }},
|
|
|
|
|
{ { static_cast<double>(4.782769898853794e-15), static_cast<double>(0.50000000000000477), static_cast<double>(43.289540141820908), SC_(8235.578376364917373771471380274179857713986) }},
|
|
|
|
|
{ { static_cast<double>(-4.782769898853794e-15), static_cast<double>(0.49999999999999523), static_cast<double>(43.289540141820908), SC_(-8233.57837636502669085205930058992320862281194) }},
|
|
|
|
|
{ { static_cast<double>(4.782769898853794e-15), static_cast<double>(-0.49999999999999523), static_cast<double>(43.289540141820908), SC_(-696269.800378137841948029488304613132151506346) }},
|
|
|
|
|
{ { static_cast<double>(-4.782769898853794e-15), static_cast<double>(-0.50000000000000477), static_cast<double>(43.289540141820908), SC_(696271.8003781336298001417038674968935893361) }},
|
|
|
|
|
{ { static_cast<double>(8.1104991963343309e-05), static_cast<double>(-0.99991889500803666), static_cast<double>(-289.12455415725708), SC_(7.89625448009377635153307897651433007437615965e-124) }},
|
|
|
|
|
{ { static_cast<double>(-8.1104991963343309e-05), static_cast<double>(-1.0000811049919633), static_cast<double>(-289.12455415725708), SC_(7.8949781467741574268884621364833028722017032e-124) }},
|
|
|
|
|
{{ static_cast<T>(4.782769898853794e-15), static_cast<T>(1.0000000000000049), static_cast<T>(43.289540141820908), SC_(715.678254892476818206948251991084031658534788) }},
|
|
|
|
|
{ { static_cast<T>(-4.782769898853794e-15), static_cast<T>(0.99999999999999523), static_cast<T>(43.289540141820908), SC_(-713.67825489247727251051792450091274703212426) }},
|
|
|
|
|
{ { static_cast<T>(4.782769898853794e-15), static_cast<T>(0.50000000000000477), static_cast<T>(43.289540141820908), SC_(8235.578376364917373771471380274179857713986) }},
|
|
|
|
|
{ { static_cast<T>(-4.782769898853794e-15), static_cast<T>(0.49999999999999523), static_cast<T>(43.289540141820908), SC_(-8233.57837636502669085205930058992320862281194) }},
|
|
|
|
|
{ { static_cast<T>(4.782769898853794e-15), static_cast<T>(-0.49999999999999523), static_cast<T>(43.289540141820908), SC_(-696269.800378137841948029488304613132151506346) }},
|
|
|
|
|
{ { static_cast<T>(-4.782769898853794e-15), static_cast<T>(-0.50000000000000477), static_cast<T>(43.289540141820908), SC_(696271.8003781336298001417038674968935893361) }},
|
|
|
|
|
{ { static_cast<T>(8.1104991963343309e-05), static_cast<T>(-0.99991889500803666), static_cast<T>(-289.12455415725708), SC_(7.89625448009377635153307897651433007437615965e-124) }},
|
|
|
|
|
{ { static_cast<T>(-8.1104991963343309e-05), static_cast<T>(-1.0000811049919633), static_cast<T>(-289.12455415725708), SC_(7.8949781467741574268884621364833028722017032e-124) }},
|
|
|
|
|
|
|
|
|
|
{{ static_cast<double>(-1.98018241448205767), static_cast<double>(1.98450573845762079), static_cast<double>(54.4977916804564302), SC_(2972026581564772.790187123046255523239732028) }},
|
|
|
|
|
{{ static_cast<T>(-1.98018241448205767), static_cast<T>(1.98450573845762079), static_cast<T>(54.4977916804564302), SC_(2972026581564772.790187123046255523239732028) }},
|
|
|
|
|
|
|
|
|
|
{ { static_cast<double>(-7.8238229420435346e-05), static_cast<double>(-0.50007823822942044), static_cast<double>(-1896.0561106204987), SC_(1.00058778866237037053151236215058095904086972) }},
|
|
|
|
|
{ { static_cast<T>(-7.8238229420435346e-05), static_cast<T>(-0.50007823822942044), static_cast<T>(-1896.0561106204987), SC_(1.00058778866237037053151236215058095904086972) }},
|
|
|
|
|
|
|
|
|
|
// Unexpected high error : 2.48268e+91 Found : -9.61305e+268 Expected : -1.74382e+193
|
|
|
|
|
{ { static_cast<double>(5.9981750131794866e-15), static_cast<double>(-230.70702263712883), static_cast<double>(240.42092034220695), SC_(-1.74381782591884817018404492963109914357365958e+193) }},
|
|
|
|
|
{ { static_cast<T>(5.9981750131794866e-15), static_cast<T>(-230.70702263712883), static_cast<T>(240.42092034220695), SC_(-1.74381782591884817018404492963109914357365958e+193) }},
|
|
|
|
|
// Unexpected high error : 1.79769313486231570814527423731704356798070568e+308 Found : -9.61305077326281580724540507004198316499661687e+268 Expected : 1.74381782591870724567837900957146707932623893e+193
|
|
|
|
|
{ { static_cast<double>(-5.9981750131794866e-15), static_cast<double>(-230.70702263712883), static_cast<double>(240.42092034220695), SC_(1.74381782591870734495565763481520223752372107e+193) }},
|
|
|
|
|
//Unexpected exception : Error in function boost::math::hypergeometric_pFq<long double> : Cancellation is so severe that no bits in the result are correct, last result was - 13497.312248525042
|
|
|
|
|
{ { static_cast<double>(-0.00023636552788275367), static_cast<double>(0.49976363447211725), static_cast<double>(-55.448519088327885), SC_(1.00141219419064760011631555641142295011268795) }},
|
|
|
|
|
// Unexpected exception: Error in function boost::math::hypergeometric_pFq<long double>: Cancellation is so severe that no bits in the result are correct, last result was -13497.312248525042
|
|
|
|
|
{{ static_cast<double>(-0.00023636552788275367), static_cast<double>(-0.50023636552788275), static_cast<double>(-55.448519088327885), SC_(1.00093463146763986302362749764017215184711625) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long double> : Cancellation is so severe that no bits in the result are correct, last result was - 1.3871133003351527e+47
|
|
|
|
|
{ { static_cast<double>(-1.6548533913638905e-10), static_cast<double>(0.49999999983451465), static_cast<double>(-169.20843148231506), SC_(1.00000000117356793527360151094991866549128017) }},
|
|
|
|
|
// Unexpected exception: Error in function boost::math::hypergeometric_pFq<long double>: Cancellation is so severe that no bits in the result are correct, last result was -1.3871133003351527e+47
|
|
|
|
|
{{ static_cast<double>(-1.6548533913638905e-10), static_cast<double>(-0.50000000016548529), static_cast<double>(-169.20843148231506), SC_(1.00000000084161045914716192484600809610013447) }},
|
|
|
|
|
{ { static_cast<T>(-5.9981750131794866e-15), static_cast<T>(-230.70702263712883), static_cast<T>(240.42092034220695), SC_(1.74381782591870734495565763481520223752372107e+193) }},
|
|
|
|
|
//Unexpected exception : Error in function boost::math::hypergeometric_pFq<long T> : Cancellation is so severe that no bits in the result are correct, last result was - 13497.312248525042
|
|
|
|
|
{ { static_cast<T>(-0.00023636552788275367), static_cast<T>(0.49976363447211725), static_cast<T>(-55.448519088327885), SC_(1.00141219419064760011631555641142295011268795) }},
|
|
|
|
|
// Unexpected exception: Error in function boost::math::hypergeometric_pFq<long T>: Cancellation is so severe that no bits in the result are correct, last result was -13497.312248525042
|
|
|
|
|
{{ static_cast<T>(-0.00023636552788275367), static_cast<T>(-0.50023636552788275), static_cast<T>(-55.448519088327885), SC_(1.00093463146763986302362749764017215184711625) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long T> : Cancellation is so severe that no bits in the result are correct, last result was - 1.3871133003351527e+47
|
|
|
|
|
{ { static_cast<T>(-1.6548533913638905e-10), static_cast<T>(0.49999999983451465), static_cast<T>(-169.20843148231506), SC_(1.00000000117356793527360151094991866549128017) }},
|
|
|
|
|
// Unexpected exception: Error in function boost::math::hypergeometric_pFq<long T>: Cancellation is so severe that no bits in the result are correct, last result was -1.3871133003351527e+47
|
|
|
|
|
{{ static_cast<T>(-1.6548533913638905e-10), static_cast<T>(-0.50000000016548529), static_cast<T>(-169.20843148231506), SC_(1.00000000084161045914716192484600809610013447) }},
|
|
|
|
|
// Unexpected high error : 17825.7893791562892147339880466461181640625 Found : -0.000253525216373273569459012577453904668800532818 Expected : -0.000253525216374277052779756536082800266740377992
|
|
|
|
|
{ { static_cast<double>(-2.0211181797563725e-14), static_cast<double>(-1.0000000000000202), static_cast<double>(-25.653068032115698), SC_(-0.000253525216374277055047768086884693917115210113) }},
|
|
|
|
|
{ { static_cast<T>(-2.0211181797563725e-14), static_cast<T>(-1.0000000000000202), static_cast<T>(-25.653068032115698), SC_(-0.000253525216374277055047768086884693917115210113) }},
|
|
|
|
|
// Unexpected high error: 1.79769e+308 Found: -inf Expected: -2.63233e-197
|
|
|
|
|
{{ static_cast<double>(235.44106131792068), static_cast<double>(-2.250966744069919e-13), static_cast<double>(-974.28781914710999), SC_(-2.63233018990922939037251029961929844581862228e-197) }},
|
|
|
|
|
{{ static_cast<T>(235.44106131792068), static_cast<T>(-2.250966744069919e-13), static_cast<T>(-974.28781914710999), SC_(-2.63233018990922939037251029961929844581862228e-197) }},
|
|
|
|
|
// Unexpected high error : 1.79769313486231570814527423731704356798070568e+308 Found : -inf Expected : -3.53316570137147325345279499243339692001224196e+226
|
|
|
|
|
{ { static_cast<double>(-235.44106131792068), static_cast<double>(-2.250966744069919e-13), static_cast<double>(974.28781914710999), SC_(-3.53316570137147343919975579872097464691424847e+226) }},
|
|
|
|
|
{ { static_cast<T>(-235.44106131792068), static_cast<T>(-2.250966744069919e-13), static_cast<T>(974.28781914710999), SC_(-3.53316570137147343919975579872097464691424847e+226) }},
|
|
|
|
|
// Unexpected high error : 2.48268e+91 Found : -9.61305e+268 Expected : -1.74382e+193
|
|
|
|
|
{ { static_cast<double>(5.9981750131794866e-15), static_cast<double>(-230.70702263712883), static_cast<double>(240.42092034220695), SC_(-1.74381782591884817018404492963109914357365958e+193) }},
|
|
|
|
|
{ { static_cast<T>(5.9981750131794866e-15), static_cast<T>(-230.70702263712883), static_cast<T>(240.42092034220695), SC_(-1.74381782591884817018404492963109914357365958e+193) }},
|
|
|
|
|
// Unexpected high error : 1.79769313486231570814527423731704356798070568e+308 Found : -9.61305077326281580724540507004198316499661687e+268 Expected : 1.74381782591870724567837900957146707932623893e+193
|
|
|
|
|
{ { static_cast<double>(-5.9981750131794866e-15), static_cast<double>(-230.70702263712883), static_cast<double>(240.42092034220695), SC_(1.74381782591870734495565763481520223752372107e+193) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long double> : Cancellation is so severe that no bits in the result are correct, last result was 3.0871891698197084e+73
|
|
|
|
|
{ { static_cast<double>(-5.9981750131794866e-15), static_cast<double>(0.499999999999994), static_cast<double>(-240.42092034220695), SC_(1.00000000000004464930530925572237133417488137) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long double> : Cancellation is so severe that no bits in the result are correct, last result was 3.0871891698197084e+73
|
|
|
|
|
{ { static_cast<double>(-5.9981750131794866e-15), static_cast<double>(-0.500000000000006), static_cast<double>(-240.42092034220695), SC_(1.00000000000003262784934420226963147689063665) }},
|
|
|
|
|
{ { static_cast<T>(-5.9981750131794866e-15), static_cast<T>(-230.70702263712883), static_cast<T>(240.42092034220695), SC_(1.74381782591870734495565763481520223752372107e+193) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long T> : Cancellation is so severe that no bits in the result are correct, last result was 3.0871891698197084e+73
|
|
|
|
|
{ { static_cast<T>(-5.9981750131794866e-15), static_cast<T>(0.499999999999994), static_cast<T>(-240.42092034220695), SC_(1.00000000000004464930530925572237133417488137) }},
|
|
|
|
|
// Unexpected exception : Error in function boost::math::hypergeometric_pFq<long T> : Cancellation is so severe that no bits in the result are correct, last result was 3.0871891698197084e+73
|
|
|
|
|
{ { static_cast<T>(-5.9981750131794866e-15), static_cast<T>(-0.500000000000006), static_cast<T>(-240.42092034220695), SC_(1.00000000000003262784934420226963147689063665) }},
|
|
|
|
|
// Unexpected high error : 18466.4373304979599197395145893096923828125 Found : 1.32865406167486480872551302123696359558380209e-08 Expected : 1.3286540616694168317751162703647255236560909e-08
|
|
|
|
|
{ { static_cast<double>(6.772927684190258e-10), static_cast<double>(-0.99999999932270722), static_cast<double>(-483.69576895236969), SC_(1.32865406166941679958876322759721528297325713e-08) }},
|
|
|
|
|
{ { static_cast<T>(6.772927684190258e-10), static_cast<T>(-0.99999999932270722), static_cast<T>(-483.69576895236969), SC_(1.32865406166941679958876322759721528297325713e-08) }},
|
|
|
|
|
// Unexpected high error: 1.79769e+308 Found: -nan(ind) Expected: 5.31173e-38
|
|
|
|
|
{{ static_cast<double>(6763.4877452850342), static_cast<double>(3.6834977949762315e-08), static_cast<double>(-210.20976513624191), SC_(5.31173132667573457976877380237496445775181141e-38) }},
|
|
|
|
|
{{ static_cast<T>(6763.4877452850342), static_cast<T>(3.6834977949762315e-08), static_cast<T>(-210.20976513624191), SC_(5.31173132667573457976877380237496445775181141e-38) }},
|
|
|
|
|
// Unexpected high error : 1.79769313486231570814527423731704356798070568e+308 Found : -nan(ind) Expected : 1.04274264437409856500364465136386556989276338e+54
|
|
|
|
|
{ { static_cast<double>(-6763.4877452850342), static_cast<double>(3.6834977949762315e-08), static_cast<double>(210.20976513624191), SC_(1.04274264437409861991447530452939035771734596e+54) }},
|
|
|
|
|
{ { static_cast<T>(-6763.4877452850342), static_cast<T>(3.6834977949762315e-08), static_cast<T>(210.20976513624191), SC_(1.04274264437409861991447530452939035771734596e+54) }},
|
|
|
|
|
// Unexpected high error: 3.17219226436543247206316287281668161679098192e+185 Found: 1.00012411189051491970538746574092795078602734e+201 Expected: 14198882672502154063215954231296
|
|
|
|
|
{{ static_cast<double>(76763.042617797852), static_cast<double>(-21.722407214343548), static_cast<double>(-0.60326536209322512), SC_(14198882672502153010712531896984.8126667697959) }},
|
|
|
|
|
{{ static_cast<T>(76763.042617797852), static_cast<T>(-21.722407214343548), static_cast<T>(-0.60326536209322512), SC_(14198882672502153010712531896984.8126667697959) }},
|
|
|
|
|
|
|
|
|
|
// Unexpected high error: 1.79769313486231570814527423731704356798070568e+308 Found: -2.39521645877904927856730119998375850409649219e+124 Expected: 2.3952164587795095929135248712964248422934629e+124
|
|
|
|
|
{{ static_cast<double>(-1.8857404964801872e-09), static_cast<double>(-226.52341184020042), static_cast<double>(160.86221924424171), SC_(2.39521645877950946848639784331327651190093595e+124) }},
|
|
|
|
|
{{ static_cast<T>(-1.8857404964801872e-09), static_cast<T>(-226.52341184020042), static_cast<T>(160.86221924424171), SC_(2.39521645877950946848639784331327651190093595e+124) }},
|
|
|
|
|
// Unexpected high error : 73027.246763920571538619697093963623046875 Found : 0.000111810625893715248580992382976262433658121154 Expected : 0.000111810625895528292111404111697225971511215903
|
|
|
|
|
{ { static_cast<double>(-7.5220323642510769e-13), static_cast<double>(-1.0000000000007523), static_cast<double>(-17.948102783411741), SC_(0.00011181062589552829441403260197223627311023229) }},
|
|
|
|
|
{ { static_cast<T>(-7.5220323642510769e-13), static_cast<T>(-1.0000000000007523), static_cast<T>(-17.948102783411741), SC_(0.00011181062589552829441403260197223627311023229) }},
|
|
|
|
|
// Unexpected high error: 111726.15160028330865316092967987060546875 Found: 0.00856985181006919560786627698689699172973632813 Expected: 0.00856985180985659310282098743982714950107038021
|
|
|
|
|
{{ static_cast<double>(5.6136137469239618e-15), static_cast<double>(-0.99999999999999434), static_cast<double>(-1989.8742001056671), SC_(0.00856985180985659334965068576732515544478559175) }},
|
|
|
|
|
{{ static_cast<T>(5.6136137469239618e-15), static_cast<T>(-0.99999999999999434), static_cast<T>(-1989.8742001056671), SC_(0.00856985180985659334965068576732515544478559175) }},
|
|
|
|
|
// Unexpected high error : 10431.000000023717802832834422588348388671875 Found : 0.99999999999772626324556767940521240234375 Expected : 1.00000000000004241051954068097984418272972107
|
|
|
|
|
{ { static_cast<double>(-5.6136137469239618e-15), static_cast<double>(-0.50000000000000566), static_cast<double>(-1989.8742001056671), SC_(1.00000000000004243096226509338784935080089269) }},
|
|
|
|
|
{ { static_cast<T>(-5.6136137469239618e-15), static_cast<T>(-0.50000000000000566), static_cast<T>(-1989.8742001056671), SC_(1.00000000000004243096226509338784935080089269) }},
|
|
|
|
|
// And more from error rate testing:
|
|
|
|
|
{{ (T)std::ldexp((double)-17079780487168000, -44), (T)std::ldexp((double)9462273998848000, -46), (T)std::ldexp((double)9928190459904000, -48), SC_(7.7358754011357422722746277257633664799903803239195e-72) }},
|
|
|
|
|
{{ (T)std::ldexp((double)-16238757384192000, -44), (T)std::ldexp((double)17248812490752000, -44), (T)std::ldexp((double)12549255331840000, -49), SC_(4.7354970214088286546733909450191631190700414608975e-10) }},
|
|
|
|
|
{{ static_cast<double>(-6.8543290253728628), static_cast<double>(607.72073245607316), static_cast<double>(253.26409819535911), SC_(0.024418741483258497441042709681531519387974841769189) }},
|
|
|
|
|
{{ static_cast<T>(-6.8543290253728628), static_cast<T>(607.72073245607316), static_cast<T>(253.26409819535911), SC_(0.024418741483258497441042709681531519387974841769189) }},
|
|
|
|
|
{{ (T)std::ldexp((double)-15569844699136000, -52), (T)std::ldexp((double)12855440629760000, -44), (T)std::ldexp((double)12563412279296000, -45), SC_(0.097879401070280078654536987721507669872679020399179) }},
|
|
|
|
|
{{ (T)std::ldexp((double)-13521484578816000, -48), (T)std::ldexp((double)11813014388736000, -46), (T)std::ldexp((double)12736881098752000, -48), SC_(9.1262751214688536871555425535678062558805718157237e-08) }},
|
|
|
|
|
{{ (T)std::ldexp((double)-13125670141952000, -44), (T)std::ldexp((double)16524914262016000, -44), (T)std::ldexp((double)12270166867968000, -49), SC_(2.0809215788388623809065210261671764534436583442155e-08) }},
|
|
|
|
|
@@ -295,36 +295,36 @@ void test_spots6(T, const char* type_name)
|
|
|
|
|
//
|
|
|
|
|
// Special cases for a,b equal and negative integers, see:
|
|
|
|
|
//
|
|
|
|
|
{ {-1, -1, 0.9999999999990905052982270717620850, SC_(1.9999999999990905052982270717620850)} },
|
|
|
|
|
{ { -2, -2, 0.9999999999990905052982270717620850, SC_(2.4999999999981810105964545571144762) } },
|
|
|
|
|
{ { -3, -3, 0.9999999999990905052982270717620850, SC_(2.6666666666643929299122351732524916) } },
|
|
|
|
|
{ { -4, -4, 0.9999999999990905052982270717620850, SC_(2.7083333333309080141286065586746589) } },
|
|
|
|
|
{ { -5, -5, 0.9999999999990905052982270717620850, SC_(2.7166666666642034518493660889297968) } },
|
|
|
|
|
{ { -6, -6, 0.9999999999990905052982270717620850, SC_(2.7180555555530847616157402206496325) } },
|
|
|
|
|
{ { -7, -7, 0.9999999999990905052982270717620850, SC_(2.7182539682514961968413528410609673) } },
|
|
|
|
|
{ { -8, -8, 0.9999999999990905052982270717620850, SC_(2.7182787698387976036876421724036051) } },
|
|
|
|
|
{ { -9, -9, 0.9999999999990905052982270717620850, SC_(2.7182815255707199797197951818652022) } },
|
|
|
|
|
{ { -10, -10, 0.9999999999990905052982270717620850, SC_(2.7182818011439122170723781245206092) } },
|
|
|
|
|
{ { -11, -11, 0.9999999999990905052982270717620850, SC_(2.7182818261960206022634645412810530) } },
|
|
|
|
|
{ { -12, -12, 0.9999999999990905052982270717620850, SC_(2.7182818282836963010274896793573756) } },
|
|
|
|
|
{ { -13, -13, 0.9999999999990905052982270717620850, SC_(2.7182818284442867393938070953642430) } },
|
|
|
|
|
{ { -14, -14, 0.9999999999990905052982270717620850, SC_(2.7182818284557574849913907639252443) } },
|
|
|
|
|
{ { -15, -15, 0.9999999999990905052982270717620850, SC_(2.7182818284565222013645623129904880) } },
|
|
|
|
|
{ { -16, -16, 0.9999999999990905052982270717620850, SC_(2.7182818284565699961378854913379726) } },
|
|
|
|
|
{ { -17, -17, 0.9999999999990905052982270717620850, SC_(2.7182818284565728075951397933896427)} },
|
|
|
|
|
{ { -18, -18, 0.9999999999990905052982270717620850, SC_(2.7182818284565729637872094766949018) } },
|
|
|
|
|
{ { -19, -19, 0.9999999999990905052982270717620850, SC_(2.7182818284565729720078447231771757) } },
|
|
|
|
|
{ { -20, -20, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724188764855009155) } },
|
|
|
|
|
{ { -21, -21, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724384494265639330) } },
|
|
|
|
|
{ { -22, -22, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393391057031602) } },
|
|
|
|
|
{ { -23, -23, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393777874048657) } },
|
|
|
|
|
{ { -24, -24, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393793991424368) } },
|
|
|
|
|
{ { -25, -25, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794636119396) } },
|
|
|
|
|
{ { -26, -26, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794660915359) } },
|
|
|
|
|
{ { -27, -27, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794661833728) } },
|
|
|
|
|
{ { -28, -28, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794661866527) } },
|
|
|
|
|
{ { -29, -29, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794661867658) } },
|
|
|
|
|
{ { -30, -30, 0.9999999999990905052982270717620850, SC_(2.7182818284565729724393794661867696) } },
|
|
|
|
|
{ {-1, -1, SC_(0.9999999999990905052982270717620850), SC_(1.9999999999990905052982270717620850)} },
|
|
|
|
|
{ { -2, -2, SC_(0.9999999999990905052982270717620850), SC_(2.4999999999981810105964545571144762) } },
|
|
|
|
|
{ { -3, -3, SC_(0.9999999999990905052982270717620850), SC_(2.6666666666643929299122351732524916) } },
|
|
|
|
|
{ { -4, -4, SC_(0.9999999999990905052982270717620850), SC_(2.7083333333309080141286065586746589) } },
|
|
|
|
|
{ { -5, -5, SC_(0.9999999999990905052982270717620850), SC_(2.7166666666642034518493660889297968) } },
|
|
|
|
|
{ { -6, -6, SC_(0.9999999999990905052982270717620850), SC_(2.7180555555530847616157402206496325) } },
|
|
|
|
|
{ { -7, -7, SC_(0.9999999999990905052982270717620850), SC_(2.7182539682514961968413528410609673) } },
|
|
|
|
|
{ { -8, -8, SC_(0.9999999999990905052982270717620850), SC_(2.7182787698387976036876421724036051) } },
|
|
|
|
|
{ { -9, -9, SC_(0.9999999999990905052982270717620850), SC_(2.7182815255707199797197951818652022) } },
|
|
|
|
|
{ { -10, -10, SC_(0.9999999999990905052982270717620850), SC_(2.7182818011439122170723781245206092) } },
|
|
|
|
|
{ { -11, -11, SC_(0.9999999999990905052982270717620850), SC_(2.7182818261960206022634645412810530) } },
|
|
|
|
|
{ { -12, -12, SC_(0.9999999999990905052982270717620850), SC_(2.7182818282836963010274896793573756) } },
|
|
|
|
|
{ { -13, -13, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284442867393938070953642430) } },
|
|
|
|
|
{ { -14, -14, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284557574849913907639252443) } },
|
|
|
|
|
{ { -15, -15, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565222013645623129904880) } },
|
|
|
|
|
{ { -16, -16, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565699961378854913379726) } },
|
|
|
|
|
{ { -17, -17, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565728075951397933896427)} },
|
|
|
|
|
{ { -18, -18, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729637872094766949018) } },
|
|
|
|
|
{ { -19, -19, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729720078447231771757) } },
|
|
|
|
|
{ { -20, -20, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724188764855009155) } },
|
|
|
|
|
{ { -21, -21, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724384494265639330) } },
|
|
|
|
|
{ { -22, -22, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393391057031602) } },
|
|
|
|
|
{ { -23, -23, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393777874048657) } },
|
|
|
|
|
{ { -24, -24, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393793991424368) } },
|
|
|
|
|
{ { -25, -25, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794636119396) } },
|
|
|
|
|
{ { -26, -26, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794660915359) } },
|
|
|
|
|
{ { -27, -27, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794661833728) } },
|
|
|
|
|
{ { -28, -28, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794661866527) } },
|
|
|
|
|
{ { -29, -29, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794661867658) } },
|
|
|
|
|
{ { -30, -30, SC_(0.9999999999990905052982270717620850), SC_(2.7182818284565729724393794661867696) } },
|
|
|
|
|
|
|
|
|
|
{ {-1, -1, 23.5, 24.500000000000000000000000000000000} },
|
|
|
|
|
{ { -2, -2, 23.5, SC_(300.62500000000000000000000000000000) } },
|
|
|
|
|
@@ -395,14 +395,18 @@ void test_spots6(T, const char* type_name)
|
|
|
|
|
{{ 13, 1.5f, 61, SC_(1.35508577094765660270265300640877455638098585524020525369044e39)}},
|
|
|
|
|
{{ 13, 1.5f - T(1)/128, 61, SC_(1.40067238333701986992154961431485209677766220602448290643906e39)}},
|
|
|
|
|
{{ 13, 1.5f + T(1)/128, 61, SC_(1.31105748771677778012064837998217769289913724450105998963999e39)}},
|
|
|
|
|
|
|
|
|
|
// Uncovered code:
|
|
|
|
|
{ { SC_(3.125), SC_(-4.25), SC_(0.25), SC_(0.8377654489787288706170314748630804839990046835429477943509538691)}},
|
|
|
|
|
{ { SC_(3.125), SC_(-4.25), SC_(6.25), SC_(-1.0732328736644883882525050418994056179896661423277961620744e8)}},
|
|
|
|
|
} };
|
|
|
|
|
static const std::array<std::array<T, 4>, 2> hypergeometric_1F1_big_bugs = { {
|
|
|
|
|
#if DBL_MAX_EXP == LDBL_MAX_EXP
|
|
|
|
|
{{ static_cast<double>(7.8238229420435346e-05), static_cast<double>(-5485.3222503662109), static_cast<double>(1896.0561106204987), BOOST_MATH_HUGE_CONSTANT(T, 1000, 4.33129800901478785957996719992774682013355926e+668) }},
|
|
|
|
|
{{ static_cast<double>(-7.8238229420435346e-05), static_cast<double>(-5485.3222503662109), static_cast<double>(1896.0561106204987), BOOST_MATH_HUGE_CONSTANT(T, 1000, -4.3248750673398590673783317624407455467680038e+668) }},
|
|
|
|
|
{{ static_cast<T>(7.8238229420435346e-05), static_cast<T>(-5485.3222503662109), static_cast<T>(1896.0561106204987), BOOST_MATH_HUGE_CONSTANT(T, 1000, 4.33129800901478785957996719992774682013355926e+668) }},
|
|
|
|
|
{{ static_cast<T>(-7.8238229420435346e-05), static_cast<T>(-5485.3222503662109), static_cast<T>(1896.0561106204987), BOOST_MATH_HUGE_CONSTANT(T, 1000, -4.3248750673398590673783317624407455467680038e+668) }},
|
|
|
|
|
#else
|
|
|
|
|
{ { static_cast<double>(7.8238229420435346e-05), static_cast<double>(-5485.3222503662109), static_cast<double>(1896.0561106204987), SC_(4.33129800901478785957996719992774682013355926e+668) } },
|
|
|
|
|
{ { static_cast<double>(-7.8238229420435346e-05), static_cast<double>(-5485.3222503662109), static_cast<double>(1896.0561106204987), SC_(-4.3248750673398590673783317624407455467680038e+668) } },
|
|
|
|
|
{ { static_cast<T>(7.8238229420435346e-05), static_cast<T>(-5485.3222503662109), static_cast<T>(1896.0561106204987), SC_(4.33129800901478785957996719992774682013355926e+668) } },
|
|
|
|
|
{ { static_cast<T>(-7.8238229420435346e-05), static_cast<T>(-5485.3222503662109), static_cast<T>(1896.0561106204987), SC_(-4.3248750673398590673783317624407455467680038e+668) } },
|
|
|
|
|
#endif
|
|
|
|
|
} };
|
|
|
|
|
do_test_1F1<T>(hypergeometric_1F1_bugs, type_name, "Bug cases");
|
|
|
|
|
@@ -426,6 +430,15 @@ void test_spots7(T, const char* type_name)
|
|
|
|
|
do_test_1F1<T>(hypergeometric_1f1_neg_int, type_name, "Both parameters negative integers.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
void test_spots8(T, const char* type_name)
|
|
|
|
|
{
|
|
|
|
|
BOOST_CHECK_THROW(boost::math::hypergeometric_1F1(static_cast<T>(2), static_cast<T>(-100), static_cast<T>(0.5)), std::domain_error);
|
|
|
|
|
BOOST_CHECK_THROW(boost::math::hypergeometric_1F1(static_cast<T>(-100.1), static_cast<T>(-100), static_cast<T>(0.5)), std::domain_error);
|
|
|
|
|
BOOST_CHECK_THROW(boost::math::hypergeometric_1F1(static_cast<T>(-102), static_cast<T>(-100), static_cast<T>(0.5)), std::domain_error);
|
|
|
|
|
BOOST_CHECK_THROW(boost::math::hypergeometric_1F1(static_cast<T>(-50.25), static_cast<T>(-100), static_cast<T>(0.5)), std::domain_error);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
void test_spots(T z, const char* type_name)
|
|
|
|
|
{
|
|
|
|
|
@@ -448,6 +461,7 @@ void test_spots(T z, const char* type_name)
|
|
|
|
|
if(std::numeric_limits<T>::digits >= std::numeric_limits<double>::digits && std::numeric_limits<T>::digits <= 128)
|
|
|
|
|
test_spots6(z, type_name);
|
|
|
|
|
test_spots7(z, type_name);
|
|
|
|
|
test_spots8(z, type_name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|