diff --git a/.github/workflows/multiprecision.yml b/.github/workflows/multiprecision.yml index da9a9ebbd..3518c0d09 100644 --- a/.github/workflows/multiprecision.yml +++ b/.github/workflows/multiprecision.yml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: compiler: [ g++-12, clang++-14 ] - standard: [ c++14, c++17, c++20, c++2b ] + standard: [ c++14, c++17 ] suite: [ github_ci_block_1, github_ci_block_2 ] steps: - uses: actions/checkout@v3 @@ -91,7 +91,7 @@ jobs: fail-fast: false matrix: compiler: [ g++-10, g++-11, clang++-10, clang++-11 ] - standard: [ c++14, c++17, c++2a ] + standard: [ c++14, c++17 ] suite: [ github_ci_block_1, github_ci_block_2 ] steps: - uses: actions/checkout@v3 @@ -446,7 +446,7 @@ jobs: fail-fast: false matrix: toolset: [ msvc-14.0 ] - standard: [ 14, 17 ] + standard: [ 14, latest ] suite: [ github_ci_block_1, github_ci_block_2 ] steps: - uses: actions/checkout@v3 diff --git a/include/boost/multiprecision/cpp_bin_float.hpp b/include/boost/multiprecision/cpp_bin_float.hpp index 7678c5e00..82ac4afe7 100644 --- a/include/boost/multiprecision/cpp_bin_float.hpp +++ b/include/boost/multiprecision/cpp_bin_float.hpp @@ -2172,7 +2172,7 @@ class numeric_limits, ExpressionTemplates> infinity() { return boost::multiprecision::cpp_dec_float::inf(); } static constexpr boost::multiprecision::number, ExpressionTemplates> quiet_NaN() { return boost::multiprecision::cpp_dec_float::nan(); } static constexpr boost::multiprecision::number, ExpressionTemplates> signaling_NaN() { return boost::multiprecision::cpp_dec_float::zero(); } - static constexpr boost::multiprecision::number, ExpressionTemplates> denorm_min() { return boost::multiprecision::cpp_dec_float::zero(); } + static constexpr boost::multiprecision::number, ExpressionTemplates> denorm_min() { return (boost::multiprecision::cpp_dec_float::min)(); } }; template diff --git a/include/boost/multiprecision/cpp_int/bitwise.hpp b/include/boost/multiprecision/cpp_int/bitwise.hpp index de23f5265..99f635810 100644 --- a/include/boost/multiprecision/cpp_int/bitwise.hpp +++ b/include/boost/multiprecision/cpp_int/bitwise.hpp @@ -436,12 +436,12 @@ inline BOOST_MP_CXX14_CONSTEXPR void left_shift_generic(Int& result, double_limb ++i; } } - for (; rs - i >= 2 + offset; ++i) + for (; rs - i >= static_cast(static_cast(2u) + offset); ++i) { pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift; pr[rs - 1 - i] |= pr[rs - 2 - i - offset] >> (Int::limb_bits - shift); } - if (rs - i >= 1 + offset) + if (rs - i >= static_cast(static_cast(1u) + offset)) { pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift; ++i; diff --git a/include/boost/multiprecision/cpp_int/divide.hpp b/include/boost/multiprecision/cpp_int/divide.hpp index b1253fc36..136facea4 100644 --- a/include/boost/multiprecision/cpp_int/divide.hpp +++ b/include/boost/multiprecision/cpp_int/divide.hpp @@ -552,8 +552,14 @@ eval_modulus( const limb_type mod) { const std::ptrdiff_t n = static_cast(a.size()); - const double_limb_type two_n_mod = static_cast(1u) + (~static_cast(0u) - mod) % mod; - limb_type res = a.limbs()[n - 1] % mod; + + const double_limb_type two_n_mod = + static_cast + ( + static_cast(1u) + static_cast(static_cast(~static_cast(0u) - mod) % mod) + ); + + limb_type res = a.limbs()[n - 1] % mod; for (std::ptrdiff_t i = n - 2; i >= 0; --i) res = static_cast(static_cast(static_cast(res * two_n_mod) + a.limbs()[i]) % mod); diff --git a/include/boost/multiprecision/gmp.hpp b/include/boost/multiprecision/gmp.hpp index fdb848fef..ce02a5dff 100644 --- a/include/boost/multiprecision/gmp.hpp +++ b/include/boost/multiprecision/gmp.hpp @@ -3595,7 +3595,7 @@ class numeric_limits #include #include -#include +#include #include #include diff --git a/test/concepts/number_concept_check.cpp b/test/concepts/number_concept_check.cpp index dc1e02398..80067eb49 100644 --- a/test/concepts/number_concept_check.cpp +++ b/test/concepts/number_concept_check.cpp @@ -16,6 +16,7 @@ #pragma warning(disable : 4503) // decorated name length exceeded, name was truncated #endif +#include #include #include diff --git a/test/math/high_prec/gamma.ipp b/test/math/high_prec/gamma.ipp index 97186bfdf..bb6c6c37e 100644 --- a/test/math/high_prec/gamma.ipp +++ b/test/math/high_prec/gamma.ipp @@ -3,7 +3,7 @@ // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -static const boost::array::type, 3>, 500> gamma = {{{SC_(8.45530509948730468750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01), SC_(1.11676792084632275714192215809847832812560655161416701540037514678588899552795223636051283861515685855053582939146274240113874531527973814210488207830128530900559599074170389066138081891070712920623473461857632254352617595899153121789055651865429663273105801624222067275035146160407682419814612559770937851333313258174693831239060158272144283644033402005812336141640353704703451805075743457651474500575180336149704581761302422616802534269713673320145810616702623379426577267381016596640646036780085640e+00), SC_(1.10438728442867816609665916944098399086765601795314917615577669041382221945245269046345957164829024229823010663264720601624809651655116368339246859099278886577422386896811750937967494940960029250224075543433744666205413027910764506859493838993507216401131983731121529344952082060498119577899781093069658373786189150246027769179901839580061229387653730476486565832292623869480613925012343335744507187985817127088673548820437219886661135524261767270766239756270078148544872782377812888609878714473093021e-01)}, +static const std::array::type, 3>, 500> gamma = {{{SC_(8.45530509948730468750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01), SC_(1.11676792084632275714192215809847832812560655161416701540037514678588899552795223636051283861515685855053582939146274240113874531527973814210488207830128530900559599074170389066138081891070712920623473461857632254352617595899153121789055651865429663273105801624222067275035146160407682419814612559770937851333313258174693831239060158272144283644033402005812336141640353704703451805075743457651474500575180336149704581761302422616802534269713673320145810616702623379426577267381016596640646036780085640e+00), SC_(1.10438728442867816609665916944098399086765601795314917615577669041382221945245269046345957164829024229823010663264720601624809651655116368339246859099278886577422386896811750937967494940960029250224075543433744666205413027910764506859493838993507216401131983731121529344952082060498119577899781093069658373786189150246027769179901839580061229387653730476486565832292623869480613925012343335744507187985817127088673548820437219886661135524261767270766239756270078148544872782377812888609878714473093021e-01)}, {SC_(1.39026832580566406250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(8.87837246534584512058304626597150000489120292563756272246130863589440629431328166236343343023478965830481648988944668013833863592688512739847732271129409060356695212103238739655240822053671736250775878014127604440817225103010320322756075484745769185701456653223475749864397685319786785385530182719007531303116138466452735235078861018575437520732342354574967183308070807923233032727588780923086501266291147367564653286869648484915713961300281876539970618140056759819325004245961660980554836491213594461e-01), SC_(-1.18966833717491030777529019926331960352855377707641323046275606078389124027926611789911603150540144713683748681801863772072067302459578683018790819197528173413969356904557087663396842789779718125888832504274452988602707088024742817513733531775897173110489239191365127876847654130551501903438865671258532679739640203442463217240189322306203147786367096739239036281487648421042118138143391813517167916949838797835701356844050619004326570975617904601257077440910867376277877219954044806432791089137635152e-01)}, {SC_(1.43504619598388671875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(8.85908592055477020544823146996462988920753671462990877927427523793784391636857990149923096368122868020391764231333911220440936193158035215379333873738823239728773696032128851923243880532734156757960723683643045365212843713096041451134263420009087064362953191913886157628325070283143368675406959711653730415068180223485945836948634468821206791379329892575297995361852566312748126836116054701645545213593209611892028096694432232545135202461301088136703343459844999000604508302338782169984763967607501314e-01), SC_(-1.21141502936978554470331924245181844536653300286225422140798757837139525637498346623087068230762388958190805297179369893104223420947821790937027145400844138709085611406641604698885150056395888192847451388558341660380510005326476801210828545697252686002267491495285666799318711798085628503140489815338199728719860874280450505965277773655528536902886328052951994398070322644031431224912585052114632613788261969630244977993915035447500319483308338977079266591371885961850522890584558525442875774358053017e-01)}, {SC_(2.42817401885986328125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(1.26548780776578840420381427518520449855608041962978420562324571651972061904909219213050500986673056140976438565871543352029900201913847740572555310587852358164122797887781229263011351199466922757394212036282675265716319706112696638181549111225164845253224133071688478880244916384306812998466169110572223013741424946407661202839829092882797566392445456945362691783965322378415320774013882498835505927125822970066960016136071528037620210173970460365408629248314390843812310532824823798560386378408531758e+00), SC_(2.35457666634852101044747755129837867262195483343254983494923132129084740599968117459876158642974817916730545060077157131801833625262395918879296296970891493947670708984616066541861044565554092681572085484952572699514279293900419924199381144525738569464382042666825565090748449951697963176145208698932021640416912747873111038321169415221202446804427993828714087337477405157815350337354930690780319199568346826770338612483088645913829939414504125261936354188139129621440596127411902107048621213505069787e-01)}, diff --git a/test/math/high_prec/gamma_0.ipp b/test/math/high_prec/gamma_0.ipp index e3bf7d75d..d1ffd6db1 100644 --- a/test/math/high_prec/gamma_0.ipp +++ b/test/math/high_prec/gamma_0.ipp @@ -2,7 +2,7 @@ // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -static const boost::array::type, 3>, 101> gamma_0 = {{{SC_(1.43156441636360688183664865448643158739330056363229723426222506077465368434786796569824218750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-30), SC_(6.98536502143685108617882284090181520784225065279944459321343460310063824042105596746205061501871754388692206421700826292338586923926227628460021980992867287987375102820871203483062060697666614954318393354992686094982543110966849877446263308176165064356911280715433887048666237697473022869255273999217684089964991492221986910024913642477585922789463545534969256995761341961043378489622694491092689099559034124245255841747358458264103951568451574298386270253381902108950381976482928860300454676297330631e+29), SC_(6.87187849460716195307241085972306257332085866067179593404732520056618176287191986920381800623266452019036583359883694184875415202170061110761480957915606961682069515921066423464205321804055901215315467103669400564886703708251292818882278221076111306170866005908677608207802396451776607673326647945821489765973119269856654977100758235960633379767322574933089743488018675093572248899118887185116534963011794036363538903828089102456817460307090409752243309227015705466471210473582150215759294410478127318e+01)}, +static const std::array::type, 3>, 101> gamma_0 = {{{SC_(1.43156441636360688183664865448643158739330056363229723426222506077465368434786796569824218750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-30), SC_(6.98536502143685108617882284090181520784225065279944459321343460310063824042105596746205061501871754388692206421700826292338586923926227628460021980992867287987375102820871203483062060697666614954318393354992686094982543110966849877446263308176165064356911280715433887048666237697473022869255273999217684089964991492221986910024913642477585922789463545534969256995761341961043378489622694491092689099559034124245255841747358458264103951568451574298386270253381902108950381976482928860300454676297330631e+29), SC_(6.87187849460716195307241085972306257332085866067179593404732520056618176287191986920381800623266452019036583359883694184875415202170061110761480957915606961682069515921066423464205321804055901215315467103669400564886703708251292818882278221076111306170866005908677608207802396451776607673326647945821489765973119269856654977100758235960633379767322574933089743488018675093572248899118887185116534963011794036363538903828089102456817460307090409752243309227015705466471210473582150215759294410478127318e+01)}, {SC_(1.79146693234808763489644628257161121326585477954787539722758538118796423077583312988281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-30), SC_(5.58201763003960861567789539135859580193439485454005702914698335930268444742331582630745213615777247085201364155083693868300803234678816291383457578463565723759685983298265642045770249117431149944641399014596592494299731209900651334858910291525879151363330828856538879949073338110312308363596227316892822743368020808448586000291704754174750156554217552056937856371791137981786534012294619836443861840926728414921766784846846305707429974243911452854519547303013841568504048941438592827646572038542434135e+29), SC_(6.84945179903097403861349744215875103992060757962123025404796608423978602225846553619170965077356955755357802672163974219562277828210284327971512344158362567867847738326049609853308815256769082679556958330239424646993080494046302980172303736275513780193302833410723002758066285468945113082751363817936859921002909109039191137803314698577973722031573009127625727285778678734025455705063199556191858178447008447936782744160858096688591534358039500459582424936993394926936663017800067374964851005923319757e+01)}, {SC_(6.01361845021915553684662812684153866129482788357822620195491936101461760699748992919921875000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-30), SC_(1.66289233059599382108622045278925250222879368299965805063800397354768670022530740489524286087023172081743657291575193949292317670513431375657893264047630789615214924106176337174346019293635258374337002078109120613262494521256415816444259140590129490551962102684902275473895987026116781659018530303429482685495372173326818893646289757008674753758860465244922365484215329043013694653249383965600156071526093224196543564395256619974579165365709216420397501003922915691506013990491427372931318956493080999e+29), SC_(6.72835261508627487441809388914618718039806766838076765738449388127304650638500226155393279449547157554874214601262165687120232963516589317117744273330309623400314525833549943284641956342219602925993192470847874648719472012633435814459477730435577468888682456785797630097073380249832077254791664762750315685378649126380990575187276250739357550980693771790622800409807477947479455730830600697505092486997466317766437101841783321172164072094610651193846740792964214770153922331926924938123871030133738925e+01)}, {SC_(1.15805324961653822428570241697281798757994191687720197947442102304194122552871704101562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-29), SC_(8.63518150250108277194016891306233647484350850467664211488828521671098276856027646738832798460638738889745235576927151073499175108377545838358386482265787302310436375999567002230935819513356910576887220572360144418394608202135272298033654003052182297572299115574956232437725263892943148991293370552472446011183244210703600281122859489582978101451793967074375924992378742386032880290147673310487052110730167491270221379145909984226467052326276061760313245928809376103054222364829784917100855808316020815e+28), SC_(6.66282273346089416734535625179362666621182077643990467879063832625680227791050206585733185502957596233314540660483901760430911805270185678987126994680068402992221525616904588488441229909153800950377006070324398572799927651884646302955793101599665239041508783676953386426252223745918060631306977940834262621283653711331967519129060500243592868823804992668473953470906948420875648942763002156556099370463527314476558063517916220321125974741423139110495117826462394235672451732466307699999303905633370100e+01)}, diff --git a/test/math/high_prec/gamma_1_2.ipp b/test/math/high_prec/gamma_1_2.ipp index 9b59f040a..3b77d1429 100644 --- a/test/math/high_prec/gamma_1_2.ipp +++ b/test/math/high_prec/gamma_1_2.ipp @@ -2,7 +2,7 @@ // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -static const boost::array::type, 3>, 42> gamma_1_2 = {{{SC_(1.00000143051147460937500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(9.99999174288391999092757871949960760944599692334161113632612001448234829888352099654097074654344285708898686038400924243326257000995473599459860412189476206535957778861551088462375468578938240500307167618043731787467573306745319965463132052615688418631316435531309275145303892395341676733095522386701856522207240447267708668301329563326443831046210450368179263405643106444973478994275343456845976754204700528622443064906871609264433329448562184863557194334628845647631027980086626707202034219860132039e-01), SC_(-8.25711948900924692597299306183832574130326734078524848537366321722804959189414089321374321487571322916700881394838168937675017756067526027059906924659380618507813551107141661082752510377407448366888067712646753094821383103251070103298799663269077425948810538745741157050557462080083874347930605957984000258314264095908394093097201357665227991167061298266665567091332898437498972810629979744483195488186797207794753595348181654435055140261537588799716884603608921499148980999953580901141143177940912987e-07)}, +static const std::array::type, 3>, 42> gamma_1_2 = {{{SC_(1.00000143051147460937500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(9.99999174288391999092757871949960760944599692334161113632612001448234829888352099654097074654344285708898686038400924243326257000995473599459860412189476206535957778861551088462375468578938240500307167618043731787467573306745319965463132052615688418631316435531309275145303892395341676733095522386701856522207240447267708668301329563326443831046210450368179263405643106444973478994275343456845976754204700528622443064906871609264433329448562184863557194334628845647631027980086626707202034219860132039e-01), SC_(-8.25711948900924692597299306183832574130326734078524848537366321722804959189414089321374321487571322916700881394838168937675017756067526027059906924659380618507813551107141661082752510377407448366888067712646753094821383103251070103298799663269077425948810538745741157050557462080083874347930605957984000258314264095908394093097201357665227991167061298266665567091332898437498972810629979744483195488186797207794753595348181654435055140261537588799716884603608921499148980999953580901141143177940912987e-07)}, {SC_(1.00000190734863281250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(9.99998899052088870556298015139749114669312651159953142848295392815303317500016029969635974482718991700497816055817263571292901954688370348906253549005287861083171410201406647883485474421222649893000205148346129113166971062186410799748091336730057656052509954292585979817626028277775407407112537788176094920236533009104994139384430523864665582176691381647483160502797293814016280767994802120063648051546796192887146643586658388925305855542153022171696856252158767172309183370455258068376853535216362470e-01), SC_(-1.10094851717304002712268894099127595921487972573933586334689334527229248323934919014638550108524145553527405840273344353639000207218741487766297554573091476469480049905558271838458052416000410785954618163762239772914309942293307957081996934083616872743593791436745000684254951241300456576383726667911197040993317728453157236842228209877681100498209542136619826560930165076125847234456840374995616717759747291279589613997037378064178672114262185168274084948288257929977168303768505416039428474173888808e-06)}, {SC_(1.00000715255737304687500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(9.99995871482439030123562974470516145713394424812766636877383802416011979320279049083203112581733456099995683282738209665836532102308697025612534875128891666457345958520964130243018916433692201391748875528601051438277602513487355536872792386028259758535373151611332556663150738220804194424251848920431250539383936484964316068698893034940814586752406503829065074575875145977149630424770495659102034695665964258237898580634499483188073724936730054003089085359012125236558137262535083336056587140852800456e-01), SC_(-4.12852608332195851691203735959218082583309360270436920767851544796916430110170536266576060329474456009336058048427569309546294249770163912414335808655484082224000396074276450271816190829739395101572464054265620776265007334847480163917450671956548131916218767194273440313568874946498741895154818277265159531908173961864655218297464043731661102093299016819229971909322404880656592327408588191219928932127624518196151869557514361114934732089059682453199895851884381325844177861206907545771018319777526395e-06)}, {SC_(1.00001382827758789062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(9.99992018290683797846000226935056171185859936503128820835471750919976663152444739936675800355406606711512157240239127384452319098942674657017897817468120805836926848121657068423652761200611382709254842088377275403963217241357409925817025690122325186353402737193791739281574809393066322820848698863824029214072384456058169355314312772713088236719681578106869264305967664276510843791749709913005299240434221449190581606080546735845029507633743966156522363875224608869485434247381577247694136841387337506e-01), SC_(-7.98174117021345792583197715106148864099769997469814968659586924923411082051309399423820083379003398574828706106026847702771900443355053076333928564661934959347977543844422372354610528704694194514369673005031394800075820697954595056265037686466809758696282814462959586452027325510485481129596043614869818722579861830854885232173045580402917981131629803571485201158990471407846736365894690896340575434314344665619486163529114866521238533471912104264466874277993839991170047144881087379199096956344930374e-06)}, diff --git a/test/math/high_prec/gamma_neg.ipp b/test/math/high_prec/gamma_neg.ipp index ca2a0ae23..fe0fdfdae 100644 --- a/test/math/high_prec/gamma_neg.ipp +++ b/test/math/high_prec/gamma_neg.ipp @@ -2,7 +2,7 @@ // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -static const boost::array::type, 3>, 37> gamma_neg = {{{SC_(-1.99999923706054687500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+01), SC_(5.38759967029644469616560016595808625878165115132471799422204595092834392971724800295938555800538579100535589193822651301525500332693249993444773179507605929981356967101597471714913951503842754010685235605590797063810809157738833492835143542871035345598564520502417261905785944669205716043072390494373490322257034881967960644010974493437512042261352756680026670684484992045553462469360277775982744564680091587106757967345008672070319207656022615608926133979854875552214891487061214012912806431933345947e-14), SC_(-3.05520913463708585014455473559668296916495608452525817143535406097314334283489713736687704477991497991743275712369308074041840740834063476031830765479882984731724892451179592298597321676916458283977757781247413334326383052593649852562076019260959425621178055912343813003433354826966649421695320908213626776555336215272482327946648668250227228003910957432402159538084527454011770143934418513330640797665570919946502860682207966694798401992754387345165102379010439953671041677549784758078058910327404016e+01)}, +static const std::array::type, 3>, 37> gamma_neg = {{{SC_(-1.99999923706054687500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+01), SC_(5.38759967029644469616560016595808625878165115132471799422204595092834392971724800295938555800538579100535589193822651301525500332693249993444773179507605929981356967101597471714913951503842754010685235605590797063810809157738833492835143542871035345598564520502417261905785944669205716043072390494373490322257034881967960644010974493437512042261352756680026670684484992045553462469360277775982744564680091587106757967345008672070319207656022615608926133979854875552214891487061214012912806431933345947e-14), SC_(-3.05520913463708585014455473559668296916495608452525817143535406097314334283489713736687704477991497991743275712369308074041840740834063476031830765479882984731724892451179592298597321676916458283977757781247413334326383052593649852562076019260959425621178055912343813003433354826966649421695320908213626776555336215272482327946648668250227228003910957432402159538084527454011770143934418513330640797665570919946502860682207966694798401992754387345165102379010439953671041677549784758078058910327404016e+01)}, {SC_(-1.99999847412109375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+01), SC_(2.69386191462138420561447561038626224725117398415048907272463757295904788742894427112020961644079599036497975583044564125160703746233180407160915929733564532906838635276687410781434210968261046929963453818364947812836593421630201317463294954608503146564867836821695405794382366118304227852763276692341615826262038036617817133464411475558985554970017557556048465581312483241407482874644374899521475569917118996299966475968950890235428728201297431223495619259559376314387803604742172470399752300894010086e-14), SC_(-3.12452154818785908505194845842029487392648620731103347207456198557211206269365761877112968634636619292832400844203780475198066901590319174974134489763347121929467737468999532787760555110439805900327811331337512388862249634034030061740800094556846919604832510099987981577497784616554033244322463034054231121064946938163159446958559684540678853656682058592193991149452718861454400627271395975031543423753488544502623725092389101829686729006797143129176563509552320320921307398500613227697762154498835511e+01)}, {SC_(-1.99999389648437500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+01), SC_(6.73558608044741627613413161420894656660058244124013446415180740530561515977792519827786858298784888263741224694297801215204067458618582387642758104711087267937066115855571693609659647797364715279501851796768712301165273782031584039675949865273825182234792801200308929645339256017900697087444360181691659499183064954028133244891427139092630423281589186925295403769367835997750592932795632852612041064703694287432540499377174363368787259684826128422805916075141721701587432972834880653382078107215883569e-15), SC_(-3.26313715687234132229989418098489729669001773722991796067366352789851953766781785355780461541281354995935763718291948133987534108182481755843147601008349939129025054962326064655846767144347454369030917012611615739585725945726636841524124521503115786360787497866575048827515382394272660988449740261822693490509884264357425735902873622582534393835987530480698916877954377750564674591032227255165999311213894591898118964168841058394282558238633558154941771511534821685892908044060408931199226908086343943e+01)}, {SC_(-1.99998855590820312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+01), SC_(3.59289216564568867632702480652600850125829511549703922062266320158421424945544656850160568897182121831684617893475524325850864891292297653913606807975675975259957804287451864251597624292500430910033064835076068306145275196971245113751174694351289752436653598202952240666859873317646170787625375676127677093291213853982061950730506074442529379206213215500763520379868910898060124741913721352876983505985493576120693388339647532467182999015385778276273816304969530871418809352985232191692793886546790925e-15), SC_(-3.32598188995743285208683140963089026685291890297515664542182571526269358171760131460685426882247943951266520599997842598239034632786604956930951026409905645612178203533000816237119225706763979794277386461267856071615237308870990401079821797917297401362178969714385727645391303737983992056296555425202777558250602185647615246086261095852465123851993283123459088339560080939847486920372910054110601643702914129947575674545524987272553810415588957364532956825624756792802124871830851169286718730345076044e+01)}, diff --git a/test/math/high_prec/test_gamma.hpp b/test/math/high_prec/test_gamma.hpp index 4eb1a39a8..bd890fb7c 100644 --- a/test/math/high_prec/test_gamma.hpp +++ b/test/math/high_prec/test_gamma.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "libs/math/test/functor.hpp" #include "libs/math/test/handle_test_result.hpp" diff --git a/test/sincos.ipp b/test/sincos.ipp index 863d13dce..6533a9008 100644 --- a/test/sincos.ipp +++ b/test/sincos.ipp @@ -6,7 +6,7 @@ #ifndef SC_ #define SC_(x) static_cast(BOOST_STRINGIZE(x)) #endif -static const boost::array, 351> sincos = {{{{SC_(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00)}}, +static const std::array, 351> sincos = {{{{SC_(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00), SC_(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00)}}, {{SC_(1.40129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-45), SC_(1.40129846432481707092372958328991613128026194187651577175706828388979108268586060148663818790351457308800340787773674912766449462132584452348391040651604302709449379239880726512478831381302725264182410989377719891632824721505923538954718756787336781717738534589892517841597367279244325993758027159471887458619888927468693858915842127431596637785499217667152866164893680003868553832956009253404298979008131545708840033018263781326433505544641583562700173344804674499926293464492880691980275690339365803e-45), SC_(9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999018181306940454689380845609002744871404956897500110086977690176562578949055656828707980423353194933884755560203023626611533678706648719853431695157198205786802969097792096779337651473648106366274410397508094269252694850980143248502445340096430658555215811691593841493933838124949891785030283170868447315870535323338409489664710335241993056422950940322493204196544853978533985277190092235175175166662055024795932e-01)}}, {{SC_(2.80259692864963414184745916657983226256052388375303154351413656777958216537172120297327637672424316406250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-45), SC_(2.80259692864963414184745916657983226256052388375303154351413656777958216537172120297327637305538709251652726302189399302131595697060675618787128325212834421675595033919045812099830759114965997778797780834590216037028749734324604341671062262121984141170908506261795217328399995070051694207174852643747661007471491085388153950316454056337188894731416167834304541739657820299760902499844561410566938370733275087498466575935335388483418932214377317214724719142755203142240541630547874210971000852044930167e-45), SC_(9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999996072725227761818757523382436010979485619827590000440347910760706250315796222627314831921695340715627621329535004694534216141863971398843021645158093032804874254958679377217097895883419963322632791960267614868367018464110751226843336329749526804502021446103686642277447920958483566966767779163022051468729743460838565621454431717928897730690691764161059400654765666575293764292473950159219386917758286295006197205e-01)}}, {{SC_(4.20389539297445121277118874986974839384078582562954731527120485166937324805758180445991456508636474609375000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-45), SC_(4.20389539297445121277118874986974839384078582562954731527120485166937324805758180445991455270397550462609201269889222644694135477579780213406558097593316173155133239476779615836929419876071343120971532989314549209781635141154879822077216303667702093239942499810993653083491071372581441825986232094472955340205971243975796884028319908471468409203092484306028848922723223269266129671649514061121265458553966701648599990935430386904212713721653207641489661037980396865125821447766865757966623202011002481e-45), SC_(9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999991163631762464092204427610481024703842644612077500990782799211589063210541500911458371823821746369757456643806982812806123846003228662260328395521200223742443485215609381850897310524629291344568956530530262684105635460612822223837210330705593721872335387821404502143865865987389605653700871033897311375196441706482504472066650591798878127657289137553615069304296604544940870015086975449211081356049236357710750027e-01)}}, diff --git a/test/test_acos.cpp b/test/test_acos.cpp index c4260c14c..8ce3a16aa 100644 --- a/test/test_acos.cpp +++ b/test/test_acos.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -64,7 +64,7 @@ void test() // Test with some exact binary values as input - this tests our code // rather than the test data: // - static const boost::array, 13> exact_data = + static const std::array, 13> exact_data = {{ {{0.5, static_cast("1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550442743555")}}, {{0.25, static_cast("1.31811607165281796574566425464604046984639096659071471685354851741333314266208327690226867044304393238598144034722708676")}}, diff --git a/test/test_arithmetic.hpp b/test/test_arithmetic.hpp index 732424647..7016187f8 100644 --- a/test/test_arithmetic.hpp +++ b/test/test_arithmetic.hpp @@ -7,6 +7,7 @@ #include #endif +#include #include #include #include @@ -3182,6 +3183,8 @@ const T& self(const T& a) { return a; } template void test() { + using std::swap; + #if !defined(NO_MIXED_OPS) && !defined(SLOW_COMPILER) boost::multiprecision::is_number tag; test_mixed(tag); diff --git a/test/test_arithmetic_mpz_br.cpp b/test/test_arithmetic_mpz_br.cpp index c109a49a9..33f1a222c 100644 --- a/test/test_arithmetic_mpz_br.cpp +++ b/test/test_arithmetic_mpz_br.cpp @@ -7,13 +7,13 @@ #define _SCL_SECURE_NO_WARNINGS #endif +#include #include #define NO_MIXED_OPS #define BOOST_MP_NOT_TESTING_NUMBER #include "test_arithmetic.hpp" -#include template struct is_boost_rational > : public std::integral_constant diff --git a/test/test_asin.cpp b/test/test_asin.cpp index 8dfeb4525..a90b9ef5d 100644 --- a/test/test_asin.cpp +++ b/test/test_asin.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -64,7 +64,7 @@ void test() // Test with some exact binary values as input - this tests our code // rather than the test data: // - static const boost::array, 6> exact_data = + static const std::array, 6> exact_data = {{ {{0.5, static_cast("0.523598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752213717775")}}, {{0.25, static_cast("0.252680255142078653485657436993710972252193733096838193633923778740575060481021222411748742228014601605092602909414066566")}}, diff --git a/test/test_assume_uniform_precision.cpp b/test/test_assume_uniform_precision.cpp index e36fe1c83..e673a76e1 100644 --- a/test/test_assume_uniform_precision.cpp +++ b/test/test_assume_uniform_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_atan.cpp b/test/test_atan.cpp index 83bc40993..58ab83551 100644 --- a/test/test_atan.cpp +++ b/test/test_atan.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -87,7 +87,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "9.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999966666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-101", "9.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666668666666666666667e-97", diff --git a/test/test_cos_near_half_pi.cpp b/test/test_cos_near_half_pi.cpp index 6f219982b..00b0fb371 100644 --- a/test/test_cos_near_half_pi.cpp +++ b/test/test_cos_near_half_pi.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include #include "test.hpp" diff --git a/test/test_cosh.cpp b/test/test_cosh.cpp index 770022235..b165276bb 100644 --- a/test/test_cosh.cpp +++ b/test/test_cosh.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "1.0560191127459844751259038114395241283965590525302917878166464679729562764239266483419824023679041866569431842053263976225991679105269492268050148624443706785607467750929028856273183654547152707568642275917435773104050171284580773949313906303074811586096214771879801872225500237540725592288167903987152007171391207680034517664218965133028298959753155835975555361514087618679892905973726581183754237665", "6.0577917650974496023981039346694689204850927958941226507775366589415588030232830758139222010716099059155799853188868489737439396141346120898610181630988217093945337280471788812956307352429914669334599644412036010014302812555700905490062030666482387008384856645533100266205122930455496234252478878949675888122615795451076521244771554025667181070733415815608287241160724578541982548132473721865287585003", diff --git a/test/test_cpp_bin_float.cpp b/test/test_cpp_bin_float.cpp index 4a116f6c2..132341a5e 100644 --- a/test/test_cpp_bin_float.cpp +++ b/test/test_cpp_bin_float.cpp @@ -50,25 +50,31 @@ typedef number::digits, digit_base_ void test_special_cases() { #if !defined(BOOST_CI_ASAN_BUILD) && !defined(BOOST_CI_USAN_BUID) - test_type max_val = (std::numeric_limits::max)(); - test_type min_val = (std::numeric_limits::min)(); - test_type eps = std::numeric_limits::epsilon(); - test_type inf_val = (std::numeric_limits::infinity)(); - test_type nan_val = (std::numeric_limits::quiet_NaN)(); - test_type half = 0.5; - test_type one_point_5 = 1.5; + test_type max_val = (std::numeric_limits::max)(); + test_type denorm_min_val = std::numeric_limits::denorm_min(); + test_type min_val = (std::numeric_limits::min)(); + test_type eps = std::numeric_limits::epsilon(); + test_type inf_val = (std::numeric_limits::infinity)(); + test_type nan_val = (std::numeric_limits::quiet_NaN)(); + test_type half = 0.5; + test_type one_point_5 = 1.5; BOOST_CHECK((boost::math::isnormal)(max_val)); BOOST_CHECK((boost::math::isnormal)(-max_val)); BOOST_CHECK((boost::math::isnormal)(min_val)); BOOST_CHECK((boost::math::isnormal)(-min_val)); + BOOST_CHECK((boost::math::isnormal)(denorm_min_val)); + BOOST_CHECK((boost::math::isnormal)(-denorm_min_val)); BOOST_CHECK((boost::math::isinf)(inf_val)); BOOST_CHECK((boost::math::isinf)(-inf_val)); BOOST_CHECK((boost::math::isnan)(nan_val)); BOOST_CHECK((boost::math::isnan)(-nan_val)); - if (std::numeric_limits::has_denorm) - min_val = std::numeric_limits::denorm_min(); + if (!std::numeric_limits::has_denorm) { + BOOST_CHECK_EQUAL(denorm_min_val, min_val); + } else { + BOOST_CHECK_LE(denorm_min_val, min_val); + } // Adding epsilon will increment 1.0: BOOST_CHECK(test_type(1) + eps != test_type(1)); @@ -91,6 +97,8 @@ void test_special_cases() BOOST_CHECK_EQUAL(max_val / -half, -inf_val); BOOST_CHECK_EQUAL(max_val / min_val, inf_val); BOOST_CHECK_EQUAL(max_val / -min_val, -inf_val); + BOOST_CHECK_EQUAL(max_val / denorm_min_val, inf_val); + BOOST_CHECK_EQUAL(max_val / -denorm_min_val, -inf_val); // Underflow: BOOST_CHECK_EQUAL(min_val * 2 - one_point_5 * min_val, 0); BOOST_CHECK_EQUAL(-min_val * 2 + one_point_5 * min_val, 0); @@ -98,16 +106,30 @@ void test_special_cases() BOOST_CHECK_EQUAL(min_val / max_val, 0); BOOST_CHECK_EQUAL(min_val * half, 0); BOOST_CHECK_EQUAL(min_val - min_val, 0); - BOOST_CHECK_EQUAL(max_val - max_val, 0); BOOST_CHECK_EQUAL(-min_val + min_val, 0); - BOOST_CHECK_EQUAL(-max_val + max_val, 0); + + BOOST_CHECK_EQUAL(denorm_min_val * 2 - one_point_5 * denorm_min_val, 0); + BOOST_CHECK_EQUAL(-denorm_min_val * 2 + one_point_5 * denorm_min_val, 0); + BOOST_CHECK_EQUAL(denorm_min_val / 2, 0); + BOOST_CHECK_EQUAL(denorm_min_val / max_val, 0); + BOOST_CHECK_EQUAL(denorm_min_val * half, 0); + BOOST_CHECK_EQUAL(denorm_min_val - denorm_min_val, 0); + BOOST_CHECK_EQUAL(-denorm_min_val + denorm_min_val, 0); // Things which should not over/underflow: BOOST_CHECK_EQUAL((min_val * 2) / 2, min_val); - BOOST_CHECK_EQUAL((max_val / 2) * 2, max_val); BOOST_CHECK_GE((min_val * 2.0000001) / 1.9999999999999999, min_val); - BOOST_CHECK_LE((max_val / 2.0000001) * 1.9999999999999999, max_val); BOOST_CHECK_EQUAL(min_val * 2 - min_val, min_val); + + BOOST_CHECK_EQUAL((denorm_min_val * 2) / 2, denorm_min_val); + BOOST_CHECK_GE((denorm_min_val * 2.0000001) / 1.9999999999999999, denorm_min_val); + BOOST_CHECK_EQUAL(denorm_min_val * 2 - denorm_min_val, denorm_min_val); + + BOOST_CHECK_EQUAL(-max_val + max_val, 0); + BOOST_CHECK_EQUAL(max_val - max_val, 0); + BOOST_CHECK_EQUAL((max_val / 2) * 2, max_val); + BOOST_CHECK_LE((max_val / 2.0000001) * 1.9999999999999999, max_val); BOOST_CHECK_EQUAL(max_val / 2 + max_val / 2, max_val); + // Things involving zero: BOOST_CHECK_EQUAL(max_val + 0, max_val); BOOST_CHECK_EQUAL(max_val - 0, max_val); @@ -210,12 +232,20 @@ void test_special_cases() // Corner cases: BOOST_CHECK_EQUAL((max_val * half) / half, max_val); BOOST_CHECK_EQUAL((max_val / 2) * 2, max_val); + BOOST_CHECK_EQUAL((min_val / half) * half, min_val); BOOST_CHECK_EQUAL((min_val * 2) / 2, min_val); BOOST_CHECK_EQUAL(max_val + min_val, max_val); BOOST_CHECK_EQUAL(min_val + max_val, max_val); BOOST_CHECK_EQUAL(max_val - min_val, max_val); BOOST_CHECK_EQUAL(min_val - max_val, -max_val); + + BOOST_CHECK_EQUAL((denorm_min_val / half) * half, denorm_min_val); + BOOST_CHECK_EQUAL((denorm_min_val * 2) / 2, denorm_min_val); + BOOST_CHECK_EQUAL(max_val + denorm_min_val, max_val); + BOOST_CHECK_EQUAL(denorm_min_val + max_val, max_val); + BOOST_CHECK_EQUAL(max_val - denorm_min_val, max_val); + BOOST_CHECK_EQUAL(denorm_min_val - max_val, -max_val); // Signed zeros: BOOST_CHECK(boost::math::signbit(min_val * -min_val)); BOOST_CHECK(boost::math::signbit(min_val * min_val) == 0); @@ -230,6 +260,24 @@ void test_special_cases() BOOST_CHECK(boost::math::signbit(-min_val / -2) == 0); BOOST_CHECK(boost::math::signbit(-min_val / 2)); test_type neg_zero = min_val * -min_val; + + BOOST_CHECK(boost::math::signbit(denorm_min_val * -denorm_min_val)); + BOOST_CHECK(boost::math::signbit(denorm_min_val * denorm_min_val) == 0); + BOOST_CHECK(boost::math::signbit(-denorm_min_val * -denorm_min_val) == 0); + BOOST_CHECK(boost::math::signbit(-denorm_min_val * denorm_min_val)); + BOOST_CHECK(boost::math::signbit(denorm_min_val / max_val) == 0); + BOOST_CHECK(boost::math::signbit(denorm_min_val / -max_val)); + BOOST_CHECK(boost::math::signbit(-denorm_min_val / -max_val) == 0); + BOOST_CHECK(boost::math::signbit(-denorm_min_val / max_val)); + BOOST_CHECK(boost::math::signbit(denorm_min_val / 2) == 0); + BOOST_CHECK(boost::math::signbit(denorm_min_val / -2)); + BOOST_CHECK(boost::math::signbit(-denorm_min_val / -2) == 0); + BOOST_CHECK(boost::math::signbit(-denorm_min_val / 2)); + + test_type neg_denorm_zero = denorm_min_val * -denorm_min_val; + + BOOST_CHECK_EQUAL(neg_zero, neg_denorm_zero); + test_type zero = 0; // Arithmetic involving signed zero: BOOST_CHECK_EQUAL(-neg_zero, 0); diff --git a/test/test_cpp_bin_float_conv.cpp b/test/test_cpp_bin_float_conv.cpp index fb8e555e0..70412e743 100644 --- a/test/test_cpp_bin_float_conv.cpp +++ b/test/test_cpp_bin_float_conv.cpp @@ -9,7 +9,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_cpp_bin_float_io.cpp b/test/test_cpp_bin_float_io.cpp index 992a9e515..d92d4d8c2 100644 --- a/test/test_cpp_bin_float_io.cpp +++ b/test/test_cpp_bin_float_io.cpp @@ -15,7 +15,7 @@ #include #include #include "test.hpp" -#include +#include #include #include @@ -62,12 +62,12 @@ template void test() { typedef T mp_t; - boost::array f = + std::array f = {{std::ios_base::fmtflags(0), std::ios_base::showpoint, std::ios_base::showpos, std::ios_base::scientific, std::ios_base::scientific | std::ios_base::showpos, std::ios_base::scientific | std::ios_base::showpoint, std::ios_base::fixed, std::ios_base::fixed | std::ios_base::showpoint, std::ios_base::fixed | std::ios_base::showpos}}; - boost::array, 40> string_data = {{ + std::array, 40> string_data = {{ #include "libs/multiprecision/test/string_data.ipp" }}; @@ -104,7 +104,7 @@ void test() val = num / denom; } - boost::array zeros = + std::array zeros = {{"0", "0.", "+0", "0.0e+00", "+0.0e+00", "0.0e+00", "0.0", "0.0", "+0.0", "0", "0.0", "+0", "0.00e+00", "+0.00e+00", "0.00e+00", "0.00", "0.00", "+0.00", "0", "0.00", "+0", "0.000e+00", "+0.000e+00", "0.000e+00", "0.000", "0.000", "+0.000", "0", "0.000", "+0", "0.0000e+00", "+0.0000e+00", "0.0000e+00", "0.0000", "0.0000", "+0.0000", "0", "0.0000", "+0", "0.00000e+00", "+0.00000e+00", "0.00000e+00", "0.00000", "0.00000", "+0.00000", "0", "0.00000", "+0", "0.000000e+00", "+0.000000e+00", "0.000000e+00", "0.000000", "0.000000", "+0.000000", "0", "0.000000", "+0", "0.0000000e+00", "+0.0000000e+00", "0.0000000e+00", "0.0000000", "0.0000000", "+0.0000000", "0", "0.0000000", "+0", "0.00000000e+00", "+0.00000000e+00", "0.00000000e+00", "0.00000000", "0.00000000", "+0.00000000", "0", "0.00000000", "+0", "0.000000000e+00", "+0.000000000e+00", "0.000000000e+00", "0.000000000", "0.000000000", "+0.000000000", "0", "0.000000000", "+0", "0.0000000000e+00", "+0.0000000000e+00", "0.0000000000e+00", "0.0000000000", "0.0000000000", "+0.0000000000", "0", "0.0000000000", "+0", "0.00000000000e+00", "+0.00000000000e+00", "0.00000000000e+00", "0.00000000000", "0.00000000000", "+0.00000000000", "0", "0.00000000000", "+0", "0.000000000000e+00", "+0.000000000000e+00", "0.000000000000e+00", "0.000000000000", "0.000000000000", "+0.000000000000", "0", "0.000000000000", "+0", "0.0000000000000e+00", "+0.0000000000000e+00", "0.0000000000000e+00", "0.0000000000000", "0.0000000000000", "+0.0000000000000"}}; unsigned col = 0; diff --git a/test/test_cpp_dec_float_conv.cpp b/test/test_cpp_dec_float_conv.cpp index e562b364b..22cbd7eed 100644 --- a/test/test_cpp_dec_float_conv.cpp +++ b/test/test_cpp_dec_float_conv.cpp @@ -9,7 +9,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_cpp_int_conv.cpp b/test/test_cpp_int_conv.cpp index 6dc1081bc..1bfa8e5a4 100644 --- a/test/test_cpp_int_conv.cpp +++ b/test/test_cpp_int_conv.cpp @@ -9,7 +9,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_exp.cpp b/test/test_exp.cpp index 627157b42..539de175b 100644 --- a/test/test_exp.cpp +++ b/test/test_exp.cpp @@ -14,7 +14,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -61,7 +61,7 @@ template void test() { std::cout << "Testing type " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "9.47747587596218770242116751705184563668845029215054154915126374673142219159548534317576897266130328412495991561490384353e76", @@ -145,7 +145,7 @@ void test() BOOST_TEST(max_err < 5000); #endif - static const boost::array, 12> exact_data = + static const std::array, 12> exact_data = {{ {{std::ldexp(1.0, -50), static_cast("1.00000000000000088817841970012562676935794497867573073630970950828771105957980924149923657574337470594698012676100224953")}}, {{std::ldexp(1.0, -20), static_cast("1.00000095367477115374544678824955687428365188553281789775169686343569285229334215539516690752571791280462887427635269562")}}, diff --git a/test/test_fixed_zero_precision_io.cpp b/test/test_fixed_zero_precision_io.cpp index eecf1cd3c..1dca94353 100644 --- a/test/test_fixed_zero_precision_io.cpp +++ b/test/test_fixed_zero_precision_io.cpp @@ -30,7 +30,7 @@ #include #include #include "test.hpp" -#include +#include #include #include diff --git a/test/test_float_conversions.cpp b/test/test_float_conversions.cpp index 7b20ebece..b8dbdbd1a 100644 --- a/test/test_float_conversions.cpp +++ b/test/test_float_conversions.cpp @@ -9,7 +9,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_float_io.cpp b/test/test_float_io.cpp index b6c108c12..d1517b59c 100644 --- a/test/test_float_io.cpp +++ b/test/test_float_io.cpp @@ -44,7 +44,7 @@ #include #include #include "test.hpp" -#include +#include #include #include @@ -107,12 +107,12 @@ template void test() { typedef T mp_t; - boost::array f = + std::array f = {{std::ios_base::fmtflags(0), std::ios_base::showpoint, std::ios_base::showpos, std::ios_base::scientific, std::ios_base::scientific | std::ios_base::showpos, std::ios_base::scientific | std::ios_base::showpoint, std::ios_base::fixed, std::ios_base::fixed | std::ios_base::showpoint, std::ios_base::fixed | std::ios_base::showpos}}; - boost::array, 40> string_data = {{ + std::array, 40> string_data = {{ #include "libs/multiprecision/test/string_data.ipp" }}; @@ -156,7 +156,7 @@ void test() val = num / denom; } - boost::array zeros = + std::array zeros = {{"0", "0.", "+0", "0.0e+00", "+0.0e+00", "0.0e+00", "0.0", "0.0", "+0.0", "0", "0.0", "+0", "0.00e+00", "+0.00e+00", "0.00e+00", "0.00", "0.00", "+0.00", "0", "0.00", "+0", "0.000e+00", "+0.000e+00", "0.000e+00", "0.000", "0.000", "+0.000", "0", "0.000", "+0", "0.0000e+00", "+0.0000e+00", "0.0000e+00", "0.0000", "0.0000", "+0.0000", "0", "0.0000", "+0", "0.00000e+00", "+0.00000e+00", "0.00000e+00", "0.00000", "0.00000", "+0.00000", "0", "0.00000", "+0", "0.000000e+00", "+0.000000e+00", "0.000000e+00", "0.000000", "0.000000", "+0.000000", "0", "0.000000", "+0", "0.0000000e+00", "+0.0000000e+00", "0.0000000e+00", "0.0000000", "0.0000000", "+0.0000000", "0", "0.0000000", "+0", "0.00000000e+00", "+0.00000000e+00", "0.00000000e+00", "0.00000000", "0.00000000", "+0.00000000", "0", "0.00000000", "+0", "0.000000000e+00", "+0.000000000e+00", "0.000000000e+00", "0.000000000", "0.000000000", "+0.000000000", "0", "0.000000000", "+0", "0.0000000000e+00", "+0.0000000000e+00", "0.0000000000e+00", "0.0000000000", "0.0000000000", "+0.0000000000", "0", "0.0000000000", "+0", "0.00000000000e+00", "+0.00000000000e+00", "0.00000000000e+00", "0.00000000000", "0.00000000000", "+0.00000000000", "0", "0.00000000000", "+0", "0.000000000000e+00", "+0.000000000000e+00", "0.000000000000e+00", "0.000000000000", "0.000000000000", "+0.000000000000", "0", "0.000000000000", "+0", "0.0000000000000e+00", "+0.0000000000000e+00", "0.0000000000000e+00", "0.0000000000000", "0.0000000000000", "+0.0000000000000"}}; unsigned col = 0; diff --git a/test/test_generic_conv.cpp b/test/test_generic_conv.cpp index 33a09b660..d238efd62 100644 --- a/test/test_generic_conv.cpp +++ b/test/test_generic_conv.cpp @@ -9,7 +9,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_gmp_conversions.cpp b/test/test_gmp_conversions.cpp index 5c7efb433..369fd7216 100644 --- a/test/test_gmp_conversions.cpp +++ b/test/test_gmp_conversions.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_log.cpp b/test/test_log.cpp index d73170aff..0a22c908d 100644 --- a/test/test_log.cpp +++ b/test/test_log.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { std::cout << "Testing type " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "-2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806", "10.355073440919378699690477472036470469315794905372650461119520557405966250191554948388847794306923706128373152780234988638443954821327953543032075228882306893901540038156503265416950932549208174713640840670002321534598356631953006304821201484830902632165858733357596733427094375150860310219829690440417223992885533566388118595248523193740778052893647271700612136670114224280374211626787106078693643289", diff --git a/test/test_mpc_conversions.cpp b/test/test_mpc_conversions.cpp index 3a880b6d2..7d83b06cd 100644 --- a/test/test_mpc_conversions.cpp +++ b/test/test_mpc_conversions.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_mpfr_conversions.cpp b/test/test_mpfr_conversions.cpp index 4e9b90b93..2317ebc3e 100644 --- a/test/test_mpfr_conversions.cpp +++ b/test/test_mpfr_conversions.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #include diff --git a/test/test_numeric_limits.cpp b/test/test_numeric_limits.cpp index fe8885af4..685be8ddd 100644 --- a/test/test_numeric_limits.cpp +++ b/test/test_numeric_limits.cpp @@ -83,9 +83,9 @@ void test_specific(const std::integral_constant::is_specialized) + BOOST_IF_CONSTEXPR(std::numeric_limits::is_specialized) { - if (std::numeric_limits::has_quiet_NaN) + BOOST_IF_CONSTEXPR(std::numeric_limits::has_quiet_NaN) { BOOST_TEST((boost::math::isnan)(std::numeric_limits::quiet_NaN())); BOOST_TEST(FP_NAN == (boost::math::fpclassify)(std::numeric_limits::quiet_NaN())); @@ -93,7 +93,7 @@ void test_specific(const std::integral_constant::quiet_NaN())); BOOST_TEST(!(boost::math::isinf)(std::numeric_limits::quiet_NaN())); } - if (std::numeric_limits::has_signaling_NaN) + BOOST_IF_CONSTEXPR(std::numeric_limits::has_signaling_NaN) { BOOST_TEST((boost::math::isnan)(std::numeric_limits::signaling_NaN())); BOOST_TEST(FP_NAN == (boost::math::fpclassify)(std::numeric_limits::signaling_NaN())); @@ -101,7 +101,7 @@ void test_specific(const std::integral_constant::signaling_NaN())); BOOST_TEST(!(boost::math::isinf)(std::numeric_limits::signaling_NaN())); } - if (std::numeric_limits::has_infinity) + BOOST_IF_CONSTEXPR(std::numeric_limits::has_infinity) { BOOST_TEST((boost::math::isinf)(std::numeric_limits::infinity())); BOOST_TEST(FP_INFINITE == (boost::math::fpclassify)(std::numeric_limits::infinity())); @@ -109,7 +109,7 @@ void test_specific(const std::integral_constant::infinity())); BOOST_TEST(!(boost::math::isnan)(std::numeric_limits::infinity())); } - if (std::numeric_limits::has_denorm == std::denorm_present) + BOOST_IF_CONSTEXPR(std::numeric_limits::has_denorm == std::denorm_present) { BOOST_TEST(FP_SUBNORMAL == (boost::math::fpclassify)(std::numeric_limits::denorm_min())); BOOST_TEST(FP_SUBNORMAL == (boost::math::fpclassify)((std::numeric_limits::min)() / 2)); @@ -121,6 +121,16 @@ void test_specific(const std::integral_constant::min)() / 2); BOOST_TEST(0 != std::numeric_limits::denorm_min()); } + BOOST_IF_CONSTEXPR(std::numeric_limits::has_denorm == std::denorm_absent) + { + BOOST_TEST(std::numeric_limits::denorm_min() > 0); + BOOST_TEST(!(std::numeric_limits::denorm_min() > (std::numeric_limits::min)())); + BOOST_TEST(!(std::numeric_limits::denorm_min() < (std::numeric_limits::min)())); + BOOST_TEST(std::numeric_limits::denorm_min() == (std::numeric_limits::min)()); + BOOST_TEST(FP_NORMAL == (boost::math::fpclassify)(std::numeric_limits::denorm_min())); + BOOST_TEST(FP_NORMAL == (boost::math::fpclassify)(-std::numeric_limits::denorm_min())); + BOOST_TEST(FP_ZERO != (boost::math::fpclassify)(std::numeric_limits::denorm_min())); + } } Number n = 0; BOOST_TEST((boost::math::fpclassify)(n) == FP_ZERO); @@ -135,11 +145,11 @@ void test_specific(const std::integral_constant::round_style == std::round_to_nearest) + BOOST_IF_CONSTEXPR(std::numeric_limits::round_style == std::round_to_nearest) { BOOST_CHECK_EQUAL(std::numeric_limits::round_error(), 0.5); } - else if (std::numeric_limits::round_style != std::round_indeterminate) + else BOOST_IF_CONSTEXPR(std::numeric_limits::round_style != std::round_indeterminate) { // Round error is 1.0: BOOST_CHECK_EQUAL(std::numeric_limits::round_error(), 1); @@ -154,9 +164,9 @@ void test_specific(const std::integral_constant void test_specific(const std::integral_constant&) { - if (std::numeric_limits::is_modulo) + BOOST_IF_CONSTEXPR(std::numeric_limits::is_modulo) { - if (!std::numeric_limits::is_signed) + BOOST_IF_CONSTEXPR(!std::numeric_limits::is_signed) { BOOST_TEST(1 + (std::numeric_limits::max)() == 0); BOOST_TEST(--Number(0) == (std::numeric_limits::max)()); @@ -186,13 +196,13 @@ void test() std::cout << "numeric_limits values for type " << typeid(Number).name() << std::endl; PRINT(is_specialized); - if (std::numeric_limits::is_integer) + BOOST_IF_CONSTEXPR(std::numeric_limits::is_integer) { std::cout << std::hex << std::showbase; } std::cout << "max()" << " = " << (std::numeric_limits::max)() << std::endl; - if (std::numeric_limits::is_integer) + BOOST_IF_CONSTEXPR(std::numeric_limits::is_integer) { std::cout << std::dec; } diff --git a/test/test_pow.cpp b/test/test_pow.cpp index a4befeb4e..5a844e64f 100644 --- a/test/test_pow.cpp +++ b/test/test_pow.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array, 702> data = + static const std::array, 702> data = {{ {{"9.85291419463953934609889984130859375e4", "8.4167086266170372255146503448486328125e2", "8.66781019918879108354226292713799369912745098619466567318041467361236175866573114777000418440761829061824953361563557580935951901405814080757565313129904800947783606850513184296612628910656615168927761935861462770335134108408073175949783551491164949747086136599355880600420490275164555515512645668845e4202"}}, {{"1.652914355109703592461301013827323913574218750e1", "4.936528947862250937816952500725165009498596191406250e-2", "1.14852190138491736562279120519668390081141778746743826681517181158751264571350304943298501284647564489716027476004029804110782430201351750715968215799574772058637701195873519618784612525011353325208230847515250406858209757415407239793739704829281917272032288615255140733409015874140869835291148547238"}}, diff --git a/test/test_preserve_all_precision.cpp b/test/test_preserve_all_precision.cpp index 89a6dc1c7..c501a38a6 100644 --- a/test/test_preserve_all_precision.cpp +++ b/test/test_preserve_all_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_preserve_component_precision.cpp b/test/test_preserve_component_precision.cpp index ef2583278..0f33b933a 100644 --- a/test/test_preserve_component_precision.cpp +++ b/test/test_preserve_component_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_preserve_related_precision.cpp b/test/test_preserve_related_precision.cpp index 8061bb6b5..0ce2e3aa9 100644 --- a/test/test_preserve_related_precision.cpp +++ b/test/test_preserve_related_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_preserve_source_precision.cpp b/test/test_preserve_source_precision.cpp index e2f96c389..9cfe5c8bd 100644 --- a/test/test_preserve_source_precision.cpp +++ b/test/test_preserve_source_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_preserve_target_precision.cpp b/test/test_preserve_target_precision.cpp index d514eb0a0..dc0054862 100644 --- a/test/test_preserve_target_precision.cpp +++ b/test/test_preserve_target_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_rat_float_interconv.cpp b/test/test_rat_float_interconv.cpp index c7b4a24d2..c364fb6fd 100644 --- a/test/test_rat_float_interconv.cpp +++ b/test/test_rat_float_interconv.cpp @@ -21,7 +21,7 @@ #include #include #include "test.hpp" -#include +#include #include #include diff --git a/test/test_sin_near_half_pi.cpp b/test/test_sin_near_half_pi.cpp index 41fb25f6d..e62308aa2 100644 --- a/test/test_sin_near_half_pi.cpp +++ b/test/test_sin_near_half_pi.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include #include "test.hpp" diff --git a/test/test_sinh.cpp b/test/test_sinh.cpp index 8e82213ab..689d32261 100644 --- a/test/test_sinh.cpp +++ b/test/test_sinh.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "0.33937643772780730649735035088117439284797964277099188367427256402032493952288848579083622213428182842627923924487560393743204013166230906610274533504451302298480596207257724471359936027198954417317381228420986152562253196896619001418292769103034561794393400788635610424360775622370491149170501475453034747306600304507650361914904138327962144190354572359428689767990353722392457982930942617983634601752", "5.9746833446871871874685235810964396457491766537010251792063372398172074828151074989468673672535421045923659313715467371148678693662985453590831122722616951299822923837410906027605763677066945998696776562438704017846907508677186762421899376364636371743116519071733413775650991880222096045615827530741679305666041641331859757012015389431793705875600863391408448065773828563483223117178640044499399723744", @@ -133,7 +133,7 @@ void test() max_err = err; } - boost::array small_values = + std::array small_values = {{ "8.223167319358299807036616344469138485821440027829633696917375433348917938654659351596020080036406671343718039863220496616e-01", "2.526123168081683079141251505420579055197542874276608074880949653019810769068593790606537020961198741487692473633089323967e-01", diff --git a/test/test_sqrt.cpp b/test/test_sqrt.cpp index 3295a8c74..a2fda6af2 100644 --- a/test/test_sqrt.cpp +++ b/test/test_sqrt.cpp @@ -14,7 +14,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { - static const boost::array data = + static const std::array data = {{ "0", "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362428257066623615286572442260252509370960278706846203769865310512284992517302895082622893209537926796280017463901535147972051670019018523401858544697449491264031392177552590621640541933250090639840761373347747515343366798978936585183640879545116516173876005906739343179133280985484624818490205465485219561325156164746751504273876105610799612710721006037204448367236529661370809432349883166842421384570960912042042778577806869476657000521830568512541339663694465418151071669388332194292935706226886522442054214994804992075648639887483850593064021821402928581123306497894520362114907896228738940324597819851313487126651250629326004465638210967502681249693059542046156076195221739152507020779275809905433290066222306761446966124818874306997883520506146444385418530797357425717918563595974995995226384924220388910396640644729397284134504300214056423343303926175613417633632001703765416347632066927654181283576249032690450848532013419243598973087119379948293873011126256165881888478597787596376136", diff --git a/test/test_tan.cpp b/test/test_tan.cpp index 595bae8eb..0cab30d95 100644 --- a/test/test_tan.cpp +++ b/test/test_tan.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -80,7 +80,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array, 500> data = + static const std::array, 500> data = {{ {{"0", "0"}}, {{"0.03125", "0.03126017650125595642059651621507489147877835880393069701338513042228140662868270178810496567920444849"}}, diff --git a/test/test_tanh.cpp b/test/test_tanh.cpp index f2da4f710..afd2b740f 100644 --- a/test/test_tanh.cpp +++ b/test/test_tanh.cpp @@ -13,7 +13,7 @@ #endif #include -#include +#include #include "test.hpp" #if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128) && !defined(TEST_CPP_BIN_FLOAT) @@ -60,7 +60,7 @@ template void test() { std::cout << "Testing type: " << typeid(T).name() << std::endl; - static const boost::array data = + static const std::array data = {{ "0.32137338579537729992840434899278935725496267444911714908205287462634251052210833615032073534299473485492692600156322137421801432333125051088723502425037485776412801577568405892077585206768190530859883094571475323319480739773193974206966728764224286661945738178210577326172938196062277314761537881936346874075881338768208490193827960565412814349738654540520356903367084438822830345189856017860672463017", "0.98628073997374759901559180515206275902189609982907214282364143439537215491113710345866034807991101303183938339561499559327886956280789743287824488269072297413440935381715378233031399015496124706604318545539544610760151756970229801074280545428642122005982857974921606264103186878499260552388713716032507770319550435738767597150644370033277228635793175246197730488375240713357827246166262087899961098648", diff --git a/test/test_threaded_precision.cpp b/test/test_threaded_precision.cpp index d626b9a67..f8ee9ce8d 100644 --- a/test/test_threaded_precision.cpp +++ b/test/test_threaded_precision.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include