From 0aa1a09902cfb7d84dff68374cbec7bfb3dbbb59 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 18 May 2008 08:29:50 +0000 Subject: [PATCH 001/192] Merged changes from Trunk. [SVN r45478] --- doc/sf_and_dist/roadmap.qbk | 3 ++- include/boost/math/concepts/real_concept.hpp | 5 ++++- include/boost/math/concepts/std_real_concept.hpp | 10 ++++++++-- test/compile_test/instantiate.hpp | 13 +++++++++---- test/compile_test/sf_modf_incl_test.cpp | 2 +- test/compile_test/sf_round_incl_test.cpp | 6 +++--- test/compile_test/sf_trunc_incl_test.cpp | 6 +++--- test/compile_test/test_compile_result.hpp | 2 +- test/pow_test.cpp | 2 +- .../test_rational_double4.cpp | 2 +- .../test_rational_float4.cpp | 2 +- .../test_rational_ldouble4.cpp | 2 +- .../test_rational_real_concept4.cpp | 2 +- test/test_rationals.cpp | 2 +- test/test_round.cpp | 4 ++-- vc71_fix/instantiate_all.cpp | 4 +++- 16 files changed, 42 insertions(+), 25 deletions(-) diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 3ba84d13b..00dbaa0b5 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -71,7 +71,7 @@ on error rates. SVN Revisions: -Sandbox and trunk last synchonised at revision: 44695. +Sandbox and trunk last synchonised at revision: 45480. ] [/ @@ -81,3 +81,4 @@ Sandbox and trunk last synchonised at revision: 44695. http://www.boost.org/LICENSE_1_0.txt). ] + diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index a419d96cc..ad9ceebb6 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -66,7 +66,10 @@ public: real_concept(int c) : m_value(c){} real_concept(unsigned long c) : m_value(c){} real_concept(long c) : m_value(c){} -#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX) || defined(__SUNPRO_CC) +#if defined(__DECCXX) || defined(__SUNPRO_CC) + real_concept(unsigned long long c) : m_value(static_cast(c)){} + real_concept(long long c) : m_value(static_cast(c)){} +#elif defined(BOOST_HAS_LONG_LONG) real_concept(unsigned long long c) : m_value(static_cast(c)){} real_concept(long long c) : m_value(static_cast(c)){} #elif defined(BOOST_HAS_MS_INT64) diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index 00391c644..b5517c3c3 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -58,7 +58,10 @@ public: std_real_concept(int c) : m_value(c){} std_real_concept(unsigned long c) : m_value(c){} std_real_concept(long c) : m_value(c){} -#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX) || defined(__SUNPRO_CC) +#if defined(__DECCXX) || defined(__SUNPRO_CC) + std_real_concept(unsigned long long c) : m_value(static_cast(c)){} + std_real_concept(long long c) : m_value(static_cast(c)){} +#elif defined(BOOST_HAS_LONG_LONG) std_real_concept(unsigned long long c) : m_value(static_cast(c)){} std_real_concept(long long c) : m_value(static_cast(c)){} #endif @@ -79,7 +82,10 @@ public: std_real_concept& operator=(unsigned int c) { m_value = c; return *this; } std_real_concept& operator=(long c) { m_value = c; return *this; } std_real_concept& operator=(unsigned long c) { m_value = c; return *this; } -#if defined(BOOST_HAS_LONG_LONG) || defined(__DECCXX) || defined(__SUNPRO_CC) +#if defined(__DECCXX) || defined(__SUNPRO_CC) + std_real_concept& operator=(unsigned long long c) { m_value = static_cast(c); return *this; } + std_real_concept& operator=(long long c) { m_value = static_cast(c); return *this; } +#elif defined(BOOST_HAS_LONG_LONG) std_real_concept& operator=(long long c) { m_value = static_cast(c); return *this; } std_real_concept& operator=(unsigned long long c) { m_value = static_cast(c); return *this; } #endif diff --git a/test/compile_test/instantiate.hpp b/test/compile_test/instantiate.hpp index b753941e1..5ae153880 100644 --- a/test/compile_test/instantiate.hpp +++ b/test/compile_test/instantiate.hpp @@ -16,6 +16,8 @@ #include #include +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM + typedef boost::math::policies::policy<> test_policy; namespace test{ @@ -29,6 +31,7 @@ namespace dist_test{ BOOST_MATH_DECLARE_DISTRIBUTIONS(double, test_policy) } +#endif namespace boost{ namespace math{ // @@ -79,7 +82,7 @@ void instantiate(RealType) function_requires > >(); function_requires > >(); function_requires > >(); - +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM function_requires > >(); function_requires > >(); function_requires > >(); @@ -128,7 +131,7 @@ void instantiate(RealType) function_requires >(); function_requires >(); function_requires >(); - +#endif int i; RealType v1(0.5), v2(0.5), v3(0.5); boost::math::tgamma(v1); @@ -242,7 +245,7 @@ void instantiate(RealType) #ifdef BOOST_HAS_LONG_LONG boost::math::lltrunc(v1); boost::math::llround(v1); - long long ll; + boost::long_long_type ll; boost::math::modf(v1, &ll); #endif boost::math::pow<2>(v1); @@ -502,7 +505,7 @@ void instantiate_mixed(RealType) { using namespace boost; using namespace boost::math; - +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM int i = 1; long l = 1; short s = 1; @@ -851,7 +854,9 @@ void instantiate_mixed(RealType) test::sph_bessel(i, 1); test::sph_neumann(i, lr); test::sph_neumann(i, i); +#endif } #endif // BOOST_LIBS_MATH_TEST_INSTANTIATE_HPP + diff --git a/test/compile_test/sf_modf_incl_test.cpp b/test/compile_test/sf_modf_incl_test.cpp index 42a9d9177..2c8ebb967 100644 --- a/test/compile_test/sf_modf_incl_test.cpp +++ b/test/compile_test/sf_modf_incl_test.cpp @@ -20,7 +20,7 @@ long double lldd; int ii; long ll; #ifdef BOOST_HAS_LONG_LONG -long long llll; +boost::long_long_type llll; #endif void check() diff --git a/test/compile_test/sf_round_incl_test.cpp b/test/compile_test/sf_round_incl_test.cpp index 4c89e9027..e351fc556 100644 --- a/test/compile_test/sf_round_incl_test.cpp +++ b/test/compile_test/sf_round_incl_test.cpp @@ -31,10 +31,10 @@ void check() check_result(boost::math::lround(l)); #endif #ifdef BOOST_HAS_LONG_LONG - check_result(boost::math::llround(f)); - check_result(boost::math::llround(d)); + check_result(boost::math::llround(f)); + check_result(boost::math::llround(d)); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - check_result(boost::math::llround(l)); + check_result(boost::math::llround(l)); #endif #endif } diff --git a/test/compile_test/sf_trunc_incl_test.cpp b/test/compile_test/sf_trunc_incl_test.cpp index 3b0295468..4da5deba2 100644 --- a/test/compile_test/sf_trunc_incl_test.cpp +++ b/test/compile_test/sf_trunc_incl_test.cpp @@ -31,10 +31,10 @@ void check() check_result(boost::math::ltrunc(l)); #endif #ifdef BOOST_HAS_LONG_LONG - check_result(boost::math::lltrunc(f)); - check_result(boost::math::lltrunc(d)); + check_result(boost::math::lltrunc(f)); + check_result(boost::math::lltrunc(d)); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - check_result(boost::math::lltrunc(l)); + check_result(boost::math::lltrunc(l)); #endif #endif } diff --git a/test/compile_test/test_compile_result.hpp b/test/compile_test/test_compile_result.hpp index 993d9dc43..b3e331b81 100644 --- a/test/compile_test/test_compile_result.hpp +++ b/test/compile_test/test_compile_result.hpp @@ -24,7 +24,7 @@ inline void check_result_imp(long double, long double){} inline void check_result_imp(int, int){} inline void check_result_imp(long, long){} #ifdef BOOST_HAS_LONG_LONG -inline void check_result_imp(long long, long long){} +inline void check_result_imp(boost::long_long_type, boost::long_long_type){} #endif inline void check_result_imp(bool, bool){} diff --git a/test/pow_test.cpp b/test/pow_test.cpp index 313b7a3b3..c9f8f5319 100644 --- a/test/pow_test.cpp +++ b/test/pow_test.cpp @@ -109,7 +109,7 @@ void test_return_types() #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_STATIC_ASSERT((is_same(7.0l)), long double>::value)); #endif -}; +} namespace boost { namespace math { namespace policies { diff --git a/test/test_rational_instances/test_rational_double4.cpp b/test/test_rational_instances/test_rational_double4.cpp index 64e31eccd..7e7faa8a5 100644 --- a/test/test_rational_instances/test_rational_double4.cpp +++ b/test/test_rational_instances/test_rational_double4.cpp @@ -6,5 +6,5 @@ #include "test_rational.hpp" #ifdef BOOST_HAS_LONG_LONG -template void do_test_spots(double, unsigned long long); +template void do_test_spots(double, boost::ulong_long_type); #endif diff --git a/test/test_rational_instances/test_rational_float4.cpp b/test/test_rational_instances/test_rational_float4.cpp index 49f792016..4e55876da 100644 --- a/test/test_rational_instances/test_rational_float4.cpp +++ b/test/test_rational_instances/test_rational_float4.cpp @@ -7,5 +7,5 @@ #include "test_rational.hpp" #ifdef BOOST_HAS_LONG_LONG -template void do_test_spots(float, unsigned long long); +template void do_test_spots(float, boost::ulong_long_type); #endif diff --git a/test/test_rational_instances/test_rational_ldouble4.cpp b/test/test_rational_instances/test_rational_ldouble4.cpp index 9b945b186..63b5a1b8e 100644 --- a/test/test_rational_instances/test_rational_ldouble4.cpp +++ b/test/test_rational_instances/test_rational_ldouble4.cpp @@ -7,5 +7,5 @@ #include "test_rational.hpp" #ifdef BOOST_HAS_LONG_LONG -template void do_test_spots(long double, unsigned long long); +template void do_test_spots(long double, boost::ulong_long_type); #endif diff --git a/test/test_rational_instances/test_rational_real_concept4.cpp b/test/test_rational_instances/test_rational_real_concept4.cpp index e74537f75..2dd58713f 100644 --- a/test/test_rational_instances/test_rational_real_concept4.cpp +++ b/test/test_rational_instances/test_rational_real_concept4.cpp @@ -11,6 +11,6 @@ #include #ifdef BOOST_HAS_LONG_LONG -template void do_test_spots(boost::math::concepts::real_concept, unsigned long long); +template void do_test_spots(boost::math::concepts::real_concept, boost::ulong_long_type); #endif #endif diff --git a/test/test_rationals.cpp b/test/test_rationals.cpp index 7987cdfc9..ac53caee1 100644 --- a/test/test_rationals.cpp +++ b/test/test_rationals.cpp @@ -20,7 +20,7 @@ void test_spots(T t, const char* n) do_test_spots(t, int(0)); do_test_spots(t, unsigned(0)); #ifdef BOOST_HAS_LONG_LONG - do_test_spots(t, (unsigned long long)(0)); + do_test_spots(t, (boost::ulong_long_type)(0)); #endif do_test_spots(t, float(0)); do_test_spots(t, T(0)); diff --git a/test/test_round.cpp b/test/test_round.cpp index bb63f40b5..e3c71fcc2 100644 --- a/test/test_round.cpp +++ b/test/test_round.cpp @@ -141,9 +141,9 @@ void test_round(T, const char* name) } #ifdef BOOST_HAS_LONG_LONG - if(abs(r) < (std::numeric_limits::max)()) + if(abs(r) < (std::numeric_limits::max)()) { - long long ll = boost::math::llround(arg); + boost::long_long_type ll = boost::math::llround(arg); check_within_half(arg, ll); ll = boost::math::lltrunc(arg); check_trunc_result(arg, ll); diff --git a/vc71_fix/instantiate_all.cpp b/vc71_fix/instantiate_all.cpp index 450ca188e..0a7357ff5 100644 --- a/vc71_fix/instantiate_all.cpp +++ b/vc71_fix/instantiate_all.cpp @@ -14,8 +14,10 @@ // as that would lead to recursive project dependencies... // -#include "../test/compile_test/instantiate.hpp" +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#define BOOST_MATH_INSTANTIATE_MINIMUM #include +#include "../test/compile_test/instantiate.hpp" void some_proc() { From c758387e9e56b1114ee8c8f1b691e607fda49221 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 18 May 2008 09:32:39 +0000 Subject: [PATCH 002/192] Updated revision merged number. [SVN r45484] --- doc/sf_and_dist/roadmap.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 00dbaa0b5..252b91ba6 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -71,7 +71,7 @@ on error rates. SVN Revisions: -Sandbox and trunk last synchonised at revision: 45480. +Sandbox and trunk last synchonised at revision: 45484. ] [/ From 90ee188ee11ea42c108c22f0eb01cb22e24e57f0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 20 May 2008 08:27:17 +0000 Subject: [PATCH 003/192] Removed local settings files. Moved preprocessor def's into stdafx.h. [SVN r45572] --- dot_net_example/boost_math/Stdafx.h | 3 + dot_net_example/boost_math/boost_math.sln.lnk | Bin 1163 -> 1176 bytes dot_net_example/boost_math/boost_math.suo | Bin 192000 -> 0 bytes dot_net_example/boost_math/boost_math.vcproj | 4 +- .../boost_math.vcproj.FUJI.John Maddock.user | 65 ------------------ ...boost_math.vcproj.HETP7.Administrator.user | 65 ------------------ 6 files changed, 5 insertions(+), 132 deletions(-) delete mode 100644 dot_net_example/boost_math/boost_math.suo delete mode 100644 dot_net_example/boost_math/boost_math.vcproj.FUJI.John Maddock.user delete mode 100644 dot_net_example/boost_math/boost_math.vcproj.HETP7.Administrator.user diff --git a/dot_net_example/boost_math/Stdafx.h b/dot_net_example/boost_math/Stdafx.h index 48864e3aa..106b208b1 100644 --- a/dot_net_example/boost_math/Stdafx.h +++ b/dot_net_example/boost_math/Stdafx.h @@ -13,6 +13,9 @@ #pragma once +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#define BOOST_MATH_OVERFLOW_ERROR_POLICY errno_on_error + #include #include #include diff --git a/dot_net_example/boost_math/boost_math.sln.lnk b/dot_net_example/boost_math/boost_math.sln.lnk index 04c41d62399e48a63cb2f000d49c62216b048afc..94cb7997802c0a3a6594bde78d571dd103a6dd03 100644 GIT binary patch literal 1176 zcmeZaU|?VrVPXJ*10aHd!EH7J1A_ts14F{L=?^+49A{i`)FtEg&J&C zlXICw7~}&U_+LN1Nd|pqs~ET<1jB^E5X{LjU*9djkdj!E2(p%$ zfra7yz8GVLp3N4z6GRvo7*ZG#8A=!u85kHu7|fu0R#^x*3os<*=NFeSC^5kFsKWIm zG2}DkGZZtFpy--u@w5wF*D|wmSC~zxx@@3!t+tSK5nw1z%u7kiuV7Gv+P2K>h1+He zorxe97BeI=@|FffQQctG{evFMyEz~Ji`;t?NGXUM={0M)(R%-j>EI~VM~ z42F1y60oat7_u2M!7i6zfQ8X=v&&ur3^|!e#fUIkZe|NNBZncAA&H?F>|2L}g{aiurHG{ji%4@TQG}yN(4EYQt4Dk$k z45?r`m7#(mks+6%fFXw=m4Sglg24r9ny2}ZU;zdvfB)c+c#vs2aMP;crh&o?5>xRE zu#fLi7+rQq%b5hlrSVRFffQPm_hZ}nQ4UzFeK&Y7nd+7F~Ibw z!u2FE+^x@D`rS!$YV%h0O_w_U|e!lE0b3u3D-1G-5P3^4yfOv=ejDn|Hsv&o+{n16E^ zG8vK>ioq`Tf!gk5#@i^s;OiLT5$^`F-2`g;W)rJ)n7&+aIAt)zGo&$;GUPENGn6o7 zGUPMlfz6U&@PnG=XU3W;z~JH^67S~d! zD~1?&Do0iwgO-Yr<XE98;FnRMHLh>L(0Q@2ZO8@`> diff --git a/dot_net_example/boost_math/boost_math.suo b/dot_net_example/boost_math/boost_math.suo deleted file mode 100644 index e734f649d0af82335726b39fbdbb195d5c8d117a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192000 zcmca`Uhu)fjZzO8(10BSGsD0CoD6J8;>-*T42&?o00RRP0|NsK0|Udq|NsBPgd0E% zMh1reqhLscz~BG>|AXStjDdkclYxOjgMk4Y=j;p&3>*v$44e!M3|tHh48jZy3_J`B z47>~s415d>4EziX3<3-c41x>{3_=VH46FHyrNzL&pv}O*pvS<#pu@nxpv%C(pwGa-U;t9j$iSe%$iQI4z`$V4z`$U_z`$V2 zz`$V6z`)?n$iUzPHN%R5fx()Afx(7>fx(u6fx(V}fx(`Efx&@+fx(f1fx(c0fx(%9 zfx(4=fx(r5fx!)=pMinFgMop;lYxQ3i-Cc`n}LDBhk=2?mw|!7kAZ=~pMilPfPsM_ zkb!|Ah=GA2n1O*Ign@w}l!1XEjDdk6oPmKMf`Ne{l7WFCih+S4nt_2KhJk@0mVtpG zj)8$8o`HcOfq{V`k%56BiGhJ3nSp^Jg@J(~m4SgFje&t7oq>TNgMon|lYxODi-Cb5 zn}LBLhk=11mw|yHkAZ<9pMim)fPsObkb!}rh=GBjn1O+zgn@yfl!1YvjDdlnoPmL% zf`Ngdl7WGtih+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1`7L)U@-s?vdjVi diff --git a/dot_net_example/boost_math/boost_math.vcproj b/dot_net_example/boost_math/boost_math.vcproj index daab1e4cf..6a93404c9 100644 --- a/dot_net_example/boost_math/boost_math.vcproj +++ b/dot_net_example/boost_math/boost_math.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../../../" - PreprocessorDefinitions="WIN32;_DEBUG;BOOST_MATH_THROW_ON_DOMAIN_ERROR" + PreprocessorDefinitions="WIN32;_DEBUG;" RuntimeLibrary="3" UsePrecompiledHeader="2" WarningLevel="4" @@ -118,7 +118,7 @@ Name="VCCLCompilerTool" Optimization="3" AdditionalIncludeDirectories="../../../../" - PreprocessorDefinitions="WIN32;NDEBUG;"BOOST_MATH_ASSERT_UNDEFINED_POLICY=0";"BOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error"" + PreprocessorDefinitions="WIN32;NDEBUG;" ExceptionHandling="2" RuntimeLibrary="2" UsePrecompiledHeader="2" diff --git a/dot_net_example/boost_math/boost_math.vcproj.FUJI.John Maddock.user b/dot_net_example/boost_math/boost_math.vcproj.FUJI.John Maddock.user deleted file mode 100644 index 788a0d137..000000000 --- a/dot_net_example/boost_math/boost_math.vcproj.FUJI.John Maddock.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/dot_net_example/boost_math/boost_math.vcproj.HETP7.Administrator.user b/dot_net_example/boost_math/boost_math.vcproj.HETP7.Administrator.user deleted file mode 100644 index 2722a7fce..000000000 --- a/dot_net_example/boost_math/boost_math.vcproj.HETP7.Administrator.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - From d416f6d6a2159452e052e31fecdc6303fc70f348 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sat, 24 May 2008 16:54:00 +0000 Subject: [PATCH 004/192] Description of dist explorer as Quickbook to go on sourceforge & jamfile to build. [SVN r45731] --- doc/distexplorer/Jamfile.v2 | 63 ++++++++++++++++++ doc/distexplorer/distexplorer.qbk | 105 ++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 doc/distexplorer/Jamfile.v2 create mode 100644 doc/distexplorer/distexplorer.qbk diff --git a/doc/distexplorer/Jamfile.v2 b/doc/distexplorer/Jamfile.v2 new file mode 100644 index 000000000..64b89ed04 --- /dev/null +++ b/doc/distexplorer/Jamfile.v2 @@ -0,0 +1,63 @@ +# Copyright Paul A. Bristow 2008 +# Copyright John Maddock 2008 + +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt +# or copy at http://www.boost.org/LICENSE_1_0.txt) + +# Reminder: whitespace MUST terminate variable name! +# so space BEFORE ; and : + +# Distexplorer documentation as html from Quickbook. + +# project boost/doc ; + +using quickbook ; + +#path-constant images_location : html ; +# location of SVG images referenced by Quickbook. +# screenshots installed as recomended by Sourceforge. + +xml distexplorer + : + distexplorer.qbk + : +; + +# import boostbook : boostbook ; + +boostbook standalone + : + distexplorer + : + + # Path for links to Boost: + boost.root=../../../../../../../../trunk + # Path for libraries index: + boost.libraries=$(boost-root)/libs/libraries.htm + # Use the main Boost stylesheet: + html.stylesheet=../../../../../../../../trunk/doc/html/boostbook.css + # Use the distexplorer local Boost stylesheet: + # html.stylesheet=./html/boostbook.css + + # Some general style settings: + table.footnote.number.format=1 + footnote.number.format=1 + + # HTML options first: + # Use graphics not text for navigation: + navig.graphics=1 + # How far down we chunk nested sections, basically all of them: + chunk.section.depth=10 + # Don't put the first section on the same page as the TOC: + chunk.first.sections=1 + # How far down sections get TOC's + toc.section.depth=10 + # Max depth in each TOC: + toc.max.depth=4 + # How far down we go with TOC's + generate.section.toc.level=10 + #root.filename="distexplorer" +; + + diff --git a/doc/distexplorer/distexplorer.qbk b/doc/distexplorer/distexplorer.qbk new file mode 100644 index 000000000..f76ef7fca --- /dev/null +++ b/doc/distexplorer/distexplorer.qbk @@ -0,0 +1,105 @@ +[article Statistical Distribution Explorer + [quickbook 1.4] + [copyright 2008 Paul A. Bristow, John Maddock] + [license + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + [@http://www.boost.org/LICENSE_1_0.txt]) + ] + [authors [Bristow, Paul A.], [Maddock, John]] + [category math] + [purpose mathematics] + [/last-revision $Date$] +] + +A Windows utility to show the properties of statistical distributions +using parameters provided interactively by the user. + +The distributions provided are: + +*bernoulli +*beta_distribution +*binomial_distribution +*cauchy +*chi_squared +*exponential +*extreme_value +*fisher_f +*gamma_distribution +*lognormal_distribution +*negative_binomial_distribution +*normal_distribution +*pareto +*poisson +*rayleigh +*students_t +*triangular +*uniform +*weibull + +Properties of distributions computed are: + +*mean +*mode +*median +*variance +*standard deviation +*coefficient of variation, +*skewness +*kurtosis +*excess +*range supported + +Calculated, from values provided, are: + +*probability density (or mass) function (PDF) +*cumulative distribution function (CDF), and complement +*Quantiles (percentiles) are calculated for typical risk (alpha) probabilities (0.001, 0.01, 0.5, 0.1, 0.333) +and for additional probabilities provided by the user. + +Results can be saved to text files using Save or SaveAs. +All the values on the four tabs are output to the file chosen, +and are tab separated to assist input to other programs, +for example, spreadsheets or text editors. + +Note: Excel (for example), only shows 10 decimal digits, by default: +to display the maximum possible precision (abotu 15 decimal digits), +it is necessary to format all cells to display this precision. +Although unusually accurate, not all values computed by Distexplorer will be as accurate as this. +Values shown as NaN cannot be calculated from the value(s) given, +most commonly because the value input is outside the range for the distribution. + +For more information, including downloads, see + +[@http://distexplorer.sourceforge.net/ Distexplorer at Sourceforge] + +This Microsoft Windows 32 package distribution.exe +was generated from a C# program +and uses a boost_math.dll generated using the +Boost.Math C++ source code from the Boost.Math Toolkit, compiled in CLI mode, +containing the underlying statistical distribution classes and functions. + +All source code is freely available for view and use under the +[@http://www.boost.org/LICENSE_1_0.txt Boost Open Source License]. + +[@https://svn.boost.org/svn/boost/sandbox\math_toolkit\libs\math\dot_net_example +Math Toolkit C++ source code] +to produce boost_math.dll is in the most recent [@http://www.boost.org Boost] release, initially 1.35.0. + +It is distributed as a single Windows Installer package Setupdistex.msi. +Unzip the distexplorer.zip to a temporary location of your choice and run setup.exe. + +(Note that .NET framework 2.0 and VCredist are requirements for this program. +Most recent and updated Windows environments will already have these, +but they are quickly, easily and safely installed from the Microsoft site if required.) + +(The package cannot be run on other platforms at present but it should be possible +to build an equivalent utility on any C/C++ platform if anyone would like to undertake this task.) + +[/ Distexplorer.qbk + Copyright 2008 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] + From 7c1a1362c7389d7e11f5f8759ba3d249f6803630 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Mon, 26 May 2008 10:00:02 +0000 Subject: [PATCH 005/192] Reduced again the number of template instanciations [SVN r45768] --- include/boost/math/special_functions/pow.hpp | 61 +++++++++----------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/include/boost/math/special_functions/pow.hpp b/include/boost/math/special_functions/pow.hpp index 555199ec2..4a9e0bb2b 100644 --- a/include/boost/math/special_functions/pow.hpp +++ b/include/boost/math/special_functions/pow.hpp @@ -26,60 +26,53 @@ namespace math { namespace detail { -template -struct positive_power; - -template <> -struct positive_power<0, false> -{ - template - static typename tools::promote_args::type result(T) - { return 1; } -}; - -template <> -struct positive_power<1, false> -{ - template - static typename tools::promote_args::type result(T x) - { return x; } -}; - -template <> -struct positive_power<2, false> -{ - template - static typename tools::promote_args::type result(T base) - { return base*base; } -}; - -template +template struct positive_power { template static typename tools::promote_args::type result(T base) { - return base*positive_power::result(base); + typename tools::promote_args::type power = + positive_power::result(base); + return power * power; } }; template -struct positive_power +struct positive_power { template static typename tools::promote_args::type result(T base) { - return positive_power<2, false>::result( - positive_power::result(base)); + typename tools::promote_args::type power = + positive_power::result(base); + return base * power * power; } }; +template <> +struct positive_power<0, 0> +{ + template + static typename tools::promote_args::type result(T) + { return T(1); } +}; + +template <> +struct positive_power<1, 1> +{ + template + static typename tools::promote_args::type result(T base) + { return base; } +}; + + template struct power_if_positive { template static typename tools::promote_args::type result(T base, const Policy&) - { return positive_power::result(base); } + { return positive_power::result(base); } }; template @@ -98,7 +91,7 @@ struct power_if_positive ); } - return T(1) / positive_power<-N, (-N)%2>::result(base); + return T(1) / positive_power<-N>::result(base); } }; From 72ba7bce59c00c066e881d85a6bc54e9bb7bb9c4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 29 May 2008 12:38:04 +0000 Subject: [PATCH 006/192] Added rational approximations for log1p. [SVN r45898] --- .../boost/math/special_functions/log1p.hpp | 192 +++++++++++++++++- 1 file changed, 188 insertions(+), 4 deletions(-) diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 0e093a618..0122a35d7 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -59,8 +60,6 @@ namespace detail log1p_series& operator=(const log1p_series&); }; -} // namespace detail - // Algorithm log1p is part of C99, but is not yet provided by many compilers. // // This version uses a Taylor series expansion for 0.5 > x > epsilon, which may @@ -71,9 +70,8 @@ namespace detail // it performs no better than log(1+x): which is to say not very well at all. // template -typename tools::promote_args::type log1p(T x, const Policy& pol) +T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&) { // The function returns the natural logarithm of 1 + x. - // A domain error occurs if x < -1. TODO should there be a check? typedef typename tools::promote_args::type result_type; BOOST_MATH_STD_USING using std::abs; @@ -106,6 +104,192 @@ typename tools::promote_args::type log1p(T x, const Policy& pol) return result; } +template +T log1p_imp(T const& x, const Policy& pol, const mpl::int_<53>&) +{ // The function returns the natural logarithm of 1 + x. + BOOST_MATH_STD_USING + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + // Note that without numeric_limits specialisation support, + // epsilon just returns zero, and our "optimisation" will always fail: + if(a < tools::epsilon()) + return x; + + // Maximum Deviation Found: 1.846e-017 + // Expected Error Term: 1.843e-017 + // Maximum Relative Change in Control Points: 8.138e-004 + // Max Error found at double precision = 3.250766e-016 + static const T P[] = { + 0.15141069795941984e-16L, + 0.35495104378055055e-15L, + 0.33333333333332835L, + 0.99249063543365859L, + 1.1143969784156509L, + 0.58052937949269651L, + 0.13703234928513215L, + 0.011294864812099712L + }; + static const T Q[] = { + 1L, + 3.7274719063011499L, + 5.5387948649720334L, + 4.159201143419005L, + 1.6423855110312755L, + 0.31706251443180914L, + 0.022665554431410243L, + -0.29252538135177773e-5L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const mpl::int_<64>&) +{ // The function returns the natural logarithm of 1 + x. + BOOST_MATH_STD_USING + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + // Note that without numeric_limits specialisation support, + // epsilon just returns zero, and our "optimisation" will always fail: + if(a < tools::epsilon()) + return x; + + // Maximum Deviation Found: 8.089e-20 + // Expected Error Term: 8.088e-20 + // Maximum Relative Change in Control Points: 9.648e-05 + // Max Error found at long double precision = 2.242324e-19 + static const T P[] = { + -0.807533446680736736712e-19L, + -0.490881544804798926426e-18L, + 0.333333333333333373941L, + 1.17141290782087994162L, + 1.62790522814926264694L, + 1.13156411870766876113L, + 0.408087379932853785336L, + 0.0706537026422828914622L, + 0.00441709903782239229447L + }; + static const T Q[] = { + 1L, + 4.26423872346263928361L, + 7.48189472704477708962L, + 6.94757016732904280913L, + 3.6493508622280767304L, + 1.06884863623790638317L, + 0.158292216998514145947L, + 0.00885295524069924328658L, + -0.560026216133415663808e-6L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const mpl::int_<24>&) +{ // The function returns the natural logarithm of 1 + x. + BOOST_MATH_STD_USING + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + // Note that without numeric_limits specialisation support, + // epsilon just returns zero, and our "optimisation" will always fail: + if(a < tools::epsilon()) + return x; + + // Maximum Deviation Found: 6.910e-08 + // Expected Error Term: 6.910e-08 + // Maximum Relative Change in Control Points: 2.509e-04 + // Max Error found at double precision = 6.910422e-08 + // Max Error found at float precision = 8.357242e-08 + static const T P[] = { + -0.671192866803148236519e-7L, + 0.119670999140731844725e-6L, + 0.333339469182083148598L, + 0.237827183019664122066L + }; + static const T Q[] = { + 1L, + 1.46348272586988539733L, + 0.497859871350117338894L, + -0.00471666268910169651936L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +} // namespace detail + +template +inline typename tools::promote_args::type log1p(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + typedef typename mpl::if_< + mpl::less_equal >, + mpl::int_<0>, + typename mpl::if_< + mpl::less_equal >, + mpl::int_<53>, // double + typename mpl::if_< + mpl::less_equal >, + mpl::int_<64>, // 80-bit long double + mpl::int_<0> // too many bits, use generic version. + >::type + >::type + >::type tag_type; + return policies::checked_narrowing_cast( + detail::log1p_imp(static_cast(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)"); +} + #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // These overloads work around a type deduction bug: inline float log1p(float z) From 7fbf7dd47f94b8b68e30dab17ec75f25a2c290c9 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Thu, 5 Jun 2008 22:03:27 +0000 Subject: [PATCH 007/192] Added undeterminate_result_error, and used it for the pow<0>(0) case. [SVN r46182] --- .../boost/math/policies/error_handling.hpp | 62 +++++++++++++++++++ include/boost/math/policies/policy.hpp | 9 +++ include/boost/math/special_functions/pow.hpp | 30 ++++++--- test/pow_test.cpp | 15 ++++- test/test_error_handling.cpp | 33 +++++++++- test/test_policy.cpp | 42 ++++++++++--- test/test_policy_2.cpp | 14 +++-- 7 files changed, 178 insertions(+), 27 deletions(-) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index b0e562d6a..f1ac326aa 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -62,6 +62,8 @@ template T user_evaluation_error(const char* function, const char* message, const T& val); template T user_rounding_error(const char* function, const char* message, const T& val); +template +T user_undeterminate_result_error(const char* function, const char* message, const T& val); namespace detail { @@ -426,6 +428,57 @@ inline T raise_rounding_error( return user_rounding_error(function, message, val); } +template +inline T raise_undeterminate_result_error( + const char* function, + const char* message, + const T& val, + const R& , + const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::throw_on_error>&) +{ + raise_error(function, message, val); + // we never get here: + return std::numeric_limits::quiet_NaN(); +} + +template +inline T raise_undeterminate_result_error( + const char* , + const char* , + const T& , + const R& result, + const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::ignore_error>&) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return result; +} + +template +inline T raise_undeterminate_result_error( + const char* , + const char* , + const T& , + const R& result, + const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::errno_on_error>&) +{ + errno = EDOM; + // This may or may not do the right thing, but the user asked for the error + // to be silent so here we go anyway: + return result; +} + +template +inline T raise_undeterminate_result_error( + const char* function, + const char* message, + const T& val, + const R& , + const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::user_error>&) +{ + return user_undeterminate_result_error(function, message, val); +} + } // namespace detail template @@ -492,6 +545,15 @@ inline T raise_rounding_error(const char* function, const char* message, const T val, policy_type()); } +template +inline T raise_undeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) +{ + typedef typename Policy::undeterminate_result_error_type policy_type; + return detail::raise_undeterminate_result_error( + function, message ? message : "Undeterminate result with value %1%", + val, result, policy_type()); +} + // // checked_narrowing_cast: // diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 76911ff5b..625c6f076 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -63,6 +63,9 @@ namespace policies{ #ifndef BOOST_MATH_DENORM_ERROR_POLICY #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error #endif +#ifndef BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY +#define BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY ignore_error +#endif #ifndef BOOST_MATH_DIGITS10_POLICY #define BOOST_MATH_DIGITS10_POLICY 0 #endif @@ -182,6 +185,7 @@ BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERR BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, undeterminate_result_error, BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY) // // Policy types for internal promotion: @@ -403,6 +407,7 @@ public: typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; + typedef typename detail::find_arg, undeterminate_result_error<> >::type undeterminate_result_error_type; private: // // Now work out the precision: @@ -446,6 +451,7 @@ public: typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; + typedef undeterminate_result_error<> undeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else @@ -470,6 +476,7 @@ public: typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; + typedef undeterminate_result_error<> undeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else @@ -508,6 +515,7 @@ private: typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; + typedef typename detail::find_arg, typename Policy::undeterminate_result_error_type >::type undeterminate_result_error_type; // // Now work out the precision: // @@ -543,6 +551,7 @@ private: denorm_error_type, evaluation_error_type, rounding_error_type, + undeterminate_result_error_type, precision_type, promote_float_type, promote_double_type, diff --git a/include/boost/math/special_functions/pow.hpp b/include/boost/math/special_functions/pow.hpp index 4a9e0bb2b..736c9cb2a 100644 --- a/include/boost/math/special_functions/pow.hpp +++ b/include/boost/math/special_functions/pow.hpp @@ -50,14 +50,6 @@ struct positive_power } }; -template <> -struct positive_power<0, 0> -{ - template - static typename tools::promote_args::type result(T) - { return T(1); } -}; - template <> struct positive_power<1, 1> { @@ -95,6 +87,28 @@ struct power_if_positive } }; +template <> +struct power_if_positive<0, true> +{ + template + static typename tools::promote_args::type + result(T base, const Policy& policy) + { + if (base == 0) + { + return policies::raise_undeterminate_result_error( + "boost::math::pow(%1%)", + "The result of pow<0>(%1%) is undetermined", + base, + T(1), + policy + ); + } + + return T(1); + } +}; + template struct select_power_if_positive diff --git a/test/pow_test.cpp b/test/pow_test.cpp index c9f8f5319..4ba3e4dd3 100644 --- a/test/pow_test.cpp +++ b/test/pow_test.cpp @@ -115,7 +115,13 @@ void test_return_types() namespace boost { namespace math { namespace policies { template T user_overflow_error(const char*, const char*, const T&) -{ return 123.456; } +{ return T(123.456); } +}}} + +namespace boost { namespace math { namespace policies { +template +T user_undeterminate_result_error(const char*, const char*, const T&) +{ return T(456.789); } }}} @@ -128,6 +134,12 @@ void test_error_policy() policy< ::boost::math::policies::overflow_error >() ) == 123.456); + + BOOST_CHECK(pow<0>( + 0.0, + policy< ::boost::math::policies::undeterminate_result_error >() + ) + == 456.789); } int test_main(int, char* []) @@ -187,4 +199,3 @@ int test_main(int, char* []) return 0; } - diff --git a/test/test_error_handling.cpp b/test/test_error_handling.cpp index a34678b8d..5a95c3e95 100644 --- a/test/test_error_handling.cpp +++ b/test/test_error_handling.cpp @@ -53,6 +53,12 @@ T user_evaluation_error(const char* , const char* , const T& ) throw user_defined_error(); } +template +T user_undeterminate_result_error(const char* , const char* , const T& ) +{ + throw user_defined_error(); +} + }}} // namespaces #include @@ -69,21 +75,32 @@ policy< overflow_error, underflow_error, denorm_error, - evaluation_error > throw_policy; + evaluation_error, + undeterminate_result_error > throw_policy; policy< domain_error, pole_error, overflow_error, underflow_error, denorm_error, - evaluation_error > errno_policy; + evaluation_error, + undeterminate_result_error > errno_policy; +policy< + domain_error, + pole_error, + overflow_error, + underflow_error, + denorm_error, + evaluation_error, + undeterminate_result_error > ignore_policy; policy< domain_error, pole_error, overflow_error, underflow_error, denorm_error, - evaluation_error > user_policy; + evaluation_error, + undeterminate_result_error > user_policy; policy<> default_policy; #define TEST_EXCEPTION(expression, exception)\ @@ -112,6 +129,8 @@ void test_error(T) TEST_EXCEPTION(boost::math::policies::raise_denorm_error(func, 0, T(0), throw_policy), std::underflow_error); TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, msg1, T(1.25), throw_policy), boost::math::evaluation_error); TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, 0, T(1.25), throw_policy), boost::math::evaluation_error); + TEST_EXCEPTION(boost::math::policies::raise_undeterminate_result_error(func, msg1, T(1.25), T(12.34), throw_policy), std::domain_error); + TEST_EXCEPTION(boost::math::policies::raise_undeterminate_result_error(func, 0, T(1.25), T(12.34), throw_policy), std::domain_error); // // Now try user error handlers: these should all throw user_error(): // - because by design these are undefined and must be defined by the user ;-) @@ -121,7 +140,15 @@ void test_error(T) BOOST_CHECK_THROW(boost::math::policies::raise_underflow_error(func, msg2, user_policy), user_defined_error); BOOST_CHECK_THROW(boost::math::policies::raise_denorm_error(func, msg2, T(0), user_policy), user_defined_error); BOOST_CHECK_THROW(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), user_policy), user_defined_error); + BOOST_CHECK_THROW(boost::math::policies::raise_undeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); + // Test with ignore_error + BOOST_CHECK(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy) == T(12.34)); + + // Test with errno_on_error + errno = 0; + BOOST_CHECK(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), errno_policy) == T(12.34)); + BOOST_CHECK(errno == EDOM); } int test_main(int, char* []) diff --git a/test/test_policy.cpp b/test/test_policy.cpp index e0410ea1a..2aa8605ce 100644 --- a/test/test_policy.cpp +++ b/test/test_policy.cpp @@ -35,112 +35,134 @@ int test_main(int, char* []) BOOST_CHECK((is_same::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same::evaluation_error_type, evaluation_error >::value)); - + BOOST_CHECK((is_same >::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same >::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same >::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same >::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); + BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); + BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); + BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); + BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); + BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, promote_double >::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); diff --git a/test/test_policy_2.cpp b/test/test_policy_2.cpp index b51a2d4e8..7146fbfa4 100644 --- a/test/test_policy_2.cpp +++ b/test/test_policy_2.cpp @@ -33,50 +33,55 @@ int test_main(int, char* []) BOOST_CHECK((is_same, overflow_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, overflow_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, overflow_error >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same, overflow_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same, overflow_error >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same, overflow_error >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same, overflow_error >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same, overflow_error >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same, domain_error >::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same, domain_error >::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same, domain_error >::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same, domain_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, domain_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, domain_error >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same, domain_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same, domain_error >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same, domain_error >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same, domain_error >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same, domain_error >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::discrete_quantile_type, discrete_quantile >::value)); - + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::discrete_quantile_type, discrete_quantile >::value)); - + BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::domain_error_type, domain_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::pole_error_type, pole_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::overflow_error_type, overflow_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::evaluation_error_type, evaluation_error >::value)); + BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::undeterminate_result_error_type, undeterminate_result_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::promote_double_type, policy<>::promote_double_type>::value)); @@ -88,6 +93,7 @@ int test_main(int, char* []) BOOST_CHECK(check_same(make_policy(promote_float()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(domain_error()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(pole_error()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(undeterminate_result_error()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(domain_error()), policy >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error()), policy, pole_error >())); From 73b62fc8b9429d7e487016aa7b129a233a7f5875 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Fri, 6 Jun 2008 22:33:39 +0000 Subject: [PATCH 008/192] Completed policies and error handling test cases. Sanitized floating point test values in pow tests. [SVN r46205] --- include/boost/math/policies/policy.hpp | 7 +++++++ test/pow_test.cpp | 8 ++++---- test/test_error_handling.cpp | 28 ++++++++++++++++++++++++-- test/test_policy_2.cpp | 11 +++++----- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 625c6f076..418ab73b4 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -676,6 +676,13 @@ inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::ty return result_type(); } +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; + return result_type(); +} + // // Traits class to handle internal promotion: // diff --git a/test/pow_test.cpp b/test/pow_test.cpp index 4ba3e4dd3..fb88d0f47 100644 --- a/test/pow_test.cpp +++ b/test/pow_test.cpp @@ -115,13 +115,13 @@ void test_return_types() namespace boost { namespace math { namespace policies { template T user_overflow_error(const char*, const char*, const T&) -{ return T(123.456); } +{ return T(123.45); } }}} namespace boost { namespace math { namespace policies { template T user_undeterminate_result_error(const char*, const char*, const T&) -{ return T(456.789); } +{ return T(456.78); } }}} @@ -133,13 +133,13 @@ void test_error_policy() 0.0, policy< ::boost::math::policies::overflow_error >() ) - == 123.456); + == 123.45); BOOST_CHECK(pow<0>( 0.0, policy< ::boost::math::policies::undeterminate_result_error >() ) - == 456.789); + == 456.78); } int test_main(int, char* []) diff --git a/test/test_error_handling.cpp b/test/test_error_handling.cpp index 5a95c3e95..6522c8dd3 100644 --- a/test/test_error_handling.cpp +++ b/test/test_error_handling.cpp @@ -143,12 +143,36 @@ void test_error(T) BOOST_CHECK_THROW(boost::math::policies::raise_undeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); // Test with ignore_error - BOOST_CHECK(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy) == T(12.34)); + //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy))); + //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy))); + BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); + BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error(func, msg2, ignore_policy), T(0)); + BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), ignore_policy), T(1.25)); + //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); + BOOST_CHECK_EQUAL(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy), T(12.34)); // Test with errno_on_error + //errno = 0; + //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy))); + //BOOST_CHECK(errno == EDOM); + //errno = 0; + //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy))); + //BOOST_CHECK(errno == EDOM); + errno = 0; + BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); + BOOST_CHECK_EQUAL(errno, ERANGE); + errno = 0; + BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error(func, msg2, errno_policy), T(0)); + BOOST_CHECK_EQUAL(errno, ERANGE); + errno = 0; + BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), errno_policy), T(1.25)); + BOOST_CHECK_EQUAL(errno, ERANGE); + //errno = 0; + //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); + //BOOST_CHECK(errno == EDOM); errno = 0; BOOST_CHECK(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), errno_policy) == T(12.34)); - BOOST_CHECK(errno == EDOM); + BOOST_CHECK_EQUAL(errno, EDOM); } int test_main(int, char* []) diff --git a/test/test_policy_2.cpp b/test/test_policy_2.cpp index 7146fbfa4..3a2da1d36 100644 --- a/test/test_policy_2.cpp +++ b/test/test_policy_2.cpp @@ -101,12 +101,13 @@ int test_main(int, char* []) BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error()), policy, pole_error, overflow_error, underflow_error >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error()), policy, pole_error, overflow_error, underflow_error, denorm_error >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), digits2<10>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, digits2<10> >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), digits10<5>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, digits2<19> >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), digits2<10>(), promote_float()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, digits2<10>, promote_float >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10> >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits10<5>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<19> >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float >())); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), digits2<10>(), promote_float(), promote_double()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, digits2<10>, promote_float, promote_double >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), digits2<10>(), promote_float(), promote_double(), discrete_quantile()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, digits2<10>, promote_float, promote_double, discrete_quantile >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float(), promote_double()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float, promote_double >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float(), promote_double(), discrete_quantile()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float, promote_double, discrete_quantile >())); #endif return 0; } // int test_main(int, char* []) From 285615995e50a465e43ef21cb21c5ca5a23704dd Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Fri, 6 Jun 2008 23:57:24 +0000 Subject: [PATCH 009/192] Changed undeterminate to indeterminate. [SVN r46206] --- .../boost/math/policies/error_handling.hpp | 28 ++++++------- include/boost/math/policies/policy.hpp | 16 +++---- include/boost/math/special_functions/pow.hpp | 2 +- test/pow_test.cpp | 4 +- test/test_error_handling.cpp | 20 ++++----- test/test_policy.cpp | 42 +++++++++---------- test/test_policy_2.cpp | 24 +++++------ 7 files changed, 68 insertions(+), 68 deletions(-) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index f1ac326aa..95f650525 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -63,7 +63,7 @@ T user_evaluation_error(const char* function, const char* message, const T& val) template T user_rounding_error(const char* function, const char* message, const T& val); template -T user_undeterminate_result_error(const char* function, const char* message, const T& val); +T user_indeterminate_result_error(const char* function, const char* message, const T& val); namespace detail { @@ -429,12 +429,12 @@ inline T raise_rounding_error( } template -inline T raise_undeterminate_result_error( +inline T raise_indeterminate_result_error( const char* function, const char* message, const T& val, const R& , - const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::throw_on_error>&) + const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); // we never get here: @@ -442,12 +442,12 @@ inline T raise_undeterminate_result_error( } template -inline T raise_undeterminate_result_error( +inline T raise_indeterminate_result_error( const char* , const char* , const T& , const R& result, - const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::ignore_error>&) + const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::ignore_error>&) { // This may or may not do the right thing, but the user asked for the error // to be ignored so here we go anyway: @@ -455,12 +455,12 @@ inline T raise_undeterminate_result_error( } template -inline T raise_undeterminate_result_error( +inline T raise_indeterminate_result_error( const char* , const char* , const T& , const R& result, - const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::errno_on_error>&) + const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::errno_on_error>&) { errno = EDOM; // This may or may not do the right thing, but the user asked for the error @@ -469,14 +469,14 @@ inline T raise_undeterminate_result_error( } template -inline T raise_undeterminate_result_error( +inline T raise_indeterminate_result_error( const char* function, const char* message, const T& val, const R& , - const ::boost::math::policies::undeterminate_result_error< ::boost::math::policies::user_error>&) + const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::user_error>&) { - return user_undeterminate_result_error(function, message, val); + return user_indeterminate_result_error(function, message, val); } } // namespace detail @@ -546,11 +546,11 @@ inline T raise_rounding_error(const char* function, const char* message, const T } template -inline T raise_undeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) +inline T raise_indeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) { - typedef typename Policy::undeterminate_result_error_type policy_type; - return detail::raise_undeterminate_result_error( - function, message ? message : "Undeterminate result with value %1%", + typedef typename Policy::indeterminate_result_error_type policy_type; + return detail::raise_indeterminate_result_error( + function, message ? message : "Indeterminate result with value %1%", val, result, policy_type()); } diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 418ab73b4..8cd2566b3 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -63,8 +63,8 @@ namespace policies{ #ifndef BOOST_MATH_DENORM_ERROR_POLICY #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error #endif -#ifndef BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY -#define BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY ignore_error +#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY +#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error #endif #ifndef BOOST_MATH_DIGITS10_POLICY #define BOOST_MATH_DIGITS10_POLICY 0 @@ -185,7 +185,7 @@ BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERR BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY) -BOOST_MATH_META_INT(error_policy_type, undeterminate_result_error, BOOST_MATH_UNDETERMINATE_RESULT_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY) // // Policy types for internal promotion: @@ -407,7 +407,7 @@ public: typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; - typedef typename detail::find_arg, undeterminate_result_error<> >::type undeterminate_result_error_type; + typedef typename detail::find_arg, indeterminate_result_error<> >::type indeterminate_result_error_type; private: // // Now work out the precision: @@ -451,7 +451,7 @@ public: typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; - typedef undeterminate_result_error<> undeterminate_result_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else @@ -476,7 +476,7 @@ public: typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; - typedef undeterminate_result_error<> undeterminate_result_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else @@ -515,7 +515,7 @@ private: typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; - typedef typename detail::find_arg, typename Policy::undeterminate_result_error_type >::type undeterminate_result_error_type; + typedef typename detail::find_arg, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; // // Now work out the precision: // @@ -551,7 +551,7 @@ private: denorm_error_type, evaluation_error_type, rounding_error_type, - undeterminate_result_error_type, + indeterminate_result_error_type, precision_type, promote_float_type, promote_double_type, diff --git a/include/boost/math/special_functions/pow.hpp b/include/boost/math/special_functions/pow.hpp index 736c9cb2a..1de94d4b0 100644 --- a/include/boost/math/special_functions/pow.hpp +++ b/include/boost/math/special_functions/pow.hpp @@ -96,7 +96,7 @@ struct power_if_positive<0, true> { if (base == 0) { - return policies::raise_undeterminate_result_error( + return policies::raise_indeterminate_result_error( "boost::math::pow(%1%)", "The result of pow<0>(%1%) is undetermined", base, diff --git a/test/pow_test.cpp b/test/pow_test.cpp index fb88d0f47..7630b8be3 100644 --- a/test/pow_test.cpp +++ b/test/pow_test.cpp @@ -120,7 +120,7 @@ T user_overflow_error(const char*, const char*, const T&) namespace boost { namespace math { namespace policies { template -T user_undeterminate_result_error(const char*, const char*, const T&) +T user_indeterminate_result_error(const char*, const char*, const T&) { return T(456.78); } }}} @@ -137,7 +137,7 @@ void test_error_policy() BOOST_CHECK(pow<0>( 0.0, - policy< ::boost::math::policies::undeterminate_result_error >() + policy< ::boost::math::policies::indeterminate_result_error >() ) == 456.78); } diff --git a/test/test_error_handling.cpp b/test/test_error_handling.cpp index 6522c8dd3..64e4fc55d 100644 --- a/test/test_error_handling.cpp +++ b/test/test_error_handling.cpp @@ -54,7 +54,7 @@ T user_evaluation_error(const char* , const char* , const T& ) } template -T user_undeterminate_result_error(const char* , const char* , const T& ) +T user_indeterminate_result_error(const char* , const char* , const T& ) { throw user_defined_error(); } @@ -76,7 +76,7 @@ policy< underflow_error, denorm_error, evaluation_error, - undeterminate_result_error > throw_policy; + indeterminate_result_error > throw_policy; policy< domain_error, pole_error, @@ -84,7 +84,7 @@ policy< underflow_error, denorm_error, evaluation_error, - undeterminate_result_error > errno_policy; + indeterminate_result_error > errno_policy; policy< domain_error, pole_error, @@ -92,7 +92,7 @@ policy< underflow_error, denorm_error, evaluation_error, - undeterminate_result_error > ignore_policy; + indeterminate_result_error > ignore_policy; policy< domain_error, pole_error, @@ -100,7 +100,7 @@ policy< underflow_error, denorm_error, evaluation_error, - undeterminate_result_error > user_policy; + indeterminate_result_error > user_policy; policy<> default_policy; #define TEST_EXCEPTION(expression, exception)\ @@ -129,8 +129,8 @@ void test_error(T) TEST_EXCEPTION(boost::math::policies::raise_denorm_error(func, 0, T(0), throw_policy), std::underflow_error); TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, msg1, T(1.25), throw_policy), boost::math::evaluation_error); TEST_EXCEPTION(boost::math::policies::raise_evaluation_error(func, 0, T(1.25), throw_policy), boost::math::evaluation_error); - TEST_EXCEPTION(boost::math::policies::raise_undeterminate_result_error(func, msg1, T(1.25), T(12.34), throw_policy), std::domain_error); - TEST_EXCEPTION(boost::math::policies::raise_undeterminate_result_error(func, 0, T(1.25), T(12.34), throw_policy), std::domain_error); + TEST_EXCEPTION(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(1.25), T(12.34), throw_policy), std::domain_error); + TEST_EXCEPTION(boost::math::policies::raise_indeterminate_result_error(func, 0, T(1.25), T(12.34), throw_policy), std::domain_error); // // Now try user error handlers: these should all throw user_error(): // - because by design these are undefined and must be defined by the user ;-) @@ -140,7 +140,7 @@ void test_error(T) BOOST_CHECK_THROW(boost::math::policies::raise_underflow_error(func, msg2, user_policy), user_defined_error); BOOST_CHECK_THROW(boost::math::policies::raise_denorm_error(func, msg2, T(0), user_policy), user_defined_error); BOOST_CHECK_THROW(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), user_policy), user_defined_error); - BOOST_CHECK_THROW(boost::math::policies::raise_undeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); + BOOST_CHECK_THROW(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); // Test with ignore_error //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy))); @@ -149,7 +149,7 @@ void test_error(T) BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error(func, msg2, ignore_policy), T(0)); BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), ignore_policy), T(1.25)); //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); - BOOST_CHECK_EQUAL(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy), T(12.34)); + BOOST_CHECK_EQUAL(boost::math::policies::raise_indeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy), T(12.34)); // Test with errno_on_error //errno = 0; @@ -171,7 +171,7 @@ void test_error(T) //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); //BOOST_CHECK(errno == EDOM); errno = 0; - BOOST_CHECK(boost::math::policies::raise_undeterminate_result_error(func, 0, T(0.0), T(12.34), errno_policy) == T(12.34)); + BOOST_CHECK(boost::math::policies::raise_indeterminate_result_error(func, 0, T(0.0), T(12.34), errno_policy) == T(12.34)); BOOST_CHECK_EQUAL(errno, EDOM); } diff --git a/test/test_policy.cpp b/test/test_policy.cpp index 2aa8605ce..0a6f8a1ed 100644 --- a/test/test_policy.cpp +++ b/test/test_policy.cpp @@ -42,7 +42,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -54,7 +54,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -66,7 +66,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -78,7 +78,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -90,7 +90,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -102,23 +102,23 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); - BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); - BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); - BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); - BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); - BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); - BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, undeterminate_result_error >::value)); - BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); - BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); - BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); - BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); + BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); + BOOST_CHECK((is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); + BOOST_CHECK((is_same >::precision_type, policy<>::precision_type>::value)); + BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); + BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); + BOOST_CHECK((is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); BOOST_CHECK((is_same >::domain_error_type, policy<>::domain_error_type >::value)); BOOST_CHECK((is_same >::pole_error_type, policy<>::pole_error_type >::value)); @@ -126,7 +126,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -138,7 +138,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); @@ -150,7 +150,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, promote_double >::value)); @@ -162,7 +162,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); BOOST_CHECK((is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); BOOST_CHECK((is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); - BOOST_CHECK((is_same >::undeterminate_result_error_type, policy<>::undeterminate_result_error_type >::value)); + BOOST_CHECK((is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); BOOST_CHECK((is_same >::precision_type, policy<>::precision_type >::value)); BOOST_CHECK((is_same >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same >::promote_double_type, policy<>::promote_double_type>::value)); diff --git a/test/test_policy_2.cpp b/test/test_policy_2.cpp index 3a2da1d36..39ef5d2b5 100644 --- a/test/test_policy_2.cpp +++ b/test/test_policy_2.cpp @@ -33,7 +33,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same, overflow_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, overflow_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, overflow_error >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same, overflow_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same, overflow_error >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same, overflow_error >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same, overflow_error >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same, overflow_error >::promote_double_type, policy<>::promote_double_type>::value)); @@ -45,7 +45,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same, domain_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, domain_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, domain_error >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same, domain_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same, domain_error >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same, domain_error >::precision_type, policy<>::precision_type>::value)); BOOST_CHECK((is_same, domain_error >::promote_float_type, policy<>::promote_float_type>::value)); BOOST_CHECK((is_same, domain_error >::promote_double_type, policy<>::promote_double_type>::value)); @@ -57,7 +57,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error >::promote_double_type, policy<>::promote_double_type>::value)); @@ -69,7 +69,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, promote_float, discrete_quantile, denorm_error, domain_error > >::type::promote_double_type, policy<>::promote_double_type>::value)); @@ -81,7 +81,7 @@ int test_main(int, char* []) BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::underflow_error_type, underflow_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::denorm_error_type, denorm_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::evaluation_error_type, evaluation_error >::value)); - BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::undeterminate_result_error_type, undeterminate_result_error >::value)); + BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::indeterminate_result_error_type, indeterminate_result_error >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::precision_type, digits2<20> >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::promote_float_type, promote_float >::value)); BOOST_CHECK((is_same, digits2<20>, promote_float, discrete_quantile, denorm_error, domain_error >::type::promote_double_type, policy<>::promote_double_type>::value)); @@ -93,7 +93,7 @@ int test_main(int, char* []) BOOST_CHECK(check_same(make_policy(promote_float()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(domain_error()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(pole_error()), normalise > >::type())); - BOOST_CHECK(check_same(make_policy(undeterminate_result_error()), normalise > >::type())); + BOOST_CHECK(check_same(make_policy(indeterminate_result_error()), normalise > >::type())); BOOST_CHECK(check_same(make_policy(domain_error()), policy >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error()), policy, pole_error >())); @@ -101,13 +101,13 @@ int test_main(int, char* []) BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error()), policy, pole_error, overflow_error, underflow_error >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error()), policy, pole_error, overflow_error, underflow_error, denorm_error >())); BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10> >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits10<5>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<19> >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error(), digits2<10>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error, digits2<10> >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error(), digits10<5>()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error, digits2<19> >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error(), digits2<10>(), promote_float()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error, digits2<10>, promote_float >())); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float(), promote_double()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float, promote_double >())); - BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), undeterminate_result_error(), digits2<10>(), promote_float(), promote_double(), discrete_quantile()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, undeterminate_result_error, digits2<10>, promote_float, promote_double, discrete_quantile >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error(), digits2<10>(), promote_float(), promote_double()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error, digits2<10>, promote_float, promote_double >())); + BOOST_CHECK(check_same(make_policy(domain_error(), pole_error(), overflow_error(), underflow_error(), denorm_error(), evaluation_error(), indeterminate_result_error(), digits2<10>(), promote_float(), promote_double(), discrete_quantile()), policy, pole_error, overflow_error, underflow_error, denorm_error, evaluation_error, indeterminate_result_error, digits2<10>, promote_float, promote_double, discrete_quantile >())); #endif return 0; } // int test_main(int, char* []) From e01cbc1c3856291778815e9a60fcccf23e3b49c8 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Sat, 7 Jun 2008 11:28:00 +0000 Subject: [PATCH 010/192] Fixed tests involving NaN and infinity. [SVN r46210] --- test/test_error_handling.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/test_error_handling.cpp b/test/test_error_handling.cpp index 64e4fc55d..7419ae2d2 100644 --- a/test/test_error_handling.cpp +++ b/test/test_error_handling.cpp @@ -143,21 +143,21 @@ void test_error(T) BOOST_CHECK_THROW(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); // Test with ignore_error - //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy))); - //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy))); + BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error(func, msg2, ignore_policy), T(0)); BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), ignore_policy), T(1.25)); - //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); + BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(1.25), ignore_policy), T(1.25)); BOOST_CHECK_EQUAL(boost::math::policies::raise_indeterminate_result_error(func, 0, T(0.0), T(12.34), ignore_policy), T(12.34)); // Test with errno_on_error - //errno = 0; - //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy))); - //BOOST_CHECK(errno == EDOM); - //errno = 0; - //BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy))); - //BOOST_CHECK(errno == EDOM); + errno = 0; + BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK(errno == EDOM); + errno = 0; + BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK(errno == EDOM); errno = 0; BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); BOOST_CHECK_EQUAL(errno, ERANGE); @@ -167,9 +167,9 @@ void test_error(T) errno = 0; BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), errno_policy), T(1.25)); BOOST_CHECK_EQUAL(errno, ERANGE); - //errno = 0; - //BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(0.0), errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); - //BOOST_CHECK(errno == EDOM); + errno = 0; + BOOST_CHECK_EQUAL(boost::math::policies::raise_evaluation_error(func, msg1, T(1.25), errno_policy), T(1.25)); + BOOST_CHECK(errno == EDOM); errno = 0; BOOST_CHECK(boost::math::policies::raise_indeterminate_result_error(func, 0, T(0.0), T(12.34), errno_policy) == T(12.34)); BOOST_CHECK_EQUAL(errno, EDOM); @@ -182,7 +182,7 @@ int test_main(int, char* []) test_error(0.0F); // Test float. test_error(0.0); // Test double. test_error(0.0L); // Test long double. - test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts. + test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts. return 0; } // int test_main(int, char* []) From 5d6396ffbeab7680f14c5108ad86423e470cd359 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 10 Jun 2008 08:12:17 +0000 Subject: [PATCH 011/192] Added SSE2 optimised Lanczos approximations. Reordered the tgamma function to reduce the number of comparisons needed. [SVN r46289] --- .../special_functions/detail/lanczos_sse2.hpp | 201 ++++++++++++++++++ .../boost/math/special_functions/gamma.hpp | 39 ++-- .../boost/math/special_functions/lanczos.hpp | 4 + 3 files changed, 226 insertions(+), 18 deletions(-) create mode 100644 include/boost/math/special_functions/detail/lanczos_sse2.hpp diff --git a/include/boost/math/special_functions/detail/lanczos_sse2.hpp b/include/boost/math/special_functions/detail/lanczos_sse2.hpp new file mode 100644 index 000000000..a8e9f1909 --- /dev/null +++ b/include/boost/math/special_functions/detail/lanczos_sse2.hpp @@ -0,0 +1,201 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS_SSE2 +#define BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS_SSE2 + +#ifdef _MSC_VER +#pragma once +#endif + +#include + +#ifdef __GNUC__ +#define ALIGN16 __attribute__((aligned(16))) +#else +#define ALIGN16 __declspec(align(16)) +#endif + +namespace boost{ namespace math{ namespace lanczos{ + +template <> +inline double lanczos13m53::lanczos_sum(const double& x) +{ + static const ALIGN16 double coeff[26] = { + static_cast(2.506628274631000270164908177133837338626L), + static_cast(1u), + static_cast(210.8242777515793458725097339207133627117L), + static_cast(66u), + static_cast(8071.672002365816210638002902272250613822L), + static_cast(1925u), + static_cast(186056.2653952234950402949897160456992822L), + static_cast(32670u), + static_cast(2876370.628935372441225409051620849613599L), + static_cast(357423u), + static_cast(31426415.58540019438061423162831820536287L), + static_cast(2637558u), + static_cast(248874557.8620541565114603864132294232163L), + static_cast(13339535u), + static_cast(1439720407.311721673663223072794912393972L), + static_cast(45995730u), + static_cast(6039542586.35202800506429164430729792107L), + static_cast(105258076u), + static_cast(17921034426.03720969991975575445893111267L), + static_cast(150917976u), + static_cast(35711959237.35566804944018545154716670596L), + static_cast(120543840u), + static_cast(42919803642.64909876895789904700198885093L), + static_cast(39916800u), + static_cast(23531376880.41075968857200767445163675473L), + static_cast(0u) + }; + register __m128d vx = _mm_load1_pd(&x); + register __m128d sum_even = _mm_load_pd(coeff); + register __m128d sum_odd = _mm_load_pd(coeff+2); + register __m128d nc_odd, nc_even; + register __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double ALIGN16 t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} + +template <> +inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) +{ + static const ALIGN16 double coeff[26] = { + static_cast(0.006061842346248906525783753964555936883222L), + static_cast(1u), + static_cast(0.5098416655656676188125178644804694509993L), + static_cast(66u), + static_cast(19.51992788247617482847860966235652136208L), + static_cast(1925u), + static_cast(449.9445569063168119446858607650988409623L), + static_cast(32670u), + static_cast(6955.999602515376140356310115515198987526L), + static_cast(357423u), + static_cast(75999.29304014542649875303443598909137092L), + static_cast(2637558u), + static_cast(601859.6171681098786670226533699352302507L), + static_cast(13339535u), + static_cast(3481712.15498064590882071018964774556468L), + static_cast(45995730u), + static_cast(14605578.08768506808414169982791359218571L), + static_cast(105258076u), + static_cast(43338889.32467613834773723740590533316085L), + static_cast(150917976u), + static_cast(86363131.28813859145546927288977868422342L), + static_cast(120543840u), + static_cast(103794043.1163445451906271053616070238554L), + static_cast(39916800u), + static_cast(56906521.91347156388090791033559122686859L), + static_cast(0u) + }; + register __m128d vx = _mm_load1_pd(&x); + register __m128d sum_even = _mm_load_pd(coeff); + register __m128d sum_odd = _mm_load_pd(coeff+2); + register __m128d nc_odd, nc_even; + register __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double ALIGN16 t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} + +} // namespace lanczos +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS + + + + diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 1d02a3ddb..6caeb660f 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -142,26 +142,29 @@ T gamma_imp(T z, const Policy& pol, const L& l) #endif static const char* function = "boost::math::tgamma<%1%>(%1%)"; - if((z <= 0) && (floor(z) == z)) - return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); - if(z <= -20) + if(z <= 0) { - result = gamma_imp(-z, pol, l) * sinpx(z); - if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) - return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); - result = -boost::math::constants::pi() / result; - if(result == 0) - return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); - if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) - return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); - return result; - } + if(floor(z) == z) + return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); + if(z <= -20) + { + result = gamma_imp(-z, pol, l) * sinpx(z); + if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) + return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + result = -boost::math::constants::pi() / result; + if(result == 0) + return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); + if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) + return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); + return result; + } - // shift z to > 1: - while(z < 1) - { - result /= z; - z += 1; + // shift z to > 1: + while(z < 0) + { + result /= z; + z += 1; + } } if((floor(z) == z) && (z < max_factorial::value)) { diff --git a/include/boost/math/special_functions/lanczos.hpp b/include/boost/math/special_functions/lanczos.hpp index 730bb0bc0..d852ee390 100644 --- a/include/boost/math/special_functions/lanczos.hpp +++ b/include/boost/math/special_functions/lanczos.hpp @@ -1229,6 +1229,10 @@ struct lanczos } // namespace math } // namespace boost +#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__) +#include +#endif + #endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS From e46e87bc68d6f900f09f94392b1038525c9ac671 Mon Sep 17 00:00:00 2001 From: Bruno Lalande Date: Sun, 22 Jun 2008 18:03:54 +0000 Subject: [PATCH 012/192] Documented the new indeterminate_result_error. Fixed an error about ignore_error and errno_on_error bahavior on an evaluation error. [SVN r46617] --- doc/sf_and_dist/error_handling.qbk | 33 ++++++++++++++++-- doc/sf_and_dist/policy.qbk | 54 ++++++++++++++++++++++------- doc/sf_and_dist/policy_tutorial.qbk | 1 + doc/sf_and_dist/pow.qbk | 23 +++++++++--- example/policy_eg_8.cpp | 2 ++ 5 files changed, 93 insertions(+), 20 deletions(-) diff --git a/doc/sf_and_dist/error_handling.qbk b/doc/sf_and_dist/error_handling.qbk index 0efe0de59..cbc126980 100644 --- a/doc/sf_and_dist/error_handling.qbk +++ b/doc/sf_and_dist/error_handling.qbk @@ -32,6 +32,8 @@ The kinds of errors that can be raised are: [[Evaluation Error][Occurs when an internal error occured that prevented the result from being evaluated: this should never occur, but if it does, then it's likely to be due to an iterative method not converging fast enough.]] +[[Indeterminate Result Error][Occurs when the result of a function is not + defined for the values that were passed to it.]] ] The action undertaken by each error condition is determined by the current @@ -116,13 +118,23 @@ with the default action for each error shown in bold: [table Possible Actions for Internal Evaluation Errors [[Action] [Behaviour]] [[throw_on_error][[*Throws `boost::math::evaluation_error`]]] -[[errno_on_error][Sets `::errno` to `EDOM` and returns `std::numeric_limits::infinity()`.]] -[[ignore_error][Returns `std::numeric_limits::infinity()`.]] +[[errno_on_error][Sets `::errno` to `EDOM` and returns the closest approximation found.]] +[[ignore_error][Returns the closest approximation found.]] [[user_error][Returns the result of `boost::math::policies::user_evaluation_error`: [link math_toolkit.policy.pol_tutorial.user_def_err_pol this function must be defined by the user].]] ] +[table Possible Actions for Indeterminate Result Errors +[[Action] [Behaviour]] +[[throw_on_error][[*Throws `std::domain_error`]]] +[[errno_on_error][Sets `::errno` to `EDOM` and returns the same value as `ignore_error`.]] +[[ignore_error][Returns a default result that depends on the function where the error occurred.]] +[[user_error][Returns the result of `boost::math::policies::user_indeterminate_result_error`: + [link math_toolkit.policy.pol_tutorial.user_def_err_pol + this function must be defined by the user].]] +] + [heading Rationale] The flexibility of the current implementation should be reasonably obvious, the @@ -304,6 +316,23 @@ For example if `Message` contains a "%1%" then it is replaced by the value of `val` to the full precision of T, where as "%.3g" would contain the value of `val` to 3 digits. See the __format documentation for more details. +[heading [#indeterminate_result_error]Indeterminate Result Errors] + +When the result of a special function is indeterminate for the value that was +passed to it, then the function returns the result of: + + boost::math::policies::raise_overflow_error(FunctionName, Message, Val, Default, __Policy); + +Where +`T` is the floating-point type passed to the function, `FunctionName` is the +name of the function, `Message` is an error message describing the problem, +Val is the value for which the result is indeterminate, Default is an +alternative default result that must be returned for ignore_error and +errno_on_error policies, and __Policy is the current policy in use for the +function that was called. + +The default policy for this function is `ignore_error`. + [heading [#rounding_error]Rounding Errors] When one of the rounding functions __round, __trunc or __modf is diff --git a/doc/sf_and_dist/policy.qbk b/doc/sf_and_dist/policy.qbk index 17df239e7..838bcae14 100644 --- a/doc/sf_and_dist/policy.qbk +++ b/doc/sf_and_dist/policy.qbk @@ -45,6 +45,7 @@ Will throw one of the following exceptions, depending upon the [[Underflow Error][std::underflow_error]] [[Denorm Error][std::underflow_error]] [[Evaluation Error][boost::math::evaluation_error]] + [[Indeterminate Result Error][std::domain_error]] ] [h5 errno_on_error] @@ -60,11 +61,12 @@ had been ignored: [[Underflow Error][ERANGE]] [[Denorm Error][ERANGE]] [[Evaluation Error][EDOM]] + [[Indeterminate Result Error][EDOM]] ] [h5 ignore_error] -Will return a one of the values below depending on the error type (`::errno` is NOT changed):: +Will return one of the values below depending on the error type (`::errno` is NOT changed):: [table [[Error Type][Returned Value]] [[Domain Error][std::numeric_limits::quiet_NaN()]] @@ -74,6 +76,7 @@ Will return a one of the values below depending on the error type (`::errno` is [[Denorm Error][The denormalised value.]] [[Evaluation Error][The best guess as to the result: which may be significantly in error.]] + [[Indeterminate Result Error][Depends on the function where the error occurred]] ] [h5 user_error] @@ -83,28 +86,31 @@ in boost/math/policies/error_handling.hpp, but the actual definitions must be provided by the user: namespace boost{ namespace math{ namespace policies{ - + template T user_domain_error(const char* function, const char* message, const T& val); - + template T user_pole_error(const char* function, const char* message, const T& val); - + template T user_overflow_error(const char* function, const char* message, const T& val); - + template T user_underflow_error(const char* function, const char* message, const T& val); - + template T user_denorm_error(const char* function, const char* message, const T& val); - + template T user_rounding_error(const char* function, const char* message, const T& val); - + template T user_evaluation_error(const char* function, const char* message, const T& val); - + + template + T user_indeterminate_result_error(const char* function, const char* message, const T& val); + }}} // namespaces Note that the strings ['function] and ['message] may contain "%1%" format specifiers @@ -121,7 +127,7 @@ tutorial here]. [h4 Kinds of Error Raised] -There are five kinds of error reported by this library, +There are six kinds of error reported by this library, which are summarised in the following table: [table @@ -190,6 +196,14 @@ which are summarised in the following table: Defaults to `boost::math::policies::evaluation_error` + When the action is ['throw_on_error] then throws `boost::math::evaluation_error`]] +[[Indeterminate Result Error] + [boost::math::policies::indeterminate_result_error<['action]>] + [Raised when the result of a function is not defined for the values that + were passed to it. + + Defaults to `boost::math::policies::indeterminate_result_error` + When the action is ['throw_on_error] then throws `boost::math::evaluation_error`]] ] @@ -684,7 +698,9 @@ compile-time container for a collection of policies: class A8 = default_policy, class A9 = default_policy, class A10 = default_policy, - class A11 = default_policy> + class A11 = default_policy, + class A12 = default_policy, + class A13 = default_policy> struct policy { public: @@ -695,6 +711,7 @@ compile-time container for a collection of policies: typedef ``['computed-from-template-arguments]`` denorm_error_type; typedef ``['computed-from-template-arguments]`` rounding_error_type; typedef ``['computed-from-template-arguments]`` evaluation_error_type; + typedef ``['computed-from-template-arguments]`` indeterminate_result_error_type; typedef ``['computed-from-template-arguments]`` precision_type; typedef ``['computed-from-template-arguments]`` promote_float_type; typedef ``['computed-from-template-arguments]`` promote_double_type; @@ -716,7 +733,9 @@ compile-time container for a collection of policies: class A8 = default_policy, class A9 = default_policy, class A10 = default_policy, - class A11 = default_policy> + class A11 = default_policy, + class A12 = default_policy, + class A13 = default_policy> struct normalise { typedef ``computed-from-template-arguments`` type; @@ -767,6 +786,13 @@ Specifies how evaluation errors are handled, will be an instance of `boost::math::policies::evaluation_error<>` with the template argument to `evaluation_error` one of the `error_policy_type` enumerated values. + policy<...>::indeterminate_error_type + +Specifies how indeterminate result errors are handled, will be an instance of +`boost::math::policies::indeterminate_result_error<>` with the template argument +to `indeterminate_result_error` one of the `error_policy_type` enumerated +values. + policy<...>::precision_type Specifies the internal precision to use in binary digits (uses zero @@ -817,7 +843,9 @@ a normalised `policy` class. class A8 = default_policy, class A9 = default_policy, class A10 = default_policy, - class A11 = default_policy> + class A11 = default_policy, + class A12 = default_policy, + class A13 = default_policy> struct normalise { typedef ``computed-from-template-arguments`` type; diff --git a/doc/sf_and_dist/policy_tutorial.qbk b/doc/sf_and_dist/policy_tutorial.qbk index 1fc7d1757..f01e9f0ed 100644 --- a/doc/sf_and_dist/policy_tutorial.qbk +++ b/doc/sf_and_dist/policy_tutorial.qbk @@ -46,6 +46,7 @@ stop reading now! [[Denormalised Result][Ignores the fact that the result is denormalised, and returns it.]] [[Rounding Error][Throws a `boost::math::rounding_error` exception.]] [[Internal Evaluation Error][Throws a `boost::math::evaluation_error` exception.]] +[[Indeterminate Result Error][Returns a result that depends on the function where the error occurred.] [[Promotion of float to double][Does occur by default - gives full float precision results.]] [[Promotion of double to long double][Does occur by default if long double offers more precision than double.]] diff --git a/doc/sf_and_dist/pow.qbk b/doc/sf_and_dist/pow.qbk index 6f9b91314..c4d3fe4a6 100644 --- a/doc/sf_and_dist/pow.qbk +++ b/doc/sf_and_dist/pow.qbk @@ -53,8 +53,8 @@ Only 3 different products were actually computed. [h4 Return Type] -The return type of these functions is computed using the __arg_pomotion_rules -when T1 and T2 are different types. For example: +The return type of these functions is computed using the __arg_pomotion_rules. +For example: * If T is a `float`, the return type is a `float`. * If T is a `long double`, the return type is a `long double`. @@ -66,9 +66,13 @@ when T1 and T2 are different types. For example: [h4 Error Handling] -In the case where `pow` is called with a null base and a negative exponent, -an error occurs since this operation is a division by 0 (it equals to 1/0). -The error raised is an __overflow_error following the +Two cases of errors can occur when using `pow`: + +* In case of null base and negative exponent, an __overflown_error occurs since +this operation is a division by 0 (it equals to 1/0). +* In case of null exponent, an indeterminate_result_error occurs since the +result of a null power is indeterminate. +Those errors follow the [@sf_and_dist/html/math_toolkit/main_overview/error_handling.html general policies of error handling in Boost.Math]. @@ -81,6 +85,15 @@ link given above, other error handling policies can be used: * `user_error`: Returns the result of `boost::math::policies::user_overflow_error`: this function must be defined by the user. +The default indeterminate result error policy is `ignore_error`, which for this +function returns 1 since it's the most commonly chosen result for a power of 0. +Here again, other error handling policies can be used: + +* `throw_on_error`: Throws `std::domain_error` +* `errno_on_error`: Sets `::errno` to `EDOM` and returns 1. +* `user_error`: Returns the result of `boost::math::policies::user_indeterminate_result_error`: + this function must be defined by the user. + Here is an example of error handling customization where we want to specify the result that has to be returned in case of error. We will thus use the `user_error` policy, by passing as second argument an diff --git a/example/policy_eg_8.cpp b/example/policy_eg_8.cpp index c535dcdd5..50935c1fb 100644 --- a/example/policy_eg_8.cpp +++ b/example/policy_eg_8.cpp @@ -39,6 +39,8 @@ boost/math/policies/error_handling.hpp like this: T user_denorm_error(const char* function, const char* message, const T& val); template T user_evaluation_error(const char* function, const char* message, const T& val); + template + T user_indeterminate_result_error(const char* function, const char* message, const T& val); }}} // namespaces From 93ca768954c6bffff5bdb33c272c2b53ed93205a Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Jun 2008 08:57:15 +0000 Subject: [PATCH 013/192] Fix a few typos in the new indeterminate_result_error. [SVN r46890] --- doc/sf_and_dist/error_handling.qbk | 10 +++++++--- doc/sf_and_dist/math.qbk | 1 + doc/sf_and_dist/policy.qbk | 10 +++++++++- doc/sf_and_dist/policy_tutorial.qbk | 2 +- doc/sf_and_dist/pow.qbk | 6 +++--- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/sf_and_dist/error_handling.qbk b/doc/sf_and_dist/error_handling.qbk index cbc126980..7ac906b71 100644 --- a/doc/sf_and_dist/error_handling.qbk +++ b/doc/sf_and_dist/error_handling.qbk @@ -127,9 +127,9 @@ with the default action for each error shown in bold: [table Possible Actions for Indeterminate Result Errors [[Action] [Behaviour]] -[[throw_on_error][[*Throws `std::domain_error`]]] +[[throw_on_error][Throws `std::domain_error`]] [[errno_on_error][Sets `::errno` to `EDOM` and returns the same value as `ignore_error`.]] -[[ignore_error][Returns a default result that depends on the function where the error occurred.]] +[[ignore_error][[*Returns a default result that depends on the function where the error occurred.]]] [[user_error][Returns the result of `boost::math::policies::user_indeterminate_result_error`: [link math_toolkit.policy.pol_tutorial.user_def_err_pol this function must be defined by the user].]] @@ -331,7 +331,11 @@ alternative default result that must be returned for ignore_error and errno_on_error policies, and __Policy is the current policy in use for the function that was called. -The default policy for this function is `ignore_error`. +The default policy for this function is `ignore_error`: note that this error +type is reserved for situations where the result is mathematically +undefined or indeterminate, but there is none the less a convention for what +the result should be: for example the C99 standard specifies that the result +of 0[super 0] is 1, even though the result is actually mathematically indeterminate. [heading [#rounding_error]Rounding Errors] diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 420737240..cefebf9da 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -76,6 +76,7 @@ [def __denorm_error [link denorm_error denorm_error]] [def __evaluation_error [link evaluation_error evaluation_error]] [def __rounding_error [link rounding_error rounding_error]] +[def __indeterminate_result_error [link indeterminate_result_error indeterminate_result_error]] [def __checked_narrowing_cast [link checked_narrowing_cast checked_narrowing_cast]] [def __arg_pomotion_rules [link math_toolkit.main_overview.result_type ['result type calculation rules]]] diff --git a/doc/sf_and_dist/policy.qbk b/doc/sf_and_dist/policy.qbk index 838bcae14..db11495e5 100644 --- a/doc/sf_and_dist/policy.qbk +++ b/doc/sf_and_dist/policy.qbk @@ -204,7 +204,7 @@ which are summarised in the following table: Defaults to `boost::math::policies::indeterminate_result_error` - When the action is ['throw_on_error] then throws `boost::math::evaluation_error`]] + When the action is ['throw_on_error] then throws `std::domain_error`]] ] [h4 Examples] @@ -551,6 +551,14 @@ defaults to `ignore_error`, but can be set to any of the enumerated actions for error handing: `throw_on_error`, `errno_on_error`, `ignore_error` or `user_error`. +[h5 BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY] + +Defines what happens when the result is indeterminate, but where there +is none the less a convention for the result. If not defined then +defaults to `ignore_error`, but can be set to any of the enumerated +actions for error handing: `throw_on_error`, `errno_on_error`, +`ignore_error` or `user_error`. + [h5 BOOST_MATH_DIGITS10_POLICY] Defines how many decimal digits to use in internal computations: diff --git a/doc/sf_and_dist/policy_tutorial.qbk b/doc/sf_and_dist/policy_tutorial.qbk index f01e9f0ed..8ab3256f4 100644 --- a/doc/sf_and_dist/policy_tutorial.qbk +++ b/doc/sf_and_dist/policy_tutorial.qbk @@ -46,7 +46,7 @@ stop reading now! [[Denormalised Result][Ignores the fact that the result is denormalised, and returns it.]] [[Rounding Error][Throws a `boost::math::rounding_error` exception.]] [[Internal Evaluation Error][Throws a `boost::math::evaluation_error` exception.]] -[[Indeterminate Result Error][Returns a result that depends on the function where the error occurred.] +[[Indeterminate Result Error][Returns a result that depends on the function where the error occurred.]] [[Promotion of float to double][Does occur by default - gives full float precision results.]] [[Promotion of double to long double][Does occur by default if long double offers more precision than double.]] diff --git a/doc/sf_and_dist/pow.qbk b/doc/sf_and_dist/pow.qbk index c4d3fe4a6..3135a9d1b 100644 --- a/doc/sf_and_dist/pow.qbk +++ b/doc/sf_and_dist/pow.qbk @@ -68,12 +68,12 @@ For example: Two cases of errors can occur when using `pow`: -* In case of null base and negative exponent, an __overflown_error occurs since +* In case of null base and negative exponent, an __overflow_error occurs since this operation is a division by 0 (it equals to 1/0). -* In case of null exponent, an indeterminate_result_error occurs since the +* In case of null exponent, an __indeterminate_result_error occurs since the result of a null power is indeterminate. Those errors follow the -[@sf_and_dist/html/math_toolkit/main_overview/error_handling.html +[link math_toolkit.main_overview.error_handling general policies of error handling in Boost.Math]. The default overflow error policy is `throw_on_error`. A call like `pow<-2>(0)` From 37e24abe8445ab550227778870c7a7fe9f574fe2 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Jun 2008 09:01:05 +0000 Subject: [PATCH 014/192] Added log1p rational code. [SVN r46891] --- minimax/f.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/minimax/f.cpp b/minimax/f.cpp index 0508b2253..28338fa94 100644 --- a/minimax/f.cpp +++ b/minimax/f.cpp @@ -310,6 +310,14 @@ boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant) y = sqrt(y); return boost::math::erf_inv(y) / (y); } + case 28: + { + // log1p over [-0.5,0.5] + boost::math::ntl::RR y = x; + if(fabs(y) < 1e-100) + y = (y == 0) ? 1e-100 : boost::math::sign(y) * 1e-100; + return (boost::math::log1p(y) - y + y * y / 2) / (y); + } } return 0; } From dd305e133b9cf074a29ef9191e54a088e10140a5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Jun 2008 09:02:29 +0000 Subject: [PATCH 015/192] Added better Win32 control. [SVN r46892] --- performance/performance_measure.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/performance/performance_measure.hpp b/performance/performance_measure.hpp index 894426798..ce192dee6 100644 --- a/performance/performance_measure.hpp +++ b/performance/performance_measure.hpp @@ -10,11 +10,19 @@ #include #include +#ifdef _WIN32 +#include +#endif + template double performance_measure(F f) { unsigned count = 1; double time, result; +#ifdef _WIN32 + int old_priority = GetThreadPriority(GetCurrentThread()); + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); +#endif // // Begin by figuring out how many times to repeat // the function call in order to get a measureable time: @@ -37,7 +45,7 @@ double performance_measure(F f) // result, generally speaking this gives us // consistent results: // - for(unsigned i = 0; i < 10u;++i) + for(unsigned i = 0; i < 20u;++i) { boost::timer t; for(unsigned i = 0; i < count; ++i) @@ -47,6 +55,9 @@ double performance_measure(F f) result = time; t.restart(); } +#ifdef _WIN32 + SetThreadPriority(GetCurrentThread(), old_priority); +#endif return result / count; } From f284acaf50c0e37c1f3f1a34ab49390c10c1255b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 4 Jul 2008 17:08:58 +0000 Subject: [PATCH 016/192] Merge changes from Trunk. [SVN r47079] --- build/Jamfile.v2 | 9 +++++ build/has_long_double_support.cpp | 10 +++++ doc/sf_and_dist/equations/generate.sh | 4 ++ doc/sf_and_dist/graphs/generate.sh | 4 ++ doc/sf_and_dist/math.qbk | 2 +- .../distributions/detail/generic_quantile.hpp | 4 ++ .../distributions/non_central_chi_squared.hpp | 4 +- include/boost/math/distributions/poisson.hpp | 2 +- .../detail/t_distribution_inv.hpp | 6 +-- .../math/special_functions/fpclassify.hpp | 4 +- include/boost/math/special_functions/next.hpp | 2 +- include/boost/math/tr1.hpp | 37 ++++++++++++++----- performance/Jamfile.v2 | 7 +++- performance/main.cpp | 3 ++ src/tr1/expm1.cpp | 2 +- src/tr1/expm1f.cpp | 2 +- src/tr1/expm1l.cpp | 2 +- src/tr1/log1p.cpp | 2 +- src/tr1/log1pf.cpp | 2 +- src/tr1/log1pl.cpp | 2 +- src/tr1/nextafter.cpp | 2 +- src/tr1/nextafterf.cpp | 2 +- src/tr1/nextafterl.cpp | 2 +- test/Jamfile.v2 | 9 ++++- test/expint_1_data.ipp | 5 +++ test/expint_data.ipp | 5 +++ test/expint_small_data.ipp | 5 +++ test/expinti_data.ipp | 5 +++ test/expinti_data_double.ipp | 5 +++ test/expinti_data_long.ipp | 5 +++ test/ncbeta.ipp | 5 +++ test/ncbeta_big.ipp | 5 +++ test/nccs.ipp | 5 +++ test/test_nc_t.cpp | 2 +- test/test_next.cpp | 2 + test/test_tr1.cpp | 30 +++++++++++---- test/zeta_1_below_data.ipp | 5 +++ test/zeta_1_up_data.ipp | 5 +++ test/zeta_data.ipp | 5 +++ test/zeta_neg_data.ipp | 5 +++ 40 files changed, 185 insertions(+), 39 deletions(-) create mode 100644 build/has_long_double_support.cpp diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 7ed791cd9..2635f7fd9 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. +import testing ; + C99_SOURCES = acosh asinh atanh @@ -49,6 +51,8 @@ sph_legendre sph_neumann ; +compile has_long_double_support.cpp ; + lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp : shared:BOOST_MATH_TR1_DYN_LINK=1 @@ -62,6 +66,7 @@ lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp : shared:BOOST_MATH_TR1_DYN_LINK=1 + has_long_double_support ; lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp @@ -77,5 +82,9 @@ lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp : shared:BOOST_MATH_TR1_DYN_LINK=1 + has_long_double_support ; + +boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; + diff --git a/build/has_long_double_support.cpp b/build/has_long_double_support.cpp new file mode 100644 index 000000000..d314cf386 --- /dev/null +++ b/build/has_long_double_support.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#error "long double support is not supported by Boost.Math on this Plaform: the long double version of the TR1 library will not be built." +#endif diff --git a/doc/sf_and_dist/equations/generate.sh b/doc/sf_and_dist/equations/generate.sh index be6e7b9fc..677ab577f 100755 --- a/doc/sf_and_dist/equations/generate.sh +++ b/doc/sf_and_dist/equations/generate.sh @@ -1,3 +1,7 @@ +# Copyright John Maddock 2008. +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # Generates SVG and PNG files from the MML masters. # diff --git a/doc/sf_and_dist/graphs/generate.sh b/doc/sf_and_dist/graphs/generate.sh index 2ce69b38a..7a2a9271a 100755 --- a/doc/sf_and_dist/graphs/generate.sh +++ b/doc/sf_and_dist/graphs/generate.sh @@ -1,3 +1,7 @@ +# Copyright John Maddock 2008. +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # Generates PNG files from the SVG masters. # diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index cefebf9da..9ee32a90e 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -308,7 +308,7 @@ for these distributions. ] [/ template discrete_quantile_warning] This manual is also available in -[@http:svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf +[@http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf printer friendly PDF format]. [section:main_overview Overview] diff --git a/include/boost/math/distributions/detail/generic_quantile.hpp b/include/boost/math/distributions/detail/generic_quantile.hpp index acf8b48da..a28680a04 100644 --- a/include/boost/math/distributions/detail/generic_quantile.hpp +++ b/include/boost/math/distributions/detail/generic_quantile.hpp @@ -1,3 +1,7 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_DISTIBUTIONS_DETAIL_GENERIC_QUANTILE_HPP #define BOOST_MATH_DISTIBUTIONS_DETAIL_GENERIC_QUANTILE_HPP diff --git a/include/boost/math/distributions/non_central_chi_squared.hpp b/include/boost/math/distributions/non_central_chi_squared.hpp index 4bea2de3f..3b6c19023 100644 --- a/include/boost/math/distributions/non_central_chi_squared.hpp +++ b/include/boost/math/distributions/non_central_chi_squared.hpp @@ -48,7 +48,7 @@ namespace boost // and the distribution of the square of the sample // multiple correlation coeficient. // D. Benton, K. Krishnamoorthy. - // Computational Statistics & Data Analysis 43 (2003) 249 – 267 + // Computational Statistics & Data Analysis 43 (2003) 249 - 267 // BOOST_MATH_STD_USING @@ -193,7 +193,7 @@ namespace boost // and the distribution of the square of the sample // multiple correlation coeficient. // D. Benton, K. Krishnamoorthy. - // Computational Statistics & Data Analysis 43 (2003) 249 – 267 + // Computational Statistics & Data Analysis 43 (2003) 249 - 267 // // We're summing a Poisson weighting term multiplied by // a central chi squared distribution. diff --git a/include/boost/math/distributions/poisson.hpp b/include/boost/math/distributions/poisson.hpp index bd4fd5f3d..b57ba6fbc 100644 --- a/include/boost/math/distributions/poisson.hpp +++ b/include/boost/math/distributions/poisson.hpp @@ -13,7 +13,7 @@ // events, occurrences, failures or arrivals occurring in a fixed time, // assuming these events occur with a known average or mean rate (lambda) // and are independent of the time since the last event. -// The distribution was discovered by Siméon-Denis Poisson (1781–1840). +// The distribution was discovered by Simeon-Denis Poisson (1781-1840). // Parameter lambda is the mean number of events in the given time interval. // The random variate k is the number of events, occurrences or arrivals. diff --git a/include/boost/math/special_functions/detail/t_distribution_inv.hpp b/include/boost/math/special_functions/detail/t_distribution_inv.hpp index 5b965add6..1ae2033cd 100644 --- a/include/boost/math/special_functions/detail/t_distribution_inv.hpp +++ b/include/boost/math/special_functions/detail/t_distribution_inv.hpp @@ -19,7 +19,7 @@ namespace boost{ namespace math{ namespace detail{ // // The main method used is due to Hill: // -// G. W. Hill, Algorithm 396, Student’s t-Quantiles, +// G. W. Hill, Algorithm 396, Student's t-Quantiles, // Communications of the ACM, 13(10): 619-620, Oct., 1970. // template @@ -66,9 +66,9 @@ T inverse_students_t_hill(T ndf, T u, const Policy& pol) // // Tail and body series are due to Shaw: // -// www.mth.kcl.ac.uk/˜shaww/web_page/papers/Tdistribution06.pdf +// www.mth.kcl.ac.uk/~shaww/web_page/papers/Tdistribution06.pdf // -// Shaw, W.T., 2006, "Sampling Student’s T distribution – use of +// Shaw, W.T., 2006, "Sampling Student's T distribution - use of // the inverse cumulative distribution function." // Journal of Computational Finance, Vol 9 Issue 4, pp 37-73, Summer 2006 // diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index f8a3c3e94..be9fda933 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -177,7 +177,7 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) case _FPCLASS_SNAN /* Signaling NaN */ : case _FPCLASS_QNAN /* Quiet NaN */ : return FP_NAN; - case _FPCLASS_NINF /*Negative infinity ( –INF) */ : + case _FPCLASS_NINF /*Negative infinity ( -INF) */ : case _FPCLASS_PINF /* Positive infinity (+INF) */ : return FP_INFINITE; case _FPCLASS_NN /* Negative normalized non-zero */ : @@ -186,7 +186,7 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) case _FPCLASS_ND /* Negative denormalized */: case _FPCLASS_PD /* Positive denormalized */ : return FP_SUBNORMAL; - case _FPCLASS_NZ /* Negative zero ( – 0) */ : + case _FPCLASS_NZ /* Negative zero ( - 0) */ : case _FPCLASS_PZ /* Positive 0 (+0) */ : return FP_ZERO; default: diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index 675d6a38e..8cbdd86da 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -202,7 +202,7 @@ T float_distance(const T& a, const T& b, const Policy& pol) // because we actually have fewer than tools::digits() // significant bits in the representation: // - frexp((boost::math::fpclassify(a) == FP_SUBNORMAL) ? tools::min_value() : a, &expon); + frexp(((boost::math::fpclassify)(a) == FP_SUBNORMAL) ? tools::min_value() : a, &expon); T upper = ldexp(T(1), expon); T result = 0; expon = tools::digits() - expon; diff --git a/include/boost/math/tr1.hpp b/include/boost/math/tr1.hpp index 77abd23aa..a3e4028eb 100644 --- a/include/boost/math/tr1.hpp +++ b/include/boost/math/tr1.hpp @@ -14,6 +14,7 @@ #ifdef __cplusplus #include +#include namespace boost{ namespace math{ namespace tr1{ extern "C"{ @@ -140,9 +141,9 @@ double BOOST_MATH_TR1_DECL exp2(double x); float BOOST_MATH_TR1_DECL exp2f(float x); long double BOOST_MATH_TR1_DECL exp2l(long double x); #endif -double BOOST_MATH_TR1_DECL expm1(double x); -float BOOST_MATH_TR1_DECL expm1f(float x); -long double BOOST_MATH_TR1_DECL expm1l(long double x); +double BOOST_MATH_TR1_DECL boost_expm1(double x); +float BOOST_MATH_TR1_DECL boost_expm1f(float x); +long double BOOST_MATH_TR1_DECL boost_expm1l(long double x); #if 0 double BOOST_MATH_TR1_DECL fdim(double x, double y); float BOOST_MATH_TR1_DECL fdimf(float x, float y); @@ -179,9 +180,9 @@ long long BOOST_MATH_TR1_DECL llround(double x); long long BOOST_MATH_TR1_DECL llroundf(float x); long long BOOST_MATH_TR1_DECL llroundl(long double x); -double BOOST_MATH_TR1_DECL log1p(double x); -float BOOST_MATH_TR1_DECL log1pf(float x); -long double BOOST_MATH_TR1_DECL log1pl(long double x); +double BOOST_MATH_TR1_DECL boost_log1p(double x); +float BOOST_MATH_TR1_DECL boost_log1pf(float x); +long double BOOST_MATH_TR1_DECL boost_log1pl(long double x); #if 0 double BOOST_MATH_TR1_DECL log2(double x); float BOOST_MATH_TR1_DECL log2f(float x); @@ -205,9 +206,9 @@ double BOOST_MATH_TR1_DECL nearbyint(double x); float BOOST_MATH_TR1_DECL nearbyintf(float x); long double BOOST_MATH_TR1_DECL nearbyintl(long double x); #endif -double BOOST_MATH_TR1_DECL nextafter(double x, double y); -float BOOST_MATH_TR1_DECL nextafterf(float x, float y); -long double BOOST_MATH_TR1_DECL nextafterl(long double x, long double y); +double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y); +float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y); +long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y); double BOOST_MATH_TR1_DECL nexttoward(double x, long double y); float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y); @@ -430,6 +431,12 @@ double exp2(double x); float exp2f(float x); long double exp2l(long double x); #endif +inline float expm1f(float x) +{ return boost::math::tr1::boost_expm1f(x); } +inline double expm1(double x) +{ return boost::math::tr1::boost_expm1(x); } +inline long double expm1l(long double x) +{ return boost::math::tr1::boost_expm1l(x); } inline float expm1(float x) { return boost::math::tr1::expm1f(x); } inline long double expm1(long double x) @@ -493,6 +500,12 @@ template inline long long llround(T x) { return llround(static_cast(x)); } +inline float log1pf(float x) +{ return boost::math::tr1::boost_log1pf(x); } +inline double log1p(double x) +{ return boost::math::tr1::boost_log1p(x); } +inline long double log1pl(long double x) +{ return boost::math::tr1::boost_log1pl(x); } inline float log1p(float x) { return boost::math::tr1::log1pf(x); } inline long double log1p(long double x) @@ -527,6 +540,12 @@ double nearbyint(double x); float nearbyintf(float x); long double nearbyintl(long double x); #endif +inline float nextafterf(float x, float y) +{ return boost::math::tr1::boost_nextafterf(x, y); } +inline double nextafter(double x, double y) +{ return boost::math::tr1::boost_nextafter(x, y); } +inline long double nextafterl(long double x, long double y) +{ return boost::math::tr1::boost_nextafterl(x, y); } inline float nextafter(float x, float y) { return boost::math::tr1::nextafterf(x, y); } inline long double nextafter(long double x, long double y) diff --git a/performance/Jamfile.v2 b/performance/Jamfile.v2 index b20c97be2..f3b5a4350 100644 --- a/performance/Jamfile.v2 +++ b/performance/Jamfile.v2 @@ -12,7 +12,12 @@ test_gamma.cpp test_ibeta.cpp test_igamma.cpp test_polynomial.cpp -test_reference.cpp ; +test_reference.cpp +test_lanczos.cpp /boost/regex//boost_regex +: + BOOST_ALL_NO_LIB + static +; install dist-bin : diff --git a/performance/main.cpp b/performance/main.cpp index 6b78a05f5..5d890ba0c 100644 --- a/performance/main.cpp +++ b/performance/main.cpp @@ -123,8 +123,11 @@ void print_current_config() std::cout << "BOOST_MATH_MAX_ROOT_ITERATION_POLICY " << BOOST_STRINGIZE(BOOST_MATH_MAX_ROOT_ITERATION_POLICY) << std::endl; } +extern void sanity_check(); + int main(int argc, const char** argv) { + //sanity_check(); try{ #ifdef TEST_GSL diff --git a/src/tr1/expm1.cpp b/src/tr1/expm1.cpp index 5bc0a6632..f1f9e4c7b 100644 --- a/src/tr1/expm1.cpp +++ b/src/tr1/expm1.cpp @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL expm1(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_expm1(double x) { return c_policies::expm1(x); } diff --git a/src/tr1/expm1f.cpp b/src/tr1/expm1f.cpp index 98659260e..4922afdc3 100644 --- a/src/tr1/expm1f.cpp +++ b/src/tr1/expm1f.cpp @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL expm1f(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_expm1f(float x) { return c_policies::expm1(x); } diff --git a/src/tr1/expm1l.cpp b/src/tr1/expm1l.cpp index 60fb13dd4..51b5e52c3 100644 --- a/src/tr1/expm1l.cpp +++ b/src/tr1/expm1l.cpp @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL expm1l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l(long double x) { return c_policies::expm1(x); } diff --git a/src/tr1/log1p.cpp b/src/tr1/log1p.cpp index 8e808e6d4..17c9a66aa 100644 --- a/src/tr1/log1p.cpp +++ b/src/tr1/log1p.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL log1p(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_log1p(double x) { return c_policies::log1p(x); } diff --git a/src/tr1/log1pf.cpp b/src/tr1/log1pf.cpp index d671cb51c..c3412a797 100644 --- a/src/tr1/log1pf.cpp +++ b/src/tr1/log1pf.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL log1pf(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_log1pf(float x) { return c_policies::log1p(x); } diff --git a/src/tr1/log1pl.cpp b/src/tr1/log1pl.cpp index 58000ee0b..1c9ee2087 100644 --- a/src/tr1/log1pl.cpp +++ b/src/tr1/log1pl.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL log1pl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl(long double x) { return c_policies::log1p(x); } diff --git a/src/tr1/nextafter.cpp b/src/tr1/nextafter.cpp index f9ccf0858..72125945e 100644 --- a/src/tr1/nextafter.cpp +++ b/src/tr1/nextafter.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL nextafter(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y) { return c_policies::nextafter(x, y); } diff --git a/src/tr1/nextafterf.cpp b/src/tr1/nextafterf.cpp index 4a65449ec..066ce1062 100644 --- a/src/tr1/nextafterf.cpp +++ b/src/tr1/nextafterf.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL nextafterf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y) { return c_policies::nextafter(x, y); } diff --git a/src/tr1/nextafterl.cpp b/src/tr1/nextafterl.cpp index 13114ca8d..14bca47c9 100644 --- a/src/tr1/nextafterl.cpp +++ b/src/tr1/nextafterl.cpp @@ -10,7 +10,7 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL nextafterl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y) { return c_policies::nextafter(x, y); } diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0ccd525fd..c523d277e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -389,10 +389,17 @@ run test_policy_sf.cpp ; run test_tr1.cpp ../build//boost_math_tr1 ../build//boost_math_tr1f - ../build//boost_math_tr1l ../build//boost_math_c99 ../build//boost_math_c99f + ; + +run test_tr1.cpp + ../build//boost_math_tr1l ../build//boost_math_c99l + : : : + TEST_LD=1 + : + test_tr1_long_double ; compile compile_test/compl_abs_incl_test.cpp ; diff --git a/test/expint_1_data.ipp b/test/expint_1_data.ipp index 85f7a3682..2b6950949 100644 --- a/test/expint_1_data.ipp +++ b/test/expint_1_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 79> expint_1_data = {{ { SC_(1), SC_(0.1690093176520690576580818742513656616211e-8), SC_(19.62126651228390287899433646349668926594) }, diff --git a/test/expint_data.ipp b/test/expint_data.ipp index f12e0cf86..6da5b17d2 100644 --- a/test/expint_data.ipp +++ b/test/expint_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 600> expint_data = {{ { SC_(0), SC_(4.8770198822021484375), SC_(0.001562365538135970995717852896857631808327) }, diff --git a/test/expint_small_data.ipp b/test/expint_small_data.ipp index a8ec0db01..ac78b60b7 100644 --- a/test/expint_small_data.ipp +++ b/test/expint_small_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 380> expint_small_data = {{ { SC_(0), SC_(0.1730655412757187150418758392333984375e-5), SC_(577814.7758212256423775256378551874856003) }, diff --git a/test/expinti_data.ipp b/test/expinti_data.ipp index ee7e25ec5..bcfa2254e 100644 --- a/test/expinti_data.ipp +++ b/test/expinti_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 336> expinti_data = {{ { SC_(-49.689971923828125), SC_(-0.5189914452467706181911213069148082266893e-23) }, diff --git a/test/expinti_data_double.ipp b/test/expinti_data_double.ipp index 6a6b9ed11..e9547af6b 100644 --- a/test/expinti_data_double.ipp +++ b/test/expinti_data_double.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 100> expinti_data_double = {{ { SC_(102.87009429931640625), SC_(4654899469800805764672952463660041015404000.0) }, diff --git a/test/expinti_data_long.ipp b/test/expinti_data_long.ipp index 6d4a63930..0689a931f 100644 --- a/test/expinti_data_long.ipp +++ b/test/expinti_data_long.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 100> expinti_data_long = {{ { SC_(850.51361083984375), SC_(0.27809823533792637952061836944224670902e367) }, diff --git a/test/ncbeta.ipp b/test/ncbeta.ipp index 3e54ab9d7..0506706cd 100644 --- a/test/ncbeta.ipp +++ b/test/ncbeta.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 3000> ncbeta = {{ { SC_(1.454305052757263183593750000000000000000), SC_(1.454305052757263183593750000000000000000e-1), SC_(5.940588760375976562500000000000000000000e1), SC_(9.976066350936889648437500000000000000000e-1), SC_(2.759834870217354705236013708534509068967e-1), SC_(7.240165129782645294763986291465490931033e-1) }, diff --git a/test/ncbeta_big.ipp b/test/ncbeta_big.ipp index 4ee7ffa05..eeaac305f 100644 --- a/test/ncbeta_big.ipp +++ b/test/ncbeta_big.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 72> ncbeta_big = {{ { SC_(2.322846374511718750000000000000000000000e2), SC_(2.090561676025390625000000000000000000000e2), SC_(2.322846374511718750000000000000000000000e2), SC_(6.248598918318748474121093750000000000000e-2), SC_(5.822794103663371475941613559141512048716e-200), SC_(1.000000000000000000000000000000000000000) }, diff --git a/test/nccs.ipp b/test/nccs.ipp index 4195e9acb..c6471a052 100644 --- a/test/nccs.ipp +++ b/test/nccs.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 3200> nccs = {{ { SC_(1.951913356781005859375000000000000000000), SC_(9.566968083381652832031250000000000000000e-1), SC_(2.908610105514526367187500000000000000000e-1), SC_(9.191713210042786241188236234883914114395e-2), SC_(9.080828678995721375881176376511608588560e-1) }, diff --git a/test/test_nc_t.cpp b/test/test_nc_t.cpp index 79525b99f..fd29e5006 100644 --- a/test/test_nc_t.cpp +++ b/test/test_nc_t.cpp @@ -261,7 +261,7 @@ void test_spots(RealType) // and the distribution of the square of the sample // multiple correlation coeficient. // Denise Benton, K. Krishnamoorthy. - // Computational Statistics & Data Analysis 43 (2003) 249 – 267 + // Computational Statistics & Data Analysis 43 (2003) 249 - 267 // test_spot( static_cast(3), // degrees of freedom diff --git a/test/test_next.cpp b/test/test_next.cpp index 5347134c4..44618ab60 100644 --- a/test/test_next.cpp +++ b/test/test_next.cpp @@ -109,8 +109,10 @@ int test_main(int, char* []) { test_values(1.0f, "float"); test_values(1.0, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS test_values(1.0L, "long double"); test_values(boost::math::concepts::real_concept(0), "real_concept"); +#endif return 0; } diff --git a/test/test_tr1.cpp b/test/test_tr1.cpp index 8ea3b025c..b3144040b 100644 --- a/test/test_tr1.cpp +++ b/test/test_tr1.cpp @@ -6,6 +6,7 @@ #include #include #include +#include // ldexpf #ifdef TEST_STD #include @@ -18,6 +19,7 @@ namespace tr1 = boost::math::tr1; void test_values(float, const char* name) { std::cout << "Testing type " << name << std::endl; +#ifndef TEST_LD // // First the C99 math functions: // @@ -645,12 +647,14 @@ void test_values(float, const char* name) BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3, 2, static_cast(0.5)), static_cast(0.2061460599687871330692286791802688341213L), eps * 5000); BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40, 15, static_cast(0.75)), static_cast(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000); +#endif } void test_values(double, const char* name) { std::cout << "Testing type " << name << std::endl; +#ifndef TEST_LD double eps = boost::math::tools::epsilon(); BOOST_CHECK_CLOSE(tr1::acosh(std::cosh(0.5)), 0.5, 500 * eps); BOOST_CHECK_CLOSE(tr1::asinh(std::sinh(0.5)), 0.5, 500 * eps); @@ -963,10 +967,13 @@ void test_values(double, const char* name) BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3, 2, static_cast(0.5)), static_cast(0.2061460599687871330692286791802688341213L), eps * 5000); BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40, 15, static_cast(0.75)), static_cast(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000); +#endif } void test_values(long double, const char* name) { +#ifdef TEST_LD +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS std::cout << "Testing type " << name << std::endl; long double eps = boost::math::tools::epsilon(); @@ -1027,14 +1034,14 @@ void test_values(long double, const char* name) BOOST_CHECK(tr1::roundl(2.5L) == 3.0L); BOOST_CHECK(tr1::roundl(2.25L) == 2.0L); - BOOST_CHECK(tr1::nextafterf(1.0L, 2.0L) > 1.0L); - BOOST_CHECK(tr1::nextafterf(1.0L, -2.0L) < 1.0L); - BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0L, 2.0L), -2.0L) == 1.0L); - BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0L, -2.0L), 2.0L) == 1.0L); - BOOST_CHECK(tr1::nextafterf(1.0L, 2.0L) > 1.0L); - BOOST_CHECK(tr1::nextafterf(1.0L, -2.0L) < 1.0L); - BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0L, 2.0L), -2.0L) == 1.0L); - BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0L, -2.0L), 2.0L) == 1.0L); + BOOST_CHECK(tr1::nextafterl(1.0L, 2.0L) > 1.0L); + BOOST_CHECK(tr1::nextafterl(1.0L, -2.0L) < 1.0L); + BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, 2.0L), -2.0L) == 1.0L); + BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, -2.0L), 2.0L) == 1.0L); + BOOST_CHECK(tr1::nextafterl(1.0L, 2.0L) > 1.0L); + BOOST_CHECK(tr1::nextafterl(1.0L, -2.0L) < 1.0L); + BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, 2.0L), -2.0L) == 1.0L); + BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, -2.0L), 2.0L) == 1.0L); BOOST_CHECK(tr1::truncl(2.5L) == 2.0L); BOOST_CHECK(tr1::truncl(2.25L) == 2.0L); @@ -1593,13 +1600,20 @@ void test_values(long double, const char* name) BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3L, 2L, static_cast(0.5L)), static_cast(0.2061460599687871330692286791802688341213L), eps * 5000L); BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40L, 15L, static_cast(0.75L)), static_cast(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000L); +#endif +#endif } int test_main(int, char* []) { +#ifndef TEST_LD test_values(1.0f, "float"); test_values(1.0, "double"); +#else +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS test_values(1.0L, "long double"); +#endif +#endif return 0; } diff --git a/test/zeta_1_below_data.ipp b/test/zeta_1_below_data.ipp index 31b85ca53..17891a29d 100644 --- a/test/zeta_1_below_data.ipp +++ b/test/zeta_1_below_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 24> zeta_1_below_data = {{ { SC_(0.02141654491424560546875), SC_(-0.5201506602793944998316548018699690797681) }, diff --git a/test/zeta_1_up_data.ipp b/test/zeta_1_up_data.ipp index 676fdb859..cef17f34f 100644 --- a/test/zeta_1_up_data.ipp +++ b/test/zeta_1_up_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 24> zeta_1_up_data = {{ { SC_(1.00000011920928955078125), SC_(8388608.57721567358185799990090564625463) }, diff --git a/test/zeta_data.ipp b/test/zeta_data.ipp index 7deb75325..9c9b15ec6 100644 --- a/test/zeta_data.ipp +++ b/test/zeta_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 200> zeta_data = {{ { SC_(1.16628754138946533203125), SC_(6.602868183069916948720755731837247651904) }, diff --git a/test/zeta_neg_data.ipp b/test/zeta_neg_data.ipp index 86476509a..c2367d60f 100644 --- a/test/zeta_neg_data.ipp +++ b/test/zeta_neg_data.ipp @@ -1,3 +1,8 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 200> zeta_neg_data = {{ { SC_(-29.912628173828125), SC_(-11411595.03734503626230312380285630491992) }, From 35dadef0ffcc80f7f0c00310996f131167162b88 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 4 Jul 2008 17:20:52 +0000 Subject: [PATCH 017/192] Set last merge revision. [SVN r47081] --- doc/sf_and_dist/roadmap.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 252b91ba6..64b0fbd95 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -71,7 +71,7 @@ on error rates. SVN Revisions: -Sandbox and trunk last synchonised at revision: 45484. +Sandbox and trunk last synchonised at revision: 47084. ] [/ From 1f8b7ae2019d90c6a20d9b885ec477cb528a2436 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 18 Jul 2008 10:25:16 +0000 Subject: [PATCH 018/192] Fix VC 7.1 failures. Added minimal docs on the numeric constants. Regenerated HTML pages. [SVN r47541] --- doc/sf_and_dist/constants.qbk | 75 +++++++++++++++++++ doc/sf_and_dist/html/index.html | 6 +- .../backgrounders/implementation.html | 30 ++++---- .../math_toolkit/backgrounders/lanczos.html | 14 ++-- .../html/math_toolkit/backgrounders/refs.html | 6 +- .../backgrounders/relative_error.html | 2 +- .../math_toolkit/backgrounders/remez.html | 16 ++-- .../dist/dist_ref/dist_algorithms.html | 6 +- .../dist/dist_ref/dists/bernoulli_dist.html | 10 +-- .../dist/dist_ref/dists/beta_dist.html | 20 ++--- .../dist/dist_ref/dists/binomial_dist.html | 26 +++---- .../dist/dist_ref/dists/cauchy_dist.html | 10 +-- .../dist/dist_ref/dists/chi_squared_dist.html | 12 +-- .../dist/dist_ref/dists/exp_dist.html | 10 +-- .../dist/dist_ref/dists/extreme_dist.html | 8 +- .../dist/dist_ref/dists/f_dist.html | 10 +-- .../dist/dist_ref/dists/gamma_dist.html | 8 +- .../dist/dist_ref/dists/lognormal_dist.html | 8 +- .../dist/dist_ref/dists/nc_beta_dist.html | 12 +-- .../dist_ref/dists/nc_chi_squared_dist.html | 14 ++-- .../dist/dist_ref/dists/nc_f_dist.html | 10 +-- .../dist/dist_ref/dists/nc_t_dist.html | 12 +-- .../dists/negative_binomial_dist.html | 24 +++--- .../dist/dist_ref/dists/normal_dist.html | 8 +- .../dist/dist_ref/dists/pareto.html | 12 +-- .../dist/dist_ref/dists/poisson_dist.html | 8 +- .../dist/dist_ref/dists/rayleigh.html | 12 +-- .../dist/dist_ref/dists/students_t_dist.html | 10 +-- .../dist/dist_ref/dists/triangular_dist.html | 10 +-- .../dist/dist_ref/dists/uniform_dist.html | 10 +-- .../dist/dist_ref/dists/weibull.html | 12 +-- .../html/math_toolkit/dist/dist_ref/nmp.html | 54 ++++++------- .../html/math_toolkit/dist/future.html | 8 +- .../math_toolkit/dist/stat_tut/overview.html | 10 +-- .../weg/binom_eg/binomial_quiz_example.html | 4 +- .../stat_tut/weg/cs_eg/chi_sq_intervals.html | 2 +- .../dist/stat_tut/weg/dist_construct_eg.html | 2 +- .../weg/find_eg/find_location_eg.html | 2 +- .../weg/find_eg/find_mean_and_sd_eg.html | 6 +- .../stat_tut/weg/find_eg/find_scale_eg.html | 2 +- .../weg/normal_example/normal_misc.html | 14 ++-- .../main_overview/compilers_overview.html | 4 +- .../main_overview/directories.html | 4 +- .../main_overview/error_handling.html | 40 +++++----- .../math_toolkit/main_overview/history1.html | 12 +-- .../math_toolkit/main_overview/intro.html | 6 +- .../main_overview/navigation.html | 2 +- .../html/math_toolkit/main_overview/tr1.html | 10 +-- .../math_toolkit/perf/comp_compilers.html | 2 +- .../html/math_toolkit/perf/comparisons.html | 30 ++++---- .../html/math_toolkit/perf/getting_best.html | 2 +- .../html/math_toolkit/perf/tuning.html | 4 +- .../policy/pol_ref/discrete_quant_ref.html | 12 +-- .../pol_ref/error_handling_policies.html | 14 ++-- .../policy/pol_ref/internal_promotion.html | 2 +- .../policy/pol_ref/policy_defaults.html | 32 ++++---- .../pol_tutorial/understand_dis_quant.html | 2 +- .../math_toolkit/special/bessel/bessel.html | 14 ++-- .../special/bessel/bessel_over.html | 6 +- .../math_toolkit/special/bessel/mbessel.html | 14 ++-- .../special/bessel/sph_bessel.html | 10 +-- .../math_toolkit/special/ellint/ellint_1.html | 12 +-- .../math_toolkit/special/ellint/ellint_2.html | 12 +-- .../math_toolkit/special/ellint/ellint_3.html | 12 +-- .../special/ellint/ellint_carlson.html | 12 +-- .../special/ellint/ellint_intro.html | 12 +-- .../math_toolkit/special/expint/expint_i.html | 16 ++-- .../math_toolkit/special/expint/expint_n.html | 12 +-- .../math_toolkit/special/extern_c/c99.html | 4 +- .../math_toolkit/special/extern_c/tr1.html | 10 +-- .../special/extern_c/tr1_ref.html | 6 +- .../special/factorials/sf_binomial.html | 6 +- .../factorials/sf_double_factorial.html | 6 +- .../special/factorials/sf_factorial.html | 10 +-- .../factorials/sf_falling_factorial.html | 6 +- .../factorials/sf_rising_factorial.html | 6 +- .../html/math_toolkit/special/fpclass.html | 4 +- .../special/next_float/float_advance.html | 4 +- .../special/next_float/float_distance.html | 4 +- .../special/next_float/float_next.html | 4 +- .../special/next_float/float_prior.html | 4 +- .../special/next_float/nextafter.html | 6 +- .../math_toolkit/special/powers/cbrt.html | 4 +- .../math_toolkit/special/powers/ct_pow.html | 14 ++-- .../math_toolkit/special/powers/expm1.html | 4 +- .../math_toolkit/special/powers/hypot.html | 2 +- .../math_toolkit/special/powers/log1p.html | 4 +- .../math_toolkit/special/powers/powm1.html | 4 +- .../math_toolkit/special/powers/sqrt1pm1.html | 4 +- .../special/sf_beta/beta_derivative.html | 8 +- .../special/sf_beta/beta_function.html | 12 +-- .../special/sf_beta/ibeta_function.html | 18 ++--- .../special/sf_beta/ibeta_inv_function.html | 10 +-- .../special/sf_erf/error_function.html | 14 ++-- .../special/sf_erf/error_inv.html | 10 +-- .../special/sf_gamma/digamma.html | 10 +-- .../special/sf_gamma/gamma_derivatives.html | 8 +- .../special/sf_gamma/gamma_ratios.html | 12 +-- .../math_toolkit/special/sf_gamma/igamma.html | 20 ++--- .../special/sf_gamma/igamma_inv.html | 10 +-- .../math_toolkit/special/sf_gamma/lgamma.html | 10 +-- .../math_toolkit/special/sf_gamma/tgamma.html | 10 +-- .../math_toolkit/special/sf_poly/hermite.html | 12 +-- .../special/sf_poly/laguerre.html | 14 ++-- .../special/sf_poly/legendre.html | 16 ++-- .../special/sf_poly/sph_harm.html | 12 +-- .../html/math_toolkit/special/zetas/zeta.html | 12 +-- .../html/math_toolkit/status/compilers.html | 4 +- .../html/math_toolkit/status/history1.html | 12 +-- .../html/math_toolkit/status/issues.html | 16 ++-- .../html/math_toolkit/toolkit.html | 2 + .../html/math_toolkit/toolkit/internals1.html | 8 +- .../math_toolkit/toolkit/internals1/cf.html | 8 +- .../toolkit/internals1/minima.html | 6 +- .../toolkit/internals1/rational.html | 6 +- .../toolkit/internals1/roots.html | 12 +-- .../toolkit/internals1/roots2.html | 6 +- .../toolkit/internals1/series_evaluation.html | 12 +-- .../toolkit/internals2/error_test.html | 6 +- .../toolkit/internals2/polynomials.html | 4 +- .../toolkit/internals2/test_data.html | 12 +-- .../html/math_toolkit/using_udt/concepts.html | 4 +- doc/sf_and_dist/math.qbk | 1 + include/boost/math/special_functions/next.hpp | 4 + 124 files changed, 694 insertions(+), 608 deletions(-) create mode 100644 doc/sf_and_dist/constants.qbk diff --git a/doc/sf_and_dist/constants.qbk b/doc/sf_and_dist/constants.qbk new file mode 100644 index 000000000..3142b7ebf --- /dev/null +++ b/doc/sf_and_dist/constants.qbk @@ -0,0 +1,75 @@ +[section:constants Numeric Constants] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ namespace constants{ + + template T pi(); + template T root_pi(); + template T root_half_pi(); + template T root_two_pi(); + template T root_ln_four(); + template T e(); + template T half(); + template T euler(); + template T root_two(); + template T ln_two(); + template T ln_ln_two(); + template T third(); + template T twothirds(); + template T pi_minus_three(); + template T four_minus_pi(); + + }}} // namespaces + +[h4 Description] + +The header `boost/math/constants/constants.hpp` contains some numeric constants +that we have found useful in the development of this library. New constants are +added on an ad-hock basis based on need. + +Usage is like this: + + template + T circumference(T r) + { + return 2 * boost::math::constants::pi() * r; + } + +All the constants are accurate to at least the 34 decimal digits required for 128-bit +long doubles, and most are accurate to 100 digits or more when used with +a suitable arbitrary precision type. + +The following table summarises the constants we have at present: + +[table +[[Constant][Meaning][Value]] +[[pi][[pi]][3.1415926535897932384...]] +[[root_pi][[radic][pi]][1.772453850905516027...]] +[[root_half_pi][[radic]([pi]/2)][1.253314137315500251...]] +[[root_two_pi][[radic](2*[pi])][2.506628274631000502...]] +[[root_ln_four][[radic](ln(4))][1.17741002251547469...]] +[[e][['e]][2.71828182845904523536...]] +[[half][0.5][0.5]] +[[euler][Euler's constant][0.577215664901532860606]] +[[root_two][[radic]2][1.4142135623730950488...]] +[[ln_two][ln(2)][0.6931471805599453094...]] +[[ln_ln_two][ln(ln(2))][-0.3665129205816643...]] +[[third][1/3][0.333333333333333333...]] +[[twothirds][2/3][0.666666666666666666...]] +[[pi_minus_three][[pi]-3][0.14159265358979323846...]] +[[four_minus_pi][4-[pi]][0.85840734641020676153735...]] +] + +[endsect][/section Numeric Constants] + +[/ + Copyright 2008 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] diff --git a/doc/sf_and_dist/html/index.html b/doc/sf_and_dist/html/index.html index 9b1636ef3..a981f0c41 100644 --- a/doc/sf_and_dist/html/index.html +++ b/doc/sf_and_dist/html/index.html @@ -43,7 +43,7 @@

-

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

@@ -323,6 +323,8 @@
Overview
Reused Utilities
+
Numeric + Constants
Series Evaluation
Continued Fraction @@ -446,7 +448,7 @@

- +

Last revised: July 04, 2008 at 17:19:33 GMT

Last revised: July 18, 2008 at 10:10:45 GMT


diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html index 135a7b74f..380e91ce6 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html @@ -33,7 +33,7 @@ and reflect more the general implementation philosophy used.

- + Implemention philosophy
@@ -85,7 +85,7 @@ These could still provide sufficient accuracy for some speed-critical applications.

- + Accuracy and Representation of Test Values
@@ -130,7 +130,7 @@ binary value).

- + Tolerance of Tests
@@ -156,7 +156,7 @@ first that the suffix L is present, and then that the tolerance is big enough.

- + Handling Unsuitable Arguments
@@ -242,7 +242,7 @@

- + Handling of Functions that are Not Mathematically defined
@@ -276,7 +276,7 @@

- + Median of distributions
@@ -309,7 +309,7 @@ Basic Statistics. give more detail, in particular for discrete distributions.

- + Handling of Floating-Point Infinity
@@ -353,7 +353,7 @@ handling policies.

- + Scale, Shape and Location
@@ -380,7 +380,7 @@ functions, they can be added if required.

- + Notes on Implementation of Specific Functions & Distributions
@@ -392,7 +392,7 @@ 0 and upper = 1 would be more suitable.
- + Rational Approximations Used
@@ -435,7 +435,7 @@ to the "true" minimax solution.

- + Representation of Mathematical Constants
@@ -496,7 +496,7 @@ double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function
- + Thread safety
@@ -521,7 +521,7 @@ the right thing here at some point.

- + Sources of Test Data
@@ -565,7 +565,7 @@ the underlying special function is known to be difficult to implement.

- + Creating and Managing the Equations
@@ -726,7 +726,7 @@ done HTML: this needs further investigation.

- + Producing Graphs
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html index 37fbf2602..387c292ab 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html @@ -27,7 +27,7 @@ The Lanczos Approximation
- + Motivation

@@ -98,7 +98,7 @@ functions divided by large powers into single (simpler) expressions.

- + The Approximation
@@ -160,7 +160,7 @@

- + Computing the Coefficients
@@ -204,7 +204,7 @@ multiplied by F as the last step.

- + Choosing the Right Parameters
@@ -228,7 +228,7 @@ computing to float precision with double precision arithmetic.

-

Table 53. Optimal choices for N and g when computing with +

Table 53. Optimal choices for N and g when computing with guard digits (source: Pugh)

@@ -371,7 +371,7 @@ exactly matches the machine epsilon for the type in question.

-

Table 54. Optimum value for N and g when computing at fixed +

Table 54. Optimum value for N and g when computing at fixed precision

@@ -536,7 +536,7 @@ is exact, and so isn't used for the gamma function.

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html index e598ed75d..483a6fdfe 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html @@ -27,7 +27,7 @@ References
- + General references
@@ -91,7 +91,7 @@ Library (version 2), Walter E. Brown

- + Calculators* that we found (and used to cross-check - as far as their widely-varying accuracy allowed). @@ -101,7 +101,7 @@ Binomial Probability Distribution Calculator.

- + Other Libraries

diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html index f102b648d..96d5d77ad 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html @@ -81,7 +81,7 @@

- + The Impossibility of Zero Error
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html index b5ece056c..810201292 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html @@ -94,7 +94,7 @@ are located!

- + The Remez Method
@@ -174,7 +174,7 @@
- + Remez Step 1
@@ -205,7 +205,7 @@ to 5.6x10-4.

- + Remez Step 2
@@ -234,7 +234,7 @@ In our example we perform multi-point exchange.

- + Iteration

@@ -250,7 +250,7 @@ remez-4

- + Rational Approximations
@@ -299,7 +299,7 @@ number of terms overall.

- + Practical Considerations
@@ -407,7 +407,7 @@ desired minimax solution (5x10-4).

- + Remez Method Checklist
@@ -461,7 +461,7 @@
- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html index 3f6daba67..51efec6e9 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html @@ -28,7 +28,7 @@ Algorithms

- + Finding the Location and Scale for Normal and similar distributions
@@ -50,7 +50,7 @@ using boost::math::complement; // Will be needed by users who want to use complements.
- + find_location function
@@ -80,7 +80,7 @@ }} // namespaces
- + find_scale function
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html index 10249aa42..920247db3 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html @@ -87,7 +87,7 @@

- + Member Functions
@@ -103,7 +103,7 @@ Returns the success_fraction parameter of this distribution.

- + Non-member Accessors
@@ -128,7 +128,7 @@ exception and make an error message available.

- + Accuracy

@@ -136,7 +136,7 @@ and so should have errors within an epsilon or two.

- + Implementation

@@ -327,7 +327,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html index 06a3ca38e..f53744e71 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html @@ -133,12 +133,12 @@ from the centre (where x = half).

    - + Member Functions
    - + Constructor
    beta_distribution(RealType alpha, RealType beta);
    @@ -165,7 +165,7 @@
                 yellow in the graph above).
               

    - + Parameter Accessors
    @@ -189,7 +189,7 @@ assert(mybeta.beta() == 5.); // mybeta.beta() returns 5
    - + Parameter Estimators
    @@ -242,7 +242,7 @@ from presumed-known mean and variance. Returns the value of β that gives: cdf(beta_distribution<RealType>(alpha, beta), x) == probability.

    - + Non-member Accessor Functions
    @@ -264,7 +264,7 @@ from presumed-known mean and variance. Mathworld.

    - + Applications

    @@ -277,7 +277,7 @@ from presumed-known mean and variance. statistical inference.

    - + Related distributions
    @@ -303,7 +303,7 @@ from presumed-known mean and variance. Distribution with its p parameter set to x.

    - + Accuracy

    @@ -315,7 +315,7 @@ from presumed-known mean and variance. please refer to these functions for information on accuracy.

    - + Implementation

    @@ -597,7 +597,7 @@ from presumed-known mean and variance.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html index ec719f49e..08e0b2a20 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html @@ -167,12 +167,12 @@

- + Member Functions
- + Construct
binomial_distribution(RealType n, RealType p);
@@ -189,7 +189,7 @@
             otherwise calls domain_error.
           

- + Accessors
RealType success_fraction() const;
@@ -205,7 +205,7 @@
             was constructed.
           

- + Lower Bound on the Success Fraction
@@ -311,7 +311,7 @@ limits illustrated in the case of the binomial. Biometrika 26 404-413.

- + Upper Bound on the Success Fraction
@@ -389,7 +389,7 @@
- + Estimating the Number of Trials Required for a Certain Number of Successes
@@ -431,7 +431,7 @@ of seeing 10 events that occur with frequency one half.

- + Estimating the Maximum Number of Trials to Ensure no more than a Certain Number of Successes @@ -479,7 +479,7 @@ Worked Example.

- + Non-member Accessors
@@ -504,7 +504,7 @@ in the context of this distribution:

-

Table 11. Meaning of the non-member accessors

+

Table 11. Meaning of the non-member accessors

@@ -627,7 +627,7 @@

- + Examples

@@ -635,7 +635,7 @@ examples are available illustrating the use of the binomial distribution.

- + Accuracy

@@ -645,7 +645,7 @@ please refer to these functions for information on accuracy.

- + Implementation

@@ -886,7 +886,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html index a10a1f607..20acfe90a 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -114,7 +114,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -151,7 +151,7 @@ The domain of the random variable is [-[max_value], +[min_value]].

    - + Accuracy

    @@ -160,7 +160,7 @@ have very low error rates.

    - + Implementation

    @@ -276,7 +276,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html index 025e546f2..fc8d9b113 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html @@ -87,7 +87,7 @@ independent, normally distributed random

    - + Member Functions
    @@ -170,7 +170,7 @@ independent, normally distributed random NIST Engineering Statistics Handbook, Section 7.2.3.2.

    - + Non-member Accessors
    @@ -196,7 +196,7 @@ independent, normally distributed random The domain of the random variable is [0, +∞].

    - + Examples

    @@ -204,7 +204,7 @@ independent, normally distributed random are available illustrating the use of the Chi Squared Distribution.

    - + Accuracy

    @@ -212,7 +212,7 @@ independent, normally distributed random gamma functions: please refer to the accuracy data for those functions.

    - + Implementation

    @@ -379,7 +379,7 @@ independent, normally distributed random

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html index 6a46feb3b..897038ca8 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html @@ -71,7 +71,7 @@

    - + Member Functions
    @@ -91,7 +91,7 @@ Accessor function returns the lambda parameter of the distribution.

    - + Non-member Accessors
    @@ -111,7 +111,7 @@ The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -122,7 +122,7 @@ should have very low error rates.

    - + Implementation

    @@ -283,7 +283,7 @@

- + references
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html index 05bde84c1..b83bc8758 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html @@ -100,7 +100,7 @@

    - + Member Functions
    @@ -125,7 +125,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -145,7 +145,7 @@ The domain of the random parameter is [-∞, +∞].

    - + Accuracy

    @@ -154,7 +154,7 @@ very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html index 8b8f14437..1a020f89c 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html @@ -80,7 +80,7 @@

    - + Member Functions
    @@ -106,7 +106,7 @@ Returns the denominator degrees of freedom parameter of the distribution.

    - + Non-member Accessors
    @@ -126,7 +126,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -134,7 +134,7 @@ are available illustrating the use of the F Distribution.

    - + Accuracy

    @@ -143,7 +143,7 @@ refer to those functions for accuracy data.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html index 4bda0a3ca..2a52a5a30 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html @@ -137,7 +137,7 @@ than a dedicated Erlang Distribution.

    - + Member Functions
    @@ -162,7 +162,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -182,7 +182,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -194,7 +194,7 @@ refer to the accuracy data for those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html index 2c2daab6d..6cc0cbd7b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -121,7 +121,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -141,7 +141,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -150,7 +150,7 @@ function, and as such should have very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html index 9098af550..90ad33af4 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html @@ -96,7 +96,7 @@ is a central χ2 random variable with

    - + Member Functions
    @@ -128,7 +128,7 @@ is a central χ2 random variable with was constructed.

    - + Non-member Accessors
    @@ -152,7 +152,7 @@ is a central χ2 random variable with The domain of the random variable is [0, 1].

    - + Accuracy

    @@ -168,7 +168,7 @@ is a central χ2 random variable with zero error.

    -

    Table 13. Errors In CDF of the Noncentral Beta

    +

    Table 13. Errors In CDF of the Noncentral Beta

    @@ -295,7 +295,7 @@ is a central χ2 random variable with functions are broadly similar.

    - + Tests

    @@ -307,7 +307,7 @@ is a central χ2 random variable with tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html index 5dfbcb409..6eb7f96dd 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html @@ -110,7 +110,7 @@

    - + Member Functions
    @@ -183,7 +183,7 @@ == q.

    - + Non-member Accessors
    @@ -203,7 +203,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -211,7 +211,7 @@ example for the noncentral chi-squared distribution.

    - + Accuracy

    @@ -223,7 +223,7 @@ zero error.

    -

    Table 14. Errors In CDF of the Noncentral Chi-Squared

    +

    Table 14. Errors In CDF of the Noncentral Chi-Squared

    @@ -359,7 +359,7 @@ produce an accuracy greater than the square root of the machine epsilon.

    - + Tests

    @@ -373,7 +373,7 @@ to at least 50 decimal digits - and is the used for our accuracy tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html index 0cc2e8900..975733c86 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html @@ -95,7 +95,7 @@ random variable with v1

    - + Member Functions
    @@ -127,7 +127,7 @@ random variable with v1 which this object was constructed.

    - + Non-member Accessors
    @@ -147,7 +147,7 @@ random variable with v1 The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -155,7 +155,7 @@ random variable with v1 Beta Distribution: refer to that distribution for accuracy data.

    - + Tests

    @@ -164,7 +164,7 @@ random variable with v1 Math library statistical package and its pbeta and dbeta functions.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html index 1fba0faba..1130acca9 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html @@ -85,7 +85,7 @@

    - + Member Functions
    @@ -111,7 +111,7 @@ which this object was constructed.

    - + Non-member Accessors
    @@ -131,7 +131,7 @@ The domain of the random variable is [-∞, +∞].

    - + Accuracy

    @@ -141,7 +141,7 @@ one shown will have effectively zero error.

    -

    Table 15. Errors In CDF of the Noncentral T Distribution

    +

    Table 15. Errors In CDF of the Noncentral T Distribution

    @@ -255,7 +255,7 @@ epsilon.

    - + Tests

    @@ -270,7 +270,7 @@ least 50 decimal places.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html index 528815657..8b49cb3c8 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html @@ -123,7 +123,7 @@

    - + Related Distributions
    @@ -200,12 +200,12 @@

    - + Member Functions
    - + Construct
    negative_binomial_distribution(RealType r, RealType p);
    @@ -221,7 +221,7 @@
                 <= 1.
               

    - + Accessors
    RealType success_fraction() const; // successes / trials (0 <= p <= 1)
    @@ -237,7 +237,7 @@
                 was constructed.
               

    - + Lower Bound on Parameter p
    @@ -298,7 +298,7 @@ vol. 48, no3, 605-621.

    - + Upper Bound on Parameter p
    @@ -358,7 +358,7 @@ vol. 48, no3, 605-621.

    - + Estimating Number of Trials to Ensure at Least a Certain Number of Failures
    @@ -409,7 +409,7 @@ probability of observing k failures or fewer.

    - + Estimating Number of Trials to Ensure a Maximum Number of Failures or Less
    @@ -457,7 +457,7 @@ probability of observing more than k failures.

    - + Non-member Accessors
    @@ -478,7 +478,7 @@ in the context of this distribution:

    -

    Table 12. Meaning of the non-member accessors.

    +

    Table 12. Meaning of the non-member accessors.

    @@ -603,7 +603,7 @@

    - + Accuracy

    @@ -613,7 +613,7 @@ please refer to these functions for information on accuracy.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html index 65091c0ae..6384307b4 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html @@ -79,7 +79,7 @@

    - + Member Functions
    @@ -109,7 +109,7 @@ be used generically).

    - + Non-member Accessors
    @@ -131,7 +131,7 @@ and complement cdf -∞ = 1 and +∞ = 0, if RealType permits.

    - + Accuracy

    @@ -139,7 +139,7 @@ function, and as such should have very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html index a71f864c1..9f350580c 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html @@ -86,12 +86,12 @@

    - + Related distributions
    - + Member Functions
    @@ -117,7 +117,7 @@ Returns the shape parameter of this distribution.

    - + Non-member Accessors
    @@ -137,7 +137,7 @@ The supported domain of the random variable is [location, ∞].

    - + Accuracy

    @@ -147,7 +147,7 @@ to unity.

    - + Implementation

    @@ -315,7 +315,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html index 33ed52eda..6ab34b693 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html @@ -122,7 +122,7 @@

    - + Member Functions
    @@ -137,7 +137,7 @@ Returns the mean of this distribution.

    - + Non-member Accessors
    @@ -157,7 +157,7 @@ The domain of the random variable is [0, ∞].

    - + Accuracy

    @@ -171,7 +171,7 @@ using an iterative method with a lower tolerance to avoid excessive computation.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html index 01cae0ec2..100e6637f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html @@ -86,7 +86,7 @@

    - + Related distributions
    @@ -102,7 +102,7 @@ distribution.

    - + Member Functions
    @@ -121,7 +121,7 @@ Returns the sigma parameter of this distribution.

    - + Non-member Accessors
    @@ -141,7 +141,7 @@ The domain of the random variable is [0, max_value].

    - + Accuracy

    @@ -151,7 +151,7 @@ using NTL RR type with 150-bit accuracy, about 50 decimal digits.

    - + Implementation

    @@ -320,7 +320,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html index 9e2a82e3f..f6c961df0 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html @@ -97,7 +97,7 @@

    - + Member Functions
    @@ -174,7 +174,7 @@ Engineering Statistics Handbook.

    - + Non-member Accessors
    @@ -194,7 +194,7 @@ The domain of the random variable is [-∞, +∞].

    - + Examples

    @@ -202,7 +202,7 @@ are available illustrating the use of the Student's t distribution.

    - + Accuracy

    @@ -211,7 +211,7 @@ inverses, refer to accuracy data on those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html index 8536d25ae..337567942 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html @@ -128,7 +128,7 @@

    - + Member Functions
    @@ -163,7 +163,7 @@ (default+1).

    - + Non-member Accessors
    @@ -184,7 +184,7 @@ range is lower <= x <= upper.

    - + Accuracy

    @@ -193,7 +193,7 @@ with arguments nearing the extremes of zero and unity.

    - + Implementation

    @@ -378,7 +378,7 @@ Calculate and plot probability distributions

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html index c437dd00d..f73a13222 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html @@ -117,7 +117,7 @@

      - + Member Functions
      @@ -144,7 +144,7 @@ Returns the upper parameter of this distribution.

      - + Non-member Accessors
      @@ -165,7 +165,7 @@ range is only lower <= x <= upper.

      - + Accuracy

      @@ -173,7 +173,7 @@ and so should have errors within an epsilon or two.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html index 2e893d774..d7f1ae4a7 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html @@ -100,7 +100,7 @@

      - + Related distributions
      @@ -114,7 +114,7 @@ Distributions, Theory and Applications Samuel Kotz & Saralees Nadarajah.

      - + Member Functions
      @@ -140,7 +140,7 @@ Returns the scale parameter of this distribution.

      - + Non-member Accessors
      @@ -160,7 +160,7 @@ The domain of the random variable is [0, ∞].

      - + Accuracy

      @@ -170,7 +170,7 @@ as such should have very low error rates.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html index 31bc2e975..56198d16f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html @@ -37,7 +37,7 @@ the function you want if you already know its name.

      - + Function Index
      @@ -93,7 +93,7 @@
    - + Conceptual Index
    @@ -174,7 +174,7 @@
- + Cumulative Distribution Function
@@ -198,7 +198,7 @@ cdf

- + Complement of the Cumulative Distribution Function
@@ -239,7 +239,7 @@ complement is useful and when it should be used.

- + Hazard Function
template <class RealType, class Policy>
@@ -267,7 +267,7 @@
           

- + Cumulative Hazard Function
@@ -295,7 +295,7 @@

- + mean
template<class RealType, class Policy>
@@ -310,7 +310,7 @@
           distribution).
         

- + median
template<class RealType, class Policy>
@@ -320,7 +320,7 @@
           Returns the median of the distribution dist.
         

- + mode
template<class RealType, Policy>
@@ -334,7 +334,7 @@
           if the distribution does not have a defined mode.
         

- + Probability Density Function
@@ -363,7 +363,7 @@ pdf

- + range
template<class RealType, class Policy>
@@ -373,7 +373,7 @@
           Returns the valid range of the random variable over distribution dist.
         

- + Quantile
template <class RealType, class Policy>
@@ -402,7 +402,7 @@
           quantile
         

- + Quantile from the complement of the probability.
@@ -448,7 +448,7 @@ survival_inv

- + Standard Deviation
@@ -463,7 +463,7 @@ if the distribution does not have a defined standard deviation.

- + support
template<class RealType, class Policy>
@@ -480,7 +480,7 @@
           where the pdf is zero, and the cdf zero or unity.
         

- + Variance
template <class RealType, class Policy>
@@ -494,7 +494,7 @@
           if the distribution does not have a defined variance.
         

- + Skewness
template <class RealType, class Policy>
@@ -508,7 +508,7 @@
           if the distribution does not have a defined skewness.
         

- + Kurtosis
template <class RealType, class Policy>
@@ -550,7 +550,7 @@
           'Proper' kurtosis can have a value from zero to + infinity.
         

- + Kurtosis excess
@@ -585,7 +585,7 @@ The kurtosis excess of a normal distribution is zero.

- + P and Q

@@ -595,7 +595,7 @@ returned by these functions.

- + Percent Point Function
@@ -604,7 +604,7 @@ the Quantile.

- + Inverse CDF Function.
@@ -613,7 +613,7 @@ Quantile.

- + Inverse Survival Function.
@@ -621,7 +621,7 @@ The inverse of the survival function, is the same as computing the quantile from the complement of the probability.

- + Probability Mass Function
@@ -635,7 +635,7 @@ applies to continuous distributions.

- + Lower Critical Value.
@@ -645,7 +645,7 @@ the Quantile.

- + Upper Critical Value.
@@ -656,7 +656,7 @@ complement of the probability.

- + Survival Function
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/future.html b/doc/sf_and_dist/html/math_toolkit/dist/future.html index 26e3027b4..d757fab28 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/future.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/future.html @@ -27,7 +27,7 @@ Extras/Future Directions
- + Adding Additional Location and Scale Parameters
@@ -55,7 +55,7 @@ functions.

- + An "any_distribution" class
@@ -84,7 +84,7 @@ use case: this needs more investigation.

- + Higher Level Hypothesis Tests
@@ -104,7 +104,7 @@ expected_mean.

- + Integration With Statistical Accumulators
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html index cfb9a7c35..698cc00ba 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html @@ -27,7 +27,7 @@ Overview
- + Headers and Namespaces
@@ -44,7 +44,7 @@ or <boost/math/distributions.hpp>

- + Distributions are Objects
@@ -131,7 +131,7 @@ and quantiles etc for these distributions.

- + Generic operations common to all distributions are non-member functions
@@ -326,7 +326,7 @@

- + Complements are supported too
@@ -492,7 +492,7 @@ sample size.

- + Summary
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html index 748a79065..1152d142f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html @@ -497,7 +497,7 @@ Probability of getting between 4 and 4 answers right by guessing is 0.2252

    - + Using Binomial distribution moments
    @@ -534,7 +534,7 @@ Skewness is 0.2887

    - + Quantiles

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html index 9733352cb..73e9828c6 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html @@ -139,7 +139,7 @@ _____________________________________________ is between 0.00551 and 0.00729.

    - + Confidence intervals as a function of the number of observations
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html index 5e32d7f2d..e27bbef91 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html @@ -332,7 +332,7 @@ error C3861: 'mybetad0': identifier not found

    - + Default arguments to distribution constructors.
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html index 0e2afe1b0..95a884007 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html @@ -175,7 +175,7 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999

    - + Controlling Error Handling from find_location
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html index 035422cc8..f18fb754f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html @@ -62,7 +62,7 @@

    - + Using find_location and find_scale to meet dispensing and measurement specifications
    @@ -246,7 +246,7 @@

    - + Using Cauchy-Lorentz instead of normal distribution
    @@ -397,7 +397,7 @@

    - + Changing the scale or standard deviation
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html index 8645afb7d..c6c0aef4b 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html @@ -179,7 +179,7 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999

    - + Controlling how Errors from find_scale are handled
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html index 87cc00114..8054208ac 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html @@ -32,7 +32,7 @@ illustrates their use.

    - + Traditional Tables
    @@ -278,7 +278,7 @@

    - + Standard deviations either side of the Mean
    @@ -346,12 +346,12 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Some simple examples
    - + Life of light bulbs
    @@ -435,7 +435,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + How many onions?
    @@ -494,7 +494,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Packing beef
    @@ -703,7 +703,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Length of bolts
    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html b/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html index c5d44e84e..4bc8ad5b1 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html @@ -37,7 +37,7 @@

    -

    Table 9. Supported/Tested Compilers

    +

    Table 9. Supported/Tested Compilers

    @@ -540,7 +540,7 @@


    -

    Table 10. Unsupported Compilers

    +

    Table 10. Unsupported Compilers

    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html index 9618d0b57..d790e9864 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html @@ -28,7 +28,7 @@ File Structure
    - + boost/math
    @@ -73,7 +73,7 @@
    - + boost/libs
    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html index 89e247c00..ff58b9589 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html @@ -27,7 +27,7 @@ Error Handling
    - + Quick Reference
    @@ -134,7 +134,7 @@ the default action for each error shown in bold:

    -

    Table 1. Possible Actions for Domain Errors

    +

    Table 1. Possible Actions for Domain Errors

    @@ -209,7 +209,7 @@

    -

    Table 2. Possible Actions for Pole Errors

    +

    Table 2. Possible Actions for Pole Errors

    @@ -284,7 +284,7 @@

    -

    Table 3. Possible Actions for Overflow Errors

    +

    Table 3. Possible Actions for Overflow Errors

    @@ -359,7 +359,7 @@

    -

    Table 4. Possible Actions for Underflow Errors

    +

    Table 4. Possible Actions for Underflow Errors

    @@ -434,7 +434,7 @@

    -

    Table 5. Possible Actions for Denorm Errors

    +

    Table 5. Possible Actions for Denorm Errors

    @@ -509,7 +509,7 @@

    -

    Table 6. Possible Actions for Rounding Errors

    +

    Table 6. Possible Actions for Rounding Errors

    @@ -584,7 +584,7 @@

    -

    Table 7. Possible Actions for Internal Evaluation +

    Table 7. Possible Actions for Internal Evaluation Errors

    @@ -661,7 +661,7 @@

    -

    Table 8. Possible Actions for Indeterminate Result +

    Table 8. Possible Actions for Indeterminate Result Errors

    @@ -739,7 +739,7 @@

    - + Rationale

    @@ -758,7 +758,7 @@

- + Finding More Information
@@ -780,7 +780,7 @@ The various kind of errors are described in more detail below.

- + Domain Errors
@@ -873,7 +873,7 @@ for more details.

- + Evaluation at a pole
@@ -912,7 +912,7 @@ for more details.

- + Numeric Overflow
@@ -937,7 +937,7 @@ doesn't support infinities, the maximum value for the type is returned.

- + Numeric Underflow
@@ -960,7 +960,7 @@ an std::underflow_error C++ exception.

- + Denormalisation Errors
@@ -983,7 +983,7 @@ throws an std::underflow_error C++ exception.

- + Evaluation Errors
@@ -1020,7 +1020,7 @@ for more details.

- + Indeterminate Result Errors
@@ -1047,7 +1047,7 @@ the result of 00 is 1, even though the result is actually mathematically indeterminate.

- + Rounding Errors
@@ -1086,7 +1086,7 @@ for more details.

- + Errors from typecasts
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html index e115b3519..2b9310cb4 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html @@ -31,7 +31,7 @@

- + Boost-1.36.0

@@ -69,7 +69,7 @@

- + Boost-1.35.0: Post Review First Official Release
@@ -106,7 +106,7 @@

- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -125,7 +125,7 @@

- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -158,7 +158,7 @@

- + Milestone 2: Released September 10th 2006
@@ -199,7 +199,7 @@

- + Milestone 1: Released March 31st 2006
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html index d2a463af4..cc3f0245f 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html @@ -30,7 +30,7 @@ This library is divided into three interconnected parts:

- + Statistical Distributions
@@ -56,7 +56,7 @@ tests.

- + Mathematical Special Functions
@@ -83,7 +83,7 @@ double.

- + Implementation Toolkit
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html index f382bb831..cd63ed10f 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html @@ -31,7 +31,7 @@ as handy shortcuts for common navigation tasks.

- + Shortcuts
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html index 878500a4d..9893f9e17 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html @@ -284,7 +284,7 @@

- + Usage Recomendations
@@ -336,7 +336,7 @@

- + Supported C99 Functions
@@ -440,7 +440,7 @@

- + Supported TR1 Functions
@@ -579,7 +579,7 @@

- + Currently Unsupported C99 Functions
@@ -650,7 +650,7 @@

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html b/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html index 18aa66114..3d15bddb5 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html @@ -35,7 +35,7 @@ in this respect).

-

Table 48. Performance Comparison of Various Windows Compilers

+

Table 48. Performance Comparison of Various Windows Compilers

diff --git a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html index 1f0dcdd22..1d6472a11 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html @@ -46,7 +46,7 @@

- + Comparison to GSL-1.9 and Cephes
@@ -213,7 +213,7 @@

+INF - [1] + [1]

@@ -284,13 +284,13 @@ -

[1] +

[1] Cephes gets stuck in an infinite loop while trying to execute our test cases.

- + Comparison to the R Statistical Library on Windows
@@ -301,7 +301,7 @@ appears not to be buildable with Visual C++).

-

Table 51. A Comparison to the R Statistical Library on Windows +

Table 51. A Comparison to the R Statistical Library on Windows XP

@@ -374,7 +374,7 @@

74.66 - [1] + [1]

(4.905e-004s)

@@ -792,7 +792,7 @@

53.59 - [2] + [2]

(5.145e-004s)

@@ -1010,12 +1010,12 @@
-

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases @@ -1024,7 +1024,7 @@


- + Comparison to the R Statistical Library on Linux
@@ -1033,7 +1033,7 @@ Linux machine, with the test program and R-2.5.0 compiled with GNU G++ 4.2.0.

-

Table 52. A Comparison to the R Statistical Library on Linux

+

Table 52. A Comparison to the R Statistical Library on Linux

@@ -1104,7 +1104,7 @@

44.06 - [1] + [1]

(5.701e-004s)

@@ -1522,7 +1522,7 @@

30.07 - [2] + [2]

(5.490e-004s)

@@ -1740,12 +1740,12 @@
-

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases diff --git a/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html b/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html index bcc02c100..aa9f4bc65 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html @@ -33,7 +33,7 @@ penalty for using the library in debug mode can be quite large.

-

Table 47. Performance Comparison of Release and Debug Settings

+

Table 47. Performance Comparison of Release and Debug Settings

diff --git a/doc/sf_and_dist/html/math_toolkit/perf/tuning.html b/doc/sf_and_dist/html/math_toolkit/perf/tuning.html index 05724200f..b73107b98 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/tuning.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/tuning.html @@ -234,7 +234,7 @@ highly vectorisable processors in the future.

-

Table 49. A Comparison of Polynomial Evaluation Methods

+

Table 49. A Comparison of Polynomial Evaluation Methods

@@ -634,7 +634,7 @@ tutorial.

-

Table 50. Performance Comparison with and Without Internal +

Table 50. Performance Comparison with and Without Internal Promotion to long double

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html index 0002902c7..5003c9c85 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html @@ -55,7 +55,7 @@ can take have the following meanings:

- + real

@@ -93,7 +93,7 @@ = 68.1584.

- + integer_round_outwards

@@ -151,7 +151,7 @@ in each tail.

- + integer_round_inwards

@@ -214,7 +214,7 @@ in each tail.

- + integer_round_down

@@ -222,7 +222,7 @@ or a lower quantile.

- + integer_round_up

@@ -230,7 +230,7 @@ a lower quantile.

- + integer_round_nearest

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html index 9685a79ba..54ccc639e 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html @@ -39,7 +39,7 @@

- + Available Actions When an Error is Raised
@@ -62,7 +62,7 @@ The various enumerated values have the following meanings:

- + throw_on_error

@@ -174,7 +174,7 @@

- + errno_on_error

@@ -287,7 +287,7 @@

- + ignore_error

@@ -400,7 +400,7 @@

- + user_error

@@ -449,7 +449,7 @@ here.

- + Kinds of Error Raised
@@ -688,7 +688,7 @@
- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html index 285d99066..c13b6d4f1 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html @@ -84,7 +84,7 @@

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html index 617aafc5b..a295f655b 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html @@ -61,7 +61,7 @@ then you can do so by defining various macros in boost/math/tools/user.hpp.

- + BOOST_MATH_DOMAIN_ERROR_POLICY

@@ -71,7 +71,7 @@ ignore_error or user_error.

- + BOOST_MATH_POLE_ERROR_POLICY

@@ -81,7 +81,7 @@ ignore_error or user_error.

- + BOOST_MATH_OVERFLOW_ERROR_POLICY

@@ -91,7 +91,7 @@ ignore_error or user_error.

- + BOOST_MATH_ROUNDING_ERROR_POLICY

@@ -101,7 +101,7 @@ ignore_error or user_error.

- + BOOST_MATH_EVALUATION_ERROR_POLICY

@@ -111,7 +111,7 @@ ignore_error or user_error.

- + BOOST_MATH_UNDERFLOW_ERROR_POLICY

@@ -121,7 +121,7 @@ ignore_error or user_error.

- + BOOST_MATH_DENORM_ERROR_POLICY

@@ -131,7 +131,7 @@ ignore_error or user_error.

- + BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY

@@ -142,7 +142,7 @@ ignore_error or user_error.

- + BOOST_MATH_DIGITS10_POLICY

@@ -153,7 +153,7 @@ recommended that you change this from the default.

- + BOOST_MATH_PROMOTE_FLOAT_POLICY

@@ -165,7 +165,7 @@ off.

- + BOOST_MATH_PROMOTE_DOUBLE_POLICY

@@ -177,7 +177,7 @@ off.

- + BOOST_MATH_DISCRETE_QUANTILE_POLICY

@@ -188,7 +188,7 @@ Defaults to integer_round_outwards.

- + BOOST_MATH_ASSERT_UNDEFINED_POLICY

@@ -201,7 +201,7 @@ whether or not a particular property is well defined.

- + BOOST_MATH_MAX_SERIES_ITERATION_POLICY

@@ -210,7 +210,7 @@ Defaults to 1000000.

- + BOOST_MATH_MAX_ROOT_ITERATION_POLICY

@@ -219,7 +219,7 @@ Defaults to 200.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html index bcc5998b2..c67bbdd63 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html @@ -177,7 +177,7 @@ base your comparisons on CDF's instead.

- + Other Rounding Policies are Available
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html index 5ee3bb81c..3968e6746 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html @@ -28,7 +28,7 @@ of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_neumann(T1 v, T2 x, const Policy&);
 
- + Description

@@ -110,7 +110,7 @@

- + Testing

@@ -119,7 +119,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -135,7 +135,7 @@ zero error. All values are relative errors in units of epsilon.

-

Table 36. Errors Rates in cyl_bessel_j

+

Table 36. Errors Rates in cyl_bessel_j

@@ -304,7 +304,7 @@

-

Table 37. Errors Rates in cyl_neumann

+

Table 37. Errors Rates in cyl_neumann

@@ -494,7 +494,7 @@ were found.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html index 5f3efe0d7..5d684ce8a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html @@ -28,7 +28,7 @@ Overview

- + Ordinary Bessel Functions
@@ -103,7 +103,7 @@ and is known as either a Bessel

- + Modified Bessel Functions
@@ -167,7 +167,7 @@ respectively:

- + Spherical Bessel Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html index 483795ba5..f5b28946f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html @@ -28,7 +28,7 @@ Functions of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_bessel_k(T1 v, T2 x, const Policy&);
 
- + Description

@@ -109,7 +109,7 @@

- + Testing

@@ -118,7 +118,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -129,7 +129,7 @@ zero error. All values are relative errors in units of epsilon.

-

Table 38. Errors Rates in cyl_bessel_i

+

Table 38. Errors Rates in cyl_bessel_i

@@ -226,7 +226,7 @@

-

Table 39. Errors Rates in cyl_bessel_k

+

Table 39. Errors Rates in cyl_bessel_k

@@ -326,7 +326,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html index 59aa1d5d4..80eecd7fc 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html @@ -28,7 +28,7 @@ Bessel Functions of the First and Second Kinds

- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type sph_neumann(unsigned v, T2 x, const Policy&);
 
- + Description

@@ -97,7 +97,7 @@ for small x:

- + Testing

@@ -106,7 +106,7 @@ for small x: implementation (with all the special case handling removed).

- + Accuracy

@@ -116,7 +116,7 @@ for small x: refer to these functions for accuracy data.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html index 80b4aeb31..0ae4c0b37 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html @@ -28,7 +28,7 @@ of the First Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -123,7 +123,7 @@

- + Accuracy

@@ -134,7 +134,7 @@ All values are relative errors in units of epsilon.

-

Table 41. Errors Rates in the Elliptic Integrals of the +

Table 41. Errors Rates in the Elliptic Integrals of the First Kind

@@ -237,7 +237,7 @@

- + Testing

@@ -247,7 +247,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html index a3fb1c643..ca1e4dd12 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html @@ -28,7 +28,7 @@ of the Second Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -123,7 +123,7 @@

- + Accuracy

@@ -134,7 +134,7 @@ All values are relative errors in units of epsilon.

-

Table 42. Errors Rates in the Elliptic Integrals of the +

Table 42. Errors Rates in the Elliptic Integrals of the Second Kind

@@ -237,7 +237,7 @@

- + Testing

@@ -247,7 +247,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html index 964e9f815..9ac119935 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html @@ -28,7 +28,7 @@ of the Third Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -135,7 +135,7 @@ [opitonal_policy]

- + Accuracy

@@ -146,7 +146,7 @@ All values are relative errors in units of epsilon.

-

Table 43. Errors Rates in the Elliptic Integrals of the +

Table 43. Errors Rates in the Elliptic Integrals of the Third Kind

@@ -249,7 +249,7 @@

- + Testing

@@ -259,7 +259,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html index 23dfb70a4..c845e247c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html @@ -28,7 +28,7 @@ Integrals - Carlson Form

- + Synopsis

@@ -100,7 +100,7 @@ }} // namespaces

- + Description

@@ -236,7 +236,7 @@

- + Testing

@@ -265,7 +265,7 @@ to verify their correctness: see the above Carlson paper for details.

- + Accuracy

@@ -276,7 +276,7 @@ All values are relative errors in units of epsilon.

-

Table 40. Errors Rates in the Carlson Elliptic Integrals

+

Table 40. Errors Rates in the Carlson Elliptic Integrals

@@ -419,7 +419,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html index 3afb57e78..98bafabf8 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html @@ -61,14 +61,14 @@ Elliptic integral.

- + Notation

All variables are real numbers unless otherwise noted.

- + Definition

@@ -257,7 +257,7 @@

- + Duplication Theorem
@@ -269,7 +269,7 @@

- + Carlson's Formulas
@@ -287,7 +287,7 @@

- + Numerical Algorithms
@@ -301,7 +301,7 @@ integrals with satisfactory precisions.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html index a2e59f477..41bce3337 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html @@ -28,7 +28,7 @@ Integral Ei

- + Synopsis

@@ -63,7 +63,7 @@

- + Description
template <class T>
@@ -83,7 +83,7 @@
           
         

- + Accuracy

@@ -95,7 +95,7 @@ error.

-

Table 46. Errors In the Function expint(z)

+

Table 46. Errors In the Function expint(z)

@@ -207,7 +207,7 @@ slightly over the range [4,6].

- + Testing

@@ -222,7 +222,7 @@ check.

- + Implementation

@@ -253,7 +253,7 @@ [-1,1]. Note that while the rational approximation over [0,6] converges rapidly to the minimax solution it is rather ill-conditioned in practice. Cody and Thacher - [1] + [1] experienced the same issue and converted the polynomials into Chebeshev form to ensure stable computation. By experiment we found that the polynomials are just as stable in polynomial as Chebyshev form, provided @@ -284,7 +284,7 @@



-

[1] +

[1] W. J. Cody and H. C. Thacher, Jr., Rational Chebyshev approximations for the exponential integral E1(x), Math. Comp. 22 (1968), 641-649, and W. J. Cody and H. C. Thacher, Jr., Chebyshev approximations for diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html index ee7ebb158..079ba3a01 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html @@ -28,7 +28,7 @@ Integral En

- + Synopsis

@@ -63,7 +63,7 @@

- + Description
template <class T>
@@ -83,7 +83,7 @@
           
         

- + Accuracy

@@ -94,7 +94,7 @@ the one shown will have effectively zero error.

-

Table 45. Errors In the Function expint(n, z)

+

Table 45. Errors In the Function expint(n, z)

@@ -225,7 +225,7 @@

- + Testing

@@ -240,7 +240,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html index 44a3070f0..c4b422ae5 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html @@ -27,7 +27,7 @@ C99 C Functions

- + Supported C99 Functions
@@ -138,7 +138,7 @@ acosh(2); // integer argument is treated as a double, returns double.
- + Quick Reference
diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html index 7cad23732..dd3b75d63 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html @@ -288,7 +288,7 @@

- + Usage Recomendations
@@ -341,7 +341,7 @@

- + Supported C99 Functions
@@ -445,7 +445,7 @@

- + Supported TR1 Functions
@@ -584,7 +584,7 @@

- + Currently Unsupported C99 Functions
@@ -655,7 +655,7 @@

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html index 485c59c41..cdff14892 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html @@ -28,7 +28,7 @@ Quick Reference
- + Supported TR1 Functions
@@ -163,7 +163,7 @@ expint(2); // integer argument is treated as a double, returns double.
- + Quick Reference
@@ -495,7 +495,7 @@ for the full template (header only) version of this function.

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html index b37fb6e9f..758805344 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html @@ -65,7 +65,7 @@ if the result is too large to represent in type T.

- + Accuracy

@@ -74,14 +74,14 @@ function for larger arguments.

- + Testing

The spot tests for the binomial coefficients use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html index 416b73876..3b99b7551 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html @@ -64,7 +64,7 @@ of i! is possible.

- + Accuracy

@@ -72,14 +72,14 @@ so error rates should be no more than a couple of epsilon higher.

- + Testing

The spot tests for the double factorial use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html index 663d8479b..45dbe0eaf 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html @@ -27,7 +27,7 @@ Factorial

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
template <class T>
@@ -112,7 +112,7 @@
           the size of further tables that depend on the factorials.
         

- + Accuracy

@@ -121,7 +121,7 @@ will be the same as for tgamma.

- + Testing

@@ -130,7 +130,7 @@ function handle those cases already.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html index e6bf3ba83..7f3fc5014 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html @@ -76,7 +76,7 @@ the type of the result is T.

- + Accuracy

@@ -84,14 +84,14 @@ function.

- + Testing

The spot tests for the falling factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html index 6673e08ea..d960f2790 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html @@ -80,7 +80,7 @@ the type of the result is T.

- + Accuracy

@@ -88,14 +88,14 @@ function.

- + Testing

The spot tests for the rising factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/fpclass.html b/doc/sf_and_dist/html/math_toolkit/special/fpclass.html index 3191ff440..8a3d79ee4 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/fpclass.html +++ b/doc/sf_and_dist/html/math_toolkit/special/fpclass.html @@ -28,7 +28,7 @@ Infinities and NaN's

- + Synopsis
#define FP_ZERO        /* implementation specific value */
@@ -58,7 +58,7 @@
         to use these functions.
       

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html index 40d19b8bc..89202b20b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html @@ -32,7 +32,7 @@ number of ULP.

- + Synopsis

@@ -50,7 +50,7 @@ }} // namespaces

- + Description - float_advance
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html index 9259f7f35..d7a4eb6ef 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html @@ -34,7 +34,7 @@ different.

- + Synopsis

@@ -52,7 +52,7 @@ }} // namespaces

- + Description - float_distance
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html index 9a62f23df..c5e6ca2d0 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html @@ -28,7 +28,7 @@ the Next Greater Representable Value (float_next)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_next
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html index 417845958..649ffc820 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html @@ -28,7 +28,7 @@ the Next Smaller Representable Value (float_prior)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_prior
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html index e48e7cd24..09f5535f7 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html @@ -28,7 +28,7 @@ the Next Representable Value in a Specific Direction (nextafter)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - nextafter
@@ -76,7 +76,7 @@ returns an overflow_error.

- + Examples - nextafter
diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html index 4623e3afb..58fa46399 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html @@ -71,7 +71,7 @@

- + Accuracy

@@ -79,7 +79,7 @@ should have approximately 2 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html index 3a589bf31..35b0968a7 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html @@ -32,7 +32,7 @@ computes the compile-time integral power of a run-time base.

- + Synopsis

@@ -49,7 +49,7 @@ }}

- + Rationale and Usage
@@ -91,7 +91,7 @@ Only 3 different products were actually computed.

- + Return Type

@@ -112,7 +112,7 @@

- + Policies

@@ -126,7 +126,7 @@

- + Error Handling
@@ -231,7 +231,7 @@ double result = pow<-5>(base);
- + Acknowledgements

@@ -242,7 +242,7 @@ improving the implementation.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html index 5adb063ce..77b05fdca 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html @@ -80,7 +80,7 @@

- + Accuracy

@@ -88,7 +88,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html index 71bb70ea2..cc982a8a8 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html @@ -58,7 +58,7 @@ in such a representable.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html index 03f6b12c9..d54a2c962 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html @@ -93,7 +93,7 @@

- + Accuracy

@@ -101,7 +101,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html index 0f0cc48c3..74ee7d8d9 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html @@ -74,14 +74,14 @@

- + Accuracy

Should have approximately 2-3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html index d8a1c53e1..2e2965f6a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html @@ -76,7 +76,7 @@

- + Accuracy

@@ -84,7 +84,7 @@ should have approximately 3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html index 5af8a9060..da6ffe6df 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html @@ -28,7 +28,7 @@ of the Incomplete Beta Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -76,14 +76,14 @@

- + Accuracy

Almost identical to the incomplete beta function ibeta.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html index 8fc331ea7..6ec5db24a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html @@ -27,7 +27,7 @@ Beta

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -86,7 +86,7 @@ type calculation rules when T1 and T2 are different types.

- + Accuracy

@@ -98,7 +98,7 @@ zero error.

-

Table 22. Peak Errors In the Beta Function

+

Table 22. Peak Errors In the Beta Function

@@ -244,7 +244,7 @@ very small.

- + Testing

@@ -253,7 +253,7 @@ at 1000-bit precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html index 831739092..d0bbf8a0f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html @@ -28,7 +28,7 @@ Beta Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -153,7 +153,7 @@

- + Accuracy

@@ -172,7 +172,7 @@ with the wider exponent range of the long double types.

-

Table 23. Errors In the Function ibeta(a,b,x)

+

Table 23. Errors In the Function ibeta(a,b,x)

@@ -359,7 +359,7 @@

-

Table 24. Errors In the Function ibetac(a,b,x)

+

Table 24. Errors In the Function ibetac(a,b,x)

@@ -526,7 +526,7 @@

-

Table 25. Errors In the Function beta(a, b, x)

+

Table 25. Errors In the Function beta(a, b, x)

@@ -693,7 +693,7 @@

-

Table 26. Errors In the Function betac(a,b,x)

+

Table 26. Errors In the Function betac(a,b,x)

@@ -860,7 +860,7 @@

- + Testing

@@ -878,7 +878,7 @@ have test data that is fully independent of the code.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html index f609ccfbe..d479571b0 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html @@ -87,7 +87,7 @@ }} // namespaces

- + Description

@@ -323,7 +323,7 @@

- + Accuracy

@@ -335,7 +335,7 @@ or 1.

- + Testing

@@ -359,7 +359,7 @@

- + Implementation of ibeta_inv and ibetac_inv
@@ -527,7 +527,7 @@ rapidly converges on the true value.

- + Implementation of inverses on the a and b parameters
diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html index 21412ec02..b7f090dad 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html @@ -28,7 +28,7 @@ Functions
- + Synopsis

@@ -69,7 +69,7 @@

- + Description
template <class T>
@@ -106,7 +106,7 @@
           
         

- + Accuracy

@@ -119,7 +119,7 @@ the one shown will have effectively zero error.

-

Table 27. Errors In the Function erf(z)

+

Table 27. Errors In the Function erf(z)

@@ -325,7 +325,7 @@

-

Table 28. Errors In the Function erfc(z)

+

Table 28. Errors In the Function erfc(z)

@@ -531,7 +531,7 @@

- + Testing

@@ -546,7 +546,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html index 85ae9763e..21745d2ff 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html @@ -28,7 +28,7 @@ Inverses

- + Synopsis

@@ -69,7 +69,7 @@

- + Description
template <class T>
@@ -103,7 +103,7 @@
           
         

- + Accuracy

@@ -113,7 +113,7 @@ error functions.

- + Testing

@@ -135,7 +135,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html index 225abacf7..39e3c4b13 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html @@ -27,7 +27,7 @@ Digamma

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -82,7 +82,7 @@ T otherwise.

- + Accuracy

@@ -270,7 +270,7 @@ absolute error will remain very low.

- + Testing

@@ -280,7 +280,7 @@ see below).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html index 081539c14..2a7b7f453 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html @@ -28,7 +28,7 @@ of the Incomplete Gamma Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -80,7 +80,7 @@ otherwise the return type is simply T1.

- + Accuracy

@@ -88,7 +88,7 @@ refer to the documentation for that function for more information.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html index 79aeab221..3a1da2766 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html @@ -51,7 +51,7 @@ }} // namespaces

- + Description
template <class T1, class T2> 
@@ -117,7 +117,7 @@
           
         

- + Accuracy

@@ -127,7 +127,7 @@ effectively zero error.

-

Table 16. Errors In the Function tgamma_delta_ratio(a, delta)

+

Table 16. Errors In the Function tgamma_delta_ratio(a, delta)

@@ -230,7 +230,7 @@

-

Table 17. Errors In the Function tgamma_ratio(a, +

Table 17. Errors In the Function tgamma_ratio(a, b)

@@ -329,7 +329,7 @@

- + Testing

@@ -338,7 +338,7 @@ a deliberately naive calculation of Γ(x)/Γ(y).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html index 52736ac57..3a6ddb2de 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html @@ -28,7 +28,7 @@ Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -160,7 +160,7 @@

- + Accuracy

@@ -185,7 +185,7 @@ All values are in units of epsilon.

-

Table 18. Errors In the Function gamma_p(a,z)

+

Table 18. Errors In the Function gamma_p(a,z)

@@ -372,7 +372,7 @@

-

Table 19. Errors In the Function gamma_q(a,z)

+

Table 19. Errors In the Function gamma_q(a,z)

@@ -558,7 +558,7 @@

-

Table 20. Errors In the Function tgamma_lower(a,z)

+

Table 20. Errors In the Function tgamma_lower(a,z)

@@ -693,7 +693,7 @@

-

Table 21. Errors In the Function tgamma(a,z)

+

Table 21. Errors In the Function tgamma(a,z)

@@ -828,7 +828,7 @@

- + Testing

@@ -844,7 +844,7 @@ fraction (see below) is unstable for small a and z.

- + Implementation

@@ -1013,7 +1013,7 @@ by Temme (see references below).

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html index c7e46f230..5aa48d5ae 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html @@ -28,7 +28,7 @@ Gamma Function Inverses
- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -173,7 +173,7 @@ 0.

- + Accuracy

@@ -187,7 +187,7 @@ functions.

- + Testing

@@ -210,7 +210,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html index 1c2fc6e0e..ce56f1a00 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html @@ -27,7 +27,7 @@ Log Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description

@@ -98,7 +98,7 @@ T otherwise.

- + Accuracy

@@ -349,7 +349,7 @@

- + Testing

@@ -360,7 +360,7 @@ Random tests in key problem areas are also used.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html index 4d696f31f..b1d8448e5 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html @@ -27,7 +27,7 @@ Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
template <class T>
@@ -129,7 +129,7 @@
 

- + Accuracy

@@ -384,7 +384,7 @@

- + Testing

@@ -399,7 +399,7 @@ a lanczos approximation accurate to around 100 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html index 62b52c403..214cc78bc 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html @@ -27,7 +27,7 @@ Hermite Polynomials

- + Synopsis

@@ -51,7 +51,7 @@ }} // namespaces

- + Description

@@ -136,7 +136,7 @@

- + Accuracy

@@ -146,7 +146,7 @@ zero error.

-

Table 34. Peak Errors In the Hermite Polynomial

+

Table 34. Peak Errors In the Hermite Polynomial

@@ -253,7 +253,7 @@ is very close to a root.

- + Testing

@@ -263,7 +263,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html index e2124deaa..6b77c59dc 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -62,7 +62,7 @@ }} // namespaces

- + Description

@@ -210,7 +210,7 @@

- + Accuracy

@@ -220,7 +220,7 @@ zero error.

-

Table 32. Peak Errors In the Laguerre Polynomial

+

Table 32. Peak Errors In the Laguerre Polynomial

@@ -320,7 +320,7 @@

-

Table 33. Peak Errors In the Associated Laguerre +

Table 33. Peak Errors In the Associated Laguerre Polynomial

@@ -429,7 +429,7 @@ is very close to a root.

- + Testing

@@ -439,7 +439,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html index 87dc8b9be..e8cae63aa 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -84,7 +84,7 @@

- + Description
template <class T>
@@ -292,7 +292,7 @@
 
 
 
- + Accuracy

@@ -302,7 +302,7 @@ zero error.

-

Table 29. Peak Errors In the Legendre P Function

+

Table 29. Peak Errors In the Legendre P Function

@@ -431,7 +431,7 @@

-

Table 30. Peak Errors In the Associated Legendre +

Table 30. Peak Errors In the Associated Legendre P Function

@@ -533,7 +533,7 @@

-

Table 31. Peak Errors In the Legendre Q Function

+

Table 31. Peak Errors In the Legendre Q Function

@@ -675,7 +675,7 @@ given here.

- + Testing

@@ -685,7 +685,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html index dfa6877f1..786c22763 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html @@ -27,7 +27,7 @@ Spherical Harmonics

- + Synopsis

@@ -60,7 +60,7 @@ }} // namespaces

- + Description

@@ -155,7 +155,7 @@

- + Accuracy

@@ -170,7 +170,7 @@ All values are in units of epsilon.

-

Table 35. Peak Errors In the Sperical Harmonic Functions

+

Table 35. Peak Errors In the Sperical Harmonic Functions

@@ -276,7 +276,7 @@ arbitrarily large when the function is very close to a root.

- + Testing

@@ -286,7 +286,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html index 2c1fbf816..af4e6e3fa 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html +++ b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html @@ -27,7 +27,7 @@ Riemann Zeta Function

- + Synopsis

@@ -62,7 +62,7 @@

- + Description
template <class T>
@@ -85,7 +85,7 @@
           
         

- + Accuracy

@@ -97,7 +97,7 @@ shown will have effectively zero error.

-

Table 44. Errors In the Function zeta(z)

+

Table 44. Errors In the Function zeta(z)

@@ -234,7 +234,7 @@

- + Testing

@@ -249,7 +249,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/status/compilers.html b/doc/sf_and_dist/html/math_toolkit/status/compilers.html index c351a222c..5eaf376d1 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/compilers.html +++ b/doc/sf_and_dist/html/math_toolkit/status/compilers.html @@ -37,7 +37,7 @@

-

Table 55. Supported/Tested Compilers

+

Table 55. Supported/Tested Compilers

@@ -540,7 +540,7 @@


-

Table 56. Unsupported Compilers

+

Table 56. Unsupported Compilers

diff --git a/doc/sf_and_dist/html/math_toolkit/status/history1.html b/doc/sf_and_dist/html/math_toolkit/status/history1.html index 8948c10b6..71ce2e9f4 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/status/history1.html @@ -30,7 +30,7 @@

- + Boost-1.36.0

@@ -68,7 +68,7 @@

- + Boost-1.35.0: Post Review First Official Release
@@ -105,7 +105,7 @@

- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -124,7 +124,7 @@

- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -157,7 +157,7 @@

- + Milestone 2: Released September 10th 2006
@@ -198,7 +198,7 @@

- + Milestone 1: Released March 31st 2006
diff --git a/doc/sf_and_dist/html/math_toolkit/status/issues.html b/doc/sf_and_dist/html/math_toolkit/status/issues.html index b01790d38..553f9a118 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/issues.html +++ b/doc/sf_and_dist/html/math_toolkit/status/issues.html @@ -43,7 +43,7 @@ with it.

- + tgamma
  • @@ -51,7 +51,7 @@ be optimized any further? (low priority)
- + Incomplete Beta
  • @@ -59,7 +59,7 @@ (medium priority).
- + Inverse Gamma
  • @@ -67,7 +67,7 @@ is good enough (Medium Priority).
- + Polynomials
  • @@ -77,7 +77,7 @@ not (Low Priority).
- + Elliptic Integrals
    @@ -127,7 +127,7 @@
- + Inverse Hyperbolic Functions
@@ -137,7 +137,7 @@ is probably only an issue for very high precision types (Low Priority).
- + Statistical distributions
@@ -146,7 +146,7 @@ for very large degrees of freedom?
- + Feature Requests

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit.html b/doc/sf_and_dist/html/math_toolkit/toolkit.html index 16919e738..322a11481 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit.html @@ -30,6 +30,8 @@

Overview
Reused Utilities
+
Numeric + Constants
Series Evaluation
Continued Fraction diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1.html index 01881516f..1327c8f50 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1.html @@ -7,7 +7,7 @@ - +
@@ -20,13 +20,15 @@

-PrevUpHomeNext +PrevUpHomeNext
+
Numeric + Constants
Series Evaluation
Continued Fraction @@ -52,7 +54,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html index 4d86dbf09..55d49d5d2 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html @@ -28,7 +28,7 @@ Evaluation
- + Synopsis

@@ -59,7 +59,7 @@ }}} // namespaces

- + Description

@@ -157,7 +157,7 @@ a continued fraction for convergence.

- + Implementation

@@ -167,7 +167,7 @@ Lentz, W.J. 1976, Applied Optics, vol. 15, pp. 668-671.

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html index b8520919c..6ee07143c 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html @@ -28,7 +28,7 @@ Minima

- + synopsis

@@ -45,7 +45,7 @@ std::pair<T, T> brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter);

- + Description

@@ -88,7 +88,7 @@ the abscissa at the minima and the value of f(x) at the minima.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html index d862f2b37..8615a9355 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html @@ -28,7 +28,7 @@ and Rational Function Evaluation

- + synopsis

@@ -79,7 +79,7 @@ V evaluate_rational(const T* num, const U* denom, V z, unsigned count);

- + Description

@@ -193,7 +193,7 @@ evaluation with compile-time array sizes may offer slightly better performance.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html index 3e3cd8d49..22c08d5d0 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html @@ -28,7 +28,7 @@ With Derivatives

- + Synopsis

@@ -61,7 +61,7 @@ }}} // namespaces

- + Description

@@ -176,7 +176,7 @@

- + Newton Raphson Method
@@ -196,7 +196,7 @@

- + Halley's Method
@@ -220,7 +220,7 @@

- + Schroeder's Method
@@ -244,7 +244,7 @@ iteration.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html index 8f95f0cd8..a4ca7f9c7 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html @@ -28,7 +28,7 @@ Without Derivatives

- + Synopsis

@@ -141,7 +141,7 @@ }}} // namespaces

- + Description

@@ -559,7 +559,7 @@ as soon as both ends of the interval round to the same nearest integer.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html index fb4ab084d..f496dded3 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@


-PrevUpHomeNext +PrevUpHomeNext

@@ -28,7 +28,7 @@ Series Evaluation

- + Synopsis

@@ -61,7 +61,7 @@ }}} // namespaces

- + Description

@@ -117,7 +117,7 @@ summation in this way.

- + Example

@@ -184,7 +184,7 @@


-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html index 9652e1212..25d884939 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html @@ -28,7 +28,7 @@ Error and Testing
- + Synopsis

@@ -45,7 +45,7 @@ test_result<see-below> test(const A& a, F1 test_func, F2 expect_func);

- + Description
template <class T>
@@ -165,7 +165,7 @@
           is mainly a debugging/development aid (and a good place for a breakpoint).
         

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html index f683064c7..ccf6664a6 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html @@ -27,7 +27,7 @@ Polynomials

- + Synopsis

@@ -103,7 +103,7 @@ }}} // namespaces

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html index 0a5cb5935..cd75caa69 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html @@ -46,7 +46,7 @@

- + Synopsis
namespace boost{ namespace math{ namespace tools{
@@ -147,7 +147,7 @@
 }}} // namespaces
 
- + Description

@@ -177,7 +177,7 @@

- + Example 1: Output Data for Graph Plotting
@@ -211,7 +211,7 @@

- + Example 2: Creating Test Data
@@ -375,7 +375,7 @@ used by default as it's rather hard on the compiler when the table is large.

- + Example 3: Profiling a Continued Fraction for Convergence and Accuracy
@@ -481,7 +481,7 @@ of a and z.

- + reference

diff --git a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html index f48f91da1..4dd44718e 100644 --- a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html +++ b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html @@ -42,7 +42,7 @@ behaves just like a built in floating point type.

- + Basic Arithmetic Requirements
@@ -1034,7 +1034,7 @@
- + Standard Library Support Requirements
diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 9b688b814..070bf0625 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -421,6 +421,7 @@ printer friendly PDF format]. [include internals_overview.qbk] [section:internals1 Reused Utilities] +[include constants.qbk] [include series.qbk] [include fraction.qbk] [include rational.qbk] diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index 235f0c981..a79b05fa0 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -37,7 +37,11 @@ inline T get_smallest_value(mpl::false_ const&) template inline T get_smallest_value() { +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1310) + return get_smallest_value(mpl::bool_::is_specialized && (std::numeric_limits::has_denorm == 1)>()); +#else return get_smallest_value(mpl::bool_::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)>()); +#endif } } From 4af37bcb6c7a57bf11db8ebc88a2c2af2c2f405c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 21 Jul 2008 12:40:03 +0000 Subject: [PATCH 019/192] Disable definitions of function bodies for functions that are already compiler intrinsics. [SVN r47656] --- src/tr1/copysign.cpp | 4 ++++ src/tr1/copysignf.cpp | 4 ++++ src/tr1/fmaxf.cpp | 4 ++++ src/tr1/fminf.cpp | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/tr1/copysign.cpp b/src/tr1/copysign.cpp index 67b31422c..214dc381e 100644 --- a/src/tr1/copysign.cpp +++ b/src/tr1/copysign.cpp @@ -8,7 +8,11 @@ #include #include "c_policy.hpp" +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + extern "C" double BOOST_MATH_TR1_DECL copysign(double x, double y) { return boost::math::copysign(x, y); } + +#endif diff --git a/src/tr1/copysignf.cpp b/src/tr1/copysignf.cpp index 5ddd28970..e9c70ebda 100644 --- a/src/tr1/copysignf.cpp +++ b/src/tr1/copysignf.cpp @@ -8,7 +8,11 @@ #include #include "c_policy.hpp" +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + extern "C" float BOOST_MATH_TR1_DECL copysignf(float x, float y) { return boost::math::copysign(x, y); } + +#endif diff --git a/src/tr1/fmaxf.cpp b/src/tr1/fmaxf.cpp index ca10295c4..4adfc176a 100644 --- a/src/tr1/fmaxf.cpp +++ b/src/tr1/fmaxf.cpp @@ -8,6 +8,8 @@ #include #include "c_policy.hpp" +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y) { if((boost::math::isnan)(x)) @@ -16,3 +18,5 @@ extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y) return x; return (std::max)(x, y); } + +#endif diff --git a/src/tr1/fminf.cpp b/src/tr1/fminf.cpp index 3de836061..ffe009f6d 100644 --- a/src/tr1/fminf.cpp +++ b/src/tr1/fminf.cpp @@ -8,6 +8,8 @@ #include #include "c_policy.hpp" +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y) { if((boost::math::isnan)(x)) @@ -16,3 +18,5 @@ extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y) return x; return (std::min)(x, y); } + +#endif From 0b5078c52e80b20aeb70d97c852a0aaf240ac725 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 23 Jul 2008 12:44:23 +0000 Subject: [PATCH 020/192] strengthen tests to include isnormal/isfinite/isnan etc. [SVN r47706] --- test/test_classify.cpp | 90 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/test/test_classify.cpp b/test/test_classify.cpp index 66394fcb3..5b661266b 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -23,6 +23,14 @@ void test_classify(T t, const char* type) T u = 2; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), true); if(std::numeric_limits::is_specialized) { t = (std::numeric_limits::max)(); @@ -31,6 +39,14 @@ void test_classify(T t, const char* type) t = (std::numeric_limits::min)(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), true); } if(std::numeric_limits::has_denorm) { @@ -39,12 +55,28 @@ void test_classify(T t, const char* type) { BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_SUBNORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } t = std::numeric_limits::denorm_min(); if((t != 0) && (t < (std::numeric_limits::min)())) { BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_SUBNORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } } else @@ -54,10 +86,26 @@ void test_classify(T t, const char* type) t = 0; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_ZERO); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_ZERO); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); t /= -u; // create minus zero if it exists BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_ZERO); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_ZERO); - // inifinity: + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); + // infinity: if(std::numeric_limits::has_infinity) { // At least one std::numeric_limits::infinity)() returns zero @@ -65,6 +113,14 @@ void test_classify(T t, const char* type) t = (std::numeric_limits::infinity)(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); #if !defined(__BORLANDC__) && !(defined(__DECCXX) && !defined(_IEEE_FP)) // divide by zero on Borland triggers a C++ exception :-( // divide by zero on Compaq CXX triggers a C style signal :-( @@ -73,10 +129,26 @@ void test_classify(T t, const char* type) t /= u; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); t = -2; t /= u; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); #else std::cout << "Infinities from divide by zero not tested" << std::endl; #endif @@ -94,6 +166,14 @@ void test_classify(T t, const char* type) t = std::numeric_limits::quiet_NaN(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NAN); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NAN); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } else { @@ -104,6 +184,14 @@ void test_classify(T t, const char* type) t = std::numeric_limits::signaling_NaN(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NAN); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NAN); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } else { From f451e1d7e4c653f250bbd7049fc5d20331b4a18b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 24 Jul 2008 09:55:07 +0000 Subject: [PATCH 021/192] Add dependency tracking info. [SVN r47745] --- include/boost/math/tools/rational.hpp | 122 ++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index 59cb5b7e0..b49d5c815 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -40,6 +40,128 @@ # include BOOST_HEADER() # undef BOOST_HEADER #endif + +#if 0 +// +// This just allows dependency trackers to find the headers +// used in the above PP-magic. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + namespace boost{ namespace math{ namespace tools{ // From 952a07b6f8a8a6c3919d297b45383c8a67563861 Mon Sep 17 00:00:00 2001 From: Daryle Walker Date: Sun, 27 Jul 2008 23:43:04 +0000 Subject: [PATCH 022/192] Tweaked files to pass inspection report; one file had some min/max violations; but all had to have 'boostinspect:nolicense' set because a copyrighter, Paul Moore, has disappeared, so his files can never be changed to the main Boost license [SVN r47847] --- include/boost/math/common_factor_rt.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/math/common_factor_rt.hpp b/include/boost/math/common_factor_rt.hpp index e7b250016..f45f3a029 100644 --- a/include/boost/math/common_factor_rt.hpp +++ b/include/boost/math/common_factor_rt.hpp @@ -6,6 +6,10 @@ // without express or implied warranty, and with no claim as to its suitability // for any purpose. +// boostinspect:nolicense (don't complain about the lack of a Boost license) +// (Paul Moore hasn't been in contact for years, so there's no way to change the +// license.) + // See http://www.boost.org for updates, documentation, and revision history. #ifndef BOOST_MATH_COMMON_FACTOR_RT_HPP From 7d56e18fedb0bd29acf56331098450ca4281d3eb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 1 Aug 2008 14:53:00 +0000 Subject: [PATCH 023/192] Prevent macro expansion of TR1 functions. [SVN r47931] --- include/boost/math/tr1.hpp | 954 ++++++++++++++++++------------------ src/tr1/acosh.cpp | 6 +- src/tr1/acoshf.cpp | 6 +- src/tr1/acoshl.cpp | 6 +- src/tr1/asinh.cpp | 6 +- src/tr1/asinhf.cpp | 6 +- src/tr1/asinhl.cpp | 6 +- src/tr1/assoc_laguerre.cpp | 6 +- src/tr1/assoc_laguerref.cpp | 6 +- src/tr1/assoc_laguerrel.cpp | 6 +- src/tr1/assoc_legendre.cpp | 6 +- src/tr1/assoc_legendref.cpp | 6 +- src/tr1/assoc_legendrel.cpp | 4 +- src/tr1/atanh.cpp | 6 +- src/tr1/atanhf.cpp | 6 +- src/tr1/atanhl.cpp | 6 +- src/tr1/beta.cpp | 6 +- src/tr1/betaf.cpp | 6 +- src/tr1/betal.cpp | 6 +- src/tr1/c_policy.hpp | 2 +- src/tr1/cbrt.cpp | 6 +- src/tr1/cbrtf.cpp | 6 +- src/tr1/cbrtl.cpp | 6 +- src/tr1/comp_ellint_1.cpp | 6 +- src/tr1/comp_ellint_1f.cpp | 6 +- src/tr1/comp_ellint_1l.cpp | 6 +- src/tr1/comp_ellint_2.cpp | 6 +- src/tr1/comp_ellint_2f.cpp | 6 +- src/tr1/comp_ellint_2l.cpp | 6 +- src/tr1/comp_ellint_3.cpp | 6 +- src/tr1/comp_ellint_3f.cpp | 6 +- src/tr1/comp_ellint_3l.cpp | 6 +- src/tr1/copysign.cpp | 6 +- src/tr1/copysignf.cpp | 6 +- src/tr1/copysignl.cpp | 6 +- src/tr1/cyl_bessel_i.cpp | 6 +- src/tr1/cyl_bessel_if.cpp | 6 +- src/tr1/cyl_bessel_il.cpp | 6 +- src/tr1/cyl_bessel_j.cpp | 6 +- src/tr1/cyl_bessel_jf.cpp | 6 +- src/tr1/cyl_bessel_jl.cpp | 6 +- src/tr1/cyl_bessel_k.cpp | 6 +- src/tr1/cyl_bessel_kf.cpp | 6 +- src/tr1/cyl_bessel_kl.cpp | 6 +- src/tr1/cyl_neumann.cpp | 6 +- src/tr1/cyl_neumannf.cpp | 6 +- src/tr1/cyl_neumannl.cpp | 6 +- src/tr1/ellint_1.cpp | 6 +- src/tr1/ellint_1f.cpp | 6 +- src/tr1/ellint_1l.cpp | 6 +- src/tr1/ellint_2.cpp | 6 +- src/tr1/ellint_2f.cpp | 6 +- src/tr1/ellint_2l.cpp | 6 +- src/tr1/ellint_3.cpp | 6 +- src/tr1/ellint_3f.cpp | 6 +- src/tr1/ellint_3l.cpp | 6 +- src/tr1/erf.cpp | 6 +- src/tr1/erfc.cpp | 6 +- src/tr1/erfcf.cpp | 6 +- src/tr1/erfcl.cpp | 6 +- src/tr1/erff.cpp | 6 +- src/tr1/erfl.cpp | 6 +- src/tr1/expint.cpp | 6 +- src/tr1/expintf.cpp | 6 +- src/tr1/expintl.cpp | 6 +- src/tr1/expm1.cpp | 6 +- src/tr1/expm1f.cpp | 6 +- src/tr1/expm1l.cpp | 6 +- src/tr1/fmax.cpp | 6 +- src/tr1/fmaxf.cpp | 4 +- src/tr1/fmaxl.cpp | 4 +- src/tr1/fmin.cpp | 4 +- src/tr1/fminf.cpp | 4 +- src/tr1/fminl.cpp | 4 +- src/tr1/fpclassify.cpp | 16 +- src/tr1/fpclassifyf.cpp | 16 +- src/tr1/fpclassifyl.cpp | 16 +- src/tr1/hermite.cpp | 6 +- src/tr1/hermitef.cpp | 6 +- src/tr1/hermitel.cpp | 6 +- src/tr1/hypot.cpp | 6 +- src/tr1/hypotf.cpp | 6 +- src/tr1/hypotl.cpp | 6 +- src/tr1/laguerre.cpp | 6 +- src/tr1/laguerref.cpp | 6 +- src/tr1/laguerrel.cpp | 6 +- src/tr1/legendre.cpp | 6 +- src/tr1/legendref.cpp | 6 +- src/tr1/legendrel.cpp | 6 +- src/tr1/lgamma.cpp | 6 +- src/tr1/lgammaf.cpp | 6 +- src/tr1/lgammal.cpp | 6 +- src/tr1/llround.cpp | 6 +- src/tr1/llroundf.cpp | 6 +- src/tr1/llroundl.cpp | 6 +- src/tr1/log1p.cpp | 6 +- src/tr1/log1pf.cpp | 6 +- src/tr1/log1pl.cpp | 6 +- src/tr1/lround.cpp | 6 +- src/tr1/lroundf.cpp | 6 +- src/tr1/lroundl.cpp | 6 +- src/tr1/nextafter.cpp | 6 +- src/tr1/nextafterf.cpp | 6 +- src/tr1/nextafterl.cpp | 6 +- src/tr1/nexttoward.cpp | 6 +- src/tr1/nexttowardf.cpp | 6 +- src/tr1/nexttowardl.cpp | 6 +- src/tr1/riemann_zeta.cpp | 6 +- src/tr1/riemann_zetaf.cpp | 6 +- src/tr1/riemann_zetal.cpp | 6 +- src/tr1/round.cpp | 6 +- src/tr1/roundf.cpp | 6 +- src/tr1/roundl.cpp | 6 +- src/tr1/sph_bessel.cpp | 6 +- src/tr1/sph_besself.cpp | 6 +- src/tr1/sph_bessell.cpp | 6 +- src/tr1/sph_legendre.cpp | 6 +- src/tr1/sph_legendref.cpp | 6 +- src/tr1/sph_legendrel.cpp | 6 +- src/tr1/sph_neumann.cpp | 6 +- src/tr1/sph_neumannf.cpp | 6 +- src/tr1/sph_neumannl.cpp | 6 +- src/tr1/tgamma.cpp | 6 +- src/tr1/tgammaf.cpp | 6 +- src/tr1/tgammal.cpp | 6 +- src/tr1/trunc.cpp | 6 +- src/tr1/truncf.cpp | 6 +- src/tr1/truncl.cpp | 6 +- 128 files changed, 862 insertions(+), 868 deletions(-) diff --git a/include/boost/math/tr1.hpp b/include/boost/math/tr1.hpp index a3e4028eb..66f753235 100644 --- a/include/boost/math/tr1.hpp +++ b/include/boost/math/tr1.hpp @@ -109,259 +109,259 @@ typedef long double double_t; #endif // C99 Functions: -double BOOST_MATH_TR1_DECL acosh(double x); -float BOOST_MATH_TR1_DECL acoshf(float x); -long double BOOST_MATH_TR1_DECL acoshl(long double x); +double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL asinh(double x); -float BOOST_MATH_TR1_DECL asinhf(float x); -long double BOOST_MATH_TR1_DECL asinhl(long double x); +double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL atanh(double x); -float BOOST_MATH_TR1_DECL atanhf(float x); -long double BOOST_MATH_TR1_DECL atanhl(long double x); +double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL cbrt(double x); -float BOOST_MATH_TR1_DECL cbrtf(float x); -long double BOOST_MATH_TR1_DECL cbrtl(long double x); +double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL copysign(double x, double y); -float BOOST_MATH_TR1_DECL copysignf(float x, float y); -long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y); +double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL erf(double x); -float BOOST_MATH_TR1_DECL erff(float x); -long double BOOST_MATH_TR1_DECL erfl(long double x); +double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL erfc(double x); -float BOOST_MATH_TR1_DECL erfcf(float x); -long double BOOST_MATH_TR1_DECL erfcl(long double x); +double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL exp2(double x); -float BOOST_MATH_TR1_DECL exp2f(float x); -long double BOOST_MATH_TR1_DECL exp2l(long double x); +double BOOST_MATH_TR1_DECL exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL boost_expm1(double x); -float BOOST_MATH_TR1_DECL boost_expm1f(float x); -long double BOOST_MATH_TR1_DECL boost_expm1l(long double x); +double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL fdim(double x, double y); -float BOOST_MATH_TR1_DECL fdimf(float x, float y); -long double BOOST_MATH_TR1_DECL fdiml(long double x, long double y); -double BOOST_MATH_TR1_DECL fma(double x, double y, double z); -float BOOST_MATH_TR1_DECL fmaf(float x, float y, float z); -long double BOOST_MATH_TR1_DECL fmal(long double x, long double y, long double z); +double BOOST_MATH_TR1_DECL fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double BOOST_MATH_TR1_DECL fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z); +float BOOST_MATH_TR1_DECL fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z); +long double BOOST_MATH_TR1_DECL fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z); #endif -double BOOST_MATH_TR1_DECL fmax(double x, double y); -float BOOST_MATH_TR1_DECL fmaxf(float x, float y); -long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y); +double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL fmin(double x, double y); -float BOOST_MATH_TR1_DECL fminf(float x, float y); -long double BOOST_MATH_TR1_DECL fminl(long double x, long double y); +double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL hypot(double x, double y); -float BOOST_MATH_TR1_DECL hypotf(float x, float y); -long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y); +double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); #if 0 -int BOOST_MATH_TR1_DECL ilogb(double x); -int BOOST_MATH_TR1_DECL ilogbf(float x); -int BOOST_MATH_TR1_DECL ilogbl(long double x); +int BOOST_MATH_TR1_DECL ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +int BOOST_MATH_TR1_DECL ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +int BOOST_MATH_TR1_DECL ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL lgamma(double x); -float BOOST_MATH_TR1_DECL lgammaf(float x); -long double BOOST_MATH_TR1_DECL lgammal(long double x); +double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -long long BOOST_MATH_TR1_DECL llrint(double x); -long long BOOST_MATH_TR1_DECL llrintf(float x); -long long BOOST_MATH_TR1_DECL llrintl(long double x); +long long BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -long long BOOST_MATH_TR1_DECL llround(double x); -long long BOOST_MATH_TR1_DECL llroundf(float x); -long long BOOST_MATH_TR1_DECL llroundl(long double x); +long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL boost_log1p(double x); -float BOOST_MATH_TR1_DECL boost_log1pf(float x); -long double BOOST_MATH_TR1_DECL boost_log1pl(long double x); +double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL log2(double x); -float BOOST_MATH_TR1_DECL log2f(float x); -long double BOOST_MATH_TR1_DECL log2l(long double x); +double BOOST_MATH_TR1_DECL log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL logb(double x); -float BOOST_MATH_TR1_DECL logbf(float x); -long double BOOST_MATH_TR1_DECL logbl(long double x); -long BOOST_MATH_TR1_DECL lrint(double x); -long BOOST_MATH_TR1_DECL lrintf(float x); -long BOOST_MATH_TR1_DECL lrintl(long double x); +double BOOST_MATH_TR1_DECL logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); +long BOOST_MATH_TR1_DECL lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long BOOST_MATH_TR1_DECL lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long BOOST_MATH_TR1_DECL lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -long BOOST_MATH_TR1_DECL lround(double x); -long BOOST_MATH_TR1_DECL lroundf(float x); -long BOOST_MATH_TR1_DECL lroundl(long double x); +long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL nan(const char *str); -float BOOST_MATH_TR1_DECL nanf(const char *str); -long double BOOST_MATH_TR1_DECL nanl(const char *str); -double BOOST_MATH_TR1_DECL nearbyint(double x); -float BOOST_MATH_TR1_DECL nearbyintf(float x); -long double BOOST_MATH_TR1_DECL nearbyintl(long double x); +double BOOST_MATH_TR1_DECL nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +float BOOST_MATH_TR1_DECL nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +long double BOOST_MATH_TR1_DECL nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +double BOOST_MATH_TR1_DECL nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y); -float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y); -long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y); +double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL nexttoward(double x, long double y); -float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y); -long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y); +double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y); +float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y); +long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); #if 0 -double BOOST_MATH_TR1_DECL remainder(double x, double y); -float BOOST_MATH_TR1_DECL remainderf(float x, float y); -long double BOOST_MATH_TR1_DECL remainderl(long double x, long double y); -double BOOST_MATH_TR1_DECL remquo(double x, double y, int *pquo); -float BOOST_MATH_TR1_DECL remquof(float x, float y, int *pquo); -long double BOOST_MATH_TR1_DECL remquol(long double x, long double y, int *pquo); -double BOOST_MATH_TR1_DECL rint(double x); -float BOOST_MATH_TR1_DECL rintf(float x); -long double BOOST_MATH_TR1_DECL rintl(long double x); +double BOOST_MATH_TR1_DECL remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double BOOST_MATH_TR1_DECL remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo); +float BOOST_MATH_TR1_DECL remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo); +long double BOOST_MATH_TR1_DECL remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo); +double BOOST_MATH_TR1_DECL rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL round(double x); -float BOOST_MATH_TR1_DECL roundf(float x); -long double BOOST_MATH_TR1_DECL roundl(long double x); +double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL scalbln(double x, long ex); -float BOOST_MATH_TR1_DECL scalblnf(float x, long ex); -long double BOOST_MATH_TR1_DECL scalblnl(long double x, long ex); -double BOOST_MATH_TR1_DECL scalbn(double x, int ex); -float BOOST_MATH_TR1_DECL scalbnf(float x, int ex); -long double BOOST_MATH_TR1_DECL scalbnl(long double x, int ex); +double BOOST_MATH_TR1_DECL scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex); +float BOOST_MATH_TR1_DECL scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex); +long double BOOST_MATH_TR1_DECL scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex); +double BOOST_MATH_TR1_DECL scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex); +float BOOST_MATH_TR1_DECL scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex); +long double BOOST_MATH_TR1_DECL scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex); #endif -double BOOST_MATH_TR1_DECL tgamma(double x); -float BOOST_MATH_TR1_DECL tgammaf(float x); -long double BOOST_MATH_TR1_DECL tgammal(long double x); +double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL trunc(double x); -float BOOST_MATH_TR1_DECL truncf(float x); -long double BOOST_MATH_TR1_DECL truncl(long double x); +double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); // [5.2.1.1] associated Laguerre polynomials: -double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x); -float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x); -long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x); +double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x); +float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x); +long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x); // [5.2.1.2] associated Legendre functions: -double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x); -float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x); -long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x); +double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x); +float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x); +long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x); // [5.2.1.3] beta function: -double BOOST_MATH_TR1_DECL beta(double x, double y); -float BOOST_MATH_TR1_DECL betaf(float x, float y); -long double BOOST_MATH_TR1_DECL betal(long double x, long double y); +double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); // [5.2.1.4] (complete) elliptic integral of the first kind: -double BOOST_MATH_TR1_DECL comp_ellint_1(double k); -float BOOST_MATH_TR1_DECL comp_ellint_1f(float k); -long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double k); +double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k); +float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k); +long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k); // [5.2.1.5] (complete) elliptic integral of the second kind: -double BOOST_MATH_TR1_DECL comp_ellint_2(double k); -float BOOST_MATH_TR1_DECL comp_ellint_2f(float k); -long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double k); +double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k); +float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k); +long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k); // [5.2.1.6] (complete) elliptic integral of the third kind: -double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu); -float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu); -long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu); +double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu); +float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu); +long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu); #if 0 // [5.2.1.7] confluent hypergeometric functions: -double BOOST_MATH_TR1_DECL conf_hyperg(double a, double c, double x); -float BOOST_MATH_TR1_DECL conf_hypergf(float a, float c, float x); -long double BOOST_MATH_TR1_DECL conf_hypergl(long double a, long double c, long double x); +double BOOST_MATH_TR1_DECL conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x); +float BOOST_MATH_TR1_DECL conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x); +long double BOOST_MATH_TR1_DECL conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x); #endif // [5.2.1.8] regular modified cylindrical Bessel functions: -double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.9] cylindrical Bessel functions (of the first kind): -double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.10] irregular modified cylindrical Bessel functions: -double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.11] cylindrical Neumann functions; // cylindrical Bessel functions (of the second kind): -double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.12] (incomplete) elliptic integral of the first kind: -double BOOST_MATH_TR1_DECL ellint_1(double k, double phi); -float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi); -long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi); +double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi); +float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi); +long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi); // [5.2.1.13] (incomplete) elliptic integral of the second kind: -double BOOST_MATH_TR1_DECL ellint_2(double k, double phi); -float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi); -long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi); +double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi); +float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi); +long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi); // [5.2.1.14] (incomplete) elliptic integral of the third kind: -double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi); -float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi); -long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi); +double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi); +float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi); +long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi); // [5.2.1.15] exponential integral: -double BOOST_MATH_TR1_DECL expint(double x); -float BOOST_MATH_TR1_DECL expintf(float x); -long double BOOST_MATH_TR1_DECL expintl(long double x); +double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); // [5.2.1.16] Hermite polynomials: -double BOOST_MATH_TR1_DECL hermite(unsigned n, double x); -float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x); -long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x); +double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); #if 0 // [5.2.1.17] hypergeometric functions: -double BOOST_MATH_TR1_DECL hyperg(double a, double b, double c, double x); -float BOOST_MATH_TR1_DECL hypergf(float a, float b, float c, float x); -long double BOOST_MATH_TR1_DECL hypergl(long double a, long double b, long double c, +double BOOST_MATH_TR1_DECL hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x); +float BOOST_MATH_TR1_DECL hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x); +long double BOOST_MATH_TR1_DECL hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c, long double x); #endif // [5.2.1.18] Laguerre polynomials: -double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x); -float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x); -long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x); +double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); // [5.2.1.19] Legendre polynomials: -double BOOST_MATH_TR1_DECL legendre(unsigned l, double x); -float BOOST_MATH_TR1_DECL legendref(unsigned l, float x); -long double BOOST_MATH_TR1_DECL legendrel(unsigned l, long double x); +double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, double x); +float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x); +long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x); // [5.2.1.20] Riemann zeta function: -double BOOST_MATH_TR1_DECL riemann_zeta(double); -float BOOST_MATH_TR1_DECL riemann_zetaf(float); -long double BOOST_MATH_TR1_DECL riemann_zetal(long double); +double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double); +float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float); +long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double); // [5.2.1.21] spherical Bessel functions (of the first kind): -double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x); -float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x); -long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x); +double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); // [5.2.1.22] spherical associated Legendre functions: -double BOOST_MATH_TR1_DECL sph_legendre(unsigned l, unsigned m, double theta); -float BOOST_MATH_TR1_DECL sph_legendref(unsigned l, unsigned m, float theta); -long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned l, unsigned m, long double theta); +double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double theta); +float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta); +long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta); // [5.2.1.23] spherical Neumann functions; // spherical Bessel functions (of the second kind): -double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x); -float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x); -long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x); +double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); #ifdef __cplusplus @@ -375,233 +375,233 @@ namespace boost{ namespace math{ namespace tr1{ // C interfaces: // // C99 Functions: -inline float acosh(float x) -{ return boost::math::tr1::acoshf(x); } -inline long double acosh(long double x) -{ return boost::math::tr1::acoshl(x); } +inline float acosh BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double acosh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type acosh(T x) -{ return boost::math::tr1::acosh(static_cast::type>(x)); } +inline typename tools::promote_args::type acosh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float asinh(float x){ return boost::math::tr1::asinhf(x); } -inline long double asinh(long double x){ return boost::math::tr1::asinhl(x); } +inline float asinh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double asinh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type asinh(T x) -{ return boost::math::tr1::asinh(static_cast::type>(x)); } +inline typename tools::promote_args::type asinh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float atanh(float x){ return boost::math::tr1::atanhf(x); } -inline long double atanh(long double x){ return boost::math::tr1::atanhl(x); } +inline float atanh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double atanh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::atanhl(x); } template -inline typename tools::promote_args::type atanh(T x) -{ return boost::math::tr1::atanh(static_cast::type>(x)); } +inline typename tools::promote_args::type atanh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float cbrt(float x) -{ return boost::math::tr1::cbrtf(x); } -inline long double cbrt(long double x) -{ return boost::math::tr1::cbrtl(x); } +inline float cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type cbrt(T x) -{ return boost::math::tr1::cbrt(static_cast::type>(x)); } +inline typename tools::promote_args::type cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float copysign(float x, float y) -{ return boost::math::tr1::copysignf(x, y); } -inline long double copysign(long double x, long double y) -{ return boost::math::tr1::copysignl(x, y); } +inline float copysign BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double copysign BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type copysign(T1 x, T2 y) -{ return boost::math::tr1::copysign(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type copysign BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float erf(float x) -{ return boost::math::tr1::erff(x); } -inline long double erf(long double x) -{ return boost::math::tr1::erfl(x); } +inline float erf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::erff BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double erf BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::erfl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type erf(T x) -{ return boost::math::tr1::erf(static_cast::type>(x)); } +inline typename tools::promote_args::type erf BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::erf BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float erfc(float x) -{ return boost::math::tr1::erfcf(x); } -inline long double erfc(long double x) -{ return boost::math::tr1::erfcl(x); } +inline float erfc BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double erfc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type erfc(T x) -{ return boost::math::tr1::erfc(static_cast::type>(x)); } +inline typename tools::promote_args::type erfc BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double exp2(double x); -float exp2f(float x); -long double exp2l(long double x); +double exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float expm1f(float x) -{ return boost::math::tr1::boost_expm1f(x); } -inline double expm1(double x) -{ return boost::math::tr1::boost_expm1(x); } -inline long double expm1l(long double x) -{ return boost::math::tr1::boost_expm1l(x); } -inline float expm1(float x) -{ return boost::math::tr1::expm1f(x); } -inline long double expm1(long double x) -{ return boost::math::tr1::expm1l(x); } +inline float expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) +{ return boost::math::tr1::boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline float expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type expm1(T x) -{ return boost::math::tr1::expm1(static_cast::type>(x)); } +inline typename tools::promote_args::type expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double fdim(double x, double y); -float fdimf(float x, float y); -long double fdiml(long double x, long double y); -double fma(double x, double y, double z); -float fmaf(float x, float y, float z); -long double fmal(long double x, long double y, long double z); +double fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z); +float fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z); +long double fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z); #endif -inline float fmax(float x, float y) -{ return boost::math::tr1::fmaxf(x, y); } -inline long double fmax(long double x, long double y) -{ return boost::math::tr1::fmaxl(x, y); } +inline float fmax BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double fmax BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type fmax(T1 x, T2 y) -{ return boost::math::tr1::fmax(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type fmax BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::fmax BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float fmin(float x, float y) -{ return boost::math::tr1::fminf(x, y); } -inline long double fmin(long double x, long double y) -{ return boost::math::tr1::fminl(x, y); } +inline float fmin BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::fminf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double fmin BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::fminl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type fmin(T1 x, T2 y) -{ return boost::math::tr1::fmin(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type fmin BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::fmin BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float hypot(float x, float y) -{ return boost::math::tr1::hypotf(x, y); } -inline long double hypot(long double x, long double y) -{ return boost::math::tr1::hypotl(x, y); } +inline float hypot BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double hypot BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type hypot(T1 x, T2 y) -{ return boost::math::tr1::hypot(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type hypot BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } #if 0 -int ilogb(double x); -int ilogbf(float x); -int ilogbl(long double x); +int ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +int ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +int ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float lgamma(float x) -{ return boost::math::tr1::lgammaf(x); } -inline long double lgamma(long double x) -{ return boost::math::tr1::lgammal(x); } +inline float lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type lgamma(T x) -{ return boost::math::tr1::lgamma(static_cast::type>(x)); } +inline typename tools::promote_args::type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -long long llrint(double x); -long long llrintf(float x); -long long llrintl(long double x); +long long llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline long long llround(float x) -{ return boost::math::tr1::llroundf(x); } -inline long long llround(long double x) -{ return boost::math::tr1::llroundl(x); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline long long llround(T x) -{ return llround(static_cast(x)); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return llround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast(x)); } -inline float log1pf(float x) -{ return boost::math::tr1::boost_log1pf(x); } -inline double log1p(double x) -{ return boost::math::tr1::boost_log1p(x); } -inline long double log1pl(long double x) -{ return boost::math::tr1::boost_log1pl(x); } -inline float log1p(float x) -{ return boost::math::tr1::log1pf(x); } -inline long double log1p(long double x) -{ return boost::math::tr1::log1pl(x); } +inline float log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x) +{ return boost::math::tr1::boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline float log1p BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type log1p(T x) -{ return boost::math::tr1::log1p(static_cast::type>(x)); } +inline typename tools::promote_args::type log1p BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double log2(double x); -float log2f(float x); -long double log2l(long double x); +double log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double logb(double x); -float logbf(float x); -long double logbl(long double x); -long lrint(double x); -long lrintf(float x); -long lrintl(long double x); +double logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); +long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline long lround(float x) -{ return boost::math::tr1::lroundf(x); } -inline long lround(long double x) -{ return boost::math::tr1::lroundl(x); } +inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -long lround(T x) -{ return boost::math::tr1::lround(static_cast(x)); } +long lround BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::lround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast(x)); } #if 0 -double nan(const char *str); -float nanf(const char *str); -long double nanl(const char *str); -double nearbyint(double x); -float nearbyintf(float x); -long double nearbyintl(long double x); +double nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +float nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +long double nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +double nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float nextafterf(float x, float y) -{ return boost::math::tr1::boost_nextafterf(x, y); } -inline double nextafter(double x, double y) -{ return boost::math::tr1::boost_nextafter(x, y); } -inline long double nextafterl(long double x, long double y) -{ return boost::math::tr1::boost_nextafterl(x, y); } -inline float nextafter(float x, float y) -{ return boost::math::tr1::nextafterf(x, y); } -inline long double nextafter(long double x, long double y) -{ return boost::math::tr1::nextafterl(x, y); } +inline float nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) +{ return boost::math::tr1::boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline float nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type nextafter(T1 x, T2 y) -{ return boost::math::tr1::nextafter(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float nexttoward(float x, long double y) -{ return boost::math::tr1::nexttowardf(x, y); } -inline long double nexttoward(long double x, long double y) -{ return boost::math::tr1::nexttowardl(x, y); } +inline float nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) +{ return boost::math::tr1::nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type nexttoward(T1 x, T2 y) -{ return boost::math::tr1::nexttoward(static_cast::type>(x), static_cast(y)); } +inline typename tools::promote_args::type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast(y)); } #if 0 -double remainder(double x, double y); -float remainderf(float x, float y); -long double remainderl(long double x, long double y); -double remquo(double x, double y, int *pquo); -float remquof(float x, float y, int *pquo); -long double remquol(long double x, long double y, int *pquo); -double rint(double x); -float rintf(float x); -long double rintl(long double x); +double remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo); +float remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo); +long double remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo); +double rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float round(float x) -{ return boost::math::tr1::roundf(x); } -inline long double round(long double x) -{ return boost::math::tr1::roundl(x); } +inline float round BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::roundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double round BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::roundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type round(T x) -{ return boost::math::tr1::round(static_cast::type>(x)); } +inline typename tools::promote_args::type round BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::round BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double scalbln(double x, long ex); -float scalblnf(float x, long ex); -long double scalblnl(long double x, long ex); -double scalbn(double x, int ex); -float scalbnf(float x, int ex); -long double scalbnl(long double x, int ex); +double scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex); +float scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex); +long double scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex); +double scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex); +float scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex); +long double scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex); #endif -inline float tgamma(float x) -{ return boost::math::tr1::tgammaf(x); } -inline long double tgamma(long double x) -{ return boost::math::tr1::tgammal(x); } +inline float tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type tgamma(T x) -{ return boost::math::tr1::tgamma(static_cast::type>(x)); } +inline typename tools::promote_args::type tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float trunc(float x) -{ return boost::math::tr1::truncf(x); } -inline long double trunc(long double x) -{ return boost::math::tr1::truncl(x); } +inline float trunc BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::truncf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double trunc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::truncl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type trunc(T x) -{ return boost::math::tr1::trunc(static_cast::type>(x)); } +inline typename tools::promote_args::type trunc BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } # define NO_MACRO_EXPAND /**/ // C99 macros defined as C++ templates @@ -644,210 +644,210 @@ template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(long d #undef NO_MACRO_EXPAND // [5.2.1.1] associated Laguerre polynomials: -inline float assoc_laguerre(unsigned n, unsigned m, float x) -{ return boost::math::tr1::assoc_laguerref(n, m, x); } -inline long double assoc_laguerre(unsigned n, unsigned m, long double x) -{ return boost::math::tr1::assoc_laguerrel(n, m, x); } +inline float assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) +{ return boost::math::tr1::assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } +inline long double assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) +{ return boost::math::tr1::assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } template -inline typename tools::promote_args::type assoc_laguerre(unsigned n, unsigned m, T x) -{ return boost::math::tr1::assoc_laguerre(n, m, static_cast::type>(x)); } +inline typename tools::promote_args::type assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, T x) +{ return boost::math::tr1::assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, static_cast::type>(x)); } // [5.2.1.2] associated Legendre functions: -inline float assoc_legendre(unsigned l, unsigned m, float x) -{ return boost::math::tr1::assoc_legendref(l, m, x); } -inline long double assoc_legendre(unsigned l, unsigned m, long double x) -{ return boost::math::tr1::assoc_legendrel(l, m, x); } +inline float assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) +{ return boost::math::tr1::assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } +inline long double assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) +{ return boost::math::tr1::assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } template -inline typename tools::promote_args::type assoc_legendre(unsigned l, unsigned m, T x) -{ return boost::math::tr1::assoc_legendre(l, m, static_cast::type>(x)); } +inline typename tools::promote_args::type assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T x) +{ return boost::math::tr1::assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast::type>(x)); } // [5.2.1.3] beta function: -inline float beta(float x, float y) -{ return boost::math::tr1::betaf(x, y); } -inline long double beta(long double x, long double y) -{ return boost::math::tr1::betal(x, y); } +inline float beta BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::betaf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double beta BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::betal BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type beta(T2 x, T1 y) -{ return boost::math::tr1::beta(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type beta BOOST_PREVENT_MACRO_SUBSTITUTION(T2 x, T1 y) +{ return boost::math::tr1::beta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } // [5.2.1.4] (complete) elliptic integral of the first kind: -inline float comp_ellint_1(float k) -{ return boost::math::tr1::comp_ellint_1f(k); } -inline long double comp_ellint_1(long double k) -{ return boost::math::tr1::comp_ellint_1l(k); } +inline float comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k) +{ return boost::math::tr1::comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k); } +inline long double comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k) +{ return boost::math::tr1::comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k); } template -inline typename tools::promote_args::type comp_ellint_1(T k) -{ return boost::math::tr1::comp_ellint_1(static_cast::type>(k)); } +inline typename tools::promote_args::type comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T k) +{ return boost::math::tr1::comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k)); } -// [5.2.1.5] (complete) elliptic integral of the second kind: +// [5.2.1.5] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the second kind: inline float comp_ellint_2(float k) { return boost::math::tr1::comp_ellint_2f(k); } inline long double comp_ellint_2(long double k) { return boost::math::tr1::comp_ellint_2l(k); } template inline typename tools::promote_args::type comp_ellint_2(T k) -{ return boost::math::tr1::comp_ellint_2(static_cast::type>(k)); } +{ return boost::math::tr1::comp_ellint_2(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k)); } -// [5.2.1.6] (complete) elliptic integral of the third kind: +// [5.2.1.6] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the third kind: inline float comp_ellint_3(float k, float nu) { return boost::math::tr1::comp_ellint_3f(k, nu); } inline long double comp_ellint_3(long double k, long double nu) { return boost::math::tr1::comp_ellint_3l(k, nu); } template inline typename tools::promote_args::type comp_ellint_3(T1 k, T2 nu) -{ return boost::math::tr1::comp_ellint_3(static_cast::type>(k), static_cast::type>(nu)); } +{ return boost::math::tr1::comp_ellint_3(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k), static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu)); } #if 0 // [5.2.1.7] confluent hypergeometric functions: -double conf_hyperg(double a, double c, double x); -float conf_hypergf(float a, float c, float x); -long double conf_hypergl(long double a, long double c, long double x); +double conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x); +float conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x); +long double conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x); #endif // [5.2.1.8] regular modified cylindrical Bessel functions: -inline float cyl_bessel_i(float nu, float x) -{ return boost::math::tr1::cyl_bessel_if(nu, x); } -inline long double cyl_bessel_i(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_il(nu, x); } +inline float cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_i(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_i(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.9] cylindrical Bessel functions (of the first kind): -inline float cyl_bessel_j(float nu, float x) -{ return boost::math::tr1::cyl_bessel_jf(nu, x); } -inline long double cyl_bessel_j(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_jl(nu, x); } +inline float cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_j(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_j(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.10] irregular modified cylindrical Bessel functions: -inline float cyl_bessel_k(float nu, float x) -{ return boost::math::tr1::cyl_bessel_kf(nu, x); } -inline long double cyl_bessel_k(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_kl(nu, x); } +inline float cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_k(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_k(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu), static_cast::type>(x)); } // [5.2.1.11] cylindrical Neumann functions; // cylindrical Bessel functions (of the second kind): -inline float cyl_neumann(float nu, float x) -{ return boost::math::tr1::cyl_neumannf(nu, x); } -inline long double cyl_neumann(long double nu, long double x) -{ return boost::math::tr1::cyl_neumannl(nu, x); } +inline float cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_neumann(T1 nu, T2 x) -{ return boost::math::tr1::cyl_neumann(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.12] (incomplete) elliptic integral of the first kind: -inline float ellint_1(float k, float phi) -{ return boost::math::tr1::ellint_1f(k, phi); } -inline long double ellint_1(long double k, long double phi) -{ return boost::math::tr1::ellint_1l(k, phi); } +inline float ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) +{ return boost::math::tr1::ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } +inline long double ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) +{ return boost::math::tr1::ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } template -inline typename tools::promote_args::type ellint_1(T1 k, T2 phi) -{ return boost::math::tr1::ellint_1(static_cast::type>(k), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi) +{ return boost::math::tr1::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(phi)); } // [5.2.1.13] (incomplete) elliptic integral of the second kind: -inline float ellint_2(float k, float phi) -{ return boost::math::tr1::ellint_2f(k, phi); } -inline long double ellint_2(long double k, long double phi) -{ return boost::math::tr1::ellint_2l(k, phi); } +inline float ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) +{ return boost::math::tr1::ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } +inline long double ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) +{ return boost::math::tr1::ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } template -inline typename tools::promote_args::type ellint_2(T1 k, T2 phi) -{ return boost::math::tr1::ellint_2(static_cast::type>(k), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi) +{ return boost::math::tr1::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(phi)); } // [5.2.1.14] (incomplete) elliptic integral of the third kind: -inline float ellint_3(float k, float nu, float phi) -{ return boost::math::tr1::ellint_3f(k, nu, phi); } -inline long double ellint_3(long double k, long double nu, long double phi) -{ return boost::math::tr1::ellint_3l(k, nu, phi); } +inline float ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi) +{ return boost::math::tr1::ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } +inline long double ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi) +{ return boost::math::tr1::ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } template -inline typename tools::promote_args::type ellint_3(T1 k, T2 nu, T3 phi) -{ return boost::math::tr1::ellint_3(static_cast::type>(k), static_cast::type>(nu), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 nu, T3 phi) +{ return boost::math::tr1::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(nu), static_cast::type>(phi)); } // [5.2.1.15] exponential integral: -inline float expint(float x) -{ return boost::math::tr1::expintf(x); } -inline long double expint(long double x) -{ return boost::math::tr1::expintl(x); } +inline float expint BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::expintf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expint BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::expintl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type expint(T x) -{ return boost::math::tr1::expint(static_cast::type>(x)); } +inline typename tools::promote_args::type expint BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::expint BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } // [5.2.1.16] Hermite polynomials: -inline float hermite(unsigned n, float x) -{ return boost::math::tr1::hermitef(n, x); } -inline long double hermite(unsigned n, long double x) -{ return boost::math::tr1::hermitel(n, x); } +inline float hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type hermite(unsigned n, T x) -{ return boost::math::tr1::hermite(n, static_cast::type>(x)); } +inline typename tools::promote_args::type hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } #if 0 // [5.2.1.17] hypergeometric functions: -double hyperg(double a, double b, double c, double x); -float hypergf(float a, float b, float c, float x); -long double hypergl(long double a, long double b, long double c, +double hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x); +float hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x); +long double hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c, long double x); #endif // [5.2.1.18] Laguerre polynomials: -inline float laguerre(unsigned n, float x) -{ return boost::math::tr1::laguerref(n, x); } -inline long double laguerre(unsigned n, long double x) -{ return boost::math::tr1::laguerrel(n, x); } +inline float laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type laguerre(unsigned n, T x) -{ return boost::math::tr1::laguerre(n, static_cast::type>(x)); } +inline typename tools::promote_args::type laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } // [5.2.1.19] Legendre polynomials: -inline float legendre(unsigned l, float x) -{ return boost::math::tr1::legendref(l, x); } -inline long double legendre(unsigned l, long double x) -{ return boost::math::tr1::legendrel(l, x); } +inline float legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x) +{ return boost::math::tr1::legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); } +inline long double legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x) +{ return boost::math::tr1::legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); } template -inline typename tools::promote_args::type legendre(unsigned l, T x) -{ return boost::math::tr1::legendre(l, static_cast::type>(x)); } +inline typename tools::promote_args::type legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, T x) +{ return boost::math::tr1::legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, static_cast::type>(x)); } // [5.2.1.20] Riemann zeta function: -inline float riemann_zeta(float z) -{ return boost::math::tr1::riemann_zetaf(z); } -inline long double riemann_zeta(long double z) -{ return boost::math::tr1::riemann_zetal(z); } +inline float riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(float z) +{ return boost::math::tr1::riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(z); } +inline long double riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(long double z) +{ return boost::math::tr1::riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(z); } template -inline typename tools::promote_args::type riemann_zeta(T z) -{ return boost::math::tr1::riemann_zeta(static_cast::type>(z)); } +inline typename tools::promote_args::type riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(T z) +{ return boost::math::tr1::riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(z)); } // [5.2.1.21] spherical Bessel functions (of the first kind): -inline float sph_bessel(unsigned n, float x) -{ return boost::math::tr1::sph_besself(n, x); } -inline long double sph_bessel(unsigned n, long double x) -{ return boost::math::tr1::sph_bessell(n, x); } +inline float sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type sph_bessel(unsigned n, T x) -{ return boost::math::tr1::sph_bessel(n, static_cast::type>(x)); } +inline typename tools::promote_args::type sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } // [5.2.1.22] spherical associated Legendre functions: -inline float sph_legendre(unsigned l, unsigned m, float theta) -{ return boost::math::tr1::sph_legendref(l, m, theta); } -inline long double sph_legendre(unsigned l, unsigned m, long double theta) -{ return boost::math::tr1::sph_legendrel(l, m, theta); } +inline float sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta) +{ return boost::math::tr1::sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); } +inline long double sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta) +{ return boost::math::tr1::sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); } template -inline typename tools::promote_args::type sph_legendre(unsigned l, unsigned m, T theta) -{ return boost::math::tr1::sph_legendre(l, m, static_cast::type>(theta)); } +inline typename tools::promote_args::type sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T theta) +{ return boost::math::tr1::sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast::type>(theta)); } // [5.2.1.23] spherical Neumann functions; // spherical Bessel functions (of the second kind): -inline float sph_neumann(unsigned n, float x) -{ return boost::math::tr1::sph_neumannf(n, x); } -inline long double sph_neumann(unsigned n, long double x) -{ return boost::math::tr1::sph_neumannl(n, x); } +inline float sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type sph_neumann(unsigned n, T x) -{ return boost::math::tr1::sph_neumann(n, static_cast::type>(x)); } +inline typename tools::promote_args::type sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } }}} // namespaces diff --git a/src/tr1/acosh.cpp b/src/tr1/acosh.cpp index 673cdc9d5..934edb652 100644 --- a/src/tr1/acosh.cpp +++ b/src/tr1/acosh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL acosh(double x) +extern "C" double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/acoshf.cpp b/src/tr1/acoshf.cpp index 1aa1e7ee5..11f8a2e2a 100644 --- a/src/tr1/acoshf.cpp +++ b/src/tr1/acoshf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL acoshf(float x) +extern "C" float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/acoshl.cpp b/src/tr1/acoshl.cpp index 074348602..e0ba58b5d 100644 --- a/src/tr1/acoshl.cpp +++ b/src/tr1/acoshl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL acoshl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinh.cpp b/src/tr1/asinh.cpp index cd013968f..95b6d48db 100644 --- a/src/tr1/asinh.cpp +++ b/src/tr1/asinh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL asinh(double x) +extern "C" double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinhf.cpp b/src/tr1/asinhf.cpp index 2c0ee91e4..b7f430daf 100644 --- a/src/tr1/asinhf.cpp +++ b/src/tr1/asinhf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL asinhf(float x) +extern "C" float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinhl.cpp b/src/tr1/asinhl.cpp index 41ac09729..3baf6d156 100644 --- a/src/tr1/asinhl.cpp +++ b/src/tr1/asinhl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL asinhl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/assoc_laguerre.cpp b/src/tr1/assoc_laguerre.cpp index 562f4ad42..84626d443 100644 --- a/src/tr1/assoc_laguerre.cpp +++ b/src/tr1/assoc_laguerre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_laguerref.cpp b/src/tr1/assoc_laguerref.cpp index 2df208398..0d611431a 100644 --- a/src/tr1/assoc_laguerref.cpp +++ b/src/tr1/assoc_laguerref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_laguerrel.cpp b/src/tr1/assoc_laguerrel.cpp index e0685c21f..a1078e2cf 100644 --- a/src/tr1/assoc_laguerrel.cpp +++ b/src/tr1/assoc_laguerrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_legendre.cpp b/src/tr1/assoc_legendre.cpp index 4df72df5d..95318d5f9 100644 --- a/src/tr1/assoc_legendre.cpp +++ b/src/tr1/assoc_legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/assoc_legendref.cpp b/src/tr1/assoc_legendref.cpp index ce28c2ce6..49745e1b7 100644 --- a/src/tr1/assoc_legendref.cpp +++ b/src/tr1/assoc_legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/assoc_legendrel.cpp b/src/tr1/assoc_legendrel.cpp index 300a5e0e7..1ff5d1880 100644 --- a/src/tr1/assoc_legendrel.cpp +++ b/src/tr1/assoc_legendrel.cpp @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/atanh.cpp b/src/tr1/atanh.cpp index 2603b9fb7..02bc18bcf 100644 --- a/src/tr1/atanh.cpp +++ b/src/tr1/atanh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL atanh(double x) +extern "C" double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/atanhf.cpp b/src/tr1/atanhf.cpp index 09ff3f70b..6628c7319 100644 --- a/src/tr1/atanhf.cpp +++ b/src/tr1/atanhf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL atanhf(float x) +extern "C" float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/atanhl.cpp b/src/tr1/atanhl.cpp index 368c3a8ea..7d3e3d856 100644 --- a/src/tr1/atanhl.cpp +++ b/src/tr1/atanhl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL atanhl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/beta.cpp b/src/tr1/beta.cpp index 22249f8a9..096e627f8 100644 --- a/src/tr1/beta.cpp +++ b/src/tr1/beta.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL beta(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/betaf.cpp b/src/tr1/betaf.cpp index 4b2a923ad..9f9a412bb 100644 --- a/src/tr1/betaf.cpp +++ b/src/tr1/betaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL betaf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/betal.cpp b/src/tr1/betal.cpp index 36cf2f05a..75d848772 100644 --- a/src/tr1/betal.cpp +++ b/src/tr1/betal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL betal(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/c_policy.hpp b/src/tr1/c_policy.hpp index 3d893349c..0ab7eeeb8 100644 --- a/src/tr1/c_policy.hpp +++ b/src/tr1/c_policy.hpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include diff --git a/src/tr1/cbrt.cpp b/src/tr1/cbrt.cpp index 91ba06427..47a2a1ffe 100644 --- a/src/tr1/cbrt.cpp +++ b/src/tr1/cbrt.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cbrt(double x) +extern "C" double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/cbrtf.cpp b/src/tr1/cbrtf.cpp index 5a93fa1bf..f416cb16c 100644 --- a/src/tr1/cbrtf.cpp +++ b/src/tr1/cbrtf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cbrtf(float x) +extern "C" float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/cbrtl.cpp b/src/tr1/cbrtl.cpp index 9ffb3a722..37ceb3db3 100644 --- a/src/tr1/cbrtl.cpp +++ b/src/tr1/cbrtl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cbrtl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1.cpp b/src/tr1/comp_ellint_1.cpp index 62e788743..bc0079bf1 100644 --- a/src/tr1/comp_ellint_1.cpp +++ b/src/tr1/comp_ellint_1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1(double x) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1f.cpp b/src/tr1/comp_ellint_1f.cpp index c65e2447a..3942d223d 100644 --- a/src/tr1/comp_ellint_1f.cpp +++ b/src/tr1/comp_ellint_1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f(float x) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1l.cpp b/src/tr1/comp_ellint_1l.cpp index a97215989..7912d980f 100644 --- a/src/tr1/comp_ellint_1l.cpp +++ b/src/tr1/comp_ellint_1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2.cpp b/src/tr1/comp_ellint_2.cpp index 307e0f049..31cef22b6 100644 --- a/src/tr1/comp_ellint_2.cpp +++ b/src/tr1/comp_ellint_2.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2(double x) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2f.cpp b/src/tr1/comp_ellint_2f.cpp index 1789d7a3b..1401a7496 100644 --- a/src/tr1/comp_ellint_2f.cpp +++ b/src/tr1/comp_ellint_2f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f(float x) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2l.cpp b/src/tr1/comp_ellint_2l.cpp index 39d0ef49d..ee9252307 100644 --- a/src/tr1/comp_ellint_2l.cpp +++ b/src/tr1/comp_ellint_2l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_3.cpp b/src/tr1/comp_ellint_3.cpp index 5abb3ba39..ff1878502 100644 --- a/src/tr1/comp_ellint_3.cpp +++ b/src/tr1/comp_ellint_3.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/comp_ellint_3f.cpp b/src/tr1/comp_ellint_3f.cpp index 0a81ea567..1caefb442 100644 --- a/src/tr1/comp_ellint_3f.cpp +++ b/src/tr1/comp_ellint_3f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/comp_ellint_3l.cpp b/src/tr1/comp_ellint_3l.cpp index 2d6f8a591..b3f7c7f6b 100644 --- a/src/tr1/comp_ellint_3l.cpp +++ b/src/tr1/comp_ellint_3l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/copysign.cpp b/src/tr1/copysign.cpp index 214dc381e..debeab23b 100644 --- a/src/tr1/copysign.cpp +++ b/src/tr1/copysign.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ #if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) -extern "C" double BOOST_MATH_TR1_DECL copysign(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } #endif diff --git a/src/tr1/copysignf.cpp b/src/tr1/copysignf.cpp index e9c70ebda..c87ab5735 100644 --- a/src/tr1/copysignf.cpp +++ b/src/tr1/copysignf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ #if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) -extern "C" float BOOST_MATH_TR1_DECL copysignf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } #endif diff --git a/src/tr1/copysignl.cpp b/src/tr1/copysignl.cpp index 1362718de..2431de9e6 100644 --- a/src/tr1/copysignl.cpp +++ b/src/tr1/copysignl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/cyl_bessel_i.cpp b/src/tr1/cyl_bessel_i.cpp index 0f29663b4..dd5cfbb09 100644 --- a/src/tr1/cyl_bessel_i.cpp +++ b/src/tr1/cyl_bessel_i.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_if.cpp b/src/tr1/cyl_bessel_if.cpp index 901d413ef..81e862543 100644 --- a/src/tr1/cyl_bessel_if.cpp +++ b/src/tr1/cyl_bessel_if.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_il.cpp b/src/tr1/cyl_bessel_il.cpp index c9ccff056..e939b190f 100644 --- a/src/tr1/cyl_bessel_il.cpp +++ b/src/tr1/cyl_bessel_il.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_j.cpp b/src/tr1/cyl_bessel_j.cpp index 9c1cecb0f..5a2dbba8b 100644 --- a/src/tr1/cyl_bessel_j.cpp +++ b/src/tr1/cyl_bessel_j.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_jf.cpp b/src/tr1/cyl_bessel_jf.cpp index 21db0ff9f..5d0e20c91 100644 --- a/src/tr1/cyl_bessel_jf.cpp +++ b/src/tr1/cyl_bessel_jf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_jl.cpp b/src/tr1/cyl_bessel_jl.cpp index 2d68a7044..0d026318c 100644 --- a/src/tr1/cyl_bessel_jl.cpp +++ b/src/tr1/cyl_bessel_jl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_k.cpp b/src/tr1/cyl_bessel_k.cpp index 2fee1329e..0f16a283b 100644 --- a/src/tr1/cyl_bessel_k.cpp +++ b/src/tr1/cyl_bessel_k.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_kf.cpp b/src/tr1/cyl_bessel_kf.cpp index 26509e62a..bbc173316 100644 --- a/src/tr1/cyl_bessel_kf.cpp +++ b/src/tr1/cyl_bessel_kf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_kl.cpp b/src/tr1/cyl_bessel_kl.cpp index 282c3b512..7d6be5ad6 100644 --- a/src/tr1/cyl_bessel_kl.cpp +++ b/src/tr1/cyl_bessel_kl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumann.cpp b/src/tr1/cyl_neumann.cpp index f3c14d5dc..ca9a874a0 100644 --- a/src/tr1/cyl_neumann.cpp +++ b/src/tr1/cyl_neumann.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumannf.cpp b/src/tr1/cyl_neumannf.cpp index ebd88fd5e..fbd219077 100644 --- a/src/tr1/cyl_neumannf.cpp +++ b/src/tr1/cyl_neumannf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumannl.cpp b/src/tr1/cyl_neumannl.cpp index 078ab131b..690e43957 100644 --- a/src/tr1/cyl_neumannl.cpp +++ b/src/tr1/cyl_neumannl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/ellint_1.cpp b/src/tr1/ellint_1.cpp index 5a0a1ac3b..a10403e69 100644 --- a/src/tr1/ellint_1.cpp +++ b/src/tr1/ellint_1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_1(double k, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_1f.cpp b/src/tr1/ellint_1f.cpp index 06cdb85b0..f48cbaaa2 100644 --- a/src/tr1/ellint_1f.cpp +++ b/src/tr1/ellint_1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_1l.cpp b/src/tr1/ellint_1l.cpp index 93a2ce451..f2c856309 100644 --- a/src/tr1/ellint_1l.cpp +++ b/src/tr1/ellint_1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2.cpp b/src/tr1/ellint_2.cpp index 72f1a8bbe..3ee322672 100644 --- a/src/tr1/ellint_2.cpp +++ b/src/tr1/ellint_2.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_2(double k, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2f.cpp b/src/tr1/ellint_2f.cpp index 4391b9adc..2d93c91b8 100644 --- a/src/tr1/ellint_2f.cpp +++ b/src/tr1/ellint_2f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2l.cpp b/src/tr1/ellint_2l.cpp index 7f6a0c905..7ea4d8d6c 100644 --- a/src/tr1/ellint_2l.cpp +++ b/src/tr1/ellint_2l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_3.cpp b/src/tr1/ellint_3.cpp index 58e7ec7aa..3f7720124 100644 --- a/src/tr1/ellint_3.cpp +++ b/src/tr1/ellint_3.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/ellint_3f.cpp b/src/tr1/ellint_3f.cpp index f15c379c4..ad97aa9d1 100644 --- a/src/tr1/ellint_3f.cpp +++ b/src/tr1/ellint_3f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/ellint_3l.cpp b/src/tr1/ellint_3l.cpp index 3837dc44a..2415ba57c 100644 --- a/src/tr1/ellint_3l.cpp +++ b/src/tr1/ellint_3l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/erf.cpp b/src/tr1/erf.cpp index 867f1da72..177ebc040 100644 --- a/src/tr1/erf.cpp +++ b/src/tr1/erf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL erf(double x) +extern "C" double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfc.cpp b/src/tr1/erfc.cpp index 22d63e360..a4db7c229 100644 --- a/src/tr1/erfc.cpp +++ b/src/tr1/erfc.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL erfc(double x) +extern "C" double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfcf.cpp b/src/tr1/erfcf.cpp index 0de3d0d95..0a177ee0c 100644 --- a/src/tr1/erfcf.cpp +++ b/src/tr1/erfcf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL erfcf(float x) +extern "C" float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfcl.cpp b/src/tr1/erfcl.cpp index 6765d1063..e5dd4aa6c 100644 --- a/src/tr1/erfcl.cpp +++ b/src/tr1/erfcl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL erfcl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erff.cpp b/src/tr1/erff.cpp index 198645ae6..1ecb69336 100644 --- a/src/tr1/erff.cpp +++ b/src/tr1/erff.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL erff(float x) +extern "C" float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfl.cpp b/src/tr1/erfl.cpp index 58ea0d97a..f1295aa3d 100644 --- a/src/tr1/erfl.cpp +++ b/src/tr1/erfl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL erfl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expint.cpp b/src/tr1/expint.cpp index b644d4c0e..710c116ba 100644 --- a/src/tr1/expint.cpp +++ b/src/tr1/expint.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL expint(double x) +extern "C" double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expintf.cpp b/src/tr1/expintf.cpp index b9a888c77..9c077f602 100644 --- a/src/tr1/expintf.cpp +++ b/src/tr1/expintf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL expintf(float x) +extern "C" float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expintl.cpp b/src/tr1/expintl.cpp index 9aa3e74d5..e795e7431 100644 --- a/src/tr1/expintl.cpp +++ b/src/tr1/expintl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL expintl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1.cpp b/src/tr1/expm1.cpp index f1f9e4c7b..c30c41be6 100644 --- a/src/tr1/expm1.cpp +++ b/src/tr1/expm1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL boost_expm1(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1f.cpp b/src/tr1/expm1f.cpp index 4922afdc3..1953f4737 100644 --- a/src/tr1/expm1f.cpp +++ b/src/tr1/expm1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL boost_expm1f(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1l.cpp b/src/tr1/expm1l.cpp index 51b5e52c3..5b71ee151 100644 --- a/src/tr1/expm1l.cpp +++ b/src/tr1/expm1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/fmax.cpp b/src/tr1/fmax.cpp index c998a87ef..65209750a 100644 --- a/src/tr1/fmax.cpp +++ b/src/tr1/fmax.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,11 +8,11 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL fmax(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { if((boost::math::isnan)(x)) return y; if((boost::math::isnan)(y)) return x; - return (std::max)(x, y); + return (std::max)(x, y); } diff --git a/src/tr1/fmaxf.cpp b/src/tr1/fmaxf.cpp index 4adfc176a..b668e9d64 100644 --- a/src/tr1/fmaxf.cpp +++ b/src/tr1/fmaxf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,7 +10,7 @@ #if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) -extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fmaxl.cpp b/src/tr1/fmaxl.cpp index 955838200..ca221d077 100644 --- a/src/tr1/fmaxl.cpp +++ b/src/tr1/fmaxl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fmin.cpp b/src/tr1/fmin.cpp index ea45d1225..284f1ed17 100644 --- a/src/tr1/fmin.cpp +++ b/src/tr1/fmin.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL fmin(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fminf.cpp b/src/tr1/fminf.cpp index ffe009f6d..93917783f 100644 --- a/src/tr1/fminf.cpp +++ b/src/tr1/fminf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,7 +10,7 @@ #if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) -extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fminl.cpp b/src/tr1/fminl.cpp index d39a30118..ca708a66b 100644 --- a/src/tr1/fminl.cpp +++ b/src/tr1/fminl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL fminl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fpclassify.cpp b/src/tr1/fpclassify.cpp index 871481178..b871c4f39 100644 --- a/src/tr1/fpclassify.cpp +++ b/src/tr1/fpclassify.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,34 +11,32 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(double x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { return (boost::math::isnormal)(x); } diff --git a/src/tr1/fpclassifyf.cpp b/src/tr1/fpclassifyf.cpp index 0789a350f..761341857 100644 --- a/src/tr1/fpclassifyf.cpp +++ b/src/tr1/fpclassifyf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,34 +11,32 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(float x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { return (boost::math::isnormal)(x); } diff --git a/src/tr1/fpclassifyl.cpp b/src/tr1/fpclassifyl.cpp index fd339fa7e..0e393ef4b 100644 --- a/src/tr1/fpclassifyl.cpp +++ b/src/tr1/fpclassifyl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,34 +11,32 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(long double x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { return (boost::math::isnormal)(x); } diff --git a/src/tr1/hermite.cpp b/src/tr1/hermite.cpp index 38410e6e5..7b0d73f3d 100644 --- a/src/tr1/hermite.cpp +++ b/src/tr1/hermite.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL hermite(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hermitef.cpp b/src/tr1/hermitef.cpp index c4b211010..0e2066c9f 100644 --- a/src/tr1/hermitef.cpp +++ b/src/tr1/hermitef.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hermitel.cpp b/src/tr1/hermitel.cpp index 542bdda35..eef803d0e 100644 --- a/src/tr1/hermitel.cpp +++ b/src/tr1/hermitel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hypot.cpp b/src/tr1/hypot.cpp index 1a5a1d1cd..fd13620d9 100644 --- a/src/tr1/hypot.cpp +++ b/src/tr1/hypot.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL hypot(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/hypotf.cpp b/src/tr1/hypotf.cpp index 11b937520..7aa2c7aff 100644 --- a/src/tr1/hypotf.cpp +++ b/src/tr1/hypotf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL hypotf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/hypotl.cpp b/src/tr1/hypotl.cpp index 165f00f62..7e4547a7a 100644 --- a/src/tr1/hypotl.cpp +++ b/src/tr1/hypotl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/laguerre.cpp b/src/tr1/laguerre.cpp index 3f1085a78..b0bc0b628 100644 --- a/src/tr1/laguerre.cpp +++ b/src/tr1/laguerre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/laguerref.cpp b/src/tr1/laguerref.cpp index 82be58ab8..341dc8324 100644 --- a/src/tr1/laguerref.cpp +++ b/src/tr1/laguerref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/laguerrel.cpp b/src/tr1/laguerrel.cpp index 722c68c27..b43418d1a 100644 --- a/src/tr1/laguerrel.cpp +++ b/src/tr1/laguerrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendre.cpp b/src/tr1/legendre.cpp index 1d1095d49..d7e41cdda 100644 --- a/src/tr1/legendre.cpp +++ b/src/tr1/legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL legendre(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendref.cpp b/src/tr1/legendref.cpp index b9d019801..318064f21 100644 --- a/src/tr1/legendref.cpp +++ b/src/tr1/legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL legendref(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendrel.cpp b/src/tr1/legendrel.cpp index e6e5d5a74..ee7ed5a21 100644 --- a/src/tr1/legendrel.cpp +++ b/src/tr1/legendrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL legendrel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/lgamma.cpp b/src/tr1/lgamma.cpp index 34a871f63..8c6b05eaf 100644 --- a/src/tr1/lgamma.cpp +++ b/src/tr1/lgamma.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL lgamma(double x) +extern "C" double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lgammaf.cpp b/src/tr1/lgammaf.cpp index 1a3e6733b..b5e3f6f5f 100644 --- a/src/tr1/lgammaf.cpp +++ b/src/tr1/lgammaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL lgammaf(float x) +extern "C" float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lgammal.cpp b/src/tr1/lgammal.cpp index 79f239282..636f1df6d 100644 --- a/src/tr1/lgammal.cpp +++ b/src/tr1/lgammal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL lgammal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llround.cpp b/src/tr1/llround.cpp index 46554c6d9..02fd019f8 100644 --- a/src/tr1/llround.cpp +++ b/src/tr1/llround.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llround(double x) +extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llroundf.cpp b/src/tr1/llroundf.cpp index 7d880e719..04c915bfa 100644 --- a/src/tr1/llroundf.cpp +++ b/src/tr1/llroundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llroundf(float x) +extern "C" long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llroundl.cpp b/src/tr1/llroundl.cpp index 299cd1673..dde7ebdc8 100644 --- a/src/tr1/llroundl.cpp +++ b/src/tr1/llroundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llroundl(long double x) +extern "C" long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1p.cpp b/src/tr1/log1p.cpp index 17c9a66aa..bf0a43950 100644 --- a/src/tr1/log1p.cpp +++ b/src/tr1/log1p.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL boost_log1p(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1pf.cpp b/src/tr1/log1pf.cpp index c3412a797..f394c9262 100644 --- a/src/tr1/log1pf.cpp +++ b/src/tr1/log1pf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL boost_log1pf(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1pl.cpp b/src/tr1/log1pl.cpp index 1c9ee2087..0ecd89333 100644 --- a/src/tr1/log1pl.cpp +++ b/src/tr1/log1pl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lround.cpp b/src/tr1/lround.cpp index 91b7cb228..4233d37f8 100644 --- a/src/tr1/lround.cpp +++ b/src/tr1/lround.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lround(double x) +extern "C" long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lroundf.cpp b/src/tr1/lroundf.cpp index 4ce4ae373..d576ba6e0 100644 --- a/src/tr1/lroundf.cpp +++ b/src/tr1/lroundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lroundf(float x) +extern "C" long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lroundl.cpp b/src/tr1/lroundl.cpp index 1e948c7eb..a0db94232 100644 --- a/src/tr1/lroundl.cpp +++ b/src/tr1/lroundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lroundl(long double x) +extern "C" long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/nextafter.cpp b/src/tr1/nextafter.cpp index 72125945e..ea26a5ce1 100644 --- a/src/tr1/nextafter.cpp +++ b/src/tr1/nextafter.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nextafterf.cpp b/src/tr1/nextafterf.cpp index 066ce1062..0f7036690 100644 --- a/src/tr1/nextafterf.cpp +++ b/src/tr1/nextafterf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nextafterl.cpp b/src/tr1/nextafterl.cpp index 14bca47c9..037f3e889 100644 --- a/src/tr1/nextafterl.cpp +++ b/src/tr1/nextafterl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nexttoward.cpp b/src/tr1/nexttoward.cpp index f3a9d8686..f1878bd0e 100644 --- a/src/tr1/nexttoward.cpp +++ b/src/tr1/nexttoward.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL nexttoward(double x, long double y) +extern "C" double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y) { - return (double)c_policies::nextafter((long double)x, y); + return (double)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y); } }}} diff --git a/src/tr1/nexttowardf.cpp b/src/tr1/nexttowardf.cpp index 753daa1f6..f9ea7e575 100644 --- a/src/tr1/nexttowardf.cpp +++ b/src/tr1/nexttowardf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y) +extern "C" float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) { - return (float)c_policies::nextafter((long double)x, y); + return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y); } }}} diff --git a/src/tr1/nexttowardl.cpp b/src/tr1/nexttowardl.cpp index 8bceeafbe..9f992fcfe 100644 --- a/src/tr1/nexttowardl.cpp +++ b/src/tr1/nexttowardl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/riemann_zeta.cpp b/src/tr1/riemann_zeta.cpp index 60300a0b8..0ef523674 100644 --- a/src/tr1/riemann_zeta.cpp +++ b/src/tr1/riemann_zeta.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL riemann_zeta(double x) +extern "C" double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/riemann_zetaf.cpp b/src/tr1/riemann_zetaf.cpp index f2cf9a4cf..0387d0250 100644 --- a/src/tr1/riemann_zetaf.cpp +++ b/src/tr1/riemann_zetaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf(float x) +extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/riemann_zetal.cpp b/src/tr1/riemann_zetal.cpp index d7af69171..a9ea46ba8 100644 --- a/src/tr1/riemann_zetal.cpp +++ b/src/tr1/riemann_zetal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/round.cpp b/src/tr1/round.cpp index 70569383c..d64bd4e48 100644 --- a/src/tr1/round.cpp +++ b/src/tr1/round.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL round(double x) +extern "C" double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/roundf.cpp b/src/tr1/roundf.cpp index 1e18b5223..e051b5be2 100644 --- a/src/tr1/roundf.cpp +++ b/src/tr1/roundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL roundf(float x) +extern "C" float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/roundl.cpp b/src/tr1/roundl.cpp index 241a0b629..49dbcc64f 100644 --- a/src/tr1/roundl.cpp +++ b/src/tr1/roundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL roundl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/sph_bessel.cpp b/src/tr1/sph_bessel.cpp index e85f12706..c1e66c90a 100644 --- a/src/tr1/sph_bessel.cpp +++ b/src/tr1/sph_bessel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_besself.cpp b/src/tr1/sph_besself.cpp index 8b48448e0..40bd63017 100644 --- a/src/tr1/sph_besself.cpp +++ b/src/tr1/sph_besself.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_bessell.cpp b/src/tr1/sph_bessell.cpp index e92b0a5d2..c38f16f3b 100644 --- a/src/tr1/sph_bessell.cpp +++ b/src/tr1/sph_bessell.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_legendre.cpp b/src/tr1/sph_legendre.cpp index 2a95a4977..714ee6d58 100644 --- a/src/tr1/sph_legendre.cpp +++ b/src/tr1/sph_legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_legendre(unsigned n, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0); } diff --git a/src/tr1/sph_legendref.cpp b/src/tr1/sph_legendref.cpp index 487efa198..6ff2ddb4b 100644 --- a/src/tr1/sph_legendref.cpp +++ b/src/tr1/sph_legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_legendref(unsigned n, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0f); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0f); } diff --git a/src/tr1/sph_legendrel.cpp b/src/tr1/sph_legendrel.cpp index bb8de9ce8..4f0c8e0c0 100644 --- a/src/tr1/sph_legendrel.cpp +++ b/src/tr1/sph_legendrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned n, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0L); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0L); } diff --git a/src/tr1/sph_neumann.cpp b/src/tr1/sph_neumann.cpp index 13c90c679..08791518e 100644 --- a/src/tr1/sph_neumann.cpp +++ b/src/tr1/sph_neumann.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_neumannf.cpp b/src/tr1/sph_neumannf.cpp index 0b2054bbd..5905bb19f 100644 --- a/src/tr1/sph_neumannf.cpp +++ b/src/tr1/sph_neumannf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_neumannl.cpp b/src/tr1/sph_neumannl.cpp index ce78f2464..32f8613ec 100644 --- a/src/tr1/sph_neumannl.cpp +++ b/src/tr1/sph_neumannl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/tgamma.cpp b/src/tr1/tgamma.cpp index 84de6200f..4735be40d 100644 --- a/src/tr1/tgamma.cpp +++ b/src/tr1/tgamma.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL tgamma(double x) +extern "C" double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/tgammaf.cpp b/src/tr1/tgammaf.cpp index 500ce42c1..02d63292e 100644 --- a/src/tr1/tgammaf.cpp +++ b/src/tr1/tgammaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL tgammaf(float x) +extern "C" float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/tgammal.cpp b/src/tr1/tgammal.cpp index c168c9955..f62cdc8e8 100644 --- a/src/tr1/tgammal.cpp +++ b/src/tr1/tgammal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL tgammal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/trunc.cpp b/src/tr1/trunc.cpp index 1d285ed59..e1e06a111 100644 --- a/src/tr1/trunc.cpp +++ b/src/tr1/trunc.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL trunc(double x) +extern "C" double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/truncf.cpp b/src/tr1/truncf.cpp index 2403f39ff..719d8b431 100644 --- a/src/tr1/truncf.cpp +++ b/src/tr1/truncf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL truncf(float x) +extern "C" float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/truncl.cpp b/src/tr1/truncl.cpp index 23f6e610f..9b77963c1 100644 --- a/src/tr1/truncl.cpp +++ b/src/tr1/truncl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL truncl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} From 2db92b7a2ae2e1ed31ecefff0e4cfbcfc59533af Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 6 Aug 2008 08:47:31 +0000 Subject: [PATCH 024/192] Changed some variable names to suppress -Wshadow warnings, also fixes #2167. [SVN r47995] --- .../boost/math/distributions/non_central_chi_squared.hpp | 2 +- include/boost/math/special_functions/beta.hpp | 4 ++-- .../boost/math/special_functions/detail/ibeta_inverse.hpp | 8 ++++---- include/boost/math/special_functions/gamma.hpp | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/boost/math/distributions/non_central_chi_squared.hpp b/include/boost/math/distributions/non_central_chi_squared.hpp index 3b6c19023..154e82ce5 100644 --- a/include/boost/math/distributions/non_central_chi_squared.hpp +++ b/include/boost/math/distributions/non_central_chi_squared.hpp @@ -113,7 +113,7 @@ namespace boost // *before* the largest term so that backwards iteration // is strictly converging. // - for(int i = k - 1; i >= 0; --i) + for(i = k - 1; i >= 0; --i) { T term = poisb * gamb; sum += term; diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 917984621..dd9bed50f 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -308,8 +308,8 @@ T ibeta_power_terms(T a, // general case: T b1 = (x * cgh) / agh; T b2 = (y * cgh) / bgh; - T l1 = a * log(b1); - T l2 = b * log(b2); + l1 = a * log(b1); + l2 = b * log(b2); if((l1 >= tools::log_max_value()) || (l1 <= tools::log_min_value()) || (l2 >= tools::log_max_value()) diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index 04898db87..0c1ae76f2 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -234,10 +234,10 @@ T temme_method_2_ibeta_inverse(T /*a*/, T /*b*/, T z, T r, T theta, const Policy workspace[0] = s * s; workspace[1] = s * c; workspace[2] = (1 - 2 * workspace[0]) / 3; - static const BOOST_MATH_INT_TABLE_TYPE(T, int) co3[] = { 1, -13, 13 }; - workspace[3] = tools::evaluate_polynomial(co3, workspace[0], 3) / (36 * s * c); - static const BOOST_MATH_INT_TABLE_TYPE(T, int) co4[] = { 1, 21, -69, 46 }; - workspace[4] = tools::evaluate_polynomial(co4, workspace[0], 4) / (270 * workspace[0] * c * c); + static const BOOST_MATH_INT_TABLE_TYPE(T, int) co12[] = { 1, -13, 13 }; + workspace[3] = tools::evaluate_polynomial(co12, workspace[0], 3) / (36 * s * c); + static const BOOST_MATH_INT_TABLE_TYPE(T, int) co13[] = { 1, 21, -69, 46 }; + workspace[4] = tools::evaluate_polynomial(co13, workspace[0], 4) / (270 * workspace[0] * c * c); x = tools::evaluate_polynomial(workspace, eta, 5); #ifdef BOOST_INSTRUMENT std::cout << "Estimating x with Temme method 2 (small eta): " << x << std::endl; diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 6caeb660f..df344ee60 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -253,10 +253,9 @@ T lgamma_imp(T z, const Policy& pol, const L& l, int* sign = 0) { // regular evaluation: T zgh = static_cast(z + L::g() - boost::math::constants::half()); - T l = L::lanczos_sum_expG_scaled(z); result = log(zgh) - 1; result *= z - 0.5f; - result += log(l); + result += log(L::lanczos_sum_expG_scaled(z)); } if(sign) From 8cbd8c5f724f59beb0815a598fd67c6ef1b4d877 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 10 Aug 2008 09:12:02 +0000 Subject: [PATCH 025/192] Added support to the TR1 library. Added Borland and Sun workaround headers to the TR1 lib. Added a "no tr1" version of cmath to Boost.Config and made use of it throughout Boost.Math. [SVN r48054] --- include/boost/math/bindings/rr.hpp | 2 +- include/boost/math/complex/details.hpp | 2 +- include/boost/math/concepts/real_concept.hpp | 2 +- include/boost/math/concepts/std_real_concept.hpp | 2 +- include/boost/math/distributions/cauchy.hpp | 2 +- include/boost/math/distributions/exponential.hpp | 2 +- include/boost/math/distributions/extreme_value.hpp | 2 +- include/boost/math/distributions/rayleigh.hpp | 2 +- include/boost/math/policies/error_handling.hpp | 2 +- include/boost/math/special_functions/acosh.hpp | 2 +- include/boost/math/special_functions/asinh.hpp | 2 +- include/boost/math/special_functions/atanh.hpp | 2 +- include/boost/math/special_functions/beta.hpp | 2 +- include/boost/math/special_functions/cos_pi.hpp | 2 +- .../boost/math/special_functions/detail/unchecked_factorial.hpp | 2 +- include/boost/math/special_functions/expm1.hpp | 2 +- include/boost/math/special_functions/factorials.hpp | 2 +- include/boost/math/special_functions/fpclassify.hpp | 2 +- include/boost/math/special_functions/gamma.hpp | 2 +- include/boost/math/special_functions/hypot.hpp | 2 +- include/boost/math/special_functions/log1p.hpp | 2 +- include/boost/math/special_functions/sin_pi.hpp | 2 +- include/boost/math/special_functions/sinc.hpp | 2 +- include/boost/math/special_functions/sinhc.hpp | 2 +- include/boost/math/tools/config.hpp | 2 +- include/boost/math/tools/fraction.hpp | 2 +- include/boost/math/tools/minima.hpp | 2 +- include/boost/math/tools/roots.hpp | 2 +- include/boost/math/tools/series.hpp | 2 +- include/boost/math/tools/stats.hpp | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/boost/math/bindings/rr.hpp b/include/boost/math/bindings/rr.hpp index d47dae654..eeeb522dc 100644 --- a/include/boost/math/bindings/rr.hpp +++ b/include/boost/math/bindings/rr.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #ifndef BOOST_MATH_NTL_RR_HPP diff --git a/include/boost/math/complex/details.hpp b/include/boost/math/complex/details.hpp index 889c79ef3..cf9907f1e 100644 --- a/include/boost/math/complex/details.hpp +++ b/include/boost/math/complex/details.hpp @@ -15,7 +15,7 @@ #include #include #include // isnan where available -#include +#include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::sqrt; } diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index 8e8d13e82..c396dd4fe 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -32,7 +32,7 @@ #endif #include #include -#include +#include #include // fmodl #ifndef BOOST_MATH_REAL_CONCEPT_HPP diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index e0f405378..d16bc9241 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include // fmodl #ifndef BOOST_MATH_STD_REAL_CONCEPT_HPP diff --git a/include/boost/math/distributions/cauchy.hpp b/include/boost/math/distributions/cauchy.hpp index ca0b0a3bc..de6f6b643 100644 --- a/include/boost/math/distributions/cauchy.hpp +++ b/include/boost/math/distributions/cauchy.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include diff --git a/include/boost/math/distributions/exponential.hpp b/include/boost/math/distributions/exponential.hpp index e3316e97b..44bf04240 100644 --- a/include/boost/math/distributions/exponential.hpp +++ b/include/boost/math/distributions/exponential.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef BOOST_MSVC # pragma warning(push) diff --git a/include/boost/math/distributions/extreme_value.hpp b/include/boost/math/distributions/extreme_value.hpp index 038307181..eeb94e750 100644 --- a/include/boost/math/distributions/extreme_value.hpp +++ b/include/boost/math/distributions/extreme_value.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include // // This is the maximum extreme value distribution, see diff --git a/include/boost/math/distributions/rayleigh.hpp b/include/boost/math/distributions/rayleigh.hpp index 2a97b4194..bcb79cdc0 100644 --- a/include/boost/math/distributions/rayleigh.hpp +++ b/include/boost/math/distributions/rayleigh.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef BOOST_MSVC # pragma warning(push) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index 95f650525..101d2cfd6 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 48cce3545..072e48802 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -14,7 +14,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index 6caa4bbc7..f524b5f05 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -15,7 +15,7 @@ #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index b67297ec3..1771fecd1 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -15,7 +15,7 @@ #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index dd9bed50f..63552a0b1 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace boost{ namespace math{ diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 4a2eb2393..3a83ed525 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/detail/unchecked_factorial.hpp b/include/boost/math/special_functions/detail/unchecked_factorial.hpp index 1189933ad..7783e161c 100644 --- a/include/boost/math/special_functions/detail/unchecked_factorial.hpp +++ b/include/boost/math/special_functions/detail/unchecked_factorial.hpp @@ -19,7 +19,7 @@ #ifdef BOOST_MSVC #pragma warning(pop) #endif -#include +#include #include namespace boost { namespace math diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index 7f83e559e..73b4f4584 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include // platform's ::expm1 #include #include diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index a6ab66247..4b484a7cb 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -22,7 +22,7 @@ #ifdef BOOST_MSVC #pragma warning(pop) #endif -#include +#include namespace boost { namespace math { diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index ae8cbe0ab..f2f0f75a4 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -11,7 +11,7 @@ #endif #include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index df344ee60..04126bb62 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #ifdef BOOST_MATH_INSTRUMENT diff --git a/include/boost/math/special_functions/hypot.hpp b/include/boost/math/special_functions/hypot.hpp index c182ada83..efe1a3f21 100644 --- a/include/boost/math/special_functions/hypot.hpp +++ b/include/boost/math/special_functions/hypot.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include // for swap #ifdef BOOST_NO_STDC_NAMESPACE diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 0122a35d7..6ce4777f0 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include // platform's ::log1p #include #include diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 551492882..8a706a1d7 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/sinc.hpp b/include/boost/math/special_functions/sinc.hpp index 62b2cad96..9c2a5c162 100644 --- a/include/boost/math/special_functions/sinc.hpp +++ b/include/boost/math/special_functions/sinc.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/sinhc.hpp b/include/boost/math/special_functions/sinhc.hpp index 808b3fd41..f90b55476 100644 --- a/include/boost/math/special_functions/sinhc.hpp +++ b/include/boost/math/special_functions/sinhc.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 16a176afc..006295517 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -14,7 +14,7 @@ #include #include #include // for min and max -#include +#include #include #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # include diff --git a/include/boost/math/tools/fraction.hpp b/include/boost/math/tools/fraction.hpp index 344012d3b..28af64eb9 100644 --- a/include/boost/math/tools/fraction.hpp +++ b/include/boost/math/tools/fraction.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/tools/minima.hpp b/include/boost/math/tools/minima.hpp index 94c5de3c4..625368c52 100644 --- a/include/boost/math/tools/minima.hpp +++ b/include/boost/math/tools/minima.hpp @@ -12,7 +12,7 @@ #endif #include -#include +#include #include #include #include diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index bbe722916..0a356b44c 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -11,7 +11,7 @@ #endif #include -#include +#include #include #include diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index f5f659d24..1a8d74403 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include diff --git a/include/boost/math/tools/stats.hpp b/include/boost/math/tools/stats.hpp index bbc1c44eb..e7ea8bd2b 100644 --- a/include/boost/math/tools/stats.hpp +++ b/include/boost/math/tools/stats.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include From c9e8b4d1925eac361fc3fdeda23feba7e1b1cf2f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 20 Aug 2008 11:02:05 +0000 Subject: [PATCH 026/192] Updated inverse hypergeometric functions with better tests and more accurate implementation. [SVN r48250] --- .../boost/math/special_functions/acosh.hpp | 69 ++--- .../boost/math/special_functions/asinh.hpp | 67 ++-- .../boost/math/special_functions/atanh.hpp | 53 ++-- include/boost/math/tools/precision.hpp | 82 +++++ include/boost/math/tools/test.hpp | 10 + include/boost/math/tools/test_data.hpp | 10 +- test/Jamfile.v2 | 2 + test/acosh_data.ipp | 266 ++++++++++++++++ test/asinh_data.ipp | 286 ++++++++++++++++++ test/atanh_data.ipp | 265 ++++++++++++++++ test/handle_test_result.hpp | 8 + test/test_inv_hyp.cpp | 237 +++++++++++++++ tools/inv_hyp_data.cpp | 134 ++++++++ 13 files changed, 1391 insertions(+), 98 deletions(-) create mode 100644 test/acosh_data.ipp create mode 100644 test/asinh_data.ipp create mode 100644 test/atanh_data.ipp create mode 100644 test/test_inv_hyp.cpp create mode 100644 tools/inv_hyp_data.cpp diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 48cce3545..a808d5731 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -1,6 +1,7 @@ // boost asinh.hpp header file // (C) Copyright Eric Ford 2001 & Hubert Holin. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -42,68 +43,66 @@ namespace boost template inline T acosh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; + BOOST_MATH_STD_USING - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - - if(x < one) + if(x < 1) { return policies::raise_domain_error( "boost::math::acosh<%1%>(%1%)", "acosh requires x >= 1, but got x = %1%.", x, pol); } - else if (x >= taylor_n_bound) + else if ((x - 1) >= tools::root_epsilon()) { - if (x > upper_taylor_2_bound) + if (x > 1 / tools::root_epsilon()) { + // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/ // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x*two) ); + return( log( x * 2) ); + } + else if(x < 1.5f) + { + // This is just a rearrangement of the standard form below + // devised to minimse loss of precision when x ~ 1: + T y = x - 1; + return boost::math::log1p(y + sqrt(y * y + 2 * y), pol); } else { - return( log( x + sqrt(x*x-one) ) ); + // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/ + return( log( x + sqrt(x * x - 1) ) ); } } else { - T y = sqrt(x-one); + // see http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/04/01/0001/ + T y = x - 1; // approximation by taylor series in y at 0 up to order 2 - T result = y; - - if (y >= taylor_2_bound) - { - T y3 = y*y*y; - - // approximation by taylor series in y at 0 up to order 4 - result -= y3/static_cast(12); - } - - return(sqrt(static_cast(2))*result); + T result = sqrt(2 * y) * (1 + y /12 + 3 * y * y / 160); + return result; } } } template - inline typename tools::promote_args::type acosh(const T x, const Policy& pol) + inline typename tools::promote_args::type acosh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::acosh_imp( - static_cast(x), pol); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::acosh_imp(static_cast(x), forwarding_policy()), + "boost::math::acosh<%1%>(%1%)"); } template inline typename tools::promote_args::type acosh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::acosh_imp( - static_cast(x), policies::policy<>()); + return boost::math::acosh(x, policies::policy<>()); } } @@ -112,5 +111,3 @@ namespace boost #endif /* BOOST_ACOSH_HPP */ - - diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index 6caa4bbc7..f2f5e4c5c 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -1,6 +1,7 @@ // boost asinh.hpp header file // (C) Copyright Eric Ford & Hubert Holin 2001. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +20,8 @@ #include #include #include +#include +#include // This is the inverse of the hyperbolic sine function. @@ -38,51 +41,41 @@ namespace boost using ::std::numeric_limits; #endif - template - inline T asinh_imp(const T x) + template + inline T asinh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; + BOOST_MATH_STD_USING - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - static T const upper_taylor_n_bound = one/taylor_n_bound; - - if (x >= +taylor_n_bound) + if (x >= tools::forth_root_epsilon()) { - if (x > upper_taylor_n_bound) + if (x > 1 / tools::root_epsilon()) { - if (x > upper_taylor_2_bound) - { - // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x * two) ); - } - else - { - // approximation by laurent series in 1/x at 0+ order from -1 to 1 - return( log( x*two + (one/(x*two)) ) ); - } + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/ + // approximation by laurent series in 1/x at 0+ order from -1 to 1 + return log(x * 2) + 1/ (4 * x * x); + } + else if(x < 0.5f) + { + // As below, but rearranged to preserve digits: + return boost::math::log1p(x + sqrt1pm1(x * x, pol), pol); } else { - return( log( x + sqrt(x*x+one) ) ); + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/ + return( log( x + sqrt(x*x+1) ) ); } } - else if (x <= -taylor_n_bound) + else if (x <= -tools::forth_root_epsilon()) { return(-asinh(-x)); } else { + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/03/01/0001/ // approximation by taylor series in x at 0 up to order 2 T result = x; - if (abs(x) >= taylor_2_bound) + if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; @@ -98,16 +91,22 @@ namespace boost template inline typename tools::promote_args::type asinh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::asinh_imp( - static_cast(x)); + return boost::math::asinh(x, policies::policy<>()); } template inline typename tools::promote_args::type asinh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::asinh_imp( - static_cast(x)); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::asinh_imp(static_cast(x), forwarding_policy()), + "boost::math::asinh<%1%>(%1%)"); } } diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index b67297ec3..deaa9fa79 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -1,6 +1,7 @@ // boost atanh.hpp header file // (C) Copyright Hubert Holin 2001. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +21,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic tangent function. @@ -45,52 +47,45 @@ namespace boost template inline T atanh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - + BOOST_MATH_STD_USING static const char* function = "boost::math::atanh<%1%>(%1%)"; - if (x < -one) + if(x < -1) { return policies::raise_domain_error( function, "atanh requires x >= -1, but got x = %1%.", x, pol); } - else if (x < -one + tools::epsilon()) + else if(x < -1 + tools::epsilon()) { // -Infinity: return -policies::raise_overflow_error(function, 0, pol); } - else if (x > one - tools::epsilon()) + else if(x > 1 - tools::epsilon()) { // Infinity: return -policies::raise_overflow_error(function, 0, pol); } - else if (x > +one) + else if(x > 1) { return policies::raise_domain_error( function, "atanh requires x <= 1, but got x = %1%.", x, pol); } - else if (abs(x) >= taylor_n_bound) + else if(abs(x) >= tools::forth_root_epsilon()) { - return(log( (one + x) / (one - x) ) / two); + // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ + if(abs(x) < 0.5f) + return (boost::math::log1p(x, pol) - boost::math::log1p(-x, pol)) / 2; + return(log( (1 + x) / (1 - x) ) / 2); } else { + // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/06/01/03/01/ // approximation by taylor series in x at 0 up to order 2 T result = x; - if (abs(x) >= taylor_2_bound) + if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; @@ -104,18 +99,24 @@ namespace boost } template - inline typename tools::promote_args::type atanh(const T x, const Policy& pol) + inline typename tools::promote_args::type atanh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::atanh_imp( - static_cast(x), pol); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::atanh_imp(static_cast(x), forwarding_policy()), + "boost::math::atanh<%1%>(%1%)"); } template inline typename tools::promote_args::type atanh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::atanh_imp( - static_cast(x), policies::policy<>()); + return boost::math::atanh(x, policies::policy<>()); } } diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 1f5029abc..a121e96d4 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -232,6 +232,88 @@ inline T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) #endif } +namespace detail{ + +template +inline T root_epsilon_imp(const mpl::int_<24>&) +{ + return static_cast(0.00034526698300124390839884978618400831996329879769945L); +} + +template +inline T root_epsilon_imp(const mpl::int_<53>&) +{ + return static_cast(0.1490116119384765625e-7L); +} + +template +inline T root_epsilon_imp(const mpl::int_<64>&) +{ + return static_cast(0.32927225399135962333569506281281311031656150598474e-9L); +} + +template +inline T root_epsilon_imp(const mpl::int_<113>&) +{ + return static_cast(0.1387778780781445675529539585113525390625e-16L); +} + +template +inline T root_epsilon_imp(const Tag&) +{ + BOOST_MATH_STD_USING + static const T r_eps = sqrt(tools::epsilon()); + return r_eps; +} + +template +inline T forth_root_epsilon_imp(const mpl::int_<24>&) +{ + return static_cast(0.018581361171917516667460937040007436176452688944747L); +} + +template +inline T forth_root_epsilon_imp(const mpl::int_<53>&) +{ + return static_cast(0.0001220703125L); +} + +template +inline T forth_root_epsilon_imp(const mpl::int_<64>&) +{ + return static_cast(0.18145860519450699870567321328132261891067079047605e-4L); +} + +template +inline T forth_root_epsilon_imp(const mpl::int_<113>&) +{ + return static_cast(0.37252902984619140625e-8L); +} + +template +inline T forth_root_epsilon_imp(const Tag&) +{ + BOOST_MATH_STD_USING + static const T r_eps = sqrt(sqrt(tools::epsilon())); + return r_eps; +} + +} + +template +inline T root_epsilon() +{ + typedef mpl::int_::digits> tag_type; + return detail::root_epsilon_imp(tag_type()); +} + +template +inline T forth_root_epsilon() +{ + typedef mpl::int_::digits> tag_type; + return detail::forth_root_epsilon_imp(tag_type()); +} + } // namespace tools } // namespace math } // namespace boost diff --git a/include/boost/math/tools/test.hpp b/include/boost/math/tools/test.hpp index 2dfd31425..c54e82727 100644 --- a/include/boost/math/tools/test.hpp +++ b/include/boost/math/tools/test.hpp @@ -151,9 +151,19 @@ inline double relative_error(double a, double b) } #endif +template +void set_output_precision(T) +{ + if(std::numeric_limits::digits10) + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } +} + template void print_row(const Seq& row) { + set_output_precision(row[0]); for(unsigned i = 0; i < row.size(); ++i) { if(i) diff --git a/include/boost/math/tools/test_data.hpp b/include/boost/math/tools/test_data.hpp index 3cc09c093..23a1abb56 100644 --- a/include/boost/math/tools/test_data.hpp +++ b/include/boost/math/tools/test_data.hpp @@ -328,8 +328,14 @@ private: template inline float test_data::truncate_to_float(float const * pf) { - extern_val = *pf; - return *pf; + BOOST_MATH_STD_USING + int expon; + float f = floor(ldexp(frexp(*pf, &expon), 22)); + f = ldexp(f, expon - 22); + return f; + + //extern_val = *pf; + //return *pf; } template diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index c523d277e..7fac3388c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -218,6 +218,7 @@ run test_igamma_inva.cpp TEST_REAL_CONCEPT : test_igamma_inva_real_concept ; run test_instantiate1.cpp test_instantiate2.cpp ; +run test_inv_hyp.cpp ; run test_laguerre.cpp ; run test_legendre.cpp ; run test_lognormal.cpp ; @@ -491,3 +492,4 @@ compile compile_test/tools_test_inc_test.cpp ; compile compile_test/tools_toms748_inc_test.cpp ; + diff --git a/test/acosh_data.ipp b/test/acosh_data.ipp new file mode 100644 index 000000000..fc252018e --- /dev/null +++ b/test/acosh_data.ipp @@ -0,0 +1,266 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 261> acosh_data = {{ + { SC_(1.000001430511474609375), SC_(0.001691455665129294448190238354291760044433) }, + { SC_(1.0000019073486328125), SC_(0.001953124689559275021527821917817027620963) }, + { SC_(1.000007152557373046875), SC_(0.003782208044661295168504799813496158490314) }, + { SC_(1.000013828277587890625), SC_(0.005258943946801101349061072655743616330534) }, + { SC_(1.0000171661376953125), SC_(0.005859366618129202398694086527594451883545) }, + { SC_(1.00006008148193359375), SC_(0.0109618319921888517811096976159923461784) }, + { SC_(1.000116825103759765625), SC_(0.01528547213183042467192017645636643040682) }, + { SC_(1.000148773193359375), SC_(0.01724931909352987823311560583970196658141) }, + { SC_(1.000398159027099609375), SC_(0.02821817173865537359266716853098519889415) }, + { SC_(1.000638484954833984375), SC_(0.03573281468231456624811499142438796295686) }, + { SC_(1.001071453094482421875), SC_(0.04628740247287877599360006621134226755174) }, + { SC_(1.003021717071533203125), SC_(0.07771996527168971264969648279358369972575) }, + { SC_(1.004993915557861328125), SC_(0.09989759308602780434912638996550489375369) }, + { SC_(1.00928401947021484375), SC_(0.1361593876803246479600670434737716450022) }, + { SC_(1.024169921875), SC_(0.2194227900495835483852561715845842241518) }, + { SC_(1.062277317047119140625), SC_(0.3511165938166054588185413287563455693446) }, + { SC_(1.12234401702880859375), SC_(0.4897502671128818535428474267470966393752) }, + { SC_(1.2495574951171875), SC_(0.6925568837084910405419269283192900693752) }, + { SC_(1.491221904754638671875), SC_(0.9545305722214140465734705961617555409538) }, + { SC_(1.983847141265869140625), SC_(1.307581416910453029674373062377350125402) }, + { SC_(2.15761280059814453125), SC_(1.403518877974133434572205965467405839077) }, + { SC_(2.40639781951904296875), SC_(1.525007084542751786819384889715403191957) }, + { SC_(3.38695812225341796875), SC_(1.890537201307279875549078665860235683411) }, + { SC_(4.4516773223876953125), SC_(2.173567339994825397387431806918552342932) }, + { SC_(6.9391326904296875), SC_(2.625091127868242256287879402513352014572) }, + { SC_(7.756023406982421875), SC_(2.737434918695162165715461546271032662695) }, + { SC_(8.8823699951171875), SC_(2.874031716780194544439172840789924579634) }, + { SC_(9.869171142578125), SC_(2.979986393289490221624555712675426245527) }, + { SC_(16.848876953125), SC_(3.516549380542481075157493697729821147595) }, + { SC_(16.88458251953125), SC_(3.518670034680249794623612003576884164306) }, + { SC_(18.18859100341796875), SC_(3.593185165198828891634086870735797352995) }, + { SC_(18.82012176513671875), SC_(3.627367214296338506596699897092700261917) }, + { SC_(19.18418121337890625), SC_(3.646553244410946142822321573885913155251) }, + { SC_(24.039520263671875), SC_(3.872413451393967155852229598937671193827) }, + { SC_(26.5569915771484375), SC_(3.97208556893332931613088010770137243142) }, + { SC_(27.92110443115234375), SC_(4.022209178119237972634584536383754567227) }, + { SC_(32.314666748046875), SC_(4.168428891496629419926716002725343213186) }, + { SC_(34.7300872802734375), SC_(4.24054622986100481621284684937772318866) }, + { SC_(36.51556396484375), SC_(4.290698214968890417003449585503652329902) }, + { SC_(38.851287841796875), SC_(4.352722738491573736218790864551080662126) }, + { SC_(49.46875), SC_(4.59438616262944868606926670858880728888) }, + { SC_(49.6726531982421875), SC_(4.598500387004538200979463375829093317529) }, + { SC_(55.821014404296875), SC_(4.715217340185609026248077357993388963859) }, + { SC_(57.119781494140625), SC_(4.738221040019820009132180121068224048563) }, + { SC_(60.3798370361328125), SC_(4.793733825338028989056646578701956447074) }, + { SC_(63.4661865234375), SC_(4.843592376953016901945130034442741537681) }, + { SC_(63.822418212890625), SC_(4.849190310904695081724453083230505499) }, + { SC_(64.366424560546875), SC_(4.857678972284480806836897045666147581194) }, + { SC_(65.82318115234375), SC_(4.880061548144127001309581646898589070845) }, + { SC_(68.60302734375), SC_(4.921430721025434361496543279369773904556) }, + { SC_(70.173583984375), SC_(4.944068352080570156852448111271304401145) }, + { SC_(71.80126953125), SC_(4.967000841791218009854450984654955748527) }, + { SC_(75.407867431640625), SC_(5.016014824864731856945880331601344083118) }, + { SC_(75.497711181640625), SC_(5.017205657609766266706283982466292758789) }, + { SC_(78.06475830078125), SC_(5.050644871655082237287791451581061020693) }, + { SC_(79.64892578125), SC_(5.070736320140527520131044330827542555678) }, + { SC_(79.8707275390625), SC_(5.073517411135062274633407326047677797493) }, + { SC_(82.14324951171875), SC_(5.101574796209937553992594384708408566472) }, + { SC_(86.422149658203125), SC_(5.152357710985635411723269669070507384393) }, + { SC_(87.758697509765625), SC_(5.167705692500116617668438212039278403675) }, + { SC_(94.249420166015625), SC_(5.239063709802807411774762976165711451289) }, + { SC_(95.002593994140625), SC_(5.24702367651990363562135237922593081374) }, + { SC_(96.06402587890625), SC_(5.258134994273664228925894855596706922092) }, + { SC_(99.10101318359375), SC_(5.289261389093961411474730159621540149161) }, + { SC_(104.825958251953125), SC_(5.345425863147170918152692907733404160171) }, + { SC_(105.894317626953125), SC_(5.355566478724588805787125327460047194459) }, + { SC_(106.750244140625), SC_(5.363617180711894834893456209993366372702) }, + { SC_(109.40167236328125), SC_(5.388152468690488330936438928871930644775) }, + { SC_(111.295989990234375), SC_(5.40532022596301299871913818031312501789) }, + { SC_(112.682159423828125), SC_(5.417698597745428582703028438959417637741) }, + { SC_(115.847869873046875), SC_(5.445406415908932972979361284782173288771) }, + { SC_(122.518951416015625), SC_(5.501396249028249309478903043850515943644) }, + { SC_(126.29083251953125), SC_(5.531718947357248141901016725943097821463) }, + { SC_(127.88677978515625), SC_(5.544277233951786833046255699209839124282) }, + { SC_(128.29241943359375), SC_(5.547444176085567387868629933507681372844) }, + { SC_(129.49658203125), SC_(5.556786759298987489018162005929203901677) }, + { SC_(138.73651123046875), SC_(5.625710723366437130110566517151979116591) }, + { SC_(139.18450927734375), SC_(5.628934733085021889655473009134778907233) }, + { SC_(139.9705810546875), SC_(5.63456668505549125187745033695013277031) }, + { SC_(143.6336669921875), SC_(5.660401141376928390068911580516739480767) }, + { SC_(149.2176513671875), SC_(5.698541939965667319302405718431306124964) }, + { SC_(150.61602783203125), SC_(5.707869896181299042045964962097048877529) }, + { SC_(151.65460205078125), SC_(5.714741890601692470131657476637875234333) }, + { SC_(154.77532958984375), SC_(5.735111323217677235163096422075933590581) }, + { SC_(158.9586181640625), SC_(5.76178119164116056169664536557902282984) }, + { SC_(159.23260498046875), SC_(5.76350337802895912932271749968885321291) }, + { SC_(166.89166259765625), SC_(5.810483079631769347906173026231591180669) }, + { SC_(169.22418212890625), SC_(5.824362807770767372309724658583543187687) }, + { SC_(170.85247802734375), SC_(5.833939098607024938518744061528880726076) }, + { SC_(175.641845703125), SC_(5.861586030831371111277316749706184493497) }, + { SC_(176.47808837890625), SC_(5.866335876872543841804521246497450515591) }, + { SC_(177.0284423828125), SC_(5.869449614294116474831852726381675383803) }, + { SC_(178.81622314453125), SC_(5.879497954012966336157412623485146460234) }, + { SC_(181.28570556640625), SC_(5.893213844044450514365554597289542581697) }, + { SC_(190.84246826171875), SC_(5.944588630523773589353947366401268565142) }, + { SC_(191.39764404296875), SC_(5.94749352592071287963619396611460598163) }, + { SC_(194.2606201171875), SC_(5.962341215900494050109187978733428591562) }, + { SC_(194.89630126953125), SC_(5.965608227627600046293288118981009401155) }, + { SC_(196.72125244140625), SC_(5.974928484931286802822226328854017998272) }, + { SC_(196.76788330078125), SC_(5.97516550017620215691682414383193227447) }, + { SC_(198.0592041015625), SC_(5.981706804024238659640680772319516752432) }, + { SC_(199.97052001953125), SC_(5.991310884439669647644011374615753552043) }, + { SC_(202.70001220703125), SC_(6.004868209578553896003834136537443847497) }, + { SC_(204.95684814453125), SC_(6.015940689286515853596140406483086930665) }, + { SC_(206.92059326171875), SC_(6.025476453825986378650455090165700700781) }, + { SC_(211.4588623046875), SC_(6.047172064627678522672151564001319932574) }, + { SC_(211.6217041015625), SC_(6.047941864223159215142104276243607189411) }, + { SC_(212.15936279296875), SC_(6.050479329955437674042299338123601544698) }, + { SC_(219.93341064453125), SC_(6.086466833749718691309844243695794396376) }, + { SC_(223.34747314453125), SC_(6.101870903204913623855234973179987714517) }, + { SC_(228.56036376953125), SC_(6.12494274439855238424605675602915271015) }, + { SC_(229.53656005859375), SC_(6.129204755426344240698049588914342485212) }, + { SC_(231.15753173828125), SC_(6.136241935513705416652882857399712029477) }, + { SC_(235.22589111328125), SC_(6.153688953514382528837249519861026992294) }, + { SC_(237.17108154296875), SC_(6.16192447986332112027066888322817886098) }, + { SC_(237.904541015625), SC_(6.165012268502458223847465413629334545746) }, + { SC_(243.202392578125), SC_(6.187036941752031847781237018817248226575) }, + { SC_(244.296875), SC_(6.191527178125453588013362995547294190556) }, + { SC_(245.39239501953125), SC_(6.196001570568187444354689455736723305464) }, + { SC_(245.80389404296875), SC_(6.197677082130341298614824238362609944761) }, + { SC_(249.68365478515625), SC_(6.213337906126028634019511362668656048871) }, + { SC_(252.32763671875), SC_(6.223871642756904989009941455863848621693) }, + { SC_(253.4725341796875), SC_(6.228398760115368978419785861340394334949) }, + { SC_(264.1583251953125), SC_(6.269692237869834655812588535960729291645) }, + { SC_(265.867919921875), SC_(6.276143287577458434544566538806340395227) }, + { SC_(273.893798828125), SC_(6.305884283737175999056149819356227140283) }, + { SC_(274.060546875), SC_(6.306492908028796208195612980534832526609) }, + { SC_(274.06298828125), SC_(6.306501816321711306242744764166827854238) }, + { SC_(275.31201171875), SC_(6.311048924823309539122894248298646711515) }, + { SC_(281.2171630859375), SC_(6.332271212543191917887016682596127229871) }, + { SC_(284.3428955078125), SC_(6.343324976847916523668021506516982451804) }, + { SC_(284.8428955078125), SC_(6.345081883725142172010442438360996090607) }, + { SC_(287.3035888671875), SC_(6.353683609448095450690653155116609411345) }, + { SC_(290.8973388671875), SC_(6.366114643735996187010064226141367713494) }, + { SC_(293.0467529296875), SC_(6.373476431987165195009419682926258568514) }, + { SC_(293.048583984375), SC_(6.3734826803404046607923256022891007467) }, + { SC_(296.819091796875), SC_(6.386267177599691603449621482941540136447) }, + { SC_(297.6572265625), SC_(6.389086936901673374370938395043767464615) }, + { SC_(308.40625), SC_(6.424562459508494815578189029717236448261) }, + { SC_(316.5472412109375), SC_(6.450617177370153067374226847837008577358) }, + { SC_(320.2418212890625), SC_(6.462221144761522067224169792659123404149) }, + { SC_(322.33642578125), SC_(6.468740575092417615259160797033210213863) }, + { SC_(323.5101318359375), SC_(6.472375224718483717268648919441488851024) }, + { SC_(327.8939208984375), SC_(6.485834999462653559161623555380871809288) }, + { SC_(328.0833740234375), SC_(6.486412623146554512400295875149968123595) }, + { SC_(328.214599609375), SC_(6.486812521370483270051173204357170113696) }, + { SC_(332.13916015625), SC_(6.498698952535686590971725425771901435577) }, + { SC_(339.6888427734375), SC_(6.521175044233962334855405597829204127829) }, + { SC_(340.171630859375), SC_(6.522595306993372841176959822169835487203) }, + { SC_(340.22998046875), SC_(6.522766822935215301119395768816736464171) }, + { SC_(340.9984130859375), SC_(6.525022854134450397488249525584977969848) }, + { SC_(347.719482421875), SC_(6.544541182598698837108180066568285561192) }, + { SC_(347.921142578125), SC_(6.545120967585682780158986289403626335039) }, + { SC_(349.8392333984375), SC_(6.550618853671590396954212923343777795426) }, + { SC_(353.1812744140625), SC_(6.560126626713879038902701972848577987576) }, + { SC_(353.3170166015625), SC_(6.560510895819138848557847535694659145744) }, + { SC_(354.9730224609375), SC_(6.56518699003913475265728787337345634833) }, + { SC_(355.6412353515625), SC_(6.567067660815945254763768403011524099801) }, + { SC_(363.193603515625), SC_(6.588081320423385926941395650884632048324) }, + { SC_(363.7503662109375), SC_(6.589613116365141119507599520545813820205) }, + { SC_(366.66650390625), SC_(6.597598047275183820713128823864925712214) }, + { SC_(370.5828857421875), SC_(6.608222493065004674432923629831401595644) }, + { SC_(371.822998046875), SC_(6.611563301604297330780249554012149222974) }, + { SC_(375.8822021484375), SC_(6.622421213257872616605790226875280590718) }, + { SC_(377.1107177734375), SC_(6.625684248051367798967594517111734939065) }, + { SC_(377.588623046875), SC_(6.626950731244344518396423054010667385835) }, + { SC_(378.8428955078125), SC_(6.630267034079058832474904688332205765807) }, + { SC_(379.1123046875), SC_(6.630977920761718188663355128303457269644) }, + { SC_(381.1038818359375), SC_(6.636217452968849140199299619634845177402) }, + { SC_(382.1112060546875), SC_(6.63885714989915892916806173377813464616) }, + { SC_(382.9927978515625), SC_(6.641161660644278254856011296094169025726) }, + { SC_(387.1845703125), SC_(6.652047018118426624071335253039983067027) }, + { SC_(389.669921875), SC_(6.658445560711747733097363184134660374201) }, + { SC_(389.804443359375), SC_(6.658790721334144459483338624834811878532) }, + { SC_(396.3114013671875), SC_(6.675345858154136306174834824525273599533) }, + { SC_(397.005126953125), SC_(6.677094789236718239327386065258295745882) }, + { SC_(397.1934814453125), SC_(6.677569116668089765968288575699796076917) }, + { SC_(397.8046875), SC_(6.679106750673113062518913783394959687397) }, + { SC_(398.8426513671875), SC_(6.681712590609844816466059398426090860379) }, + { SC_(399.1663818359375), SC_(6.682523938576487571986006995202709018951) }, + { SC_(399.2547607421875), SC_(6.682745323455160373493982153327465350514) }, + { SC_(400.33984375), SC_(6.68545941647717813159478393220239518843) }, + { SC_(403.9578857421875), SC_(6.6944562778394978005276529277337054901) }, + { SC_(404.279541015625), SC_(6.69525222285407608719250824812439781544) }, + { SC_(405.0574951171875), SC_(6.697174677114241660699777628750006369949) }, + { SC_(407.328125), SC_(6.702764738337774266407206003201536960489) }, + { SC_(407.547119140625), SC_(6.703302231179959306927821131625588949855) }, + { SC_(410.5994873046875), SC_(6.710763953621196143396177253879091429692) }, + { SC_(410.8016357421875), SC_(6.711256159037372934708585809074885390587) }, + { SC_(411.129638671875), SC_(6.712054288828398871484168355341928910672) }, + { SC_(411.9053955078125), SC_(6.71393940750234669898410033879058990879) }, + { SC_(415.5833740234375), SC_(6.722828986708716597641935076657699092718) }, + { SC_(417.669189453125), SC_(6.727835453862131466839432640652077316451) }, + { SC_(420.517822265625), SC_(6.734632628835640647510302384260878716087) }, + { SC_(424.3853759765625), SC_(6.743787740494532100937084679719803238806) }, + { SC_(424.7154541015625), SC_(6.744565219553757289338296980369793898726) }, + { SC_(436.3419189453125), SC_(6.771572021268065472972105624143419455948) }, + { SC_(438.501953125), SC_(6.776510146304200360440233381235270942742) }, + { SC_(439.3369140625), SC_(6.778412462065226061129312213528458641603) }, + { SC_(445.5606689453125), SC_(6.792479340600349658156225315328718026016) }, + { SC_(452.9901123046875), SC_(6.809016260337228831936738732897410136218) }, + { SC_(453.77490234375), SC_(6.810747231716348697176150895548602377257) }, + { SC_(456.7745361328125), SC_(6.817335895109250694056391088138248559173) }, + { SC_(457.9520263671875), SC_(6.819910421197310978529029433663908470507) }, + { SC_(458.6795654296875), SC_(6.821497844004013502448409287800537132756) }, + { SC_(460.5164794921875), SC_(6.825494642872147128332763285398798677976) }, + { SC_(461.8717041015625), SC_(6.828433164406686771701521855077910926631) }, + { SC_(464.7025146484375), SC_(6.834543470287694007429787493802694241702) }, + { SC_(467.0626220703125), SC_(6.839609377592375029558701051277174984946) }, + { SC_(467.0712890625), SC_(6.83962793384421245687931998241985864452) }, + { SC_(470.096923828125), SC_(6.846084943645238808995975141700921096311) }, + { SC_(475.1607666015625), SC_(6.856799276049143563229337105263608232029) }, + { SC_(477.5537109375), SC_(6.861822721577315741859023908594798480392) }, + { SC_(478.626220703125), SC_(6.864066049482580522441871176709541953581) }, + { SC_(478.7958984375), SC_(6.8644204973336804815313774177052514308) }, + { SC_(479.6864013671875), SC_(6.86627865397306926299976132455469132911) }, + { SC_(479.7867431640625), SC_(6.866487814627139251181098007832885765806) }, + { SC_(479.9122314453125), SC_(6.866749331118839213169502276407114725047) }, + { SC_(482.4793701171875), SC_(6.872084270243208288559827917865564857217) }, + { SC_(482.5181884765625), SC_(6.872164723177874204251489651336382789811) }, + { SC_(483.8797607421875), SC_(6.874982560453873383658251901541786496761) }, + { SC_(484.4649658203125), SC_(6.876191234145179554349993597841191267853) }, + { SC_(485.3258056640625), SC_(6.877966548833207350351265217595172972905) }, + { SC_(490.57373046875), SC_(6.888721726428236039221890401406352667404) }, + { SC_(493.7423095703125), SC_(6.895159895589969853078001763235883415882) }, + { SC_(494.272216796875), SC_(6.896232568812717932403585431953843090099) }, + { SC_(496.44775390625), SC_(6.900624415355815565025217006388610220335) }, + { SC_(497.0401611328125), SC_(6.901816998553274960978831433918910814375) }, + { SC_(498.234130859375), SC_(6.904216282287646841845864948036717548583) }, + { SC_(665.0791015625), SC_(7.193052598670792558912351099032198333184) }, + { SC_(1170.29150390625), SC_(7.758155143419731595147190189684865359835) }, + { SC_(2058.7958984375), SC_(8.323023697145112010072186763207801515396) }, + { SC_(5824.533203125), SC_(9.362981311610990187535171280837584820237) }, + { SC_(9114.30859375), SC_(9.810748008110925084589570791503788344652) }, + { SC_(31388.40625), SC_(11.04734105631420306080680845572519805956) }, + { SC_(53732.765625), SC_(11.58492543551253544550738607240822985131) }, + { SC_(117455.09375), SC_(12.3669585392073964063765790447351364021) }, + { SC_(246210.625), SC_(13.10708982832787479175510220013343945066) }, + { SC_(513670.125), SC_(13.84248373881161892648765606597953800527) }, + { SC_(788353.25), SC_(14.2708487357510805583139091933979145572) }, + { SC_(1736171), SC_(15.06033985221540896276800056693696357419) }, + { SC_(3770530), SC_(15.83587331365755605568701554508826253991) }, + { SC_(4344090), SC_(15.97747403917326507392988269405762331118) }, + { SC_(11419360), SC_(16.94396789915014469006155507384872743685) }, + { SC_(31023240), SC_(17.9433943395609684013300439026124645108) }, + { SC_(40665424), SC_(18.21403593674543079149440340324547029148) }, + { SC_(129788064), SC_(19.37456058170921543648305825985098346634) }, + { SC_(225668224), SC_(19.9277236237785460971743917048171789264) }, + { SC_(450631936), SC_(20.61930863840059519949232655148142693395) }, + { SC_(750941952), SC_(21.1299860930266968673735341410555546727) }, + { SC_(1887358976), SC_(22.05159150215413004649732665310838648331) }, + { SC_(3738011648), SC_(22.73496684263974142690946105862900518113) }, + { SC_(7486695424), SC_(23.42954051928097083366085869187241049078) }, + { SC_(12668080128), SC_(23.95549847139166892348970713379911103008) }, + { SC_(23918272512), SC_(24.59105572458284785473015955570721968617) }, + { SC_(48862560256), SC_(25.30542448179939429678484289438720749573) }, + { SC_(113763549184), SC_(26.15053518194943663075151882301281675861) }, + { SC_(161334755328), SC_(26.49989444953256419131899378956019192586) }, + { SC_(321933279232), SC_(27.19075733422631778452130090694771384112) }, + { SC_(715734122496), SC_(27.98972177820814613504868209029528272152) }, + { SC_(1875817529344), SC_(28.95321287653379863631300659442341812344) } + }}; +#undef SC_ + diff --git a/test/asinh_data.ipp b/test/asinh_data.ipp new file mode 100644 index 000000000..9a165d2ed --- /dev/null +++ b/test/asinh_data.ipp @@ -0,0 +1,286 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 281> asinh_data = {{ + { SC_(-497.181640625), SC_(-6.902103625349694816896128061929344488774) }, + { SC_(-495.216552734375), SC_(-6.898143347143858285101511567975488446084) }, + { SC_(-488.0980224609375), SC_(-6.883664481302669222996695409880306523751) }, + { SC_(-486.4609375), SC_(-6.880304842490272781295755933349565066089) }, + { SC_(-482.2261962890625), SC_(-6.87156154650904602462361416438487324277) }, + { SC_(-468.167236328125), SC_(-6.841973895837549314760586943747302390125) }, + { SC_(-465.553955078125), SC_(-6.836376331805492593765664636569933371943) }, + { SC_(-464.288330078125), SC_(-6.833654100575195198545828306587445927099) }, + { SC_(-463.558837890625), SC_(-6.832081663500904935919737735423649299577) }, + { SC_(-453.82861328125), SC_(-6.81086801736630853656142245668310545817) }, + { SC_(-448.7835693359375), SC_(-6.799689165151486910757237507031024212372) }, + { SC_(-446.0499267578125), SC_(-6.793579326246197169098958913912928750651) }, + { SC_(-432.4046630859375), SC_(-6.762510387544996144846476710732722287747) }, + { SC_(-424.145751953125), SC_(-6.74322572098922178423984261142063288429) }, + { SC_(-402.8682861328125), SC_(-6.69175839599430693315848859453612846314) }, + { SC_(-402.4595947265625), SC_(-6.690743430063694316478378930442947372479) }, + { SC_(-390.1383056640625), SC_(-6.65965012921145083591836824643494979965) }, + { SC_(-387.5355224609375), SC_(-6.652956360641761371501126846246743833405) }, + { SC_(-381.0023193359375), SC_(-6.635954365364266311169729037072694814964) }, + { SC_(-374.8172607421875), SC_(-6.619587562578274050554380148151080691039) }, + { SC_(-374.1033935546875), SC_(-6.617681179427804403332414367961774779791) }, + { SC_(-373.01318359375), SC_(-6.614762741096184771534770781005436075363) }, + { SC_(-370.0938720703125), SC_(-6.606905687537060691122483933557635629252) }, + { SC_(-364.5230712890625), SC_(-6.591738907156093293807291816593779744849) }, + { SC_(-361.3756103515625), SC_(-6.583066984213974024130269349536598335519) }, + { SC_(-358.1136474609375), SC_(-6.573999516974134646764605942478671320562) }, + { SC_(-350.8861083984375), SC_(-6.553610904389895936746972395658913458292) }, + { SC_(-350.7060546875), SC_(-6.553097634736137347416591397792124912806) }, + { SC_(-345.5616455078125), SC_(-6.538320325468201861196672683728074373679) }, + { SC_(-342.386962890625), SC_(-6.529090881007076202584033383216307968614) }, + { SC_(-341.9425048828125), SC_(-6.527791927233787108981347318463639017897) }, + { SC_(-337.3883056640625), SC_(-6.51438388615078099259979168949837683455) }, + { SC_(-328.8133544921875), SC_(-6.488639771044976384845381893407049569445) }, + { SC_(-326.1348876953125), SC_(-6.480460592697476652284072277108613530788) }, + { SC_(-313.12744140625), SC_(-6.439759999015992467577771895808599408942) }, + { SC_(-311.6180419921875), SC_(-6.434927968512049412470577925892037200619) }, + { SC_(-303.40478515625), SC_(-6.408217734896572191669656774970329190625) }, + { SC_(-291.9320068359375), SC_(-6.369671035834964490622480119650197877027) }, + { SC_(-289.791015625), SC_(-6.362310184909174825124230502026784750431) }, + { SC_(-288.07568359375), SC_(-6.356373428913315483326002974850146028147) }, + { SC_(-282.76220703125), SC_(-6.337756593913613854161781726501299103316) }, + { SC_(-278.9659423828125), SC_(-6.3242400970614694374776334482330766038) }, + { SC_(-276.1881103515625), SC_(-6.314232650754295158800596164826483845909) }, + { SC_(-269.843994140625), SC_(-6.290994606392703105943420882029653368811) }, + { SC_(-256.47509765625), SC_(-6.240182555852785458496224304526376585373) }, + { SC_(-248.91619873046875), SC_(-6.210267503979360726887449195178911415313) }, + { SC_(-245.71783447265625), SC_(-6.197335184435549180000272192577714732671) }, + { SC_(-244.9049072265625), SC_(-6.194021350132334791819182281057947070343) }, + { SC_(-242.49176025390625), SC_(-6.184119163536405964259882205805060501935) }, + { SC_(-223.97491455078125), SC_(-6.104686221071835053635371385862353306867) }, + { SC_(-223.0770263671875), SC_(-6.100669325836893543736746195548392269128) }, + { SC_(-221.50177001953125), SC_(-6.093582856519022569016903564242082589239) }, + { SC_(-214.1610107421875), SC_(-6.059880750068793807232821057354816859259) }, + { SC_(-202.9705810546875), SC_(-6.006214296526251845395554109089589227751) }, + { SC_(-200.1683349609375), SC_(-5.992312107336994557313003250781997964749) }, + { SC_(-198.0869140625), SC_(-5.981859446096082920408103292664994574137) }, + { SC_(-191.8330078125), SC_(-5.949779216585290285138095990044779123562) }, + { SC_(-183.4495849609375), SC_(-5.905094497458789993605346377453537455651) }, + { SC_(-182.9005126953125), SC_(-5.90209701227578839648368537690039781634) }, + { SC_(-167.5517578125), SC_(-5.814448391006795100253762785669751772879) }, + { SC_(-162.87738037109375), SC_(-5.786154254111213380715127555746974140457) }, + { SC_(-159.6142578125), SC_(-5.765917008989404365321507899157382728927) }, + { SC_(-150.01629638671875), SC_(-5.703902219845273396365649927451080691209) }, + { SC_(-148.34051513671875), SC_(-5.69266895044603959347064515800579166058) }, + { SC_(-147.23760986328125), SC_(-5.685206387751923160853276372644826819905) }, + { SC_(-143.65484619140625), SC_(-5.660572815631807047475426769799365771506) }, + { SC_(-138.70599365234375), SC_(-5.625516713960632970798501811037458042606) }, + { SC_(-119.554168701171875), SC_(-5.476934234171878793825519703714137456694) }, + { SC_(-118.441558837890625), SC_(-5.467584665632571047898569146378815818543) }, + { SC_(-112.7041015625), SC_(-5.41793267560343365856590869885928647495) }, + { SC_(-111.430206298828125), SC_(-5.406565756574078635952822819651240567772) }, + { SC_(-107.772979736328125), SC_(-5.373195678988387579981120804358907493552) }, + { SC_(-107.6795654296875), SC_(-5.372328571218373638952712194621628880899) }, + { SC_(-105.091796875), SC_(-5.348004040102252742967063201190196082691) }, + { SC_(-101.261474609375), SC_(-5.310877589708960332430067923458969169195) }, + { SC_(-95.79150390625), SC_(-5.255348419702703704863588329233038165262) }, + { SC_(-91.26885986328125), SC_(-5.206986845736275651134721240774128212633) }, + { SC_(-87.33349609375), SC_(-5.162914035396618398952584430311544798966) }, + { SC_(-78.238739013671875), SC_(-5.052952927749896114494197793427686940384) }, + { SC_(-77.912353515625), SC_(-5.048772883924985058524898899156261070079) }, + { SC_(-76.83489990234375), SC_(-5.03484848764480888947313271747141240657) }, + { SC_(-61.255645751953125), SC_(-4.808269821238498732397629948430226353629) }, + { SC_(-54.4138031005859375), SC_(-4.689849459883310559788337051110370703783) }, + { SC_(-43.967193603515625), SC_(-4.476720236388958724591705984989483327501) }, + { SC_(-42.0108489990234375), SC_(-4.431216695067421800858619793836241888979) }, + { SC_(-30.609375), SC_(-4.114720236218123790586146467787932912866) }, + { SC_(-26.7111663818359375), SC_(-3.978579083165602241813343216612781617222) }, + { SC_(-25.2413177490234375), SC_(-3.922021583095348294972916890287113874009) }, + { SC_(-14.624359130859375), SC_(-3.377002632462029261128559390722023174755) }, + { SC_(-12.431087493896484375), SC_(-3.214961448471211148851788664569558466737) }, + { SC_(-10.235607147216796875), SC_(-3.021397455139020950019259089284989476735) }, + { SC_(-9.41094970703125), SC_(-2.937831931335705068892682801940661221814) }, + { SC_(-1.635939121246337890625), SC_(-1.267878515574958901161281414987746394126) }, + { SC_(0.165048140085555239409131900174543261528e-11), SC_(0.1650481400855552394091318252402434490969e-11) }, + { SC_(0.2065420751096169738048047292977571487427e-11), SC_(0.2065420751096169738048045824476195851805e-11) }, + { SC_(0.6933230031758164102484442992135882377625e-11), SC_(0.6933230031758164102484387445779249960378e-11) }, + { SC_(0.1335144494962747785393730737268924713135e-10), SC_(0.1335144494962747785393691069885154254178e-10) }, + { SC_(0.1639981206391638579589198343455791473389e-10), SC_(0.1639981206391638579589124830249793630233e-10) }, + { SC_(0.5730159402528300915946601890027523040771e-10), SC_(0.5730159402528300915943466086387879674642e-10) }, + { SC_(0.1113731329382972035091370344161987304688e-9), SC_(0.1113731329382972035089067894949093881495e-9) }, + { SC_(0.1421470718909745301061775535345077514648e-9), SC_(0.1421470718909745301056988545527660628072e-9) }, + { SC_(0.3800632031314421510614920407533645629883e-9), SC_(0.3800632031314421510523421433949182208556e-9) }, + { SC_(0.6091627202664540163823403418064117431641e-9), SC_(0.6091627202664540163446657373156062782485e-9) }, + { SC_(0.1022164131114777774200774729251861572266e-8), SC_(0.1022164131114777774022778557990306872369e-8) }, + { SC_(0.2881922256392499548383057117462158203125e-8), SC_(0.2881922256392499544393767813667092771012e-8) }, + { SC_(0.4762776839584148547146469354629516601563e-8), SC_(0.476277683958414852913996340565203355397e-8) }, + { SC_(0.8854133426439148024655878543853759765625e-8), SC_(0.8854133426439147908968245283871083240172e-8) }, + { SC_(0.2305032609228874207474291324615478515625e-7), SC_(0.2305032609228874003356918102983865074646e-7) }, + { SC_(0.593924909253473742865025997161865234375e-7), SC_(0.5939249092534733936898428443727569533982e-7) }, + { SC_(0.116676488914890796877443790435791015625e-6), SC_(0.1166764889148905321500984793498641255822e-6) }, + { SC_(0.23799674409019644372165203094482421875e-6), SC_(0.2379967440901941969351979802846104416105e-6) }, + { SC_(0.468465941594331525266170501708984375e-6), SC_(0.4684659415943143903171559983024977629855e-6) }, + { SC_(0.938269977268646471202373504638671875e-6), SC_(0.9382699772685088034539126253793231155849e-6) }, + { SC_(0.11039855962735600769519805908203125e-5), SC_(0.1103985596273335823585612314642277768255e-5) }, + { SC_(0.3291776010883040726184844970703125e-5), SC_(0.3291776010877095894302224300936487731914e-5) }, + { SC_(0.7517213816754519939422607421875e-5), SC_(0.7517213816683722188794989550887653607132e-5) }, + { SC_(0.1511466689407825469970703125e-4), SC_(0.1511466689350275580917503171217159502838e-4) }, + { SC_(0.2986399340443313121795654296875e-4), SC_(0.2986399339999405714013629488236926241004e-4) }, + { SC_(0.338702811859548091888427734375e-4), SC_(0.3387028117947883430533095948345065139191e-4) }, + { SC_(0.906601198948919773101806640625e-4), SC_(0.906601197706988351306957830965994124706e-4) }, + { SC_(0.0002194953267462551593780517578125), SC_(0.0002194953249837736286256750985648679367941) }, + { SC_(0.000439521507360041141510009765625), SC_(0.0004395214932089767739989257698158711437628) }, + { SC_(0.000633315183222293853759765625), SC_(0.0006333151408864353233898099984279240916971) }, + { SC_(0.0011151232756674289703369140625), SC_(0.001115123044558274291478926657905120008324) }, + { SC_(0.001962467096745967864990234375), SC_(0.001962465837080717523701980763915077400694) }, + { SC_(0.00555375404655933380126953125), SC_(0.005553725496786973429128982795141683132844) }, + { SC_(0.0086911283433437347412109375), SC_(0.008691018931968293864799414130929206833958) }, + { SC_(0.0299333631992340087890625), SC_(0.02992889492062483965221469264905787460865) }, + { SC_(0.05124260485172271728515625), SC_(0.05122020579778826952521305025815121247091) }, + { SC_(0.1120129525661468505859375), SC_(0.1117800293787827963417928974597546321371) }, + { SC_(0.23480379581451416015625), SC_(0.2326980652154337550758180136962670174127) }, + { SC_(0.48987305164337158203125), SC_(0.4721357117742938088066477027937692054202) }, + { SC_(0.7518312931060791015625), SC_(0.6946115711893359819020679952345318169567) }, + { SC_(1.6557407379150390625), SC_(1.278160734826225530236928993772347284054) }, + { SC_(3.59585666656494140625), SC_(1.991726234324511503262116200593118895023) }, + { SC_(3.66270542144775390625), SC_(2.009484184971721909158848583710336926639) }, + { SC_(4.14284515380859375), SC_(2.128787712416204967344704932367445907457) }, + { SC_(5.957065582275390625), SC_(2.484696793415547705602607297785951657088) }, + { SC_(10.890350341796875), SC_(3.083125584533294091723482211217314707631) }, + { SC_(27.3714599609375), SC_(4.002981567623351049359177787856924686562) }, + { SC_(29.58606719970703125), SC_(4.080736210902825878904303085045024018186) }, + { SC_(30.79753875732421875), SC_(4.12084543001111324730244006549246292804) }, + { SC_(38.7815704345703125), SC_(4.351258506393415652318140630603706518075) }, + { SC_(46.8814849853515625), SC_(4.540883728536112674069796475595291204506) }, + { SC_(47.21551513671875), SC_(4.547981853382592216976253569088895438026) }, + { SC_(47.2205810546875), SC_(4.548089117076700023837192332723136228729) }, + { SC_(49.7236175537109375), SC_(4.599728302509060806991933759403338520635) }, + { SC_(61.557464599609375), SC_(4.813184271185753146544327202950243752583) }, + { SC_(67.821624755859375), SC_(4.910082619934557664814376219665476353171) }, + { SC_(68.823638916015625), SC_(4.924747230639766605446150280099353765226) }, + { SC_(73.754669189453125), SC_(4.993937439635390959095430118863527649672) }, + { SC_(80.956695556640625), SC_(5.087099712053553781191118720872632390369) }, + { SC_(85.264068603515625), SC_(5.138934697019629394937832600298516485788) }, + { SC_(85.2677001953125), SC_(5.138977285472120998185283011836704311053) }, + { SC_(92.8238525390625), SC_(5.223879832616765332217842454967156441878) }, + { SC_(94.503570556640625), SC_(5.241812789460326774676763952219373084611) }, + { SC_(116.044677734375), SC_(5.447141014648796298911597081177174321311) }, + { SC_(123.775543212890625), SC_(5.511633288238573314525515498135556594256) }, + { SC_(132.3592529296875), SC_(5.578681289305597653175233933020307342597) }, + { SC_(139.7633056640625), SC_(5.633110296634630769495301352527335620124) }, + { SC_(143.9609375), SC_(5.662701238627724704458477126104574527542) }, + { SC_(146.31298828125), SC_(5.67890694100532316423025711195756179793) }, + { SC_(155.0980224609375), SC_(5.737214893086865588590011960998256979258) }, + { SC_(155.47784423828125), SC_(5.739660763047893353413979379888554852015) }, + { SC_(155.74066162109375), SC_(5.741349685869528141606229427222705529931) }, + { SC_(163.60546875), SC_(5.790614371552514063824117620171866397141) }, + { SC_(178.735107421875), SC_(5.879059869096351492478036425245903640013) }, + { SC_(179.70269775390625), SC_(5.884458728291027196042299574564237490922) }, + { SC_(179.81976318359375), SC_(5.885109945587401516601219374963261030511) }, + { SC_(181.3594970703125), SC_(5.893636014368935823237345043968331464439) }, + { SC_(194.82861328125), SC_(5.965274032538233309914029311001854910366) }, + { SC_(195.23284912109375), SC_(5.967346683696556361432840609074921098744) }, + { SC_(199.07666015625), SC_(5.986843466070591664424697234367005123532) }, + { SC_(205.77423095703125), SC_(6.019932686217941432444903969630541836634) }, + { SC_(206.04608154296875), SC_(6.021252909681260874009121058600710829746) }, + { SC_(209.36480712890625), SC_(6.037231102920488838374618484909263149999) }, + { SC_(210.703857421875), SC_(6.043606439928323259236771869386592943524) }, + { SC_(215.2139892578125), SC_(6.064785410115010353953388909263073452906) }, + { SC_(225.83892822265625), SC_(6.112974120371601210219399663570367666925) }, + { SC_(226.95465087890625), SC_(6.117902255760310722524206309196088056026) }, + { SC_(232.79864501953125), SC_(6.143325688959409019088830019463644651492) }, + { SC_(240.647216796875), SC_(6.176483527820343060796486861138751990657) }, + { SC_(243.1324462890625), SC_(6.186757751007361577528719065211514303001) }, + { SC_(251.26702880859375), SC_(6.219667373726848075772693817688242362523) }, + { SC_(253.72906494140625), SC_(6.22941808808355428724031065923268579187) }, + { SC_(254.6866455078125), SC_(6.233184983047428276974209254934385269649) }, + { SC_(257.2001953125), SC_(6.243005711460191965779748682542918291165) }, + { SC_(257.7401123046875), SC_(6.245102704489326829989715358050375153164) }, + { SC_(261.731201171875), SC_(6.260468857392133508067336988271711266899) }, + { SC_(263.75), SC_(6.268152459140511369534885468430435001253) }, + { SC_(265.5167236328125), SC_(6.27482855458316535698354618677862660051) }, + { SC_(273.9171142578125), SC_(6.305976070434008107321296347063621346142) }, + { SC_(278.897705078125), SC_(6.323995460699820076921115676535829705602) }, + { SC_(279.167236328125), SC_(6.324961403980196616927106861416582346957) }, + { SC_(292.207275390625), SC_(6.370613506132747051155136954016356169709) }, + { SC_(293.5975341796875), SC_(6.375359978930308922973172601759003753776) }, + { SC_(293.9749755859375), SC_(6.37664472001459930030121377025213179339) }, + { SC_(295.1998291015625), SC_(6.380802563199264354475951774362027757146) }, + { SC_(297.2799072265625), SC_(6.387824152942428878634062028172724987619) }, + { SC_(297.9285888671875), SC_(6.390003820200830500292592492268074658657) }, + { SC_(298.1058349609375), SC_(6.390598568067900196600610103133530143627) }, + { SC_(300.2803955078125), SC_(6.397866642974941387667911791807820745523) }, + { SC_(307.531005859375), SC_(6.421725738171607321147138767579512701297) }, + { SC_(308.1754150390625), SC_(6.423818963102848059254801023392818581651) }, + { SC_(309.7344970703125), SC_(6.42886525591175973950489819292419777646) }, + { SC_(314.2847900390625), SC_(6.443449261058926842539512498259875923692) }, + { SC_(314.7236328125), SC_(6.444844602076255234209250709648120853169) }, + { SC_(320.8406982421875), SC_(6.464094341970106436820739729174428145587) }, + { SC_(321.2459716796875), SC_(6.465356699668166045068069215854964871388) }, + { SC_(321.9031982421875), SC_(6.467400466944124604717633061439316010097) }, + { SC_(323.457763671875), SC_(6.472218114936839319482664927965675017022) }, + { SC_(330.82861328125), SC_(6.494749921382326159049677218709809728653) }, + { SC_(335.008544921875), SC_(6.507305446835735629461798195367913785079) }, + { SC_(340.7171630859375), SC_(6.52420203343567514995053263208100130883) }, + { SC_(348.4677734375), SC_(6.546694993078936223411278280975538973745) }, + { SC_(349.1292724609375), SC_(6.548591493378012538030220208753185699103) }, + { SC_(372.4288330078125), SC_(6.613194950203131899741436452253747959432) }, + { SC_(376.7574462890625), SC_(6.624750543633906159543027563737013064495) }, + { SC_(378.4306640625), SC_(6.629181796246806383589594972543857520438) }, + { SC_(390.9031982421875), SC_(6.661608771130218794653929942801159149921) }, + { SC_(405.7918701171875), SC_(6.698989091751706872771950506377356853297) }, + { SC_(407.3646240234375), SC_(6.702857353572475083661986001523177171689) }, + { SC_(413.3758544921875), SC_(6.717505881986416333938861696792809072989) }, + { SC_(415.7354736328125), SC_(6.723197804327891152771611004762978333262) }, + { SC_(417.193603515625), SC_(6.726699007993022779613295744938090059081) }, + { SC_(420.874755859375), SC_(6.735483889307782773060913517308358177287) }, + { SC_(429.2635498046875), SC_(6.755219602793124098109976875531119009337) }, + { SC_(429.756103515625), SC_(6.756366380816258251898421006493740831209) }, + { SC_(433.9931640625), SC_(6.766177290841292993057892254025351144187) }, + { SC_(434.0106201171875), SC_(6.766217511883345263895227495273810179399) }, + { SC_(440.073974609375), SC_(6.780091308338912469861271641540800609593) }, + { SC_(450.2220458984375), SC_(6.802889310303153472760070274877750654792) }, + { SC_(455.017578125), SC_(6.813484439494547291485100306142865313692) }, + { SC_(457.1668701171875), SC_(6.818196843455478403993903909497663695391) }, + { SC_(457.5068359375), SC_(6.818940201487998386877795327256997263141) }, + { SC_(459.2913818359375), SC_(6.822833193143804950038640831090638344206) }, + { SC_(459.492431640625), SC_(6.823270835445770195995146570284994476855) }, + { SC_(459.743896484375), SC_(6.823817951018000432957797403476399271545) }, + { SC_(464.888427734375), SC_(6.834945773756887582002201745232432180165) }, + { SC_(464.96630859375), SC_(6.835113285253827054382848168952118996735) }, + { SC_(467.6949462890625), SC_(6.840964582694129262617973631406633110533) }, + { SC_(468.86767578125), SC_(6.843468905210339769583953244362473799296) }, + { SC_(470.5927734375), SC_(6.847141429556456346098564888170408445454) }, + { SC_(481.109619140625), SC_(6.869243403190376592226057897975831923528) }, + { SC_(487.4595947265625), SC_(6.882355637062963925878474710879054534122) }, + { SC_(488.521484375), SC_(6.884531678915821025400961463061609241284) }, + { SC_(492.8812255859375), SC_(6.893416432937340181639026008051884214636) }, + { SC_(494.0684814453125), SC_(6.895822338701104787981876142689381248646) }, + { SC_(496.4613037109375), SC_(6.900653737167637608469868350257964416187) }, + { SC_(716.154052734375), SC_(7.2670429692740963323840103680788401489) }, + { SC_(1799.92578125), SC_(8.18864796812207220842639194214816612374) }, + { SC_(3564.845703125), SC_(8.872023251113288479644702153534943187411) }, + { SC_(7139.869140625), SC_(9.566596912986166722124065953497502737374) }, + { SC_(12081.22265625), SC_(10.09255486190560839163513867694963651638) }, + { SC_(22810.2421875), SC_(10.72811211386442708825132311411659945728) }, + { SC_(46598.96875), SC_(11.44248087071561781484413254045580909559) }, + { SC_(108493.375), SC_(12.2875915707717694181967755881243802905) }, + { SC_(153860.8125), SC_(12.63695083834421849044542638165059455958) }, + { SC_(307019.5), SC_(13.32781372303006380727775468144124321804) }, + { SC_(682577.25), SC_(14.12677816700977652906247822629132152831) }, + { SC_(1788919), SC_(15.09026926533497056732451999718664988024) }, + { SC_(3769169), SC_(15.83551229128394411859348316953904317643) }, + { SC_(4327820), SC_(15.97372168955474121405849637207319473463) }, + { SC_(11044024), SC_(16.91054720571544732784968725481341574805) }, + { SC_(21423208), SC_(17.57313255890322504472542433762806340181) }, + { SC_(62828288), SC_(18.64906315643796382994112822618240813581) }, + { SC_(70207360), SC_(18.7601108873651530393019317938988457707) }, + { SC_(154231424), SC_(19.54711196618087428636344348941647974165) }, + { SC_(294509056), SC_(20.1939674915675244205666343569672677746) }, + { SC_(1070557184), SC_(21.48459226315622322979093631189365864251) }, + { SC_(1957922816), SC_(22.08829714102155481686957732827526425736) }, + { SC_(3912507392), SC_(22.78059146269991677250675041832419710247) }, + { SC_(7279233024), SC_(23.40143852031869095098313030835785443555) }, + { SC_(9665245184), SC_(23.68494949808078517275225570625127768937) }, + { SC_(22627590144), SC_(24.53558298204260156687347955127694595939) }, + { SC_(60601991168), SC_(25.52074076759958328225601044752066239618) }, + { SC_(134018236416), SC_(26.31438890085421876104087786768111623882) }, + { SC_(204864946176), SC_(26.73876398039978985836947169876252884996) }, + { SC_(284346286080), SC_(27.06660583008717947194092254982253381033) }, + { SC_(914576637952), SC_(28.23487428494463574299686107465880501208) }, + { SC_(1581915832320), SC_(28.7828049610810604762091293247739091717) } + }}; +#undef SC_ + diff --git a/test/atanh_data.ipp b/test/atanh_data.ipp new file mode 100644 index 000000000..aa2b36647 --- /dev/null +++ b/test/atanh_data.ipp @@ -0,0 +1,265 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 260> atanh_data = {{ + { SC_(-0.9999983310699462890625), SC_(-6.998237084679026894944012639589359039154) }, + { SC_(-0.9999978542327880859375), SC_(-6.872579751329170618373487147465365112113) }, + { SC_(-0.999992847442626953125), SC_(-6.270592097465752658938563627507298840894) }, + { SC_(-0.999986171722412109375), SC_(-5.94096761408481303343713262973790932529) }, + { SC_(-0.9999828338623046875), SC_(-5.832855225378502201556044619092381320613) }, + { SC_(-0.99993991851806640625), SC_(-5.206463012087559958576821359878019831698) }, + { SC_(-0.9998834133148193359375), SC_(-4.874982184181078415951979525893507005727) }, + { SC_(-0.9998509883880615234375), SC_(-4.752279497280337973604777810710354182427) }, + { SC_(-0.9996016025543212890625), SC_(-4.260504202858904159948511594799808172686) }, + { SC_(-0.9993612766265869140625), SC_(-4.024433435320311666223352267171267188441) }, + { SC_(-0.9989283084869384765625), SC_(-3.765564108299923386710499391156429825334) }, + { SC_(-0.996978282928466796875), SC_(-3.246782610980921221976121268600437559073) }, + { SC_(-0.9950058460235595703125), SC_(-2.995067117994093910327278839368162513171) }, + { SC_(-0.9942638874053955078125), SC_(-2.925624274960953689217686505461794222524) }, + { SC_(-0.9907157421112060546875), SC_(-2.683964628330836423435761449812536808992) }, + { SC_(-0.990334033966064453125), SC_(-2.663723350226517894297444398633783948406) }, + { SC_(-0.9760982990264892578125), SC_(-2.207464998348322224447911930881940831481) }, + { SC_(-0.975830078125), SC_(-2.201817459680555978821333155035293326746) }, + { SC_(-0.972824573516845703125), SC_(-2.142454230829143642120980722087236052917) }, + { SC_(-0.964355945587158203125), SC_(-2.004668675602091699628236313728557407114) }, + { SC_(-0.9377224445343017578125), SC_(-1.718833734617706500332405835370646660471) }, + { SC_(-0.936240673065185546875), SC_(-1.706694048256515431631815885672233674251) }, + { SC_(-0.9310147762298583984375), SC_(-1.665954300553314591750124550883856364694) }, + { SC_(-0.9284839630126953125), SC_(-1.647283871876074775612635961977408037529) }, + { SC_(-0.92702484130859375), SC_(-1.636806734088156154435563850211913111601) }, + { SC_(-0.907566547393798828125), SC_(-1.513547347731111539787447924356304439238) }, + { SC_(-0.8974773883819580078125), SC_(-1.45909860863314960721683880733144126731) }, + { SC_(-0.89201068878173828125), SC_(-1.431681573516303182182852281763191690617) }, + { SC_(-0.87765598297119140625), SC_(-1.365471286049011032989426113780315638737) }, + { SC_(-0.864722728729248046875), SC_(-1.31177055834445394659795622633703969998) }, + { SC_(-0.8482067584991455078125), SC_(-1.249725893334944048400811976134680437019) }, + { SC_(-0.805655956268310546875), SC_(-1.114524602859225810626832366034868507092) }, + { SC_(-0.8048388957977294921875), SC_(-1.112200609756455010839566277837214844325) }, + { SC_(-0.780198574066162109375), SC_(-1.045877833082255648218230662475846475501) }, + { SC_(-0.774993419647216796875), SC_(-1.032711173436253036051634900441573817364) }, + { SC_(-0.761928558349609375), SC_(-1.000796728136218508274740551519944314059) }, + { SC_(-0.7504425048828125), SC_(-0.9739672824457071545212558891424185128762) }, + { SC_(-0.7495596408843994140625), SC_(-0.9719492983286864197920761015664283271976) }, + { SC_(-0.7481319904327392578125), SC_(-0.9686989420144869980652193388237565424316) }, + { SC_(-0.7459518909454345703125), SC_(-0.9637657636705832060477647484529718099027) }, + { SC_(-0.740113735198974609375), SC_(-0.9507308314464193446531653906278264445993) }, + { SC_(-0.7289731502532958984375), SC_(-0.926532531986765318247140551363667818701) }, + { SC_(-0.7226788997650146484375), SC_(-0.9132299082876395943553155758462776294309) }, + { SC_(-0.7161557674407958984375), SC_(-0.8997082193533088241452821117641146130759) }, + { SC_(-0.7017018795013427734375), SC_(-0.8706453720344795324137713806233471643566) }, + { SC_(-0.7013418674468994140625), SC_(-0.869936501309450037837255615527206388543) }, + { SC_(-0.6910541057586669921875), SC_(-0.8499705913361888274674607430873352657984) }, + { SC_(-0.6847054958343505859375), SC_(-0.8379194558420050243680161679293990119402) }, + { SC_(-0.683816432952880859375), SC_(-0.8362476144993315210191634049830735329595) }, + { SC_(-0.6747090816497802734375), SC_(-0.8193374156276963181623971413078624527231) }, + { SC_(-0.6575610637664794921875), SC_(-0.7885046044142132636244565971148537710756) }, + { SC_(-0.6522045135498046875), SC_(-0.7791255597799838714478027675042210151575) }, + { SC_(-0.6261923313140869140625), SC_(-0.7351275788820003190814567583601297864281) }, + { SC_(-0.62317371368408203125), SC_(-0.7301771459970386661436038123301221899899) }, + { SC_(-0.6067488193511962890625), SC_(-0.703759752613062694606340098389939027562) }, + { SC_(-0.583805561065673828125), SC_(-0.6682166303197607887197770868026216259119) }, + { SC_(-0.57952404022216796875), SC_(-0.6617457665293066615721543987931600748293) }, + { SC_(-0.5760939121246337890625), SC_(-0.6565964588573980673410012745962406194225) }, + { SC_(-0.56546783447265625), SC_(-0.6408350116350283247012343252539212893332) }, + { SC_(-0.557876110076904296875), SC_(-0.6297442839791668262390512924219530985196) }, + { SC_(-0.552320957183837890625), SC_(-0.6217149641475686188387285842099747744544) }, + { SC_(-0.5396339893341064453125), SC_(-0.6036390747171697770925487100621985766607) }, + { SC_(-0.512898921966552734375), SC_(-0.566655625606477066963814924576009526094) }, + { SC_(-0.5087778568267822265625), SC_(-0.5610793900942041010450981003401240686441) }, + { SC_(-0.49778258800506591796875), SC_(-0.5463539505715040435095828997881628670016) }, + { SC_(-0.49138653278350830078125), SC_(-0.5378865967606702825309467710240853062652) }, + { SC_(-0.48976075649261474609375), SC_(-0.5357455496477737185521806219611537015446) }, + { SC_(-0.4849350452423095703125), SC_(-0.5294166456244710849865087993139911130393) }, + { SC_(-0.447905063629150390625), SC_(-0.4820764946679978939347292302681479739796) }, + { SC_(-0.4461095333099365234375), SC_(-0.4798325976916710897104638200930521631286) }, + { SC_(-0.442959308624267578125), SC_(-0.4759065337156127733780647024545262009008) }, + { SC_(-0.4282791614532470703125), SC_(-0.4577873936293679104616687959332340265949) }, + { SC_(-0.40590059757232666015625), SC_(-0.4306933608076878743806295938648362982359) }, + { SC_(-0.40029656887054443359375), SC_(-0.4240020382545707218942432038948084774496) }, + { SC_(-0.3961341381072998046875), SC_(-0.4190551379319939121143095387765817810309) }, + { SC_(-0.38362753391265869140625), SC_(-0.4043062717590873607565891081374512836717) }, + { SC_(-0.3668625354766845703125), SC_(-0.3847928551425506989844364335805100378916) }, + { SC_(-0.36576449871063232421875), SC_(-0.383524642274593405044354917396013672621) }, + { SC_(-0.33507001399993896484375), SC_(-0.3485286317501441759395903809820783149922) }, + { SC_(-0.325722217559814453125), SC_(-0.3380352468276521988337991305273476357259) }, + { SC_(-0.3191967010498046875), SC_(-0.3307524237890151189189282578009246778706) }, + { SC_(-0.300002574920654296875), SC_(-0.3095224337886502772553678318463405679109) }, + { SC_(-0.296651363372802734375), SC_(-0.3058438250228024929192737081479944125667) }, + { SC_(-0.2944457530975341796875), SC_(-0.3034271164344304639271762476267134487006) }, + { SC_(-0.287281036376953125), SC_(-0.2956001834724682534366346933530868053292) }, + { SC_(-0.277384281158447265625), SC_(-0.2848460820316943671684268151981802822583) }, + { SC_(-0.239084422588348388671875), SC_(-0.2438028008332661157406055005411967471601) }, + { SC_(-0.23685944080352783203125), SC_(-0.2414442516939151847702918137086915005926) }, + { SC_(-0.2253856658935546875), SC_(-0.2293228153248167922436892209184552796457) }, + { SC_(-0.222838103771209716796875), SC_(-0.2266405306474514216815783549721039495306) }, + { SC_(-0.2155244350433349609375), SC_(-0.2189577360114399508892266906786141753798) }, + { SC_(-0.215337574481964111328125), SC_(-0.2187617810795299603977983273974692894269) }, + { SC_(-0.210162580013275146484375), SC_(-0.213341433207717363756996669992890635922) }, + { SC_(-0.202502727508544921875), SC_(-0.2053409277979887156428422481476167713845) }, + { SC_(-0.1915638446807861328125), SC_(-0.1939600847413307517360830799803393191118) }, + { SC_(-0.182519435882568359375), SC_(-0.1845877143932293893050297021219967479454) }, + { SC_(-0.1746494770050048828125), SC_(-0.1764584460861806768647912839605350112421) }, + { SC_(-0.15646183490753173828125), SC_(-0.1577576667718915543508871956214699612414) }, + { SC_(-0.155809104442596435546875), SC_(-0.1570886262196417664166148374546893502577) }, + { SC_(-0.15365445613861083984375), SC_(-0.1548811251554959173309605263848373765859) }, + { SC_(-0.1224990189075469970703125), SC_(-0.1231173360990485154969499505998906050858) }, + { SC_(-0.1088167130947113037109375), SC_(-0.1092492929673783678150776545155488162838) }, + { SC_(-0.0879255831241607666015625), SC_(-0.08815322150790301444935652020860591175639) }, + { SC_(-0.084013283252716064453125), SC_(-0.08421178632314607700273933837777975783955) }, + { SC_(-0.06121261417865753173828125), SC_(-0.06128924075509795947903082912344529497771) }, + { SC_(-0.0534169971942901611328125), SC_(-0.05346789060550385741248960046699294299987) }, + { SC_(-0.0504775941371917724609375), SC_(-0.0505205318923802872873054309617566051014) }, + { SC_(-0.029245793819427490234375), SC_(-0.02925413623733265658295603323356445573956) }, + { SC_(-0.024859689176082611083984375), SC_(-0.02486481220617492008704879514284669118942) }, + { SC_(-0.02046917378902435302734375), SC_(-0.02047203328100153078698678836073163016822) }, + { SC_(-0.0188200175762176513671875), SC_(-0.01882224002175634892911631496693598606876) }, + { SC_(-0.01615250110626220703125), SC_(-0.01615390607310920464304141890191065645265) }, + { SC_(-0.003271550871431827545166015625), SC_(-0.003271562543358962122360602166863449874156) }, + { SC_(0.165048140085555239409131900174543261528e-11), SC_(0.1650481400855552394091320500431428863902e-11) }, + { SC_(0.2065420751096169738048047292977571487427e-11), SC_(0.206542075109616973804805022998032275867e-11) }, + { SC_(0.6933230031758164102484442992135882377625e-11), SC_(0.6933230031758164102484554084849147212117e-11) }, + { SC_(0.1335144494962747785393730737268924713135e-10), SC_(0.1335144494962747785393810072036465631048e-10) }, + { SC_(0.1639981206391638579589198343455791473389e-10), SC_(0.16399812063916385795893453698677871597e-10) }, + { SC_(0.5730159402528300915946601890027523040771e-10), SC_(0.573015940252830091595287349730680977303e-10) }, + { SC_(0.1113731329382972035091370344161987304688e-9), SC_(0.1113731329382972035095975242587774151074e-9) }, + { SC_(0.1421470718909745301061775535345077514648e-9), SC_(0.1421470718909745301071349514979911287802e-9) }, + { SC_(0.3800632031314421510614920407533645629883e-9), SC_(0.3800632031314421510797918354702572472565e-9) }, + { SC_(0.6091627202664540163823403418064117431641e-9), SC_(0.6091627202664540164576895507880226730245e-9) }, + { SC_(0.1022164131114777774200774729251861572266e-8), SC_(0.1022164131114777774556767071774970972449e-8) }, + { SC_(0.2881922256392499548383057117462158203125e-8), SC_(0.288192225639249955636163572505228913693e-8) }, + { SC_(0.4762776839584148547146469354629516601563e-8), SC_(0.4762776839584148583159481252584483554515e-8) }, + { SC_(0.8854133426439148024655878543853759765625e-8), SC_(0.8854133426439148256031145063819131862293e-8) }, + { SC_(0.2305032609228874207474291324615478515625e-7), SC_(0.2305032609228874615709037767878933144975e-7) }, + { SC_(0.593924909253473742865025997161865234375e-7), SC_(0.5939249092534744412153923027426683753111e-7) }, + { SC_(0.116676488914890796877443790435791015625e-6), SC_(0.1166764889148913263321344126152128598244e-6) }, + { SC_(0.23799674409019644372165203094482421875e-6), SC_(0.2379967440902009372945601325325051016678e-6) }, + { SC_(0.468465941594331525266170501708984375e-6), SC_(0.4684659415943657951641995164188851895468e-6) }, + { SC_(0.938269977268646471202373504638671875e-6), SC_(0.9382699772689218066992955176687134214945e-6) }, + { SC_(0.11039855962735600769519805908203125e-5), SC_(0.1103985596274008583684717717140945872849e-5) }, + { SC_(0.3291776010883040726184844970703125e-5), SC_(0.3291776010894930389950221585822451540922e-5) }, + { SC_(0.7517213816754519939422607421875e-5), SC_(0.7517213816896115440686244581232090380807e-5) }, + { SC_(0.1511466689407825469970703125e-4), SC_(0.151146668952292524810471268542864819142e-4) }, + { SC_(0.2986399340443313121795654296875e-4), SC_(0.2986399341331127938191098992807520418566e-4) }, + { SC_(0.338702811859548091888427734375e-4), SC_(0.3387028119890675897146774685716560577438e-4) }, + { SC_(0.906601198948919773101806640625e-4), SC_(0.9066012014327826381277876686817592943471e-4) }, + { SC_(0.0002194953267462551593780517578125), SC_(0.0002194953302712183992004987083863068286575) }, + { SC_(0.000439521507360041141510009765625), SC_(0.0004395215356621756172832388067699815859163) }, + { SC_(0.000633315183222293853759765625), SC_(0.0006333152678940465733692213551976187060063) }, + { SC_(0.0011151232756674289703369140625), SC_(0.001115123737886341835357675971473032730801) }, + { SC_(0.001962467096745967864990234375), SC_(0.001962469616086656343101697360448994447248) }, + { SC_(0.00555375404655933380126953125), SC_(0.005553811147953337251608673095795926379418) }, + { SC_(0.0073246769607067108154296875), SC_(0.007324807956742500088707032291078962161983) }, + { SC_(0.0086911283433437347412109375), SC_(0.008691347183450786003338484767259005750621) }, + { SC_(0.01191294193267822265625), SC_(0.01191350553503790551712224267804100577312) }, + { SC_(0.0299333631992340087890625), SC_(0.02994230816857020273948279830730524489901) }, + { SC_(0.05124260485172271728515625), SC_(0.05128752666822782052568477249433836427776) }, + { SC_(0.05473744869232177734375), SC_(0.05479221508125443603584511761951841280462) }, + { SC_(0.0615889132022857666015625), SC_(0.0616669638195183068123715085691638305692) }, + { SC_(0.0937536060810089111328125), SC_(0.09402975380882211958737150286272764887037) }, + { SC_(0.0944215953350067138671875), SC_(0.09470370926367391764663232920446630580688) }, + { SC_(0.0944317281246185302734375), SC_(0.09471393321406025987803236345499696649722) }, + { SC_(0.099437296390533447265625), SC_(0.09976699249016486016395021218834536220752) }, + { SC_(0.1120129525661468505859375), SC_(0.1124849830355889429846170463794901835017) }, + { SC_(0.123102605342864990234375), SC_(0.1237301640233916802510730091978889755734) }, + { SC_(0.1356296539306640625), SC_(0.136470609508612479912140462032722727509) }, + { SC_(0.137633502483367919921875), SC_(0.1385125786609474520950316182245783874744) }, + { SC_(0.1474945545196533203125), SC_(0.1485782998046483417449330959482946265992) }, + { SC_(0.161897182464599609375), SC_(0.163334331667904492581671816308390067676) }, + { SC_(0.170511066913604736328125), SC_(0.1721929869363735526203806645402133592389) }, + { SC_(0.170518338680267333984375), SC_(0.1722004764629990854468820758107275101776) }, + { SC_(0.1856291294097900390625), SC_(0.1878064731815008603331954720151705472375) }, + { SC_(0.188988208770751953125), SC_(0.1912876932893582208057658208318612269009) }, + { SC_(0.23206615447998046875), SC_(0.2363721243391452317792593455314737006561) }, + { SC_(0.23480379581451416015625), SC_(0.2392675448267426979141683097039145007706) }, + { SC_(0.2646920680999755859375), SC_(0.271147290330230077990690324884981633411) }, + { SC_(0.27949869632720947265625), SC_(0.287138205934443267371748751232576707068) }, + { SC_(0.2878930568695068359375), SC_(0.2962673858386818760743191664695461734079) }, + { SC_(0.29259669780731201171875), SC_(0.3014037366523923189237135841752647308831) }, + { SC_(0.310164928436279296875), SC_(0.3207278827697849622886565511333038417846) }, + { SC_(0.31092464923858642578125), SC_(0.321568689394455844291345719208687599694) }, + { SC_(0.31145012378692626953125), SC_(0.3221505056451928603025272541357270447997) }, + { SC_(0.3271782398223876953125), SC_(0.339664946169947805312598648269899355103) }, + { SC_(0.3574345111846923828125), SC_(0.3739415343654542284372692080523616239196) }, + { SC_(0.35936939716339111328125), SC_(0.3761615922309022376646457727379955025932) }, + { SC_(0.35960352420806884765625), SC_(0.376430465969337149289307260724149960882) }, + { SC_(0.36268270015716552734375), SC_(0.3799714809649667171023188371749734970087) }, + { SC_(0.38961827754974365234375), SC_(0.4113499159905352551364249131399712396774) }, + { SC_(0.3904266357421875), SC_(0.4123033008021400244918917567469642157756) }, + { SC_(0.39811360836029052734375), SC_(0.4214052375603138698610724190400452927171) }, + { SC_(0.41150724887847900390625), SC_(0.4374243870957909704688484065341332398408) }, + { SC_(0.4120509624481201171875), SC_(0.438079118237434936389702798117975965435) }, + { SC_(0.41868770122528076171875), SC_(0.4460997186945703025969092767121680940872) }, + { SC_(0.4213654994964599609375), SC_(0.4493511447897728936819156706558562191803) }, + { SC_(0.4516327381134033203125), SC_(0.4867494899047367852559605895765155264024) }, + { SC_(0.45386397838592529296875), SC_(0.4895560176112374916678981118235718808999) }, + { SC_(0.46555078029632568359375), SC_(0.5043748446613432644265368658689527269923) }, + { SC_(0.48124635219573974609375), SC_(0.5246050193978662791545681419778026197093) }, + { SC_(0.4862163066864013671875), SC_(0.5310932154891663069921221983411478381793) }, + { SC_(0.48987305164337158203125), SC_(0.5358932909903700749055224508487508967699) }, + { SC_(0.502483844757080078125), SC_(0.5526234425942533333497748944931154989089) }, + { SC_(0.5074074268341064453125), SC_(0.5592320547729961905967162368329222398251) }, + { SC_(0.50932216644287109375), SC_(0.5618140818296767894194272698942620318047) }, + { SC_(0.5143489837646484375), SC_(0.5686253097655145706303693099066490153432) }, + { SC_(0.5154285430908203125), SC_(0.5700943191671631767428541315644447456688) }, + { SC_(0.5234100818634033203125), SC_(0.5810250825991417575052326759884079418476) }, + { SC_(0.527447223663330078125), SC_(0.5866018515043636631396476583453040565353) }, + { SC_(0.5309803485870361328125), SC_(0.5915094458340507867953465738492206518901) }, + { SC_(0.5477793216705322265625), SC_(0.615203099922968789392563855123133294432) }, + { SC_(0.5577394962310791015625), SC_(0.6295459624918965701898701179409871117547) }, + { SC_(0.558278560638427734375), SC_(0.6303287742357745455208912482493484545533) }, + { SC_(0.5843560695648193359375), SC_(0.6690521906099504661825293948827417437714) }, + { SC_(0.58713626861572265625), SC_(0.6732844960442398402790025978545962104976) }, + { SC_(0.587891101837158203125), SC_(0.6744372167164567880432735474026414000937) }, + { SC_(0.59034061431884765625), SC_(0.6781887236623533927703862563260315607999) }, + { SC_(0.5945003032684326171875), SC_(0.684597775489552027208298442397307157518) }, + { SC_(0.59579753875732421875), SC_(0.686606510213166504449707209584681039618) }, + { SC_(0.5961520671844482421875), SC_(0.6871563252400655469505525776500166368732) }, + { SC_(0.6005008220672607421875), SC_(0.6939300827887145041443406444376899260605) }, + { SC_(0.6150004863739013671875), SC_(0.7169242329194352408292786592670047478091) }, + { SC_(0.6162893772125244140625), SC_(0.718999805549710753361347867549953319929) }, + { SC_(0.6194069385528564453125), SC_(0.7240422748778544828852658840299672671419) }, + { SC_(0.62850666046142578125), SC_(0.7389438896054792083692956718844417119266) }, + { SC_(0.6293842792510986328125), SC_(0.7403958734869583175052115753160537014235) }, + { SC_(0.641617298126220703125), SC_(0.7609178886018203867768570854585116358618) }, + { SC_(0.6424276828765869140625), SC_(0.7622965466812235050838313606820415418465) }, + { SC_(0.643742084503173828125), SC_(0.7645378650643100878873860589743586646119) }, + { SC_(0.6468508243560791015625), SC_(0.7698647951781609863982541324817513695536) }, + { SC_(0.661591053009033203125), SC_(0.7956379107512945487304413199186620675388) }, + { SC_(0.669950008392333984375), SC_(0.8106524185805045490744310224054265386895) }, + { SC_(0.6813662052154541015625), SC_(0.8316597473423232100463095038096703191227) }, + { SC_(0.6968657970428466796875), SC_(0.861181279065929560893743209045814929335) }, + { SC_(0.69818878173828125), SC_(0.8637579113749143394578018115274414809977) }, + { SC_(0.7447831630706787109375), SC_(0.9611360201710216528199065175645895870797) }, + { SC_(0.7518312931060791015625), SC_(0.9771540941752986840434538256366757954859) }, + { SC_(0.753439426422119140625), SC_(0.9808634133542228689124290623167881332843) }, + { SC_(0.7567856311798095703125), SC_(0.9886489208209698781284720459176833206972) }, + { SC_(0.781728267669677734375), SC_(1.049799171982895646434536064092181561482) }, + { SC_(0.8115026950836181640625), SC_(1.13141414441875853996497925019619325203) }, + { SC_(0.8146479129791259765625), SC_(1.140694775558441751141132778566016009721) }, + { SC_(0.8266689777374267578125), SC_(1.177523083369968036920622084233473757412) }, + { SC_(0.8313877582550048828125), SC_(1.192613822570143323026054454909849845367) }, + { SC_(0.83430385589599609375), SC_(1.202132332303961254992584113869002097916) }, + { SC_(0.8416652679443359375), SC_(1.226857064433516189319978030947873360052) }, + { SC_(0.85844135284423828125), SC_(1.287389667157365295856183109440507044615) }, + { SC_(0.8678996562957763671875), SC_(1.324504043392939851303939943290664403741) }, + { SC_(0.8679344654083251953125), SC_(1.324645130926160707039340948233535357264) }, + { SC_(0.8800599575042724609375), SC_(1.376033487778217701076449442272672558944) }, + { SC_(0.900353908538818359375), SC_(1.474085296119410724208965851686464033313) }, + { SC_(0.909944057464599609375), SC_(1.527199085186199482742984118973093246969) }, + { SC_(0.9142425060272216796875), SC_(1.552776894827300414876536030721521100862) }, + { SC_(0.9149219989776611328125), SC_(1.556931837197935820864845994901316963069) }, + { SC_(0.918490886688232421875), SC_(1.579289662838161287932020406856633071199) }, + { SC_(0.91889286041259765625), SC_(1.581866335942762753838726342973068309432) }, + { SC_(0.919395923614501953125), SC_(1.585108284332000716017087123313008639504) }, + { SC_(0.9296839237213134765625), SC_(1.656055522329536863771852381599659592259) }, + { SC_(0.929839611053466796875), SC_(1.6572041418041492174589693922205395004) }, + { SC_(0.9352962970733642578125), SC_(1.69909864336192661532416961180476119912) }, + { SC_(0.937641620635986328125), SC_(1.718164398807964846646482962730886595432) }, + { SC_(0.9410912990570068359375), SC_(1.747508407724663243809927907107491941803) }, + { SC_(0.96212291717529296875), SC_(1.973718016345510160586126866935192466646) }, + { SC_(0.974821567535400390625), SC_(2.181122777108378116176876272951870175355) }, + { SC_(0.976945400238037109375), SC_(2.225721449969825368029395993270411091677) }, + { SC_(0.985663890838623046875), SC_(2.465463560165053850170474882317767473537) }, + { SC_(0.98803806304931640625), SC_(2.556586922814200202245299755886851508354) }, + { SC_(0.9928233623504638671875), SC_(2.813238353909419376753157236188061588174) } + }}; +#undef SC_ + diff --git a/test/handle_test_result.hpp b/test/handle_test_result.hpp index 21d768b88..9f6eb10dd 100644 --- a/test/handle_test_result.hpp +++ b/test/handle_test_result.hpp @@ -135,6 +135,14 @@ void handle_test_result(const boost::math::tools::test_result& result, { std::cout << "\n worst case at row: " << row << "\n { "; + if(std::numeric_limits::digits10) + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } + else + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } for(unsigned i = 0; i < worst.size(); ++i) { if(i) diff --git a/test/test_inv_hyp.cpp b/test/test_inv_hyp.cpp new file mode 100644 index 000000000..ebff08b75 --- /dev/null +++ b/test/test_inv_hyp.cpp @@ -0,0 +1,237 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" + +// +// DESCRIPTION: +// ~~~~~~~~~~~~ +// +// This file tests the inverse hyperbolic functions. There are two sets of tests: +// 1) Sanity checks: comparison to test values created with the +// online calculator at functions.wolfram.com +// 2) Accuracy tests use values generated with NTL::RR at +// 1000-bit precision and our generic versions of these functions. +// +// Note that when this file is first run on a new platform many of +// these tests will fail: the default accuracy is 1 epsilon which +// is too tight for most platforms. In this situation you will +// need to cast a human eye over the error rates reported and make +// a judgement as to whether they are acceptable. Either way please +// report the results to the Boost mailing list. Acceptable rates of +// error are marked up below as a series of regular expressions that +// identify the compiler/stdlib/platform/data-type/test-data/test-function +// along with the maximum expected peek and RMS mean errors for that +// test. +// + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + const char* largest_type; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(boost::math::policies::digits >() == boost::math::policies::digits >()) + { + largest_type = "(long\\s+)?double"; + } + else + { + largest_type = "long double"; + } +#else + largest_type = "(long\\s+)?double"; +#endif + + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + ".*", // test data group + ".*", 4, 2); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 2, 1); // test function + + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template +void do_test_asinh(const T& data, const char* type_name, const char* test_name) +{ + // + // test asinh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::asinh; +#else + pg funcp = boost::math::asinh; +#endif + + boost::math::tools::test_result result; + // + // test asinh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::asinh", test_name); + std::cout << std::endl; +} + +template +void do_test_acosh(const T& data, const char* type_name, const char* test_name) +{ + // + // test acosh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::acosh; +#else + pg funcp = boost::math::acosh; +#endif + + boost::math::tools::test_result result; + // + // test acosh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::acosh", test_name); + std::cout << std::endl; +} + +template +void do_test_atanh(const T& data, const char* type_name, const char* test_name) +{ + // + // test atanh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::atanh; +#else + pg funcp = boost::math::atanh; +#endif + + boost::math::tools::test_result result; + // + // test atanh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::atanh", test_name); + std::cout << std::endl; +} + +template +void test_inv_hyperbolics(T, const char* name) +{ + // + // The actual test data is rather verbose, so it's in a separate file + // +#include "asinh_data.ipp" + do_test_asinh(asinh_data, name, "asinh"); +#include "acosh_data.ipp" + do_test_acosh(acosh_data, name, "acosh"); +#include "atanh_data.ipp" + do_test_atanh(atanh_data, name, "atanh"); +} + +extern "C" double zetac(double); + +template +void test_spots(T, const char* t) +{ + std::cout << "Testing basic sanity checks for type " << t << std::endl; + // + // Basic sanity checks, tolerance is either 5 or 10 epsilon + // expressed as a percentage: + // + T tolerance = boost::math::tools::epsilon() * 100 * + (boost::is_floating_point::value ? 5 : 10); + //BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast(0.125)), static_cast(-0.63277562349869525529352526763564627152686379131122L), tolerance); + (void)tolerance; +} + +int test_main(int, char* []) +{ + expected_results(); + BOOST_MATH_CONTROL_FP; + + test_spots(0.0f, "float"); + test_spots(0.0, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_spots(0.0L, "long double"); + test_spots(boost::math::concepts::real_concept(0.1), "real_concept"); +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif + + test_inv_hyperbolics(0.1F, "float"); + test_inv_hyperbolics(0.1, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_inv_hyperbolics(0.1L, "long double"); + test_inv_hyperbolics(boost::math::concepts::real_concept(0.1), "real_concept"); +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif + return 0; +} + + + diff --git a/tools/inv_hyp_data.cpp b/tools/inv_hyp_data.cpp new file mode 100644 index 000000000..b18396722 --- /dev/null +++ b/tools/inv_hyp_data.cpp @@ -0,0 +1,134 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include + +#include + +using namespace boost::math::tools; +using namespace std; + +struct asinh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log(z + sqrt(z * z + 1)); + std::cout << result << std::endl; + return result; + } +}; + +struct acosh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log(z + sqrt(z * z - 1)); + std::cout << result << std::endl; + return result; + } +}; + +struct atanh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log((z + 1) / (1 - z)) / 2; + std::cout << result << std::endl; + return result; + } +}; + +int test_main(int argc, char*argv []) +{ + boost::math::ntl::RR::SetPrecision(500); + boost::math::ntl::RR::SetOutputPrecision(40); + + parameter_info arg1; + test_data data; + std::ofstream ofs; + + bool cont; + std::string line; + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic sin function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(asinh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=asinh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "asinh_data.ipp"; + ofs.open(line.c_str()); + write_code(ofs, data, "asinh_data"); + data.clear(); + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic cos function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(acosh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=acosh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "acosh_data.ipp"; + ofs.close(); + ofs.open(line.c_str()); + write_code(ofs, data, "acosh_data"); + data.clear(); + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic tan function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(atanh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=atanh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "atanh_data.ipp"; + ofs.close(); + ofs.open(line.c_str()); + write_code(ofs, data, "atanh_data"); + + return 0; +} + From 963749fab1f546f70179461476f4c9c34fed124f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 20 Aug 2008 11:34:48 +0000 Subject: [PATCH 027/192] boost-install rule doesn't work from the sandbox. [SVN r48253] --- build/Jamfile.v2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 2635f7fd9..82ef52982 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -86,5 +86,6 @@ lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp ; -boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; +#boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; + From 394ed0afefb92fe3a449c861be42d090479ac7c0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Aug 2008 08:51:22 +0000 Subject: [PATCH 028/192] Fixes for gcc compilation. Added sanity checks to tests. [SVN r48289] --- .../boost/math/special_functions/acosh.hpp | 1 + include/boost/math/tools/precision.hpp | 22 +++++----- test/acosh_data.ipp | 42 +++++++++---------- test/asinh_data.ipp | 42 +++++++++---------- test/test_inv_hyp.cpp | 21 ++++++++-- 5 files changed, 72 insertions(+), 56 deletions(-) diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index a808d5731..1b722cdd7 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -20,6 +20,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic cosine function. diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index a121e96d4..c2866dca9 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -241,25 +241,25 @@ inline T root_epsilon_imp(const mpl::int_<24>&) } template -inline T root_epsilon_imp(const mpl::int_<53>&) +inline T root_epsilon_imp(const T*, const mpl::int_<53>&) { return static_cast(0.1490116119384765625e-7L); } template -inline T root_epsilon_imp(const mpl::int_<64>&) +inline T root_epsilon_imp(const T*, const mpl::int_<64>&) { return static_cast(0.32927225399135962333569506281281311031656150598474e-9L); } template -inline T root_epsilon_imp(const mpl::int_<113>&) +inline T root_epsilon_imp(const T*, const mpl::int_<113>&) { return static_cast(0.1387778780781445675529539585113525390625e-16L); } template -inline T root_epsilon_imp(const Tag&) +inline T root_epsilon_imp(const T*, const Tag&) { BOOST_MATH_STD_USING static const T r_eps = sqrt(tools::epsilon()); @@ -267,31 +267,31 @@ inline T root_epsilon_imp(const Tag&) } template -inline T forth_root_epsilon_imp(const mpl::int_<24>&) +inline T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) { return static_cast(0.018581361171917516667460937040007436176452688944747L); } template -inline T forth_root_epsilon_imp(const mpl::int_<53>&) +inline T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) { return static_cast(0.0001220703125L); } template -inline T forth_root_epsilon_imp(const mpl::int_<64>&) +inline T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) { return static_cast(0.18145860519450699870567321328132261891067079047605e-4L); } template -inline T forth_root_epsilon_imp(const mpl::int_<113>&) +inline T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) { return static_cast(0.37252902984619140625e-8L); } template -inline T forth_root_epsilon_imp(const Tag&) +inline T forth_root_epsilon_imp(const T*, const Tag&) { BOOST_MATH_STD_USING static const T r_eps = sqrt(sqrt(tools::epsilon())); @@ -304,14 +304,14 @@ template inline T root_epsilon() { typedef mpl::int_::digits> tag_type; - return detail::root_epsilon_imp(tag_type()); + return detail::root_epsilon_imp(static_cast(0), tag_type()); } template inline T forth_root_epsilon() { typedef mpl::int_::digits> tag_type; - return detail::forth_root_epsilon_imp(tag_type()); + return detail::forth_root_epsilon_imp(static_cast(0), tag_type()); } } // namespace tools diff --git a/test/acosh_data.ipp b/test/acosh_data.ipp index fc252018e..daa3f6b61 100644 --- a/test/acosh_data.ipp +++ b/test/acosh_data.ipp @@ -240,27 +240,27 @@ { SC_(246210.625), SC_(13.10708982832787479175510220013343945066) }, { SC_(513670.125), SC_(13.84248373881161892648765606597953800527) }, { SC_(788353.25), SC_(14.2708487357510805583139091933979145572) }, - { SC_(1736171), SC_(15.06033985221540896276800056693696357419) }, - { SC_(3770530), SC_(15.83587331365755605568701554508826253991) }, - { SC_(4344090), SC_(15.97747403917326507392988269405762331118) }, - { SC_(11419360), SC_(16.94396789915014469006155507384872743685) }, - { SC_(31023240), SC_(17.9433943395609684013300439026124645108) }, - { SC_(40665424), SC_(18.21403593674543079149440340324547029148) }, - { SC_(129788064), SC_(19.37456058170921543648305825985098346634) }, - { SC_(225668224), SC_(19.9277236237785460971743917048171789264) }, - { SC_(450631936), SC_(20.61930863840059519949232655148142693395) }, - { SC_(750941952), SC_(21.1299860930266968673735341410555546727) }, - { SC_(1887358976), SC_(22.05159150215413004649732665310838648331) }, - { SC_(3738011648), SC_(22.73496684263974142690946105862900518113) }, - { SC_(7486695424), SC_(23.42954051928097083366085869187241049078) }, - { SC_(12668080128), SC_(23.95549847139166892348970713379911103008) }, - { SC_(23918272512), SC_(24.59105572458284785473015955570721968617) }, - { SC_(48862560256), SC_(25.30542448179939429678484289438720749573) }, - { SC_(113763549184), SC_(26.15053518194943663075151882301281675861) }, - { SC_(161334755328), SC_(26.49989444953256419131899378956019192586) }, - { SC_(321933279232), SC_(27.19075733422631778452130090694771384112) }, - { SC_(715734122496), SC_(27.98972177820814613504868209029528272152) }, - { SC_(1875817529344), SC_(28.95321287653379863631300659442341812344) } + { SC_(1736171.0), SC_(15.06033985221540896276800056693696357419) }, + { SC_(3770530.0), SC_(15.83587331365755605568701554508826253991) }, + { SC_(4344090.0), SC_(15.97747403917326507392988269405762331118) }, + { SC_(11419360.0), SC_(16.94396789915014469006155507384872743685) }, + { SC_(31023240.0), SC_(17.9433943395609684013300439026124645108) }, + { SC_(40665424.0), SC_(18.21403593674543079149440340324547029148) }, + { SC_(129788064.0), SC_(19.37456058170921543648305825985098346634) }, + { SC_(225668224.0), SC_(19.9277236237785460971743917048171789264) }, + { SC_(450631936.0), SC_(20.61930863840059519949232655148142693395) }, + { SC_(750941952.0), SC_(21.1299860930266968673735341410555546727) }, + { SC_(1887358976.0), SC_(22.05159150215413004649732665310838648331) }, + { SC_(3738011648.0), SC_(22.73496684263974142690946105862900518113) }, + { SC_(7486695424.0), SC_(23.42954051928097083366085869187241049078) }, + { SC_(12668080128.0), SC_(23.95549847139166892348970713379911103008) }, + { SC_(23918272512.0), SC_(24.59105572458284785473015955570721968617) }, + { SC_(48862560256.0), SC_(25.30542448179939429678484289438720749573) }, + { SC_(113763549184.0), SC_(26.15053518194943663075151882301281675861) }, + { SC_(161334755328.0), SC_(26.49989444953256419131899378956019192586) }, + { SC_(321933279232.0), SC_(27.19075733422631778452130090694771384112) }, + { SC_(715734122496.0), SC_(27.98972177820814613504868209029528272152) }, + { SC_(1875817529344.0), SC_(28.95321287653379863631300659442341812344) } }}; #undef SC_ diff --git a/test/asinh_data.ipp b/test/asinh_data.ipp index 9a165d2ed..2ebda9344 100644 --- a/test/asinh_data.ipp +++ b/test/asinh_data.ipp @@ -260,27 +260,27 @@ { SC_(153860.8125), SC_(12.63695083834421849044542638165059455958) }, { SC_(307019.5), SC_(13.32781372303006380727775468144124321804) }, { SC_(682577.25), SC_(14.12677816700977652906247822629132152831) }, - { SC_(1788919), SC_(15.09026926533497056732451999718664988024) }, - { SC_(3769169), SC_(15.83551229128394411859348316953904317643) }, - { SC_(4327820), SC_(15.97372168955474121405849637207319473463) }, - { SC_(11044024), SC_(16.91054720571544732784968725481341574805) }, - { SC_(21423208), SC_(17.57313255890322504472542433762806340181) }, - { SC_(62828288), SC_(18.64906315643796382994112822618240813581) }, - { SC_(70207360), SC_(18.7601108873651530393019317938988457707) }, - { SC_(154231424), SC_(19.54711196618087428636344348941647974165) }, - { SC_(294509056), SC_(20.1939674915675244205666343569672677746) }, - { SC_(1070557184), SC_(21.48459226315622322979093631189365864251) }, - { SC_(1957922816), SC_(22.08829714102155481686957732827526425736) }, - { SC_(3912507392), SC_(22.78059146269991677250675041832419710247) }, - { SC_(7279233024), SC_(23.40143852031869095098313030835785443555) }, - { SC_(9665245184), SC_(23.68494949808078517275225570625127768937) }, - { SC_(22627590144), SC_(24.53558298204260156687347955127694595939) }, - { SC_(60601991168), SC_(25.52074076759958328225601044752066239618) }, - { SC_(134018236416), SC_(26.31438890085421876104087786768111623882) }, - { SC_(204864946176), SC_(26.73876398039978985836947169876252884996) }, - { SC_(284346286080), SC_(27.06660583008717947194092254982253381033) }, - { SC_(914576637952), SC_(28.23487428494463574299686107465880501208) }, - { SC_(1581915832320), SC_(28.7828049610810604762091293247739091717) } + { SC_(1788919.0), SC_(15.09026926533497056732451999718664988024) }, + { SC_(3769169.0), SC_(15.83551229128394411859348316953904317643) }, + { SC_(4327820.0), SC_(15.97372168955474121405849637207319473463) }, + { SC_(11044024.0), SC_(16.91054720571544732784968725481341574805) }, + { SC_(21423208.0), SC_(17.57313255890322504472542433762806340181) }, + { SC_(62828288.0), SC_(18.64906315643796382994112822618240813581) }, + { SC_(70207360.0), SC_(18.7601108873651530393019317938988457707) }, + { SC_(154231424.0), SC_(19.54711196618087428636344348941647974165) }, + { SC_(294509056.0), SC_(20.1939674915675244205666343569672677746) }, + { SC_(1070557184.0), SC_(21.48459226315622322979093631189365864251) }, + { SC_(1957922816.0), SC_(22.08829714102155481686957732827526425736) }, + { SC_(3912507392.0), SC_(22.78059146269991677250675041832419710247) }, + { SC_(7279233024.0), SC_(23.40143852031869095098313030835785443555) }, + { SC_(9665245184.0), SC_(23.68494949808078517275225570625127768937) }, + { SC_(22627590144.0), SC_(24.53558298204260156687347955127694595939) }, + { SC_(60601991168.0), SC_(25.52074076759958328225601044752066239618) }, + { SC_(134018236416.0), SC_(26.31438890085421876104087786768111623882) }, + { SC_(204864946176.0), SC_(26.73876398039978985836947169876252884996) }, + { SC_(284346286080.0), SC_(27.06660583008717947194092254982253381033) }, + { SC_(914576637952.0), SC_(28.23487428494463574299686107465880501208) }, + { SC_(1581915832320.0), SC_(28.7828049610810604762091293247739091717) } }}; #undef SC_ diff --git a/test/test_inv_hyp.cpp b/test/test_inv_hyp.cpp index ebff08b75..fdf0e5a7b 100644 --- a/test/test_inv_hyp.cpp +++ b/test/test_inv_hyp.cpp @@ -73,7 +73,7 @@ void expected_results() ".*", // platform ".*", // test type(s) ".*", // test data group - ".*", 2, 1); // test function + ".*", 4, 1); // test function std::cout << "Tests run with " << BOOST_COMPILER << ", " << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; @@ -198,8 +198,23 @@ void test_spots(T, const char* t) // T tolerance = boost::math::tools::epsilon() * 100 * (boost::is_floating_point::value ? 5 : 10); - //BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast(0.125)), static_cast(-0.63277562349869525529352526763564627152686379131122L), tolerance); - (void)tolerance; + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(262145)/262144L), static_cast(0.00276213498595136093375633956331651432309750291610866833462649L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(2)), static_cast(1.31695789692481670862504634730796844402698197146751647976847L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(40)), static_cast(4.38187034804006698696313269586603717076961771721038534547948L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(262145L)), static_cast(13.1698002453253126137651962522659827810753786944786303017757L), tolerance); + + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(0)), static_cast(0), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(1)/262145L), static_cast(3.81468271375603081996185039385472561751449912305225962381803e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(0.25)), static_cast(0.247466461547263452944781549788359289253766903098567696469117L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(1)), static_cast(0.881373587019543025232609324979792309028160328261635410753296L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(10)), static_cast(2.99822295029796973884659553759645347660705805487730365573446L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(262145L)), static_cast(13.1698002453325885158685460826511173257938039316922010439486L), tolerance); + + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(0)), static_cast(0), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(1)/262145L), static_cast(3.81468271378378607794264842456613940280945630999769224301574e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(-1)/262145L), static_cast(-3.81468271378378607794264842456613940280945630999769224301574e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(0.5)), static_cast(0.549306144334054845697622618461262852323745278911374725867347L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(-0.5)), static_cast(-0.549306144334054845697622618461262852323745278911374725867347L), tolerance); } int test_main(int, char* []) From bf9a321550480a3ec26e997556904dbceda2cb30 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Aug 2008 11:04:10 +0000 Subject: [PATCH 029/192] Update inverse hypergeometric docs with accuracy, testing and implementation notes. [SVN r48291] --- doc/sf_and_dist/equations/acosh1.mml | 39 +++++++++ doc/sf_and_dist/equations/acosh1.png | Bin 0 -> 2832 bytes doc/sf_and_dist/equations/acosh1.svg | 2 + doc/sf_and_dist/equations/acosh2.mml | 40 +++++++++ doc/sf_and_dist/equations/acosh2.png | Bin 0 -> 3208 bytes doc/sf_and_dist/equations/acosh2.svg | 2 + doc/sf_and_dist/equations/acosh3.mml | 48 +++++++++++ doc/sf_and_dist/equations/acosh3.png | Bin 0 -> 4276 bytes doc/sf_and_dist/equations/acosh3.svg | 2 + doc/sf_and_dist/equations/acosh4.mml | 65 +++++++++++++++ doc/sf_and_dist/equations/acosh4.png | Bin 0 -> 6077 bytes doc/sf_and_dist/equations/acosh4.svg | 2 + doc/sf_and_dist/equations/asinh1.mml | 39 +++++++++ doc/sf_and_dist/equations/asinh1.png | Bin 0 -> 2784 bytes doc/sf_and_dist/equations/asinh1.svg | 2 + doc/sf_and_dist/equations/asinh2.mml | 51 ++++++++++++ doc/sf_and_dist/equations/asinh2.png | Bin 0 -> 3905 bytes doc/sf_and_dist/equations/asinh2.svg | 2 + doc/sf_and_dist/equations/asinh3.mml | 41 ++++++++++ doc/sf_and_dist/equations/asinh3.png | Bin 0 -> 2967 bytes doc/sf_and_dist/equations/asinh3.svg | 2 + doc/sf_and_dist/equations/asinh4.mml | 38 +++++++++ doc/sf_and_dist/equations/asinh4.png | Bin 0 -> 4070 bytes doc/sf_and_dist/equations/asinh4.svg | 2 + doc/sf_and_dist/equations/atanh1.mml | 44 ++++++++++ doc/sf_and_dist/equations/atanh1.png | Bin 0 -> 2759 bytes doc/sf_and_dist/equations/atanh1.svg | 2 + doc/sf_and_dist/equations/atanh2.mml | 40 +++++++++ doc/sf_and_dist/equations/atanh2.png | Bin 0 -> 2947 bytes doc/sf_and_dist/equations/atanh2.svg | 2 + doc/sf_and_dist/equations/atanh3.mml | 41 ++++++++++ doc/sf_and_dist/equations/atanh3.png | Bin 0 -> 4075 bytes doc/sf_and_dist/equations/atanh3.svg | 2 + doc/sf_and_dist/inv_hyper.qbk | 116 +++++++++++++++++++++++++-- 34 files changed, 618 insertions(+), 6 deletions(-) create mode 100644 doc/sf_and_dist/equations/acosh1.mml create mode 100644 doc/sf_and_dist/equations/acosh1.png create mode 100644 doc/sf_and_dist/equations/acosh1.svg create mode 100644 doc/sf_and_dist/equations/acosh2.mml create mode 100644 doc/sf_and_dist/equations/acosh2.png create mode 100644 doc/sf_and_dist/equations/acosh2.svg create mode 100644 doc/sf_and_dist/equations/acosh3.mml create mode 100644 doc/sf_and_dist/equations/acosh3.png create mode 100644 doc/sf_and_dist/equations/acosh3.svg create mode 100644 doc/sf_and_dist/equations/acosh4.mml create mode 100644 doc/sf_and_dist/equations/acosh4.png create mode 100644 doc/sf_and_dist/equations/acosh4.svg create mode 100644 doc/sf_and_dist/equations/asinh1.mml create mode 100644 doc/sf_and_dist/equations/asinh1.png create mode 100644 doc/sf_and_dist/equations/asinh1.svg create mode 100644 doc/sf_and_dist/equations/asinh2.mml create mode 100644 doc/sf_and_dist/equations/asinh2.png create mode 100644 doc/sf_and_dist/equations/asinh2.svg create mode 100644 doc/sf_and_dist/equations/asinh3.mml create mode 100644 doc/sf_and_dist/equations/asinh3.png create mode 100644 doc/sf_and_dist/equations/asinh3.svg create mode 100644 doc/sf_and_dist/equations/asinh4.mml create mode 100644 doc/sf_and_dist/equations/asinh4.png create mode 100644 doc/sf_and_dist/equations/asinh4.svg create mode 100644 doc/sf_and_dist/equations/atanh1.mml create mode 100644 doc/sf_and_dist/equations/atanh1.png create mode 100644 doc/sf_and_dist/equations/atanh1.svg create mode 100644 doc/sf_and_dist/equations/atanh2.mml create mode 100644 doc/sf_and_dist/equations/atanh2.png create mode 100644 doc/sf_and_dist/equations/atanh2.svg create mode 100644 doc/sf_and_dist/equations/atanh3.mml create mode 100644 doc/sf_and_dist/equations/atanh3.png create mode 100644 doc/sf_and_dist/equations/atanh3.svg diff --git a/doc/sf_and_dist/equations/acosh1.mml b/doc/sf_and_dist/equations/acosh1.mml new file mode 100644 index 000000000..0d420a034 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh1.mml @@ -0,0 +1,39 @@ + +]> + +acosh1 + + + + + + acosh + + + x + + + = + ln + + + x + + + + + + x + 2 + + + 1 + + + + + + + + diff --git a/doc/sf_and_dist/equations/acosh1.png b/doc/sf_and_dist/equations/acosh1.png new file mode 100644 index 0000000000000000000000000000000000000000..71d7627d838ec162b749df61370473acf365298d GIT binary patch literal 2832 zcmeAS@N?(olHy`uVBq!ia0y~yV7SG=z#zrJ#=yXE@vBol0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq|>n)5S5QV$Rz+m0Q9?MUUIZvo#)Y@Kuxxc*3P}CBX6EMw6qQK64H%O^wLV z;ybP5$-5=MIIu9n>-43iDp_0-vnCnsR51^uEE; zA>KH8%FhkXpHE+I%W@7%PtYpx+?%Q?HfbBfJk!n0uXVjm6<_9f-aVU>H|yTIIHs)& zSIuBNW3<`)m97V;1jnDn_nfXU2sg@mO3hK*rWvK(zC_T$-8ecdKho=n!-M%t#U@>G zzqEAHya^?JOZ2ZeY}=HWmfg_Zpnds^nQQjZ2`UeY64LgjYBE24mm%DEyy0}i#{)~R zimdYbp?o3y(u$S~%QDtV|7N_+{QY|L1fzgWi(2E$+h^WQOEYdPZY-Q+7tYOiy0x;U zkZ+#`LvGi#TZU3UR?l3!e!D{If`e!N#d5N_#WVLxeV0A+ zX8+S`;S8(K=5#Fyt!UZ4WYYl!&#b_%X->}$h`9Vn*}t5}Sf^FH!Ca-+aPv*kE5RaX za+;SEse3HS$X=!D-&(=B-A!l?pA6HUbI0ngI3##l_Imu1eD|AY$`;;#a(0Y$v3|9! z6K)ya*IN7|>yFjydn+;?PI%v*-|NrRpVIxz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/equations/acosh1.svg new file mode 100644 index 000000000..c9ba67d3b --- /dev/null +++ b/doc/sf_and_dist/equations/acosh1.svg @@ -0,0 +1,2 @@ + +acosh(x)=ln(x+x2−1) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh2.mml b/doc/sf_and_dist/equations/acosh2.mml new file mode 100644 index 000000000..72ceb001a --- /dev/null +++ b/doc/sf_and_dist/equations/acosh2.mml @@ -0,0 +1,40 @@ + +]> + +acosh2 + + + + + + acosh + + + x + + + + ln + + + 2 + x + + + + ; + + x + > + + 1 + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/acosh2.png b/doc/sf_and_dist/equations/acosh2.png new file mode 100644 index 0000000000000000000000000000000000000000..0f5c76556cca0925ee989ffeef3b543bb1cb18a6 GIT binary patch literal 3208 zcmeAS@N?(olHy`uVBq!ia0y~yVEDnnz@W^*#=yX^Q{(t^1_lO}VkgfK4h{~E8jh3> z1_lPs0*}aI1_q%L5N5oWCSSq8z#v)T8c`CQpH@mmtT}V z`<;yx0|O7Mr;B4q#hkZu%eRDF6+KpezuJFegQ)b3go8|zmfqlG>+PDgBS~r24TYmZ zy&Ahrv`#nO*eLD0sVDY;K(tQa=ALecH+##EiiPMH-q5c5nLK~u>C&`&XAV55*8d)z zeQj>_IlJ`t#qVz}f3x>|PfqXxhsJY^p3=;V8<}(WUy-ZzzO1Shu;4(9^ChiG#~3F! z$}@9c3tAWOfr-_MF=u~5wMjvt?NcsR{eT6<5ADASh;zj)aCm-59m*1STlj#Lt0Ykb zBn;z}Sg=mtvTq5u>fda=S1CIvPnyZsJ{Y>rZ zB@ZY0O)Z(RbCoW|0@ZRl|ca+c$p&NIC9%2FeqQ! z#kcfiolB;! zHg&mVbzs|p`KvC5Ha~uHw)en{Eoasqd(VI1edFea=c;oxGQY~)jN5iQ_`&+8-ce4M z9(>uWyLWogTYHI$W8Z9dehK{dOLLLu%cyXb5Vq~iN+NqRCtQiXR6hG;a-8zod1ef8 zZ0n|*I9~eoc~bk5q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Uuf8sCeLRzc% z8NTUG{^zV@p!WOCF~N%^@0r|}eQ8WRHE&i0U)H0~5gaepsW5tP=HYTe6gcHQH+O zwYeGpCs}?9`d!T=FZAzM(6<($d+ulMbuW28x#QT>7j6vxg4gy%H};UmzLX^sh<{6+O;vW?!VR39Oidxmiw%{T+XRd|0~!pu95B3b|K^I5$9hjzL?;_ zHr>7PYR>*kDRGB8PVC*9^MCuvJ#50v=RMCpxqNeil4}39z0qq^t+I5g7T=g#us4)9 zdu`L(j=lNq;dwt^9XREYlz%7ZjpLa&XT#pHa{NA|diKd>&y8w{e^yJzdL7K&@44f< z+wudmXDMa|A3C}*-#8^(Os4v9wCdFohh=ddSrbdt5;^v)mb5Y2GfnZ&`Ng^0#V>#O z-%&Ru@Iy&hV!Y>Jm9q~+Uj})95fX9#UdFs`%U?&{FU%cFpFi~#U*|dDiu{Y@-|s)~ zxEIf~{pP%Da=DE=o0rsbnoG18)w6xs{x|H@ehG`i-;!qJi=6tKkpXV;=EV59Of5_HV|~xRC-e7BpIh-K|4v8; zOC?x*yRh`cnRKJbbVgg1x0;!Wp4Ecv$NNr9)Bgr)EHin`N~m_xTPt2zm*DtlJEvT+ d-@^awr$icm9{bp>%D}+D;OXk;vd$@?2>_Oi7Qz4k literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh2.svg b/doc/sf_and_dist/equations/acosh2.svg new file mode 100644 index 000000000..7bd99ad61 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh2.svg @@ -0,0 +1,2 @@ + +acosh(x)≈ln(2x);x>1ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh3.mml b/doc/sf_and_dist/equations/acosh3.mml new file mode 100644 index 000000000..bd0d479c5 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh3.mml @@ -0,0 +1,48 @@ + +]> + +acosh3 + + + + + + acosh + + + x + + + = + log1p + + + y + + + + + + y + 2 + + + + 2 + y + + + + + + ; + + y + = + x + + 1 + + + + diff --git a/doc/sf_and_dist/equations/acosh3.png b/doc/sf_and_dist/equations/acosh3.png new file mode 100644 index 0000000000000000000000000000000000000000..c49727d47b536ec90e1ed13c486beb619865660b GIT binary patch literal 4276 zcmeAS@N?(olHy`uVBq!ia0y~yU~Fe#V36WqV_;y2nK&Vwfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v>OEnpQ;+Z8e|X~RB18QZ8ZVYCNYm%Hxq#zdQOOx2 z-XJbh-%FgyZpWhQSn`>_U6h#3;(GC8Tkk>@Ev`(hWg1IGrpO7pc6bIyem-7h_Ga_> zy7kX%@7E^WyZ?N%{rj8eOW*#rsb2ea&DMF(Pn=n?xG&4$(zXKu#?=PdQC+P|)*X;< zuuu2(X8X}Svv)#?Si$P6GY|jIHc9h!kd0PX`O2Wi{C|?Eu418{4xx_!%x~B7lP+FP(hj~jrZ(g>v?@fR>UulTU zBtNz|)6MoNzTT2Axc9{Qxq7mD&(h4CxMbrbtB@Jnq8{CE;8uA%%T%#6rFmDuip7gK zcs^=9NRPZ6r1mTD*eS;#>j%{b<{pUsVQsN{(~_%vY1IzFpTT|RO~+7$&1w@&1S*(r96fU_#n)eU zt84Ak0QaSaToIE@1)n-hDrjA)a*!b*?Yw)F;sf&o^R?V!%qlpa3ocLb^^o1_K3jxu zl9bBZyQj>yO$-S!nYN^F?aS4ZCTwY6;um>2kdNuEJJbHNv!)qcl#Ym8xQ&l_-P(ZY znFr4N6aT({&Ky(S(kpVgUKSp&^fHw`R6qC@wx!tML$ZTw*h}@7OrCE~zumlbf{D|m z!w0w)`1k&@3A=PxH0Kk?0^xr=(MnoED^)V}6XwqRyX&jU)3@pDp4VB~f7p0F_geME ze6Ng!%8!s&H%=)Wm+;&?xiZ(wf?+<>cShUOxek{&cO-u>GXA||hE>`(rVk7S>zB+u z^>+8v2(C5DD;mShRAkj&K0okxM_aU}j8I*8=!Uam6SmY(ot3w>fMfNA&mS`82fZqt zdS!LXr@IB0uVyN~%y{7T;9r8=YLR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vwMnBc&p*Q9cR9qY-)PH z$5`%!!TOF(vWKmIihkJ1)&E!Tz(Lh1^8K^z zfo1>U^Hxy}+)ouZ?y386>P=}4|KXB^_bz{B4_ViX_3x@=|6#Fba_L9T{`L3N9`Ea5 ztvK=eVdpochX$rK2Hzhjo^Kba=!^TYY}Vb+Q!MSzZ0Flrci!@aB)5<5rZ>M2%;CQ0x3wAEa&yyTl9fAbVk%g9B&&S_?b?*En^$W8ke7FD-auqMrU zO@njzzUcoh#;32$3DHxj<-LD>(}okDJ{O!mc>3znGyWWGRZ)feCTD%AXIQuQ{E0>X zw{>i*+7`6)ht<2!8s9^%PyXQR5s$Ja~AK6f1VswxgvgJlVSpwfzze* zNs^QH@!8x8V_~l7$P;WzthV`6)%{1FcM{*>vusDX+8PgZNpZIERg^rLd-a{R`~STK z!KtwZM*`k-PK;(bWBzO|m(N6#gI*TWnr}Wz9DSxdVY^DnQCY9es2^YFQ>ceGws*pyY9<`qRHrFDDf8gqNx;@u%({&;T3Y};)!mX^)9 z{I~G3tGMy*#V4v_3teA7(wZdxbt`+`sd)+eW^PuSAb-_}&t5FeLbu;_rLwkk{M6jc zyB|IrS(J0@z``B1p^=yGb*0;Jl~2h#P|KR#aQs8SwV+#>2WI~Kbm3f1LcvTE*}nM) zx5~uteDXDX%U16Dg?kw9b6+@QfAyOFoR4dn{B$?o``#&gJt$Sm_~)|^y>sLl?9Wxr dx%KL6y|87Ik)%!#Cj$cmgQu&X%Q~loCIFUM4XgkF literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh3.svg b/doc/sf_and_dist/equations/acosh3.svg new file mode 100644 index 000000000..c79a4d132 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh3.svg @@ -0,0 +1,2 @@ + +acosh(x)=log1p(y+y2+2y);y=x−1 \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh4.mml b/doc/sf_and_dist/equations/acosh4.mml new file mode 100644 index 000000000..77103f091 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh4.mml @@ -0,0 +1,65 @@ + +]> + +acosh4 + + + + + + acosh + + + x + + + + + + 2 + y + + + + + 1 + + + + y + 12 + + + + + + 3 + + y + 2 + + + 160 + + + + + ; + + y + = + 1 + + x + + + + y + < + + ε + + + + + diff --git a/doc/sf_and_dist/equations/acosh4.png b/doc/sf_and_dist/equations/acosh4.png new file mode 100644 index 0000000000000000000000000000000000000000..395343d4e1c579ea09810ab62539c8765b446c81 GIT binary patch literal 6077 zcmeAS@N?(olHy`uVBq!ia0y~yVEn|uz@Wv!#=yYf(S1{mfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v@+qmVTif^F7ihO=FyLTPcIMM!7J9;Ksl$3QfkB0%gT*l* zfYCK@5@Udai%N%zql1da1Q`_%0hYi3hZKoL8vGN!RM)?;GG6XKzxemJxBC|Uo}0fm zZhQV*tI*Qmx2s~UPnemSrh3ehoRRYT`&~J2UxiHJ1oH=~4@_>CPr355^Ad?mzjOcucpTJE4*|*Aa)?~z?%cUlf<-E?%KBGtd$j5Ss?ePSwSkb5;Jao zn|oKz`>cuB#=X1WdN=wr2RFoey_(A+qnx>|uW#M5Wy`d$H0@c|wfJ(pZ-2sX^PT_i zv%X{c7a8>a{sGnlc5|g;eSLkmuVAh8wO7&gesfIz{kMp$Qxi>?4diz0Sagc>fZfVC zU*EGD%fz0TroQ3(v*~uT1h2;|*GplO^d^+_E$QbCzPy{Ued*nD`<(qeHhgRBeg0m( za^;K0R)zJN$*0S8;>Dm0(Z~JlMNfW2lI`6f$c^Lty! zKBk9h+oryije7A-v+9NIij^xR>$0v^`OZ^qsBG9@UafF8;kW05)dy@3L`_ON8@rEj z#)P+Lc6TnBsxsHbCFOR^rA0@rww-6(=i`!d+oC*^>jT4vobJ2VoAxYAn{xT9=elLf zBh+l|E?*7gX zO4dD*o#nD!X^58pLhY1;GsW>0|d_Q^hfcR5t)@czEJTE%>|c;m-OcHA);zqjV~ zuWsUP_|GssET&#;hIy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09AwlaEY@&7YhSDlfv@|Fu$dlIhPWWBZ5MA3}PJ}h&*t{HPln+(zp3Vtjem~^DjnJQciG$ID8WaT=Ty(dx?8CW{QL90yjnrj#y`UH zdtt4o@Y%I3AFm|&^hcS+drB7zUptk`*8Z9~o&S15HRtW~H|@5GJu*F;@Z0D1^j{xZ<>Nm+;`3xt)&%cFR(vs7ZeBb`umaly!dLD;% zHNT*3q4tA@Mb@E3?$+};T5YBk=vpt>abeOH`-#VQUA?f$)YMeD<3Dp}RkhLQ6R!6d Q7#J8lUHx3vIVCg!0NeTB2mk;8 literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh4.svg b/doc/sf_and_dist/equations/acosh4.svg new file mode 100644 index 000000000..bdb6e538c --- /dev/null +++ b/doc/sf_and_dist/equations/acosh4.svg @@ -0,0 +1,2 @@ + +acosh(x)≈2y(1+y12+3y2160);y=1−x∧y<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh1.mml b/doc/sf_and_dist/equations/asinh1.mml new file mode 100644 index 000000000..17463c61c --- /dev/null +++ b/doc/sf_and_dist/equations/asinh1.mml @@ -0,0 +1,39 @@ + +]> + +asinh1 + + + + + + asinh + + + x + + + = + ln + + + x + + + + + + x + 2 + + + + 1 + + + + + + + + diff --git a/doc/sf_and_dist/equations/asinh1.png b/doc/sf_and_dist/equations/asinh1.png new file mode 100644 index 0000000000000000000000000000000000000000..69442140ba5e73aaf6835ec5b7b931924275e64b GIT binary patch literal 2784 zcmeAS@N?(olHy`uVBq!ia0y~yV7Sh}z#zrJ#=yX!!hP~S0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq^U5)5S5QV$R#y)f?h3iypVX|9X;wzS7r@2__ROOrn|&PSAWMXuM@&W@xlw zRM$##;iX=-t2*7gE5eeGNGOJCb!=-fkmU`^T&1NL+M6z{;V$j-J9xbk=gIJp0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F9dB(9V;)o4hP(4jt9hNfuIX*Ndm?sO>;#($%sJ&Q zUCC=5gW@0PA9&{%=eFETkHPaeLvoIM+~PmXE>6EU9?QB`=h4`8yz|MkPkq;xb1P&r zOfw5@S>|Pv*N=LhGu!^g{LZ>oH=#sfL+9!rveDvF+@8!F+rMu+RQ;d*@1FE!Pp>9| P+OG_ru6{1-oD!M +asinh(x)=ln(x+x2+1) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh2.mml b/doc/sf_and_dist/equations/asinh2.mml new file mode 100644 index 000000000..c27843dba --- /dev/null +++ b/doc/sf_and_dist/equations/asinh2.mml @@ -0,0 +1,51 @@ + +]> + +asinh2 + + + + + + asinh + + + x + + + + ln + + + 2 + x + + + + + + 1 + + 4 + + x + 2 + + + + + ; + + x + > + + 1 + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/asinh2.png b/doc/sf_and_dist/equations/asinh2.png new file mode 100644 index 0000000000000000000000000000000000000000..a5ec5ab01bdeab6f558ea0c761b07a320c641ac2 GIT binary patch literal 3905 zcmeAS@N?(olHy`uVBq!ia0y~yU{q&dU{K>=V_;xtD~t_bU|?V=cJd72;Nak>;YjIV zU|`@Z@Q5sCU=S(+Va9uD@)ZmW43Z_T5hcO-X(i=}MX3zs<>h*rdD+Fui3O>8`9Gc@yCaE!6}q6S~*F_i#i zx7D7jl%!0R&SlKD2vI$zX&Ra>Fh@%CxWtBQ3#Dc|tnTobBEk`7DAe=s)A3vEeBbZ> ze)r*CEwknQ^UrI}?f(7l<(uO3R@v*feyiK$>*!eSbZOoJ%LAR;;$Ob`Cvv52$-^VH zzo)&uzUt}wn}75~MYixy+Q#C?!fXJ?{0P;*mXc^>y+0Q_ka}WZ+m{z zj(Nwn&A)>JthYVCCCBcwZh4I29Ijo;-PXIAS$RLUR~d;PTDib_)0)lJ0T%?`U!S~F zz>k%cHFlDdg{X)~i6_^?kbr;-s+ujqj*gDgm)vccyu{yQmQrR0b1J*{uAobSxf%7f zp6ypB{x9&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|Wb!7yqYcrp}(-bnfWJ>NK&>Q^ozbJ5|l!AME=SCF|aP z_P*rO!uv%nr%m@8w>Hls*1K&YSIj4OB=2hcz@W>zPb1U$LHSFK7f~@GvnJ&D7N2?& z>zG)q^+IgPiI2NGY_H7UV5@%gtdAm-dG+nOg~q=l0_M3*=l#p7D!Pv?S;0t(fq{X+ M)78&qol`;+0Pn?(+5i9m literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/asinh2.svg b/doc/sf_and_dist/equations/asinh2.svg new file mode 100644 index 000000000..7842a15bc --- /dev/null +++ b/doc/sf_and_dist/equations/asinh2.svg @@ -0,0 +1,2 @@ + +asinh(x)≈ln(2x)+14x2;x>1ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh3.mml b/doc/sf_and_dist/equations/asinh3.mml new file mode 100644 index 000000000..e5dc329c1 --- /dev/null +++ b/doc/sf_and_dist/equations/asinh3.mml @@ -0,0 +1,41 @@ + +]> + +asinh3 + + + + + + asinh + + + x + + + + x + + + + + x + 3 + + + 6 + + + ; + + x + < + + ε + + + + + diff --git a/doc/sf_and_dist/equations/asinh3.png b/doc/sf_and_dist/equations/asinh3.png new file mode 100644 index 0000000000000000000000000000000000000000..3d2d41ae02eec0aa357aff7e8f1c3c405c56b587 GIT binary patch literal 2967 zcmeAS@N?(olHy`uVBq!ia0y~yVEE3!z@Wy##=yWJ@s9T<0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq`4Z)5S5QV$Rz+m0w~niypVXAFtHu!V&5m5YiL)+2^I#ic4By+4GdzL>+ky zT_d&DT#)i!dNk;C$lFU^0#clv8&wx-war)@I*Uu|*n|&n<$v4kth`tKbMJTQytO};JFJl^U$^~D{IyTVKse&!x8Far!UFVzu()?ctG}NR_FzeqbKfi zPQ1eUBJKBOpQ!myMDKH2gk4HW;4`@KZO)t!-3-Q~vvvzBW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$I$7NMmbbG?ii7*sfKbVP9F#4KJjDe!ug=0VN_H@E#}el3vwByiHaNhUFu z8jsxi`7Z6%e%%k68)}W8-j?yKRe7uS(!_K2v$g)!%9*;0)?TUg&+*@EJ0oJGC`Fz>eUUV1*b)=~pIH9{T3Yu+4r$?d-Sm4ECy4 zhxZ+L*!N(@tR)9#^EbMCI;vDEzcffPyT~k&`+H@L>8V!d&I8M?PL93O`*!=}-W<+7 zOg$4zQs<`H_`Qi)>sj&fbo$)m!f*eH+}`|PbzkMmH37ngsjWXJdet^I2SxdN&K9_Q z{Ihp<&TW06;P3uMsk)J6Ed^JnFQ5AAZKz`YcB7qoA@iqAzvj*@v3<$AO#dq8B9?SRDnvu_0N z*{<_8FX@!gtS!_1dhX36i3|>x~O7<0s#rbW`l~l6?OkYrmRkQu$#^apJ&#`y^8dipW6OdtXEv*@r!fg{(ro;RrCL=xwso0JNZyOlXKBz zspnU2r=E(C{2{*a?Dacei|%?v%`5Qg+xj<8t=9a3=xzP&p?6J7q`X+}$t3-L_HEsM zpXs_CZq*VS*1k=%-+t#%)pylfKd<=Q$~y4OMf&{PR`!*-^KyP);d=f{kU3Xau=I!N z^62)uNavy%zA8=jZsrlkX1b)Dw_CgFj#A%}JQtT6LI+;8lyB2FIQnh1<;yGWH~gfg zxc}`|n)N?#_pZp0q|?$$UswHRY@WP+fu71*$2|fcK3u!H#(9IW;1lES8=5zJBR22V zc-ayqdAsQeqnuks2e(kKlvzo^V>XZAJFyLqFNZ9RTvB_`xT9lNS-FBPQ_kGJ>$mJ~ zeUm)$?at=|ODCD-r`P@x3{2d4MoP@xYEPlF&92O97R^QLW`5abd!*EcdEbn{Td5Tb zr%d=GHeK-TqX*wYj(uBVbA5Zaa(8Rt^bLPqWH +asinh(x)≈x−x36;x<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh4.mml b/doc/sf_and_dist/equations/asinh4.mml new file mode 100644 index 000000000..a6a72d29c --- /dev/null +++ b/doc/sf_and_dist/equations/asinh4.mml @@ -0,0 +1,38 @@ + +]> + +asinh4 + + + + + + asinh + + + x + + + = + log1p + + + x + + + sqrtp1m1 + + + + x + 2 + + + + + + + + + diff --git a/doc/sf_and_dist/equations/asinh4.png b/doc/sf_and_dist/equations/asinh4.png new file mode 100644 index 0000000000000000000000000000000000000000..86c88dd7a45243d8dab29298a155f60a1b0ff51b GIT binary patch literal 4070 zcmeAS@N?(olHy`uVBq!ia0y~yVANt@U=ZhEV_;y|vy$lr0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq_5S)5S5QV$Rz+)qAFf&OE-KUwr4uP$5wvjwh?8dQ4lkU|CThccPDb!13tX zW1WE|9^USWOzifpGiO=Niae|^Ym)Q50C&|R2RcPm*0)Sb%G6L;q``r48=^UN0sO3t{+vY>MDq+cZm z&r~tlGtARicrMVv{sGs42KO^-ibeKkrd>X>X4=1rU!)8UopDRKogEU=yMiO>`x}Lq zjdSl#cMIW5yC(EQ|ACk1`{@B&mo9nlRmEe$Tfr~Et&l0WL1Kq)wCAO%2VSO?)vT>E znN`=Dp>Zb1zh?X2rX{}CyX|{d$ehXH+7Nc>3){BO0tJ(oR0nNo-NCfS{P1n=3Z5S| zMON!ybe=l1%WOejwejmq4nNm=J;=Q&5IMDJrm5lPd)B+yX-De1!c~esLnsh>%Ib%M?RgTbD3{=3h(nSSPt zma%kns^#G`Z}wGfn$N5=b<4KKr2Wiu=5L<(SL_8N&-sLqqKqJhu(#ii{`GLSUh3o-LCmreJj}a zKV)xr<(*Ch$Ly4sdi;&1_wAaniJ@5&5DU?mACt@NV3$ zdN(r5)zh3Ie%%w!#Vj{ptNsdvN8S-S-MTT)%Zi* zG#=0BM)|Uslfk1 z#2uDsCY?!N9Nj9y9~^n{C;Pywf||s%vmcUg6?vX#Tgz!6^kelB`x!S69+=+XuCjMd zR#mjyIe`bC4>(VnCN9~}-FRQz>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_#qr}@R)kn*JseV6qDM_j1K(YU(QtQ+oQK>&J&FG##Ei2a1aI79Q(zWCS_w8r+?{g=%K%wyNp)$@cf%~zQSZC;t|)UjvR zHIcAwu?^GGuDQAX%k};-Urr^tbH+{9AI5zQ|6(uQ`Vc%<====x_eFy33-l-Ls+n`B zaYyvS>z?fg`k!@wkWDk$XRUMWY}d9OMinL%?~Z<+sK*xN{&(SzmbvZO2LwMhY;O7{ zZ4lMJ7q-Wm)l^D<@M$aK&g)xp_~`LR7dKqA z%-wQG^mgl4-j!jGnzdhhe(d?&P|s?${FMFy@n23hD-HC|KQZ~U?uyWz&?oiB(!VvYJn=hw@3couK@wQrxj z+*9)jCr_V#d7X1d@ZF#->>sQbvoFa={ut7;P<7w@zsYmHoza}#q`vOgd)b{9s|^IJ zk2XJ3+kSO(@5YKJ8xEhVo5%EbGt-x8Kk_bXI_C=uKVS{w-2HXRRyqDs@hQ;@?iJJ& zuPC1zn<~Top>E9zDTRDtgViB7cVA*R-&@Dtvoh#+aO3Gu_eAS<$xgUXHg$Jhs$*Sk zx=r2k6)|)8<}A5&J*!Mo<6aD(+QZ%NW|;)m&57q+6U6+_K16V5<(}e?-b>V{YOlYg z@wC#;catCx7NR!+_&wD z{z4P+hw-_NA5%{Hv#8j%&+ZA&XMIleVRt+Qk%qJl18a)u)v|9^9(joh|43 z)q+R&X%iMS@hJk^B!PC{xWt~$(696rW((C{L literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/asinh4.svg b/doc/sf_and_dist/equations/asinh4.svg new file mode 100644 index 000000000..5c11b5ea5 --- /dev/null +++ b/doc/sf_and_dist/equations/asinh4.svg @@ -0,0 +1,2 @@ + +asinh(x)=log1p(x+sqrtp1m1(x2)) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh1.mml b/doc/sf_and_dist/equations/atanh1.mml new file mode 100644 index 000000000..0561c1a18 --- /dev/null +++ b/doc/sf_and_dist/equations/atanh1.mml @@ -0,0 +1,44 @@ + +]> + +atanh1 + + + + + + atanh + + + x + + + = + + + ln + + + + + 1 + + + x + + + 1 + + x + + + + + + 2 + + + + + diff --git a/doc/sf_and_dist/equations/atanh1.png b/doc/sf_and_dist/equations/atanh1.png new file mode 100644 index 0000000000000000000000000000000000000000..8e51451a034d1af01b9ac5f62a2a19a561871cac GIT binary patch literal 2759 zcmeAS@N?(olHy`uVBq!ia0y~yV3@;fq~1#)5S5QV$Rz+l@nrJMUU0T8#$;6dmh^0A#g}4K+KUtVRnbkjQV(ps&sR40suHEEIXHYQgEM~@pxVbcT@PCl1kp8xFW z$9J=5nos_&cKG+IxYE1tF5i8AuRQPj&0nX?O4t0Ha7A1q_xHI)zs@$wGxFd5S1bDC zhLA+s?}b5cYs1W$OV`wSyyA~xwFwNl&;LWofbGTogBy>Pwu;~0+#u$8d}`Ku?wI!n zdJo*)c3)@Bmc3WLH6NJc*R!?M{6jHcLC=!fZs}J{+uM}?uI$~me466#9n#OUrvjKI zb^5zE*v4NHN!Ya{>;XrDp=ebPKl)Y%T7z^qTe*JggeZ%pFx&tf^c$2Ds1u@>`XJB@}@=Na4&i&Jc=KF4Y ztsUdvw8Xb@;em_=k~@TEu*GokC~w=yBfb37;jB*)jAF}*46dxbBFB1rb7Qn>ET0L} z^V@au4woJtV4U>pMjT_#gk8GYa_*N(9-IzM+AW}dbKlw(dcr$O7wQ$*ih4KhoVh`D z562dU*NmTqcn=&9`ulyU*{@2=?`M=&aL4!`{UlTxS)nDoB zU8-H`d+hc~ovnw~wk)xmv`;s4z1D{iuCoVh+PPQg6=WMk1zT$LD=bx?%W{V)Cy;fX z*Fwn|b7QZtuKSkpPy5Qx+pOf>V0^>XkWG9u4iASeqL)8 zmaCX)p0MF<*X3N5w>iIO@?CnD@cXCN^HrunRhMNR2;9DW>cUp0$GP|87Ufnyuufez z^Fc?a*!SJC5)5;ae?Og5na}v_#=e5o)V0p?o)5}d)afFFYLfFzrxx|M>P|fl9m_XN>+z!}c|dFJ@o9mg(_Jt3Y~#)1|O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Ka z6hng+iyIeReu;#9DqA02U^`)($?T-#iz7@c7c6WpX|0fna6D%=<5KcDHZ`GZU+PxY z`RqFHlydubw`K9#i5`A84|iNnU~ULJ@c978gZ9vLjY{D(LAx!l8{Ijlw>H)@rK`?z z4!V0^_^yJ}Pt!zAKP92R^SqMpI{fL>?R++|$s(Hh;p=EOme-1Wr=?~DIb5G^k+w}H z<6P&>zq~U7L(16-%mu&QG`l)?=CPeTHhAn@!4ZJx_Mw{PU(qUYWIR z3(dA$xTAjhHlM4i2dumC0B=c%x2r>M&4o<>U;AsuQ-lh zC2mP|ZvCnAYA+)n1m50zs%eVJiEoP*?P5FRF)Q)+gH@j%hyGoft)gPfcqjAsEw11E z>VJxN->6$0J@a*=$G@{j4}@;3k2<@v+WXjhi3cK{Z-4TBHsF)^94WA^#m9aB&RfFY zxf+XWvPx763e#Ksg5o{H1?6Mva!Nm5XD&1>2-J<+5Vvt@n#Zn_8Mn(zChTLaIG8(e zQXIdha)a<3r~c6S`^`CHWS=T#Mk_TYO$oQX8gDE2is}2!hDW>eCO2%{wtLc>TdH5U zWY_h5@~C?2dmyv*kXoj$Cwu7R>AwsQ#_=6}{${yAdPKiB<1{-LmlqC?tPfv(ynNr% vZ*eNe|7 +atanh(x)=ln(1+x1−x)2 \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh2.mml b/doc/sf_and_dist/equations/atanh2.mml new file mode 100644 index 000000000..735fd86b6 --- /dev/null +++ b/doc/sf_and_dist/equations/atanh2.mml @@ -0,0 +1,40 @@ + +]> + +atanh2 + + + + + + atanh + + + x + + + + x + + + + + x + 3 + + 3 + + + ; + + x + < + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/atanh2.png b/doc/sf_and_dist/equations/atanh2.png new file mode 100644 index 0000000000000000000000000000000000000000..4b5545e1fb77d6b08a90b04fb7ee7dd92e41f17d GIT binary patch literal 2947 zcmeAS@N?(olHy`uVBq!ia0y~yVEDnnz@Wy##=yYv@@ZHI0|Ns~v6E*A2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YH{5r!S%IXIG=TQREDi{%ul-?C3ja%2ovSW**0^pxb|Yr#@;b9b%k8&^)3!}iUKg74Lm^XY!;v#;DrfA4`cGJ2;qs~7%KD@}xWv3* z)zUBiYKc6RduPs_;`UcpaP58V^+{1jiY~f6NJ+@}z#Y<3)4%CG)8X4Y3cnw&j%CQ17CLJi78J7|NqF!(Q6f+*(ZY~XzIt!8*S@VnZ6@xIl6P7q zY+UlgV3p+yR-aSXub%O6Tm52@`@}2P&&<;b-X?FiE+{Sbh8Bcx2`Ll1%%X~fQqCu3axb5PLkq3U=_|xM%LKcH70iHIiyRbKthw-;ZBe@;zoXzTb11m%qewS8JFX_oM%N Y1x`MAu}5hl0|Nttr>mdKI;Vst06Q05&j0`b literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/atanh2.svg b/doc/sf_and_dist/equations/atanh2.svg new file mode 100644 index 000000000..dab81641a --- /dev/null +++ b/doc/sf_and_dist/equations/atanh2.svg @@ -0,0 +1,2 @@ + +atanh(x)≈x+x33;x<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh3.mml b/doc/sf_and_dist/equations/atanh3.mml new file mode 100644 index 000000000..1d839acfd --- /dev/null +++ b/doc/sf_and_dist/equations/atanh3.mml @@ -0,0 +1,41 @@ + +]> + +atanh3 + + + + + + atanh + + + x + + + = + + + log1p + + + x + + + + log1p + + + + x + + + + 2 + + + + + diff --git a/doc/sf_and_dist/equations/atanh3.png b/doc/sf_and_dist/equations/atanh3.png new file mode 100644 index 0000000000000000000000000000000000000000..36e3df0c8215f1d85792542a60a1809184c5c461 GIT binary patch literal 4075 zcmeAS@N?(olHy`uVBq!ia0y~yU=(6tU{K{?V_;zDvrlVcU|?V=cJd72;Nak>;YjIV zU|`@Z@Q5sCU=S(+Va9uD@)ZmW43Z_T5hcO-X(i=}MX3zs<>h*rdD+Fui3O>8`9~Ko@snPA?;Be8!#qg-t-yf&a z6H+BtBu@JAC^*sUXM<9_>xYXXhc{iC8DL`iHgTH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_and_dist/inv_hyper.qbk b/doc/sf_and_dist/inv_hyper.qbk index 05fc23a28..5666c6999 100644 --- a/doc/sf_and_dist/inv_hyper.qbk +++ b/doc/sf_and_dist/inv_hyper.qbk @@ -85,9 +85,7 @@ and can be computed as [equation special_functions_blurb18]. Computes the reciprocal of (the restriction to the range of __form1) [link math_toolkit.special.inv_hyper.inv_hyper_over -the hyperbolic cosine function], at x. Values returned are positive. Generalised -Taylor series are used near 1 and Laurent series are used near the -infinity to ensure accuracy. +the hyperbolic cosine function], at x. Values returned are positive. If x is in the range __form2 then returns the result of __domain_error. @@ -98,6 +96,45 @@ the return type is `double` when T is an integer type, and T otherwise. [graph acosh] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation acosh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently large x, we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/ +approximation]: + +[equation acosh2] + +For x sufficiently close to 1 we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/04/01/0001/ +approximation]: + +[equation acosh4] + +Otherwise for x close to 1 we can use the following rearrangement of the +primary definition to preserve accuracy: + +[equation acosh3] + +Otherwise the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/ +primary definition] is used: + +[equation acosh1] + [endsect] [section:asinh asinh] @@ -115,8 +152,6 @@ the return type is `double` when T is an integer type, and T otherwise. Computes the reciprocal of [link math_toolkit.special.inv_hyper.inv_hyper_over the hyperbolic sine function]. -Taylor series are used at the origin and Laurent series are used near the -infinity to ensure accuracy. The return type of this function is computed using the __arg_pomotion_rules: the return type is `double` when T is an integer type, and T otherwise. @@ -125,6 +160,44 @@ the return type is `double` when T is an integer type, and T otherwise. [optional_policy] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation asinh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently large x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/ +approximation]: + +[equation asinh2] + +While for very small x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/03/01/0001/ +approximation]: + +[equation asinh3] + +For 0.5 > x > [epsilon] the following rearrangement of the primary definition is used: + +[equation asinh4] + +Otherwise evalution is via the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/ +primary definition]: + +[equation asinh4] + [endsect] [section:atanh atanh] @@ -142,7 +215,6 @@ the return type is `double` when T is an integer type, and T otherwise. Computes the reciprocal of [link math_toolkit.special.inv_hyper.inv_hyper_over the hyperbolic tangent function], at x. -Taylor series are used at the origin to ensure accuracy. [optional_policy] @@ -170,6 +242,38 @@ the return type is `double` when T is an integer type, and T otherwise. [graph atanh] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation atanh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently small x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/06/01/03/01/ approximation]: + +[equation atanh2] + +Otherwise the +[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ primary definition]: + +[equation atanh1] + +or it's equivalent form: + +[equation atanh3] + +is used. + [endsect] [endsect] From e3b02163227f6d7091e7bba57aa2899ad50108c0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Aug 2008 11:15:14 +0000 Subject: [PATCH 030/192] Update to reflect latest works. [SVN r48292] --- doc/sf_and_dist/implementation.qbk | 16 +++++++--------- doc/sf_and_dist/issues.qbk | 7 +++++++ doc/sf_and_dist/roadmap.qbk | 4 ++++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/doc/sf_and_dist/implementation.qbk b/doc/sf_and_dist/implementation.qbk index ac647f7f8..8fda4a313 100644 --- a/doc/sf_and_dist/implementation.qbk +++ b/doc/sf_and_dist/implementation.qbk @@ -548,17 +548,15 @@ generated HTML: this needs further investigation. [h4 Producing Graphs] -Graphs were mostly produced by a very laborious process entailing output -of columns of values from C++ programs to a .csv file, -use of [@http://www.rjsweb.fsnet.co.uk/graph/ RJS Graph] to arrange the display and axes, -and output to a .ps file, followed by conversion to .png using Adobe Photoshop, -or similar utility. This rigmarole is *not* recommended! +Graphs were produced in SVG format and then converted to PNG's using the same +process as the equations. -We plan to carry out this process in a single step using the +The programs +/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp +and /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp +generate the SVG's directly using the [@http://code.google.com/soc/2007/boost/about.html Google Summer of Code 2007] -project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization) -that should, when completed, allow output of annotated graphs as -Scalable Vector Graphic .svg files directly from C++ programs. +project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization). [endsect] [/section:implementation Implementation Notes] diff --git a/doc/sf_and_dist/issues.qbk b/doc/sf_and_dist/issues.qbk index c23e82a27..9a59a3174 100644 --- a/doc/sf_and_dist/issues.qbk +++ b/doc/sf_and_dist/issues.qbk @@ -132,6 +132,13 @@ is found, the higher the priority for implementing it: [[Reciprocal][-][-][-][X][-]] ] +Also asked for more than once: + +* Add support for interpolated distributions, possibly combine with numeric +integration and differentiation. +* Add support for bivariate and multivariate distributions: most especially the normal. + + [endsect][/section:issues Known Issues, and Todo List] [/ diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 64b0fbd95..28b1e23b8 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -1,5 +1,9 @@ [template history[] +[h4 Boost-1.37.0] + +* Improved accuracy and testing of the inverse hypergeometric functions. + [h4 Boost-1.36.0] * Added Noncentral Chi Squared Distribution. From 3f6394139c464919519f1729259355818ee8c6ce Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Aug 2008 12:33:21 +0000 Subject: [PATCH 031/192] Merge changes from Trunk. [SVN r48293] --- doc/sf_and_dist/constants.qbk | 75 ++ doc/sf_and_dist/math.qbk | 1 + doc/sf_and_dist/roadmap.qbk | 2 +- include/boost/math/bindings/rr.hpp | 2 +- include/boost/math/concepts/real_concept.hpp | 4 +- .../boost/math/concepts/std_real_concept.hpp | 2 +- include/boost/math/distributions/cauchy.hpp | 2 +- .../boost/math/distributions/exponential.hpp | 2 +- .../math/distributions/extreme_value.hpp | 2 +- .../distributions/non_central_chi_squared.hpp | 2 +- include/boost/math/distributions/rayleigh.hpp | 2 +- .../boost/math/policies/error_handling.hpp | 2 +- .../boost/math/special_functions/acosh.hpp | 2 +- .../boost/math/special_functions/asinh.hpp | 2 +- .../boost/math/special_functions/atanh.hpp | 2 +- include/boost/math/special_functions/beta.hpp | 6 +- .../boost/math/special_functions/cos_pi.hpp | 2 +- .../detail/ibeta_inverse.hpp | 8 +- .../detail/unchecked_factorial.hpp | 2 +- .../boost/math/special_functions/expm1.hpp | 2 +- .../math/special_functions/factorials.hpp | 2 +- .../math/special_functions/fpclassify.hpp | 14 +- .../boost/math/special_functions/gamma.hpp | 5 +- .../boost/math/special_functions/hypot.hpp | 2 +- .../boost/math/special_functions/log1p.hpp | 2 +- include/boost/math/special_functions/next.hpp | 6 +- .../boost/math/special_functions/sin_pi.hpp | 2 +- include/boost/math/special_functions/sinc.hpp | 2 +- .../boost/math/special_functions/sinhc.hpp | 2 +- include/boost/math/tools/config.hpp | 4 +- include/boost/math/tools/fraction.hpp | 2 +- include/boost/math/tools/minima.hpp | 2 +- include/boost/math/tools/rational.hpp | 122 +++ include/boost/math/tools/roots.hpp | 2 +- include/boost/math/tools/series.hpp | 2 +- include/boost/math/tools/stats.hpp | 2 +- include/boost/math/tr1.hpp | 954 +++++++++--------- src/tr1/acosh.cpp | 6 +- src/tr1/acoshf.cpp | 6 +- src/tr1/acoshl.cpp | 6 +- src/tr1/asinh.cpp | 6 +- src/tr1/asinhf.cpp | 6 +- src/tr1/asinhl.cpp | 6 +- src/tr1/assoc_laguerre.cpp | 6 +- src/tr1/assoc_laguerref.cpp | 6 +- src/tr1/assoc_laguerrel.cpp | 6 +- src/tr1/assoc_legendre.cpp | 6 +- src/tr1/assoc_legendref.cpp | 6 +- src/tr1/assoc_legendrel.cpp | 4 +- src/tr1/atanh.cpp | 6 +- src/tr1/atanhf.cpp | 6 +- src/tr1/atanhl.cpp | 6 +- src/tr1/beta.cpp | 6 +- src/tr1/betaf.cpp | 6 +- src/tr1/betal.cpp | 6 +- src/tr1/c_policy.hpp | 2 +- src/tr1/cbrt.cpp | 6 +- src/tr1/cbrtf.cpp | 6 +- src/tr1/cbrtl.cpp | 6 +- src/tr1/comp_ellint_1.cpp | 6 +- src/tr1/comp_ellint_1f.cpp | 6 +- src/tr1/comp_ellint_1l.cpp | 6 +- src/tr1/comp_ellint_2.cpp | 6 +- src/tr1/comp_ellint_2f.cpp | 6 +- src/tr1/comp_ellint_2l.cpp | 6 +- src/tr1/comp_ellint_3.cpp | 6 +- src/tr1/comp_ellint_3f.cpp | 6 +- src/tr1/comp_ellint_3l.cpp | 6 +- src/tr1/copysign.cpp | 10 +- src/tr1/copysignf.cpp | 10 +- src/tr1/copysignl.cpp | 6 +- src/tr1/cyl_bessel_i.cpp | 6 +- src/tr1/cyl_bessel_if.cpp | 6 +- src/tr1/cyl_bessel_il.cpp | 6 +- src/tr1/cyl_bessel_j.cpp | 6 +- src/tr1/cyl_bessel_jf.cpp | 6 +- src/tr1/cyl_bessel_jl.cpp | 6 +- src/tr1/cyl_bessel_k.cpp | 6 +- src/tr1/cyl_bessel_kf.cpp | 6 +- src/tr1/cyl_bessel_kl.cpp | 6 +- src/tr1/cyl_neumann.cpp | 6 +- src/tr1/cyl_neumannf.cpp | 6 +- src/tr1/cyl_neumannl.cpp | 6 +- src/tr1/ellint_1.cpp | 6 +- src/tr1/ellint_1f.cpp | 6 +- src/tr1/ellint_1l.cpp | 6 +- src/tr1/ellint_2.cpp | 6 +- src/tr1/ellint_2f.cpp | 6 +- src/tr1/ellint_2l.cpp | 6 +- src/tr1/ellint_3.cpp | 6 +- src/tr1/ellint_3f.cpp | 6 +- src/tr1/ellint_3l.cpp | 6 +- src/tr1/erf.cpp | 6 +- src/tr1/erfc.cpp | 6 +- src/tr1/erfcf.cpp | 6 +- src/tr1/erfcl.cpp | 6 +- src/tr1/erff.cpp | 6 +- src/tr1/erfl.cpp | 6 +- src/tr1/expint.cpp | 6 +- src/tr1/expintf.cpp | 6 +- src/tr1/expintl.cpp | 6 +- src/tr1/expm1.cpp | 6 +- src/tr1/expm1f.cpp | 6 +- src/tr1/expm1l.cpp | 6 +- src/tr1/fmax.cpp | 6 +- src/tr1/fmaxf.cpp | 8 +- src/tr1/fmaxl.cpp | 4 +- src/tr1/fmin.cpp | 4 +- src/tr1/fminf.cpp | 8 +- src/tr1/fminl.cpp | 4 +- src/tr1/fpclassify.cpp | 28 +- src/tr1/fpclassifyf.cpp | 28 +- src/tr1/fpclassifyl.cpp | 28 +- src/tr1/hermite.cpp | 6 +- src/tr1/hermitef.cpp | 6 +- src/tr1/hermitel.cpp | 6 +- src/tr1/hypot.cpp | 6 +- src/tr1/hypotf.cpp | 6 +- src/tr1/hypotl.cpp | 6 +- src/tr1/laguerre.cpp | 6 +- src/tr1/laguerref.cpp | 6 +- src/tr1/laguerrel.cpp | 6 +- src/tr1/legendre.cpp | 6 +- src/tr1/legendref.cpp | 6 +- src/tr1/legendrel.cpp | 6 +- src/tr1/lgamma.cpp | 6 +- src/tr1/lgammaf.cpp | 6 +- src/tr1/lgammal.cpp | 6 +- src/tr1/llround.cpp | 6 +- src/tr1/llroundf.cpp | 6 +- src/tr1/llroundl.cpp | 6 +- src/tr1/log1p.cpp | 6 +- src/tr1/log1pf.cpp | 6 +- src/tr1/log1pl.cpp | 6 +- src/tr1/lround.cpp | 6 +- src/tr1/lroundf.cpp | 6 +- src/tr1/lroundl.cpp | 6 +- src/tr1/nextafter.cpp | 6 +- src/tr1/nextafterf.cpp | 6 +- src/tr1/nextafterl.cpp | 6 +- src/tr1/nexttoward.cpp | 6 +- src/tr1/nexttowardf.cpp | 6 +- src/tr1/nexttowardl.cpp | 6 +- src/tr1/riemann_zeta.cpp | 6 +- src/tr1/riemann_zetaf.cpp | 6 +- src/tr1/riemann_zetal.cpp | 6 +- src/tr1/round.cpp | 6 +- src/tr1/roundf.cpp | 6 +- src/tr1/roundl.cpp | 6 +- src/tr1/sph_bessel.cpp | 6 +- src/tr1/sph_besself.cpp | 6 +- src/tr1/sph_bessell.cpp | 6 +- src/tr1/sph_legendre.cpp | 6 +- src/tr1/sph_legendref.cpp | 6 +- src/tr1/sph_legendrel.cpp | 6 +- src/tr1/sph_neumann.cpp | 6 +- src/tr1/sph_neumannf.cpp | 6 +- src/tr1/sph_neumannl.cpp | 6 +- src/tr1/tgamma.cpp | 6 +- src/tr1/tgammaf.cpp | 6 +- src/tr1/tgammal.cpp | 6 +- src/tr1/trunc.cpp | 6 +- src/tr1/truncf.cpp | 6 +- src/tr1/truncl.cpp | 6 +- test/test_error_handling.cpp | 8 +- test/test_igamma_inv.cpp | 4 +- test/test_next.cpp | 11 +- test/test_tr1.cpp | 6 +- 168 files changed, 1165 insertions(+), 943 deletions(-) create mode 100644 doc/sf_and_dist/constants.qbk diff --git a/doc/sf_and_dist/constants.qbk b/doc/sf_and_dist/constants.qbk new file mode 100644 index 000000000..3142b7ebf --- /dev/null +++ b/doc/sf_and_dist/constants.qbk @@ -0,0 +1,75 @@ +[section:constants Numeric Constants] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ namespace constants{ + + template T pi(); + template T root_pi(); + template T root_half_pi(); + template T root_two_pi(); + template T root_ln_four(); + template T e(); + template T half(); + template T euler(); + template T root_two(); + template T ln_two(); + template T ln_ln_two(); + template T third(); + template T twothirds(); + template T pi_minus_three(); + template T four_minus_pi(); + + }}} // namespaces + +[h4 Description] + +The header `boost/math/constants/constants.hpp` contains some numeric constants +that we have found useful in the development of this library. New constants are +added on an ad-hock basis based on need. + +Usage is like this: + + template + T circumference(T r) + { + return 2 * boost::math::constants::pi() * r; + } + +All the constants are accurate to at least the 34 decimal digits required for 128-bit +long doubles, and most are accurate to 100 digits or more when used with +a suitable arbitrary precision type. + +The following table summarises the constants we have at present: + +[table +[[Constant][Meaning][Value]] +[[pi][[pi]][3.1415926535897932384...]] +[[root_pi][[radic][pi]][1.772453850905516027...]] +[[root_half_pi][[radic]([pi]/2)][1.253314137315500251...]] +[[root_two_pi][[radic](2*[pi])][2.506628274631000502...]] +[[root_ln_four][[radic](ln(4))][1.17741002251547469...]] +[[e][['e]][2.71828182845904523536...]] +[[half][0.5][0.5]] +[[euler][Euler's constant][0.577215664901532860606]] +[[root_two][[radic]2][1.4142135623730950488...]] +[[ln_two][ln(2)][0.6931471805599453094...]] +[[ln_ln_two][ln(ln(2))][-0.3665129205816643...]] +[[third][1/3][0.333333333333333333...]] +[[twothirds][2/3][0.666666666666666666...]] +[[pi_minus_three][[pi]-3][0.14159265358979323846...]] +[[four_minus_pi][4-[pi]][0.85840734641020676153735...]] +] + +[endsect][/section Numeric Constants] + +[/ + Copyright 2008 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 9ee32a90e..d7efb9f64 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -420,6 +420,7 @@ printer friendly PDF format]. [include internals_overview.qbk] [section:internals1 Reused Utilities] +[include constants.qbk] [include series.qbk] [include fraction.qbk] [include rational.qbk] diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 28b1e23b8..f1696a2cc 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -75,7 +75,7 @@ on error rates. SVN Revisions: -Sandbox and trunk last synchonised at revision: 47084. +Sandbox and trunk last synchonised at revision: 48300. ] [/ diff --git a/include/boost/math/bindings/rr.hpp b/include/boost/math/bindings/rr.hpp index 09b6eb625..00db1fc40 100644 --- a/include/boost/math/bindings/rr.hpp +++ b/include/boost/math/bindings/rr.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #ifndef BOOST_MATH_NTL_RR_HPP diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index ad9ceebb6..837e62dcc 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -32,7 +32,7 @@ #endif #include #include -#include +#include #include // fmodl #ifndef BOOST_MATH_REAL_CONCEPT_HPP @@ -299,7 +299,7 @@ inline std::basic_istream& operator>>(std::basic_istream> v; a = v; return is; -#elif defined(__SGI_STL_PORT) +#elif defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__) std::string s; real_concept_base_type d; is >> s; diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index b5517c3c3..63e0b2ef5 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include // fmodl #ifndef BOOST_MATH_STD_REAL_CONCEPT_HPP diff --git a/include/boost/math/distributions/cauchy.hpp b/include/boost/math/distributions/cauchy.hpp index ca0b0a3bc..de6f6b643 100644 --- a/include/boost/math/distributions/cauchy.hpp +++ b/include/boost/math/distributions/cauchy.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include diff --git a/include/boost/math/distributions/exponential.hpp b/include/boost/math/distributions/exponential.hpp index e3316e97b..44bf04240 100644 --- a/include/boost/math/distributions/exponential.hpp +++ b/include/boost/math/distributions/exponential.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef BOOST_MSVC # pragma warning(push) diff --git a/include/boost/math/distributions/extreme_value.hpp b/include/boost/math/distributions/extreme_value.hpp index 038307181..eeb94e750 100644 --- a/include/boost/math/distributions/extreme_value.hpp +++ b/include/boost/math/distributions/extreme_value.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include // // This is the maximum extreme value distribution, see diff --git a/include/boost/math/distributions/non_central_chi_squared.hpp b/include/boost/math/distributions/non_central_chi_squared.hpp index 3b6c19023..154e82ce5 100644 --- a/include/boost/math/distributions/non_central_chi_squared.hpp +++ b/include/boost/math/distributions/non_central_chi_squared.hpp @@ -113,7 +113,7 @@ namespace boost // *before* the largest term so that backwards iteration // is strictly converging. // - for(int i = k - 1; i >= 0; --i) + for(i = k - 1; i >= 0; --i) { T term = poisb * gamb; sum += term; diff --git a/include/boost/math/distributions/rayleigh.hpp b/include/boost/math/distributions/rayleigh.hpp index 2a97b4194..bcb79cdc0 100644 --- a/include/boost/math/distributions/rayleigh.hpp +++ b/include/boost/math/distributions/rayleigh.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef BOOST_MSVC # pragma warning(push) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index 95f650525..101d2cfd6 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 1b722cdd7..f0a9a683e 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -15,7 +15,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index f2f5e4c5c..45e91da13 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -16,7 +16,7 @@ #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index deaa9fa79..ff17dc39e 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -16,7 +16,7 @@ #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 917984621..63552a0b1 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace boost{ namespace math{ @@ -308,8 +308,8 @@ T ibeta_power_terms(T a, // general case: T b1 = (x * cgh) / agh; T b2 = (y * cgh) / bgh; - T l1 = a * log(b1); - T l2 = b * log(b2); + l1 = a * log(b1); + l2 = b * log(b2); if((l1 >= tools::log_max_value()) || (l1 <= tools::log_min_value()) || (l2 >= tools::log_max_value()) diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 4a2eb2393..3a83ed525 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index 04898db87..0c1ae76f2 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -234,10 +234,10 @@ T temme_method_2_ibeta_inverse(T /*a*/, T /*b*/, T z, T r, T theta, const Policy workspace[0] = s * s; workspace[1] = s * c; workspace[2] = (1 - 2 * workspace[0]) / 3; - static const BOOST_MATH_INT_TABLE_TYPE(T, int) co3[] = { 1, -13, 13 }; - workspace[3] = tools::evaluate_polynomial(co3, workspace[0], 3) / (36 * s * c); - static const BOOST_MATH_INT_TABLE_TYPE(T, int) co4[] = { 1, 21, -69, 46 }; - workspace[4] = tools::evaluate_polynomial(co4, workspace[0], 4) / (270 * workspace[0] * c * c); + static const BOOST_MATH_INT_TABLE_TYPE(T, int) co12[] = { 1, -13, 13 }; + workspace[3] = tools::evaluate_polynomial(co12, workspace[0], 3) / (36 * s * c); + static const BOOST_MATH_INT_TABLE_TYPE(T, int) co13[] = { 1, 21, -69, 46 }; + workspace[4] = tools::evaluate_polynomial(co13, workspace[0], 4) / (270 * workspace[0] * c * c); x = tools::evaluate_polynomial(workspace, eta, 5); #ifdef BOOST_INSTRUMENT std::cout << "Estimating x with Temme method 2 (small eta): " << x << std::endl; diff --git a/include/boost/math/special_functions/detail/unchecked_factorial.hpp b/include/boost/math/special_functions/detail/unchecked_factorial.hpp index 1189933ad..7783e161c 100644 --- a/include/boost/math/special_functions/detail/unchecked_factorial.hpp +++ b/include/boost/math/special_functions/detail/unchecked_factorial.hpp @@ -19,7 +19,7 @@ #ifdef BOOST_MSVC #pragma warning(pop) #endif -#include +#include #include namespace boost { namespace math diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index 7f83e559e..73b4f4584 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include // platform's ::expm1 #include #include diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index a6ab66247..4b484a7cb 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -22,7 +22,7 @@ #ifdef BOOST_MSVC #pragma warning(pop) #endif -#include +#include namespace boost { namespace math { diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index be9fda933..f2f0f75a4 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -11,7 +11,7 @@ #endif #include -#include +#include #include #include #include @@ -38,8 +38,15 @@ #define BOOST_HAS_FPCLASSIFY #ifndef fpclassify -# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_USE_C99_MATH) && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) -# define BOOST_FPCLASSIFY_PREFIX ::std:: +# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ + && defined(_GLIBCXX_USE_C99_MATH) \ + && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \ + && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) +# ifdef _STLP_VENDOR_CSTD +# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: +# else +# define BOOST_FPCLASSIFY_PREFIX ::std:: +# endif # else # undef BOOST_HAS_FPCLASSIFY # define BOOST_FPCLASSIFY_PREFIX @@ -243,3 +250,4 @@ inline bool isnormal BOOST_NO_MACRO_EXPAND(T t) + diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 6caeb660f..04126bb62 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #ifdef BOOST_MATH_INSTRUMENT @@ -253,10 +253,9 @@ T lgamma_imp(T z, const Policy& pol, const L& l, int* sign = 0) { // regular evaluation: T zgh = static_cast(z + L::g() - boost::math::constants::half()); - T l = L::lanczos_sum_expG_scaled(z); result = log(zgh) - 1; result *= z - 0.5f; - result += log(l); + result += log(L::lanczos_sum_expG_scaled(z)); } if(sign) diff --git a/include/boost/math/special_functions/hypot.hpp b/include/boost/math/special_functions/hypot.hpp index c182ada83..efe1a3f21 100644 --- a/include/boost/math/special_functions/hypot.hpp +++ b/include/boost/math/special_functions/hypot.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include // for swap #ifdef BOOST_NO_STDC_NAMESPACE diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 0122a35d7..6ce4777f0 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include // platform's ::log1p #include #include diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index 8cbdd86da..a79b05fa0 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -37,7 +37,11 @@ inline T get_smallest_value(mpl::false_ const&) template inline T get_smallest_value() { - return get_smallest_value(mpl::bool_::is_specialized && std::numeric_limits::has_denorm>()); +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1310) + return get_smallest_value(mpl::bool_::is_specialized && (std::numeric_limits::has_denorm == 1)>()); +#else + return get_smallest_value(mpl::bool_::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)>()); +#endif } } diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 551492882..8a706a1d7 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/sinc.hpp b/include/boost/math/special_functions/sinc.hpp index 9b28e0a6a..ebd80c390 100644 --- a/include/boost/math/special_functions/sinc.hpp +++ b/include/boost/math/special_functions/sinc.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/sinhc.hpp b/include/boost/math/special_functions/sinhc.hpp index 46e373699..064d37180 100644 --- a/include/boost/math/special_functions/sinhc.hpp +++ b/include/boost/math/special_functions/sinhc.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index b44d8daad..006295517 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -14,7 +14,7 @@ #include #include #include // for min and max -#include +#include #include #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # include @@ -60,7 +60,7 @@ # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif -#ifdef BOOST_MSVC +#if defined(BOOST_MSVC) && !defined(_WIN32_WCE) // Better safe than sorry, our tests don't support hardware exceptions: # define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM) #endif diff --git a/include/boost/math/tools/fraction.hpp b/include/boost/math/tools/fraction.hpp index 344012d3b..28af64eb9 100644 --- a/include/boost/math/tools/fraction.hpp +++ b/include/boost/math/tools/fraction.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/tools/minima.hpp b/include/boost/math/tools/minima.hpp index 94c5de3c4..625368c52 100644 --- a/include/boost/math/tools/minima.hpp +++ b/include/boost/math/tools/minima.hpp @@ -12,7 +12,7 @@ #endif #include -#include +#include #include #include #include diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index 59cb5b7e0..b49d5c815 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -40,6 +40,128 @@ # include BOOST_HEADER() # undef BOOST_HEADER #endif + +#if 0 +// +// This just allows dependency trackers to find the headers +// used in the above PP-magic. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + namespace boost{ namespace math{ namespace tools{ // diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index bbe722916..0a356b44c 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -11,7 +11,7 @@ #endif #include -#include +#include #include #include diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index f5f659d24..1a8d74403 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include diff --git a/include/boost/math/tools/stats.hpp b/include/boost/math/tools/stats.hpp index bbc1c44eb..e7ea8bd2b 100644 --- a/include/boost/math/tools/stats.hpp +++ b/include/boost/math/tools/stats.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include diff --git a/include/boost/math/tr1.hpp b/include/boost/math/tr1.hpp index a3e4028eb..66f753235 100644 --- a/include/boost/math/tr1.hpp +++ b/include/boost/math/tr1.hpp @@ -109,259 +109,259 @@ typedef long double double_t; #endif // C99 Functions: -double BOOST_MATH_TR1_DECL acosh(double x); -float BOOST_MATH_TR1_DECL acoshf(float x); -long double BOOST_MATH_TR1_DECL acoshl(long double x); +double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL asinh(double x); -float BOOST_MATH_TR1_DECL asinhf(float x); -long double BOOST_MATH_TR1_DECL asinhl(long double x); +double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL atanh(double x); -float BOOST_MATH_TR1_DECL atanhf(float x); -long double BOOST_MATH_TR1_DECL atanhl(long double x); +double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL cbrt(double x); -float BOOST_MATH_TR1_DECL cbrtf(float x); -long double BOOST_MATH_TR1_DECL cbrtl(long double x); +double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL copysign(double x, double y); -float BOOST_MATH_TR1_DECL copysignf(float x, float y); -long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y); +double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL erf(double x); -float BOOST_MATH_TR1_DECL erff(float x); -long double BOOST_MATH_TR1_DECL erfl(long double x); +double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL erfc(double x); -float BOOST_MATH_TR1_DECL erfcf(float x); -long double BOOST_MATH_TR1_DECL erfcl(long double x); +double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL exp2(double x); -float BOOST_MATH_TR1_DECL exp2f(float x); -long double BOOST_MATH_TR1_DECL exp2l(long double x); +double BOOST_MATH_TR1_DECL exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL boost_expm1(double x); -float BOOST_MATH_TR1_DECL boost_expm1f(float x); -long double BOOST_MATH_TR1_DECL boost_expm1l(long double x); +double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL fdim(double x, double y); -float BOOST_MATH_TR1_DECL fdimf(float x, float y); -long double BOOST_MATH_TR1_DECL fdiml(long double x, long double y); -double BOOST_MATH_TR1_DECL fma(double x, double y, double z); -float BOOST_MATH_TR1_DECL fmaf(float x, float y, float z); -long double BOOST_MATH_TR1_DECL fmal(long double x, long double y, long double z); +double BOOST_MATH_TR1_DECL fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double BOOST_MATH_TR1_DECL fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z); +float BOOST_MATH_TR1_DECL fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z); +long double BOOST_MATH_TR1_DECL fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z); #endif -double BOOST_MATH_TR1_DECL fmax(double x, double y); -float BOOST_MATH_TR1_DECL fmaxf(float x, float y); -long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y); +double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL fmin(double x, double y); -float BOOST_MATH_TR1_DECL fminf(float x, float y); -long double BOOST_MATH_TR1_DECL fminl(long double x, long double y); +double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL hypot(double x, double y); -float BOOST_MATH_TR1_DECL hypotf(float x, float y); -long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y); +double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); #if 0 -int BOOST_MATH_TR1_DECL ilogb(double x); -int BOOST_MATH_TR1_DECL ilogbf(float x); -int BOOST_MATH_TR1_DECL ilogbl(long double x); +int BOOST_MATH_TR1_DECL ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +int BOOST_MATH_TR1_DECL ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +int BOOST_MATH_TR1_DECL ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL lgamma(double x); -float BOOST_MATH_TR1_DECL lgammaf(float x); -long double BOOST_MATH_TR1_DECL lgammal(long double x); +double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -long long BOOST_MATH_TR1_DECL llrint(double x); -long long BOOST_MATH_TR1_DECL llrintf(float x); -long long BOOST_MATH_TR1_DECL llrintl(long double x); +long long BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -long long BOOST_MATH_TR1_DECL llround(double x); -long long BOOST_MATH_TR1_DECL llroundf(float x); -long long BOOST_MATH_TR1_DECL llroundl(long double x); +long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL boost_log1p(double x); -float BOOST_MATH_TR1_DECL boost_log1pf(float x); -long double BOOST_MATH_TR1_DECL boost_log1pl(long double x); +double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL log2(double x); -float BOOST_MATH_TR1_DECL log2f(float x); -long double BOOST_MATH_TR1_DECL log2l(long double x); +double BOOST_MATH_TR1_DECL log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL logb(double x); -float BOOST_MATH_TR1_DECL logbf(float x); -long double BOOST_MATH_TR1_DECL logbl(long double x); -long BOOST_MATH_TR1_DECL lrint(double x); -long BOOST_MATH_TR1_DECL lrintf(float x); -long BOOST_MATH_TR1_DECL lrintl(long double x); +double BOOST_MATH_TR1_DECL logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); +long BOOST_MATH_TR1_DECL lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long BOOST_MATH_TR1_DECL lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long BOOST_MATH_TR1_DECL lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -long BOOST_MATH_TR1_DECL lround(double x); -long BOOST_MATH_TR1_DECL lroundf(float x); -long BOOST_MATH_TR1_DECL lroundl(long double x); +long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL nan(const char *str); -float BOOST_MATH_TR1_DECL nanf(const char *str); -long double BOOST_MATH_TR1_DECL nanl(const char *str); -double BOOST_MATH_TR1_DECL nearbyint(double x); -float BOOST_MATH_TR1_DECL nearbyintf(float x); -long double BOOST_MATH_TR1_DECL nearbyintl(long double x); +double BOOST_MATH_TR1_DECL nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +float BOOST_MATH_TR1_DECL nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +long double BOOST_MATH_TR1_DECL nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +double BOOST_MATH_TR1_DECL nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y); -float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y); -long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y); +double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); -double BOOST_MATH_TR1_DECL nexttoward(double x, long double y); -float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y); -long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y); +double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y); +float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y); +long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); #if 0 -double BOOST_MATH_TR1_DECL remainder(double x, double y); -float BOOST_MATH_TR1_DECL remainderf(float x, float y); -long double BOOST_MATH_TR1_DECL remainderl(long double x, long double y); -double BOOST_MATH_TR1_DECL remquo(double x, double y, int *pquo); -float BOOST_MATH_TR1_DECL remquof(float x, float y, int *pquo); -long double BOOST_MATH_TR1_DECL remquol(long double x, long double y, int *pquo); -double BOOST_MATH_TR1_DECL rint(double x); -float BOOST_MATH_TR1_DECL rintf(float x); -long double BOOST_MATH_TR1_DECL rintl(long double x); +double BOOST_MATH_TR1_DECL remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double BOOST_MATH_TR1_DECL remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo); +float BOOST_MATH_TR1_DECL remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo); +long double BOOST_MATH_TR1_DECL remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo); +double BOOST_MATH_TR1_DECL rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -double BOOST_MATH_TR1_DECL round(double x); -float BOOST_MATH_TR1_DECL roundf(float x); -long double BOOST_MATH_TR1_DECL roundl(long double x); +double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #if 0 -double BOOST_MATH_TR1_DECL scalbln(double x, long ex); -float BOOST_MATH_TR1_DECL scalblnf(float x, long ex); -long double BOOST_MATH_TR1_DECL scalblnl(long double x, long ex); -double BOOST_MATH_TR1_DECL scalbn(double x, int ex); -float BOOST_MATH_TR1_DECL scalbnf(float x, int ex); -long double BOOST_MATH_TR1_DECL scalbnl(long double x, int ex); +double BOOST_MATH_TR1_DECL scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex); +float BOOST_MATH_TR1_DECL scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex); +long double BOOST_MATH_TR1_DECL scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex); +double BOOST_MATH_TR1_DECL scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex); +float BOOST_MATH_TR1_DECL scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex); +long double BOOST_MATH_TR1_DECL scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex); #endif -double BOOST_MATH_TR1_DECL tgamma(double x); -float BOOST_MATH_TR1_DECL tgammaf(float x); -long double BOOST_MATH_TR1_DECL tgammal(long double x); +double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double BOOST_MATH_TR1_DECL trunc(double x); -float BOOST_MATH_TR1_DECL truncf(float x); -long double BOOST_MATH_TR1_DECL truncl(long double x); +double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); // [5.2.1.1] associated Laguerre polynomials: -double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x); -float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x); -long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x); +double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x); +float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x); +long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x); // [5.2.1.2] associated Legendre functions: -double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x); -float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x); -long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x); +double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x); +float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x); +long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x); // [5.2.1.3] beta function: -double BOOST_MATH_TR1_DECL beta(double x, double y); -float BOOST_MATH_TR1_DECL betaf(float x, float y); -long double BOOST_MATH_TR1_DECL betal(long double x, long double y); +double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); // [5.2.1.4] (complete) elliptic integral of the first kind: -double BOOST_MATH_TR1_DECL comp_ellint_1(double k); -float BOOST_MATH_TR1_DECL comp_ellint_1f(float k); -long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double k); +double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k); +float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k); +long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k); // [5.2.1.5] (complete) elliptic integral of the second kind: -double BOOST_MATH_TR1_DECL comp_ellint_2(double k); -float BOOST_MATH_TR1_DECL comp_ellint_2f(float k); -long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double k); +double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k); +float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k); +long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k); // [5.2.1.6] (complete) elliptic integral of the third kind: -double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu); -float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu); -long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu); +double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu); +float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu); +long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu); #if 0 // [5.2.1.7] confluent hypergeometric functions: -double BOOST_MATH_TR1_DECL conf_hyperg(double a, double c, double x); -float BOOST_MATH_TR1_DECL conf_hypergf(float a, float c, float x); -long double BOOST_MATH_TR1_DECL conf_hypergl(long double a, long double c, long double x); +double BOOST_MATH_TR1_DECL conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x); +float BOOST_MATH_TR1_DECL conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x); +long double BOOST_MATH_TR1_DECL conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x); #endif // [5.2.1.8] regular modified cylindrical Bessel functions: -double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.9] cylindrical Bessel functions (of the first kind): -double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.10] irregular modified cylindrical Bessel functions: -double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.11] cylindrical Neumann functions; // cylindrical Bessel functions (of the second kind): -double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x); -float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x); -long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x); +double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x); +float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x); +long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x); // [5.2.1.12] (incomplete) elliptic integral of the first kind: -double BOOST_MATH_TR1_DECL ellint_1(double k, double phi); -float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi); -long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi); +double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi); +float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi); +long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi); // [5.2.1.13] (incomplete) elliptic integral of the second kind: -double BOOST_MATH_TR1_DECL ellint_2(double k, double phi); -float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi); -long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi); +double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi); +float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi); +long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi); // [5.2.1.14] (incomplete) elliptic integral of the third kind: -double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi); -float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi); -long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi); +double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi); +float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi); +long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi); // [5.2.1.15] exponential integral: -double BOOST_MATH_TR1_DECL expint(double x); -float BOOST_MATH_TR1_DECL expintf(float x); -long double BOOST_MATH_TR1_DECL expintl(long double x); +double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); // [5.2.1.16] Hermite polynomials: -double BOOST_MATH_TR1_DECL hermite(unsigned n, double x); -float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x); -long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x); +double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); #if 0 // [5.2.1.17] hypergeometric functions: -double BOOST_MATH_TR1_DECL hyperg(double a, double b, double c, double x); -float BOOST_MATH_TR1_DECL hypergf(float a, float b, float c, float x); -long double BOOST_MATH_TR1_DECL hypergl(long double a, long double b, long double c, +double BOOST_MATH_TR1_DECL hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x); +float BOOST_MATH_TR1_DECL hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x); +long double BOOST_MATH_TR1_DECL hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c, long double x); #endif // [5.2.1.18] Laguerre polynomials: -double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x); -float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x); -long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x); +double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); // [5.2.1.19] Legendre polynomials: -double BOOST_MATH_TR1_DECL legendre(unsigned l, double x); -float BOOST_MATH_TR1_DECL legendref(unsigned l, float x); -long double BOOST_MATH_TR1_DECL legendrel(unsigned l, long double x); +double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, double x); +float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x); +long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x); // [5.2.1.20] Riemann zeta function: -double BOOST_MATH_TR1_DECL riemann_zeta(double); -float BOOST_MATH_TR1_DECL riemann_zetaf(float); -long double BOOST_MATH_TR1_DECL riemann_zetal(long double); +double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double); +float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float); +long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double); // [5.2.1.21] spherical Bessel functions (of the first kind): -double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x); -float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x); -long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x); +double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); // [5.2.1.22] spherical associated Legendre functions: -double BOOST_MATH_TR1_DECL sph_legendre(unsigned l, unsigned m, double theta); -float BOOST_MATH_TR1_DECL sph_legendref(unsigned l, unsigned m, float theta); -long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned l, unsigned m, long double theta); +double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double theta); +float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta); +long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta); // [5.2.1.23] spherical Neumann functions; // spherical Bessel functions (of the second kind): -double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x); -float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x); -long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x); +double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x); +float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x); +long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x); #ifdef __cplusplus @@ -375,233 +375,233 @@ namespace boost{ namespace math{ namespace tr1{ // C interfaces: // // C99 Functions: -inline float acosh(float x) -{ return boost::math::tr1::acoshf(x); } -inline long double acosh(long double x) -{ return boost::math::tr1::acoshl(x); } +inline float acosh BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double acosh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type acosh(T x) -{ return boost::math::tr1::acosh(static_cast::type>(x)); } +inline typename tools::promote_args::type acosh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float asinh(float x){ return boost::math::tr1::asinhf(x); } -inline long double asinh(long double x){ return boost::math::tr1::asinhl(x); } +inline float asinh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double asinh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type asinh(T x) -{ return boost::math::tr1::asinh(static_cast::type>(x)); } +inline typename tools::promote_args::type asinh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float atanh(float x){ return boost::math::tr1::atanhf(x); } -inline long double atanh(long double x){ return boost::math::tr1::atanhl(x); } +inline float atanh BOOST_PREVENT_MACRO_SUBSTITUTION(float x){ return boost::math::tr1::atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double atanh BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){ return boost::math::tr1::atanhl(x); } template -inline typename tools::promote_args::type atanh(T x) -{ return boost::math::tr1::atanh(static_cast::type>(x)); } +inline typename tools::promote_args::type atanh BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float cbrt(float x) -{ return boost::math::tr1::cbrtf(x); } -inline long double cbrt(long double x) -{ return boost::math::tr1::cbrtl(x); } +inline float cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type cbrt(T x) -{ return boost::math::tr1::cbrt(static_cast::type>(x)); } +inline typename tools::promote_args::type cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float copysign(float x, float y) -{ return boost::math::tr1::copysignf(x, y); } -inline long double copysign(long double x, long double y) -{ return boost::math::tr1::copysignl(x, y); } +inline float copysign BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double copysign BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type copysign(T1 x, T2 y) -{ return boost::math::tr1::copysign(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type copysign BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float erf(float x) -{ return boost::math::tr1::erff(x); } -inline long double erf(long double x) -{ return boost::math::tr1::erfl(x); } +inline float erf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::erff BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double erf BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::erfl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type erf(T x) -{ return boost::math::tr1::erf(static_cast::type>(x)); } +inline typename tools::promote_args::type erf BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::erf BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float erfc(float x) -{ return boost::math::tr1::erfcf(x); } -inline long double erfc(long double x) -{ return boost::math::tr1::erfcl(x); } +inline float erfc BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double erfc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type erfc(T x) -{ return boost::math::tr1::erfc(static_cast::type>(x)); } +inline typename tools::promote_args::type erfc BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double exp2(double x); -float exp2f(float x); -long double exp2l(long double x); +double exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float expm1f(float x) -{ return boost::math::tr1::boost_expm1f(x); } -inline double expm1(double x) -{ return boost::math::tr1::boost_expm1(x); } -inline long double expm1l(long double x) -{ return boost::math::tr1::boost_expm1l(x); } -inline float expm1(float x) -{ return boost::math::tr1::expm1f(x); } -inline long double expm1(long double x) -{ return boost::math::tr1::expm1l(x); } +inline float expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) +{ return boost::math::tr1::boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline float expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type expm1(T x) -{ return boost::math::tr1::expm1(static_cast::type>(x)); } +inline typename tools::promote_args::type expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double fdim(double x, double y); -float fdimf(float x, float y); -long double fdiml(long double x, long double y); -double fma(double x, double y, double z); -float fmaf(float x, float y, float z); -long double fmal(long double x, long double y, long double z); +double fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z); +float fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z); +long double fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z); #endif -inline float fmax(float x, float y) -{ return boost::math::tr1::fmaxf(x, y); } -inline long double fmax(long double x, long double y) -{ return boost::math::tr1::fmaxl(x, y); } +inline float fmax BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double fmax BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type fmax(T1 x, T2 y) -{ return boost::math::tr1::fmax(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type fmax BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::fmax BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float fmin(float x, float y) -{ return boost::math::tr1::fminf(x, y); } -inline long double fmin(long double x, long double y) -{ return boost::math::tr1::fminl(x, y); } +inline float fmin BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::fminf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double fmin BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::fminl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type fmin(T1 x, T2 y) -{ return boost::math::tr1::fmin(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type fmin BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::fmin BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float hypot(float x, float y) -{ return boost::math::tr1::hypotf(x, y); } -inline long double hypot(long double x, long double y) -{ return boost::math::tr1::hypotl(x, y); } +inline float hypot BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double hypot BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type hypot(T1 x, T2 y) -{ return boost::math::tr1::hypot(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type hypot BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } #if 0 -int ilogb(double x); -int ilogbf(float x); -int ilogbl(long double x); +int ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +int ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +int ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float lgamma(float x) -{ return boost::math::tr1::lgammaf(x); } -inline long double lgamma(long double x) -{ return boost::math::tr1::lgammal(x); } +inline float lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type lgamma(T x) -{ return boost::math::tr1::lgamma(static_cast::type>(x)); } +inline typename tools::promote_args::type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -long long llrint(double x); -long long llrintf(float x); -long long llrintl(long double x); +long long llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long long llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long long llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline long long llround(float x) -{ return boost::math::tr1::llroundf(x); } -inline long long llround(long double x) -{ return boost::math::tr1::llroundl(x); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline long long llround(T x) -{ return llround(static_cast(x)); } +inline long long llround BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return llround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast(x)); } -inline float log1pf(float x) -{ return boost::math::tr1::boost_log1pf(x); } -inline double log1p(double x) -{ return boost::math::tr1::boost_log1p(x); } -inline long double log1pl(long double x) -{ return boost::math::tr1::boost_log1pl(x); } -inline float log1p(float x) -{ return boost::math::tr1::log1pf(x); } -inline long double log1p(long double x) -{ return boost::math::tr1::log1pl(x); } +inline float log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x) +{ return boost::math::tr1::boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline float log1p BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double log1p BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type log1p(T x) -{ return boost::math::tr1::log1p(static_cast::type>(x)); } +inline typename tools::promote_args::type log1p BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double log2(double x); -float log2f(float x); -long double log2l(long double x); +double log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); -double logb(double x); -float logbf(float x); -long double logbl(long double x); -long lrint(double x); -long lrintf(float x); -long lrintl(long double x); +double logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); +long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +long lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline long lround(float x) -{ return boost::math::tr1::lroundf(x); } -inline long lround(long double x) -{ return boost::math::tr1::lroundl(x); } +inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long lround BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -long lround(T x) -{ return boost::math::tr1::lround(static_cast(x)); } +long lround BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::lround BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast(x)); } #if 0 -double nan(const char *str); -float nanf(const char *str); -long double nanl(const char *str); -double nearbyint(double x); -float nearbyintf(float x); -long double nearbyintl(long double x); +double nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +float nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +long double nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str); +double nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float nextafterf(float x, float y) -{ return boost::math::tr1::boost_nextafterf(x, y); } -inline double nextafter(double x, double y) -{ return boost::math::tr1::boost_nextafter(x, y); } -inline long double nextafterl(long double x, long double y) -{ return boost::math::tr1::boost_nextafterl(x, y); } -inline float nextafter(float x, float y) -{ return boost::math::tr1::nextafterf(x, y); } -inline long double nextafter(long double x, long double y) -{ return boost::math::tr1::nextafterl(x, y); } +inline float nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) +{ return boost::math::tr1::boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline float nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type nextafter(T1 x, T2 y) -{ return boost::math::tr1::nextafter(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } -inline float nexttoward(float x, long double y) -{ return boost::math::tr1::nexttowardf(x, y); } -inline long double nexttoward(long double x, long double y) -{ return boost::math::tr1::nexttowardl(x, y); } +inline float nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) +{ return boost::math::tr1::nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type nexttoward(T1 x, T2 y) -{ return boost::math::tr1::nexttoward(static_cast::type>(x), static_cast(y)); } +inline typename tools::promote_args::type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(T1 x, T2 y) +{ return boost::math::tr1::nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast(y)); } #if 0 -double remainder(double x, double y); -float remainderf(float x, float y); -long double remainderl(long double x, long double y); -double remquo(double x, double y, int *pquo); -float remquof(float x, float y, int *pquo); -long double remquol(long double x, long double y, int *pquo); -double rint(double x); -float rintf(float x); -long double rintl(long double x); +double remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y); +float remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y); +long double remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y); +double remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo); +float remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo); +long double remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo); +double rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x); +float rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x); +long double rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x); #endif -inline float round(float x) -{ return boost::math::tr1::roundf(x); } -inline long double round(long double x) -{ return boost::math::tr1::roundl(x); } +inline float round BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::roundf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double round BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::roundl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type round(T x) -{ return boost::math::tr1::round(static_cast::type>(x)); } +inline typename tools::promote_args::type round BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::round BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } #if 0 -double scalbln(double x, long ex); -float scalblnf(float x, long ex); -long double scalblnl(long double x, long ex); -double scalbn(double x, int ex); -float scalbnf(float x, int ex); -long double scalbnl(long double x, int ex); +double scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex); +float scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex); +long double scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex); +double scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex); +float scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex); +long double scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex); #endif -inline float tgamma(float x) -{ return boost::math::tr1::tgammaf(x); } -inline long double tgamma(long double x) -{ return boost::math::tr1::tgammal(x); } +inline float tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type tgamma(T x) -{ return boost::math::tr1::tgamma(static_cast::type>(x)); } +inline typename tools::promote_args::type tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } -inline float trunc(float x) -{ return boost::math::tr1::truncf(x); } -inline long double trunc(long double x) -{ return boost::math::tr1::truncl(x); } +inline float trunc BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::truncf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double trunc BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::truncl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type trunc(T x) -{ return boost::math::tr1::trunc(static_cast::type>(x)); } +inline typename tools::promote_args::type trunc BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } # define NO_MACRO_EXPAND /**/ // C99 macros defined as C++ templates @@ -644,210 +644,210 @@ template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(long d #undef NO_MACRO_EXPAND // [5.2.1.1] associated Laguerre polynomials: -inline float assoc_laguerre(unsigned n, unsigned m, float x) -{ return boost::math::tr1::assoc_laguerref(n, m, x); } -inline long double assoc_laguerre(unsigned n, unsigned m, long double x) -{ return boost::math::tr1::assoc_laguerrel(n, m, x); } +inline float assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) +{ return boost::math::tr1::assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } +inline long double assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) +{ return boost::math::tr1::assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } template -inline typename tools::promote_args::type assoc_laguerre(unsigned n, unsigned m, T x) -{ return boost::math::tr1::assoc_laguerre(n, m, static_cast::type>(x)); } +inline typename tools::promote_args::type assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, T x) +{ return boost::math::tr1::assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, static_cast::type>(x)); } // [5.2.1.2] associated Legendre functions: -inline float assoc_legendre(unsigned l, unsigned m, float x) -{ return boost::math::tr1::assoc_legendref(l, m, x); } -inline long double assoc_legendre(unsigned l, unsigned m, long double x) -{ return boost::math::tr1::assoc_legendrel(l, m, x); } +inline float assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) +{ return boost::math::tr1::assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } +inline long double assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) +{ return boost::math::tr1::assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } template -inline typename tools::promote_args::type assoc_legendre(unsigned l, unsigned m, T x) -{ return boost::math::tr1::assoc_legendre(l, m, static_cast::type>(x)); } +inline typename tools::promote_args::type assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T x) +{ return boost::math::tr1::assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast::type>(x)); } // [5.2.1.3] beta function: -inline float beta(float x, float y) -{ return boost::math::tr1::betaf(x, y); } -inline long double beta(long double x, long double y) -{ return boost::math::tr1::betal(x, y); } +inline float beta BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) +{ return boost::math::tr1::betaf BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } +inline long double beta BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) +{ return boost::math::tr1::betal BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } template -inline typename tools::promote_args::type beta(T2 x, T1 y) -{ return boost::math::tr1::beta(static_cast::type>(x), static_cast::type>(y)); } +inline typename tools::promote_args::type beta BOOST_PREVENT_MACRO_SUBSTITUTION(T2 x, T1 y) +{ return boost::math::tr1::beta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x), static_cast::type>(y)); } // [5.2.1.4] (complete) elliptic integral of the first kind: -inline float comp_ellint_1(float k) -{ return boost::math::tr1::comp_ellint_1f(k); } -inline long double comp_ellint_1(long double k) -{ return boost::math::tr1::comp_ellint_1l(k); } +inline float comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k) +{ return boost::math::tr1::comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k); } +inline long double comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k) +{ return boost::math::tr1::comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k); } template -inline typename tools::promote_args::type comp_ellint_1(T k) -{ return boost::math::tr1::comp_ellint_1(static_cast::type>(k)); } +inline typename tools::promote_args::type comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T k) +{ return boost::math::tr1::comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k)); } -// [5.2.1.5] (complete) elliptic integral of the second kind: +// [5.2.1.5] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the second kind: inline float comp_ellint_2(float k) { return boost::math::tr1::comp_ellint_2f(k); } inline long double comp_ellint_2(long double k) { return boost::math::tr1::comp_ellint_2l(k); } template inline typename tools::promote_args::type comp_ellint_2(T k) -{ return boost::math::tr1::comp_ellint_2(static_cast::type>(k)); } +{ return boost::math::tr1::comp_ellint_2(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k)); } -// [5.2.1.6] (complete) elliptic integral of the third kind: +// [5.2.1.6] BOOST_PREVENT_MACRO_SUBSTITUTION(complete) elliptic integral of the third kind: inline float comp_ellint_3(float k, float nu) { return boost::math::tr1::comp_ellint_3f(k, nu); } inline long double comp_ellint_3(long double k, long double nu) { return boost::math::tr1::comp_ellint_3l(k, nu); } template inline typename tools::promote_args::type comp_ellint_3(T1 k, T2 nu) -{ return boost::math::tr1::comp_ellint_3(static_cast::type>(k), static_cast::type>(nu)); } +{ return boost::math::tr1::comp_ellint_3(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(k), static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu)); } #if 0 // [5.2.1.7] confluent hypergeometric functions: -double conf_hyperg(double a, double c, double x); -float conf_hypergf(float a, float c, float x); -long double conf_hypergl(long double a, long double c, long double x); +double conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x); +float conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x); +long double conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x); #endif // [5.2.1.8] regular modified cylindrical Bessel functions: -inline float cyl_bessel_i(float nu, float x) -{ return boost::math::tr1::cyl_bessel_if(nu, x); } -inline long double cyl_bessel_i(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_il(nu, x); } +inline float cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_i(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_i(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.9] cylindrical Bessel functions (of the first kind): -inline float cyl_bessel_j(float nu, float x) -{ return boost::math::tr1::cyl_bessel_jf(nu, x); } -inline long double cyl_bessel_j(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_jl(nu, x); } +inline float cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_j(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_j(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.10] irregular modified cylindrical Bessel functions: -inline float cyl_bessel_k(float nu, float x) -{ return boost::math::tr1::cyl_bessel_kf(nu, x); } -inline long double cyl_bessel_k(long double nu, long double x) -{ return boost::math::tr1::cyl_bessel_kl(nu, x); } +inline float cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_bessel_k(T1 nu, T2 x) -{ return boost::math::tr1::cyl_bessel_k(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type> BOOST_PREVENT_MACRO_SUBSTITUTION(nu), static_cast::type>(x)); } // [5.2.1.11] cylindrical Neumann functions; // cylindrical Bessel functions (of the second kind): -inline float cyl_neumann(float nu, float x) -{ return boost::math::tr1::cyl_neumannf(nu, x); } -inline long double cyl_neumann(long double nu, long double x) -{ return boost::math::tr1::cyl_neumannl(nu, x); } +inline float cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) +{ return boost::math::tr1::cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } +inline long double cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) +{ return boost::math::tr1::cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } template -inline typename tools::promote_args::type cyl_neumann(T1 nu, T2 x) -{ return boost::math::tr1::cyl_neumann(static_cast::type>(nu), static_cast::type>(x)); } +inline typename tools::promote_args::type cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(T1 nu, T2 x) +{ return boost::math::tr1::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(nu), static_cast::type>(x)); } // [5.2.1.12] (incomplete) elliptic integral of the first kind: -inline float ellint_1(float k, float phi) -{ return boost::math::tr1::ellint_1f(k, phi); } -inline long double ellint_1(long double k, long double phi) -{ return boost::math::tr1::ellint_1l(k, phi); } +inline float ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) +{ return boost::math::tr1::ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } +inline long double ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) +{ return boost::math::tr1::ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } template -inline typename tools::promote_args::type ellint_1(T1 k, T2 phi) -{ return boost::math::tr1::ellint_1(static_cast::type>(k), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi) +{ return boost::math::tr1::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(phi)); } // [5.2.1.13] (incomplete) elliptic integral of the second kind: -inline float ellint_2(float k, float phi) -{ return boost::math::tr1::ellint_2f(k, phi); } -inline long double ellint_2(long double k, long double phi) -{ return boost::math::tr1::ellint_2l(k, phi); } +inline float ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) +{ return boost::math::tr1::ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } +inline long double ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) +{ return boost::math::tr1::ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } template -inline typename tools::promote_args::type ellint_2(T1 k, T2 phi) -{ return boost::math::tr1::ellint_2(static_cast::type>(k), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 phi) +{ return boost::math::tr1::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(phi)); } // [5.2.1.14] (incomplete) elliptic integral of the third kind: -inline float ellint_3(float k, float nu, float phi) -{ return boost::math::tr1::ellint_3f(k, nu, phi); } -inline long double ellint_3(long double k, long double nu, long double phi) -{ return boost::math::tr1::ellint_3l(k, nu, phi); } +inline float ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi) +{ return boost::math::tr1::ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } +inline long double ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi) +{ return boost::math::tr1::ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } template -inline typename tools::promote_args::type ellint_3(T1 k, T2 nu, T3 phi) -{ return boost::math::tr1::ellint_3(static_cast::type>(k), static_cast::type>(nu), static_cast::type>(phi)); } +inline typename tools::promote_args::type ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(T1 k, T2 nu, T3 phi) +{ return boost::math::tr1::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(k), static_cast::type>(nu), static_cast::type>(phi)); } // [5.2.1.15] exponential integral: -inline float expint(float x) -{ return boost::math::tr1::expintf(x); } -inline long double expint(long double x) -{ return boost::math::tr1::expintl(x); } +inline float expint BOOST_PREVENT_MACRO_SUBSTITUTION(float x) +{ return boost::math::tr1::expintf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } +inline long double expint BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) +{ return boost::math::tr1::expintl BOOST_PREVENT_MACRO_SUBSTITUTION(x); } template -inline typename tools::promote_args::type expint(T x) -{ return boost::math::tr1::expint(static_cast::type>(x)); } +inline typename tools::promote_args::type expint BOOST_PREVENT_MACRO_SUBSTITUTION(T x) +{ return boost::math::tr1::expint BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(x)); } // [5.2.1.16] Hermite polynomials: -inline float hermite(unsigned n, float x) -{ return boost::math::tr1::hermitef(n, x); } -inline long double hermite(unsigned n, long double x) -{ return boost::math::tr1::hermitel(n, x); } +inline float hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type hermite(unsigned n, T x) -{ return boost::math::tr1::hermite(n, static_cast::type>(x)); } +inline typename tools::promote_args::type hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } #if 0 // [5.2.1.17] hypergeometric functions: -double hyperg(double a, double b, double c, double x); -float hypergf(float a, float b, float c, float x); -long double hypergl(long double a, long double b, long double c, +double hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x); +float hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x); +long double hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c, long double x); #endif // [5.2.1.18] Laguerre polynomials: -inline float laguerre(unsigned n, float x) -{ return boost::math::tr1::laguerref(n, x); } -inline long double laguerre(unsigned n, long double x) -{ return boost::math::tr1::laguerrel(n, x); } +inline float laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type laguerre(unsigned n, T x) -{ return boost::math::tr1::laguerre(n, static_cast::type>(x)); } +inline typename tools::promote_args::type laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } // [5.2.1.19] Legendre polynomials: -inline float legendre(unsigned l, float x) -{ return boost::math::tr1::legendref(l, x); } -inline long double legendre(unsigned l, long double x) -{ return boost::math::tr1::legendrel(l, x); } +inline float legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x) +{ return boost::math::tr1::legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); } +inline long double legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x) +{ return boost::math::tr1::legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, x); } template -inline typename tools::promote_args::type legendre(unsigned l, T x) -{ return boost::math::tr1::legendre(l, static_cast::type>(x)); } +inline typename tools::promote_args::type legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, T x) +{ return boost::math::tr1::legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, static_cast::type>(x)); } // [5.2.1.20] Riemann zeta function: -inline float riemann_zeta(float z) -{ return boost::math::tr1::riemann_zetaf(z); } -inline long double riemann_zeta(long double z) -{ return boost::math::tr1::riemann_zetal(z); } +inline float riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(float z) +{ return boost::math::tr1::riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(z); } +inline long double riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(long double z) +{ return boost::math::tr1::riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(z); } template -inline typename tools::promote_args::type riemann_zeta(T z) -{ return boost::math::tr1::riemann_zeta(static_cast::type>(z)); } +inline typename tools::promote_args::type riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(T z) +{ return boost::math::tr1::riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast::type>(z)); } // [5.2.1.21] spherical Bessel functions (of the first kind): -inline float sph_bessel(unsigned n, float x) -{ return boost::math::tr1::sph_besself(n, x); } -inline long double sph_bessel(unsigned n, long double x) -{ return boost::math::tr1::sph_bessell(n, x); } +inline float sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type sph_bessel(unsigned n, T x) -{ return boost::math::tr1::sph_bessel(n, static_cast::type>(x)); } +inline typename tools::promote_args::type sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } // [5.2.1.22] spherical associated Legendre functions: -inline float sph_legendre(unsigned l, unsigned m, float theta) -{ return boost::math::tr1::sph_legendref(l, m, theta); } -inline long double sph_legendre(unsigned l, unsigned m, long double theta) -{ return boost::math::tr1::sph_legendrel(l, m, theta); } +inline float sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta) +{ return boost::math::tr1::sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); } +inline long double sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta) +{ return boost::math::tr1::sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, theta); } template -inline typename tools::promote_args::type sph_legendre(unsigned l, unsigned m, T theta) -{ return boost::math::tr1::sph_legendre(l, m, static_cast::type>(theta)); } +inline typename tools::promote_args::type sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, T theta) +{ return boost::math::tr1::sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, static_cast::type>(theta)); } // [5.2.1.23] spherical Neumann functions; // spherical Bessel functions (of the second kind): -inline float sph_neumann(unsigned n, float x) -{ return boost::math::tr1::sph_neumannf(n, x); } -inline long double sph_neumann(unsigned n, long double x) -{ return boost::math::tr1::sph_neumannl(n, x); } +inline float sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) +{ return boost::math::tr1::sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } +inline long double sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) +{ return boost::math::tr1::sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } template -inline typename tools::promote_args::type sph_neumann(unsigned n, T x) -{ return boost::math::tr1::sph_neumann(n, static_cast::type>(x)); } +inline typename tools::promote_args::type sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, T x) +{ return boost::math::tr1::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, static_cast::type>(x)); } }}} // namespaces diff --git a/src/tr1/acosh.cpp b/src/tr1/acosh.cpp index 673cdc9d5..934edb652 100644 --- a/src/tr1/acosh.cpp +++ b/src/tr1/acosh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL acosh(double x) +extern "C" double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/acoshf.cpp b/src/tr1/acoshf.cpp index 1aa1e7ee5..11f8a2e2a 100644 --- a/src/tr1/acoshf.cpp +++ b/src/tr1/acoshf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL acoshf(float x) +extern "C" float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/acoshl.cpp b/src/tr1/acoshl.cpp index 074348602..e0ba58b5d 100644 --- a/src/tr1/acoshl.cpp +++ b/src/tr1/acoshl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL acoshl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::acosh(x); + return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinh.cpp b/src/tr1/asinh.cpp index cd013968f..95b6d48db 100644 --- a/src/tr1/asinh.cpp +++ b/src/tr1/asinh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL asinh(double x) +extern "C" double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinhf.cpp b/src/tr1/asinhf.cpp index 2c0ee91e4..b7f430daf 100644 --- a/src/tr1/asinhf.cpp +++ b/src/tr1/asinhf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL asinhf(float x) +extern "C" float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/asinhl.cpp b/src/tr1/asinhl.cpp index 41ac09729..3baf6d156 100644 --- a/src/tr1/asinhl.cpp +++ b/src/tr1/asinhl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL asinhl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::asinh(x); + return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/assoc_laguerre.cpp b/src/tr1/assoc_laguerre.cpp index 562f4ad42..84626d443 100644 --- a/src/tr1/assoc_laguerre.cpp +++ b/src/tr1/assoc_laguerre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre(unsigned n, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_laguerref.cpp b/src/tr1/assoc_laguerref.cpp index 2df208398..0d611431a 100644 --- a/src/tr1/assoc_laguerref.cpp +++ b/src/tr1/assoc_laguerref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref(unsigned n, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_laguerrel.cpp b/src/tr1/assoc_laguerrel.cpp index e0685c21f..a1078e2cf 100644 --- a/src/tr1/assoc_laguerrel.cpp +++ b/src/tr1/assoc_laguerrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel(unsigned n, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) { - return c_policies::laguerre(n, m, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } diff --git a/src/tr1/assoc_legendre.cpp b/src/tr1/assoc_legendre.cpp index 4df72df5d..95318d5f9 100644 --- a/src/tr1/assoc_legendre.cpp +++ b/src/tr1/assoc_legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL assoc_legendre(unsigned l, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/assoc_legendref.cpp b/src/tr1/assoc_legendref.cpp index ce28c2ce6..49745e1b7 100644 --- a/src/tr1/assoc_legendref.cpp +++ b/src/tr1/assoc_legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL assoc_legendref(unsigned l, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/assoc_legendrel.cpp b/src/tr1/assoc_legendrel.cpp index 300a5e0e7..1ff5d1880 100644 --- a/src/tr1/assoc_legendrel.cpp +++ b/src/tr1/assoc_legendrel.cpp @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel(unsigned l, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) { - return (m&1 ? -1 : 1) * c_policies::legendre_p(l, m, x); + return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } diff --git a/src/tr1/atanh.cpp b/src/tr1/atanh.cpp index 2603b9fb7..02bc18bcf 100644 --- a/src/tr1/atanh.cpp +++ b/src/tr1/atanh.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL atanh(double x) +extern "C" double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/atanhf.cpp b/src/tr1/atanhf.cpp index 09ff3f70b..6628c7319 100644 --- a/src/tr1/atanhf.cpp +++ b/src/tr1/atanhf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL atanhf(float x) +extern "C" float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/atanhl.cpp b/src/tr1/atanhl.cpp index 368c3a8ea..7d3e3d856 100644 --- a/src/tr1/atanhl.cpp +++ b/src/tr1/atanhl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL atanhl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::atanh(x); + return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/beta.cpp b/src/tr1/beta.cpp index 22249f8a9..096e627f8 100644 --- a/src/tr1/beta.cpp +++ b/src/tr1/beta.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL beta(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/betaf.cpp b/src/tr1/betaf.cpp index 4b2a923ad..9f9a412bb 100644 --- a/src/tr1/betaf.cpp +++ b/src/tr1/betaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL betaf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/betal.cpp b/src/tr1/betal.cpp index 36cf2f05a..75d848772 100644 --- a/src/tr1/betal.cpp +++ b/src/tr1/betal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL betal(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::beta(x, y); + return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/c_policy.hpp b/src/tr1/c_policy.hpp index 3d893349c..0ab7eeeb8 100644 --- a/src/tr1/c_policy.hpp +++ b/src/tr1/c_policy.hpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include diff --git a/src/tr1/cbrt.cpp b/src/tr1/cbrt.cpp index 91ba06427..47a2a1ffe 100644 --- a/src/tr1/cbrt.cpp +++ b/src/tr1/cbrt.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cbrt(double x) +extern "C" double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/cbrtf.cpp b/src/tr1/cbrtf.cpp index 5a93fa1bf..f416cb16c 100644 --- a/src/tr1/cbrtf.cpp +++ b/src/tr1/cbrtf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cbrtf(float x) +extern "C" float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/cbrtl.cpp b/src/tr1/cbrtl.cpp index 9ffb3a722..37ceb3db3 100644 --- a/src/tr1/cbrtl.cpp +++ b/src/tr1/cbrtl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cbrtl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::cbrt(x); + return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1.cpp b/src/tr1/comp_ellint_1.cpp index 62e788743..bc0079bf1 100644 --- a/src/tr1/comp_ellint_1.cpp +++ b/src/tr1/comp_ellint_1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1(double x) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1f.cpp b/src/tr1/comp_ellint_1f.cpp index c65e2447a..3942d223d 100644 --- a/src/tr1/comp_ellint_1f.cpp +++ b/src/tr1/comp_ellint_1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f(float x) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_1l.cpp b/src/tr1/comp_ellint_1l.cpp index a97215989..7912d980f 100644 --- a/src/tr1/comp_ellint_1l.cpp +++ b/src/tr1/comp_ellint_1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::ellint_1(x); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2.cpp b/src/tr1/comp_ellint_2.cpp index 307e0f049..31cef22b6 100644 --- a/src/tr1/comp_ellint_2.cpp +++ b/src/tr1/comp_ellint_2.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2(double x) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2f.cpp b/src/tr1/comp_ellint_2f.cpp index 1789d7a3b..1401a7496 100644 --- a/src/tr1/comp_ellint_2f.cpp +++ b/src/tr1/comp_ellint_2f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f(float x) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_2l.cpp b/src/tr1/comp_ellint_2l.cpp index 39d0ef49d..ee9252307 100644 --- a/src/tr1/comp_ellint_2l.cpp +++ b/src/tr1/comp_ellint_2l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::ellint_2(x); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/comp_ellint_3.cpp b/src/tr1/comp_ellint_3.cpp index 5abb3ba39..ff1878502 100644 --- a/src/tr1/comp_ellint_3.cpp +++ b/src/tr1/comp_ellint_3.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3(double k, double nu) +extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/comp_ellint_3f.cpp b/src/tr1/comp_ellint_3f.cpp index 0a81ea567..1caefb442 100644 --- a/src/tr1/comp_ellint_3f.cpp +++ b/src/tr1/comp_ellint_3f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f(float k, float nu) +extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/comp_ellint_3l.cpp b/src/tr1/comp_ellint_3l.cpp index 2d6f8a591..b3f7c7f6b 100644 --- a/src/tr1/comp_ellint_3l.cpp +++ b/src/tr1/comp_ellint_3l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l(long double k, long double nu) +extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu) { - return c_policies::ellint_3(k, nu); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } diff --git a/src/tr1/copysign.cpp b/src/tr1/copysign.cpp index 67b31422c..debeab23b 100644 --- a/src/tr1/copysign.cpp +++ b/src/tr1/copysign.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,11 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL copysign(double x, double y) +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + +extern "C" double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + +#endif diff --git a/src/tr1/copysignf.cpp b/src/tr1/copysignf.cpp index 5ddd28970..c87ab5735 100644 --- a/src/tr1/copysignf.cpp +++ b/src/tr1/copysignf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,11 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL copysignf(float x, float y) +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + +extern "C" float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + +#endif diff --git a/src/tr1/copysignl.cpp b/src/tr1/copysignl.cpp index 1362718de..2431de9e6 100644 --- a/src/tr1/copysignl.cpp +++ b/src/tr1/copysignl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL copysignl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return boost::math::copysign(x, y); + return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } diff --git a/src/tr1/cyl_bessel_i.cpp b/src/tr1/cyl_bessel_i.cpp index 0f29663b4..dd5cfbb09 100644 --- a/src/tr1/cyl_bessel_i.cpp +++ b/src/tr1/cyl_bessel_i.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_if.cpp b/src/tr1/cyl_bessel_if.cpp index 901d413ef..81e862543 100644 --- a/src/tr1/cyl_bessel_if.cpp +++ b/src/tr1/cyl_bessel_if.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_il.cpp b/src/tr1/cyl_bessel_il.cpp index c9ccff056..e939b190f 100644 --- a/src/tr1/cyl_bessel_il.cpp +++ b/src/tr1/cyl_bessel_il.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_i(nu, x); + return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_j.cpp b/src/tr1/cyl_bessel_j.cpp index 9c1cecb0f..5a2dbba8b 100644 --- a/src/tr1/cyl_bessel_j.cpp +++ b/src/tr1/cyl_bessel_j.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_jf.cpp b/src/tr1/cyl_bessel_jf.cpp index 21db0ff9f..5d0e20c91 100644 --- a/src/tr1/cyl_bessel_jf.cpp +++ b/src/tr1/cyl_bessel_jf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_jl.cpp b/src/tr1/cyl_bessel_jl.cpp index 2d68a7044..0d026318c 100644 --- a/src/tr1/cyl_bessel_jl.cpp +++ b/src/tr1/cyl_bessel_jl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_j(nu, x); + return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_k.cpp b/src/tr1/cyl_bessel_k.cpp index 2fee1329e..0f16a283b 100644 --- a/src/tr1/cyl_bessel_k.cpp +++ b/src/tr1/cyl_bessel_k.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_kf.cpp b/src/tr1/cyl_bessel_kf.cpp index 26509e62a..bbc173316 100644 --- a/src/tr1/cyl_bessel_kf.cpp +++ b/src/tr1/cyl_bessel_kf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_bessel_kl.cpp b/src/tr1/cyl_bessel_kl.cpp index 282c3b512..7d6be5ad6 100644 --- a/src/tr1/cyl_bessel_kl.cpp +++ b/src/tr1/cyl_bessel_kl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_bessel_k(nu, x); + return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumann.cpp b/src/tr1/cyl_neumann.cpp index f3c14d5dc..ca9a874a0 100644 --- a/src/tr1/cyl_neumann.cpp +++ b/src/tr1/cyl_neumann.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL cyl_neumann(double nu, double x) +extern "C" double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumannf.cpp b/src/tr1/cyl_neumannf.cpp index ebd88fd5e..fbd219077 100644 --- a/src/tr1/cyl_neumannf.cpp +++ b/src/tr1/cyl_neumannf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf(float nu, float x) +extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/cyl_neumannl.cpp b/src/tr1/cyl_neumannl.cpp index 078ab131b..690e43957 100644 --- a/src/tr1/cyl_neumannl.cpp +++ b/src/tr1/cyl_neumannl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl(long double nu, long double x) +extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) { - return c_policies::cyl_neumann(nu, x); + return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } diff --git a/src/tr1/ellint_1.cpp b/src/tr1/ellint_1.cpp index 5a0a1ac3b..a10403e69 100644 --- a/src/tr1/ellint_1.cpp +++ b/src/tr1/ellint_1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_1(double k, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_1f.cpp b/src/tr1/ellint_1f.cpp index 06cdb85b0..f48cbaaa2 100644 --- a/src/tr1/ellint_1f.cpp +++ b/src/tr1/ellint_1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_1f(float k, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_1l.cpp b/src/tr1/ellint_1l.cpp index 93a2ce451..f2c856309 100644 --- a/src/tr1/ellint_1l.cpp +++ b/src/tr1/ellint_1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_1l(long double k, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) { - return c_policies::ellint_1(k, phi); + return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2.cpp b/src/tr1/ellint_2.cpp index 72f1a8bbe..3ee322672 100644 --- a/src/tr1/ellint_2.cpp +++ b/src/tr1/ellint_2.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_2(double k, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2f.cpp b/src/tr1/ellint_2f.cpp index 4391b9adc..2d93c91b8 100644 --- a/src/tr1/ellint_2f.cpp +++ b/src/tr1/ellint_2f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_2f(float k, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_2l.cpp b/src/tr1/ellint_2l.cpp index 7f6a0c905..7ea4d8d6c 100644 --- a/src/tr1/ellint_2l.cpp +++ b/src/tr1/ellint_2l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_2l(long double k, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) { - return c_policies::ellint_2(k, phi); + return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } diff --git a/src/tr1/ellint_3.cpp b/src/tr1/ellint_3.cpp index 58e7ec7aa..3f7720124 100644 --- a/src/tr1/ellint_3.cpp +++ b/src/tr1/ellint_3.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL ellint_3(double k, double nu, double phi) +extern "C" double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/ellint_3f.cpp b/src/tr1/ellint_3f.cpp index f15c379c4..ad97aa9d1 100644 --- a/src/tr1/ellint_3f.cpp +++ b/src/tr1/ellint_3f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL ellint_3f(float k, float nu, float phi) +extern "C" float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/ellint_3l.cpp b/src/tr1/ellint_3l.cpp index 3837dc44a..2415ba57c 100644 --- a/src/tr1/ellint_3l.cpp +++ b/src/tr1/ellint_3l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL ellint_3l(long double k, long double nu, long double phi) +extern "C" long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi) { - return c_policies::ellint_3(k, nu, phi); + return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } diff --git a/src/tr1/erf.cpp b/src/tr1/erf.cpp index 867f1da72..177ebc040 100644 --- a/src/tr1/erf.cpp +++ b/src/tr1/erf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL erf(double x) +extern "C" double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfc.cpp b/src/tr1/erfc.cpp index 22d63e360..a4db7c229 100644 --- a/src/tr1/erfc.cpp +++ b/src/tr1/erfc.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL erfc(double x) +extern "C" double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfcf.cpp b/src/tr1/erfcf.cpp index 0de3d0d95..0a177ee0c 100644 --- a/src/tr1/erfcf.cpp +++ b/src/tr1/erfcf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL erfcf(float x) +extern "C" float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfcl.cpp b/src/tr1/erfcl.cpp index 6765d1063..e5dd4aa6c 100644 --- a/src/tr1/erfcl.cpp +++ b/src/tr1/erfcl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL erfcl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::erfc(x); + return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erff.cpp b/src/tr1/erff.cpp index 198645ae6..1ecb69336 100644 --- a/src/tr1/erff.cpp +++ b/src/tr1/erff.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL erff(float x) +extern "C" float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/erfl.cpp b/src/tr1/erfl.cpp index 58ea0d97a..f1295aa3d 100644 --- a/src/tr1/erfl.cpp +++ b/src/tr1/erfl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL erfl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::erf(x); + return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expint.cpp b/src/tr1/expint.cpp index b644d4c0e..710c116ba 100644 --- a/src/tr1/expint.cpp +++ b/src/tr1/expint.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL expint(double x) +extern "C" double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expintf.cpp b/src/tr1/expintf.cpp index b9a888c77..9c077f602 100644 --- a/src/tr1/expintf.cpp +++ b/src/tr1/expintf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL expintf(float x) +extern "C" float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expintl.cpp b/src/tr1/expintl.cpp index 9aa3e74d5..e795e7431 100644 --- a/src/tr1/expintl.cpp +++ b/src/tr1/expintl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL expintl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::expint(x); + return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1.cpp b/src/tr1/expm1.cpp index f1f9e4c7b..c30c41be6 100644 --- a/src/tr1/expm1.cpp +++ b/src/tr1/expm1.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL boost_expm1(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1f.cpp b/src/tr1/expm1f.cpp index 4922afdc3..1953f4737 100644 --- a/src/tr1/expm1f.cpp +++ b/src/tr1/expm1f.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL boost_expm1f(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/expm1l.cpp b/src/tr1/expm1l.cpp index 51b5e52c3..5b71ee151 100644 --- a/src/tr1/expm1l.cpp +++ b/src/tr1/expm1l.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::expm1(x); + return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/fmax.cpp b/src/tr1/fmax.cpp index c998a87ef..65209750a 100644 --- a/src/tr1/fmax.cpp +++ b/src/tr1/fmax.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,11 +8,11 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL fmax(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { if((boost::math::isnan)(x)) return y; if((boost::math::isnan)(y)) return x; - return (std::max)(x, y); + return (std::max)(x, y); } diff --git a/src/tr1/fmaxf.cpp b/src/tr1/fmaxf.cpp index ca10295c4..b668e9d64 100644 --- a/src/tr1/fmaxf.cpp +++ b/src/tr1/fmaxf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,9 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y) +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + +extern "C" float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { if((boost::math::isnan)(x)) return y; @@ -16,3 +18,5 @@ extern "C" float BOOST_MATH_TR1_DECL fmaxf(float x, float y) return x; return (std::max)(x, y); } + +#endif diff --git a/src/tr1/fmaxl.cpp b/src/tr1/fmaxl.cpp index 955838200..ca221d077 100644 --- a/src/tr1/fmaxl.cpp +++ b/src/tr1/fmaxl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL fmaxl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fmin.cpp b/src/tr1/fmin.cpp index ea45d1225..284f1ed17 100644 --- a/src/tr1/fmin.cpp +++ b/src/tr1/fmin.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL fmin(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fminf.cpp b/src/tr1/fminf.cpp index 3de836061..93917783f 100644 --- a/src/tr1/fminf.cpp +++ b/src/tr1/fminf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,9 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y) +#if !(defined(__HP_aCC) && (__HP_aCC >= 61400)) + +extern "C" float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { if((boost::math::isnan)(x)) return y; @@ -16,3 +18,5 @@ extern "C" float BOOST_MATH_TR1_DECL fminf(float x, float y) return x; return (std::min)(x, y); } + +#endif diff --git a/src/tr1/fminl.cpp b/src/tr1/fminl.cpp index d39a30118..ca708a66b 100644 --- a/src/tr1/fminl.cpp +++ b/src/tr1/fminl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL fminl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { if((boost::math::isnan)(x)) return y; diff --git a/src/tr1/fpclassify.cpp b/src/tr1/fpclassify.cpp index c55b03aa8..b871c4f39 100644 --- a/src/tr1/fpclassify.cpp +++ b/src/tr1/fpclassify.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,36 +11,34 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return static_cast(boost::math::signbit(x)); + return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(double x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return boost::math::fpclassify(x); + return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return boost::math::isfinite(x); + return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return boost::math::isinf(x); + return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return boost::math::isnan(x); + return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(double x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return boost::math::isnormal(x); + return (boost::math::isnormal)(x); } }}} diff --git a/src/tr1/fpclassifyf.cpp b/src/tr1/fpclassifyf.cpp index 7e1f148ea..761341857 100644 --- a/src/tr1/fpclassifyf.cpp +++ b/src/tr1/fpclassifyf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,36 +11,34 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return static_cast(boost::math::signbit(x)); + return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(float x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return boost::math::fpclassify(x); + return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return boost::math::isfinite(x); + return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return boost::math::isinf(x); + return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return boost::math::isnan(x); + return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(float x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return boost::math::isnormal(x); + return (boost::math::isnormal)(x); } }}} diff --git a/src/tr1/fpclassifyl.cpp b/src/tr1/fpclassifyl.cpp index 682a199ee..0e393ef4b 100644 --- a/src/tr1/fpclassifyl.cpp +++ b/src/tr1/fpclassifyl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -11,36 +11,34 @@ namespace boost{ namespace math{ namespace tr1{ -#define NO_MACRO_EXPAND /**/ - -template<> bool BOOST_MATH_TR1_DECL signbit NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return static_cast(boost::math::signbit(x)); + return static_cast((boost::math::signbit)(x)); } -template<> int BOOST_MATH_TR1_DECL fpclassify NO_MACRO_EXPAND(long double x) +template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return boost::math::fpclassify(x); + return (boost::math::fpclassify)(x); } -template<> bool BOOST_MATH_TR1_DECL isfinite NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return boost::math::isfinite(x); + return (boost::math::isfinite)(x); } -template<> bool BOOST_MATH_TR1_DECL isinf NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isinf BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return boost::math::isinf(x); + return (boost::math::isinf)(x); } -template<> bool BOOST_MATH_TR1_DECL isnan NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isnan BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return boost::math::isnan(x); + return (boost::math::isnan)(x); } -template<> bool BOOST_MATH_TR1_DECL isnormal NO_MACRO_EXPAND(long double x) +template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return boost::math::isnormal(x); + return (boost::math::isnormal)(x); } }}} diff --git a/src/tr1/hermite.cpp b/src/tr1/hermite.cpp index 38410e6e5..7b0d73f3d 100644 --- a/src/tr1/hermite.cpp +++ b/src/tr1/hermite.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL hermite(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hermitef.cpp b/src/tr1/hermitef.cpp index c4b211010..0e2066c9f 100644 --- a/src/tr1/hermitef.cpp +++ b/src/tr1/hermitef.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL hermitef(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hermitel.cpp b/src/tr1/hermitel.cpp index 542bdda35..eef803d0e 100644 --- a/src/tr1/hermitel.cpp +++ b/src/tr1/hermitel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL hermitel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::hermite(n, x); + return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/hypot.cpp b/src/tr1/hypot.cpp index 1a5a1d1cd..fd13620d9 100644 --- a/src/tr1/hypot.cpp +++ b/src/tr1/hypot.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL hypot(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/hypotf.cpp b/src/tr1/hypotf.cpp index 11b937520..7aa2c7aff 100644 --- a/src/tr1/hypotf.cpp +++ b/src/tr1/hypotf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL hypotf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/hypotl.cpp b/src/tr1/hypotl.cpp index 165f00f62..7e4547a7a 100644 --- a/src/tr1/hypotl.cpp +++ b/src/tr1/hypotl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL hypotl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::hypot(x, y); + return c_policies::hypot BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/laguerre.cpp b/src/tr1/laguerre.cpp index 3f1085a78..b0bc0b628 100644 --- a/src/tr1/laguerre.cpp +++ b/src/tr1/laguerre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL laguerre(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/laguerref.cpp b/src/tr1/laguerref.cpp index 82be58ab8..341dc8324 100644 --- a/src/tr1/laguerref.cpp +++ b/src/tr1/laguerref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL laguerref(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/laguerrel.cpp b/src/tr1/laguerrel.cpp index 722c68c27..b43418d1a 100644 --- a/src/tr1/laguerrel.cpp +++ b/src/tr1/laguerrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL laguerrel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::laguerre(n, x); + return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendre.cpp b/src/tr1/legendre.cpp index 1d1095d49..d7e41cdda 100644 --- a/src/tr1/legendre.cpp +++ b/src/tr1/legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL legendre(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendref.cpp b/src/tr1/legendref.cpp index b9d019801..318064f21 100644 --- a/src/tr1/legendref.cpp +++ b/src/tr1/legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL legendref(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/legendrel.cpp b/src/tr1/legendrel.cpp index e6e5d5a74..ee7ed5a21 100644 --- a/src/tr1/legendrel.cpp +++ b/src/tr1/legendrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL legendrel(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::legendre_p(n, x); + return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/lgamma.cpp b/src/tr1/lgamma.cpp index 34a871f63..8c6b05eaf 100644 --- a/src/tr1/lgamma.cpp +++ b/src/tr1/lgamma.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL lgamma(double x) +extern "C" double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lgammaf.cpp b/src/tr1/lgammaf.cpp index 1a3e6733b..b5e3f6f5f 100644 --- a/src/tr1/lgammaf.cpp +++ b/src/tr1/lgammaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL lgammaf(float x) +extern "C" float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lgammal.cpp b/src/tr1/lgammal.cpp index 79f239282..636f1df6d 100644 --- a/src/tr1/lgammal.cpp +++ b/src/tr1/lgammal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL lgammal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::lgamma(x); + return c_policies::lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llround.cpp b/src/tr1/llround.cpp index 46554c6d9..02fd019f8 100644 --- a/src/tr1/llround.cpp +++ b/src/tr1/llround.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llround(double x) +extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llroundf.cpp b/src/tr1/llroundf.cpp index 7d880e719..04c915bfa 100644 --- a/src/tr1/llroundf.cpp +++ b/src/tr1/llroundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llroundf(float x) +extern "C" long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/llroundl.cpp b/src/tr1/llroundl.cpp index 299cd1673..dde7ebdc8 100644 --- a/src/tr1/llroundl.cpp +++ b/src/tr1/llroundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long long BOOST_MATH_TR1_DECL llroundl(long double x) +extern "C" long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::llround(x); + return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1p.cpp b/src/tr1/log1p.cpp index 17c9a66aa..bf0a43950 100644 --- a/src/tr1/log1p.cpp +++ b/src/tr1/log1p.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL boost_log1p(double x) +extern "C" double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1pf.cpp b/src/tr1/log1pf.cpp index c3412a797..f394c9262 100644 --- a/src/tr1/log1pf.cpp +++ b/src/tr1/log1pf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL boost_log1pf(float x) +extern "C" float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/log1pl.cpp b/src/tr1/log1pl.cpp index 1c9ee2087..0ecd89333 100644 --- a/src/tr1/log1pl.cpp +++ b/src/tr1/log1pl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::log1p(x); + return c_policies::log1p BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lround.cpp b/src/tr1/lround.cpp index 91b7cb228..4233d37f8 100644 --- a/src/tr1/lround.cpp +++ b/src/tr1/lround.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lround(double x) +extern "C" long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lroundf.cpp b/src/tr1/lroundf.cpp index 4ce4ae373..d576ba6e0 100644 --- a/src/tr1/lroundf.cpp +++ b/src/tr1/lroundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lroundf(float x) +extern "C" long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/lroundl.cpp b/src/tr1/lroundl.cpp index 1e948c7eb..a0db94232 100644 --- a/src/tr1/lroundl.cpp +++ b/src/tr1/lroundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long BOOST_MATH_TR1_DECL lroundl(long double x) +extern "C" long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::lround(x); + return c_policies::lround BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/nextafter.cpp b/src/tr1/nextafter.cpp index 72125945e..ea26a5ce1 100644 --- a/src/tr1/nextafter.cpp +++ b/src/tr1/nextafter.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y) +extern "C" double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nextafterf.cpp b/src/tr1/nextafterf.cpp index 066ce1062..0f7036690 100644 --- a/src/tr1/nextafterf.cpp +++ b/src/tr1/nextafterf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y) +extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nextafterl.cpp b/src/tr1/nextafterl.cpp index 14bca47c9..037f3e889 100644 --- a/src/tr1/nextafterl.cpp +++ b/src/tr1/nextafterl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/nexttoward.cpp b/src/tr1/nexttoward.cpp index f3a9d8686..f1878bd0e 100644 --- a/src/tr1/nexttoward.cpp +++ b/src/tr1/nexttoward.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL nexttoward(double x, long double y) +extern "C" double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y) { - return (double)c_policies::nextafter((long double)x, y); + return (double)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y); } }}} diff --git a/src/tr1/nexttowardf.cpp b/src/tr1/nexttowardf.cpp index 753daa1f6..f9ea7e575 100644 --- a/src/tr1/nexttowardf.cpp +++ b/src/tr1/nexttowardf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y) +extern "C" float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) { - return (float)c_policies::nextafter((long double)x, y); + return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y); } }}} diff --git a/src/tr1/nexttowardl.cpp b/src/tr1/nexttowardl.cpp index 8bceeafbe..9f992fcfe 100644 --- a/src/tr1/nexttowardl.cpp +++ b/src/tr1/nexttowardl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL nexttowardl(long double x, long double y) +extern "C" long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) { - return c_policies::nextafter(x, y); + return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } }}} diff --git a/src/tr1/riemann_zeta.cpp b/src/tr1/riemann_zeta.cpp index 60300a0b8..0ef523674 100644 --- a/src/tr1/riemann_zeta.cpp +++ b/src/tr1/riemann_zeta.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL riemann_zeta(double x) +extern "C" double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/riemann_zetaf.cpp b/src/tr1/riemann_zetaf.cpp index f2cf9a4cf..0387d0250 100644 --- a/src/tr1/riemann_zetaf.cpp +++ b/src/tr1/riemann_zetaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf(float x) +extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/riemann_zetal.cpp b/src/tr1/riemann_zetal.cpp index d7af69171..a9ea46ba8 100644 --- a/src/tr1/riemann_zetal.cpp +++ b/src/tr1/riemann_zetal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::zeta(x); + return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } diff --git a/src/tr1/round.cpp b/src/tr1/round.cpp index 70569383c..d64bd4e48 100644 --- a/src/tr1/round.cpp +++ b/src/tr1/round.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL round(double x) +extern "C" double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/roundf.cpp b/src/tr1/roundf.cpp index 1e18b5223..e051b5be2 100644 --- a/src/tr1/roundf.cpp +++ b/src/tr1/roundf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL roundf(float x) +extern "C" float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/roundl.cpp b/src/tr1/roundl.cpp index 241a0b629..49dbcc64f 100644 --- a/src/tr1/roundl.cpp +++ b/src/tr1/roundl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL roundl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::round(x); + return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/sph_bessel.cpp b/src/tr1/sph_bessel.cpp index e85f12706..c1e66c90a 100644 --- a/src/tr1/sph_bessel.cpp +++ b/src/tr1/sph_bessel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_bessel(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_besself.cpp b/src/tr1/sph_besself.cpp index 8b48448e0..40bd63017 100644 --- a/src/tr1/sph_besself.cpp +++ b/src/tr1/sph_besself.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_besself(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_bessell.cpp b/src/tr1/sph_bessell.cpp index e92b0a5d2..c38f16f3b 100644 --- a/src/tr1/sph_bessell.cpp +++ b/src/tr1/sph_bessell.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_bessell(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::sph_bessel(n, x); + return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_legendre.cpp b/src/tr1/sph_legendre.cpp index 2a95a4977..714ee6d58 100644 --- a/src/tr1/sph_legendre.cpp +++ b/src/tr1/sph_legendre.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_legendre(unsigned n, unsigned m, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0); } diff --git a/src/tr1/sph_legendref.cpp b/src/tr1/sph_legendref.cpp index 487efa198..6ff2ddb4b 100644 --- a/src/tr1/sph_legendref.cpp +++ b/src/tr1/sph_legendref.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_legendref(unsigned n, unsigned m, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0f); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0f); } diff --git a/src/tr1/sph_legendrel.cpp b/src/tr1/sph_legendrel.cpp index bb8de9ce8..4f0c8e0c0 100644 --- a/src/tr1/sph_legendrel.cpp +++ b/src/tr1/sph_legendrel.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel(unsigned n, unsigned m, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) { - return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r(n, m, x, 0.0L); + return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0L); } diff --git a/src/tr1/sph_neumann.cpp b/src/tr1/sph_neumann.cpp index 13c90c679..08791518e 100644 --- a/src/tr1/sph_neumann.cpp +++ b/src/tr1/sph_neumann.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" double BOOST_MATH_TR1_DECL sph_neumann(unsigned n, double x) +extern "C" double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_neumannf.cpp b/src/tr1/sph_neumannf.cpp index 0b2054bbd..5905bb19f 100644 --- a/src/tr1/sph_neumannf.cpp +++ b/src/tr1/sph_neumannf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" float BOOST_MATH_TR1_DECL sph_neumannf(unsigned n, float x) +extern "C" float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/sph_neumannl.cpp b/src/tr1/sph_neumannl.cpp index ce78f2464..32f8613ec 100644 --- a/src/tr1/sph_neumannl.cpp +++ b/src/tr1/sph_neumannl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -8,7 +8,7 @@ #include #include "c_policy.hpp" -extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl(unsigned n, long double x) +extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) { - return c_policies::sph_neumann(n, x); + return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } diff --git a/src/tr1/tgamma.cpp b/src/tr1/tgamma.cpp index 84de6200f..4735be40d 100644 --- a/src/tr1/tgamma.cpp +++ b/src/tr1/tgamma.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL tgamma(double x) +extern "C" double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/tgammaf.cpp b/src/tr1/tgammaf.cpp index 500ce42c1..02d63292e 100644 --- a/src/tr1/tgammaf.cpp +++ b/src/tr1/tgammaf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL tgammaf(float x) +extern "C" float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/tgammal.cpp b/src/tr1/tgammal.cpp index c168c9955..f62cdc8e8 100644 --- a/src/tr1/tgammal.cpp +++ b/src/tr1/tgammal.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL tgammal(long double x) +extern "C" long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::tgamma(x); + return c_policies::tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/trunc.cpp b/src/tr1/trunc.cpp index 1d285ed59..e1e06a111 100644 --- a/src/tr1/trunc.cpp +++ b/src/tr1/trunc.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" double BOOST_MATH_TR1_DECL trunc(double x) +extern "C" double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/truncf.cpp b/src/tr1/truncf.cpp index 2403f39ff..719d8b431 100644 --- a/src/tr1/truncf.cpp +++ b/src/tr1/truncf.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" float BOOST_MATH_TR1_DECL truncf(float x) +extern "C" float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/src/tr1/truncl.cpp b/src/tr1/truncl.cpp index 23f6e610f..9b77963c1 100644 --- a/src/tr1/truncl.cpp +++ b/src/tr1/truncl.cpp @@ -1,6 +1,6 @@ // Copyright John Maddock 2008. // Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_MATH_TR1_SOURCE @@ -10,9 +10,9 @@ namespace boost{ namespace math{ namespace tr1{ -extern "C" long double BOOST_MATH_TR1_DECL truncl(long double x) +extern "C" long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return c_policies::trunc(x); + return c_policies::trunc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } }}} diff --git a/test/test_error_handling.cpp b/test/test_error_handling.cpp index 7419ae2d2..a95f1c09d 100644 --- a/test/test_error_handling.cpp +++ b/test/test_error_handling.cpp @@ -143,8 +143,8 @@ void test_error(T) BOOST_CHECK_THROW(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error); // Test with ignore_error - BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); - BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits::has_quiet_NaN); BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, ignore_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error(func, msg2, ignore_policy), T(0)); BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error(func, msg2, T(1.25), ignore_policy), T(1.25)); @@ -153,10 +153,10 @@ void test_error(T) // Test with errno_on_error errno = 0; - BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); BOOST_CHECK(errno == EDOM); errno = 0; - BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); + BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits::has_quiet_NaN); BOOST_CHECK(errno == EDOM); errno = 0; BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error(func, msg2, errno_policy), std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value()); diff --git a/test/test_igamma_inv.cpp b/test/test_igamma_inv.cpp index a9530ddee..b638f70b4 100644 --- a/test/test_igamma_inv.cpp +++ b/test/test_igamma_inv.cpp @@ -355,9 +355,9 @@ void test_spots(T, const char* type_name) { std::cout << "Running spot checks for type " << type_name << std::endl; // - // basic sanity checks, tolerance is 100 epsilon expressed as a percentage: + // basic sanity checks, tolerance is 150 epsilon expressed as a percentage: // - T tolerance = boost::math::tools::epsilon() * 10000; + T tolerance = boost::math::tools::epsilon() * 15000; if(tolerance < 1e-25f) tolerance = 1e-25f; // limit of test data? BOOST_CHECK_CLOSE(::boost::math::gamma_q_inv(static_cast(1)/100, static_cast(1.0/128)), static_cast(0.35767144525455121503672919307647515332256996883787L), tolerance); diff --git a/test/test_next.cpp b/test/test_next.cpp index 44618ab60..1427b537a 100644 --- a/test/test_next.cpp +++ b/test/test_next.cpp @@ -39,8 +39,11 @@ void test_value(const T& val, const char* name) BOOST_CHECK_EQUAL(float_distance(float_advance(val, 4), val), -4); BOOST_CHECK_EQUAL(float_distance(float_advance(val, -4), val), 4); - BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), 4), float_next(float_next(val))), -4); - BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), -4), float_next(float_next(val))), 4); + if(std::numeric_limits::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)) + { + BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), 4), float_next(float_next(val))), -4); + BOOST_CHECK_EQUAL(float_distance(float_advance(float_next(float_next(val)), -4), float_next(float_next(val))), 4); + } } template @@ -60,7 +63,7 @@ void test_values(const T& val, const char* name) test_value(-boost::math::tools::epsilon(), name); test_value(boost::math::tools::min_value(), name); test_value(-boost::math::tools::min_value(), name); - if(std::numeric_limits::is_specialized) + if(std::numeric_limits::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)) { test_value(z, name); test_value(-z, name); @@ -69,7 +72,7 @@ void test_values(const T& val, const char* name) test_value(-one, name); test_value(two, name); test_value(-two, name); - if(std::numeric_limits::is_specialized && std::numeric_limits::has_denorm) + if(std::numeric_limits::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)) { test_value(std::numeric_limits::denorm_min(), name); test_value(-std::numeric_limits::denorm_min(), name); diff --git a/test/test_tr1.cpp b/test/test_tr1.cpp index b3144040b..e609f4b8a 100644 --- a/test/test_tr1.cpp +++ b/test/test_tr1.cpp @@ -557,7 +557,7 @@ void test_values(float, const char* name) BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast(800) / 1024, static_cast(1e-05)), static_cast(9.999999999898274739584436515967055859383969942432E-6), eps * 5000); BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast(100) / 1024, static_cast(1e+05)), static_cast(99761.153306972066658135668386691227343323331995888), eps * 5000); BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast(-0.5), static_cast(1e+10)), static_cast(9.3421545766487137036576748555295222252286528414669e9), eps * 5000); - BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast(400) / 1024, ldexpf(static_cast(1), 66)), static_cast(7.0886102721911705466476846969992069994308167515242e19), eps * 5000); + BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast(400) / 1024, static_cast(ldexp(static_cast(1), 66))), static_cast(7.0886102721911705466476846969992069994308167515242e19), eps * 5000); BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast(0), static_cast(1), static_cast(-1)), static_cast(-1.557407724654902230506974807458360173087), eps * 5000); BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast(0.4), static_cast(0), static_cast(-4)), static_cast(-4.153623371196831087495427530365430979011), eps * 5000); @@ -1230,7 +1230,7 @@ void test_values(long double, const char* name) BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast(10240L)/1024L, static_cast(1L)/1024L), static_cast(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast(10240L)/1024L, static_cast(10L)), static_cast(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast(144793L)/1024L, static_cast(100L)), static_cast(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L); - BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast(144793L)/1024L, static_cast(200L)), static_cast(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L); + BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast(144793L)/1024L, static_cast(200L)), static_cast(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L); BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast(0.5L), static_cast(1L) / (1024*1024L)), static_cast(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast(5.5L), static_cast(3.125L)), static_cast(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L); @@ -1471,7 +1471,7 @@ void test_values(long double, const char* name) BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast(10240L)/1024L, static_cast(1L)/1024L), static_cast(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast(10240L)/1024L, static_cast(10L)), static_cast(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast(144793L)/1024L, static_cast(100L)), static_cast(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L); - BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast(144793L)/1024L, static_cast(200L)), static_cast(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L); + BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast(144793L)/1024L, static_cast(200L)), static_cast(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L); BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast(0.5L), static_cast(1L) / (1024*1024L)), static_cast(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L); BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast(5.5L), static_cast(3.125L)), static_cast(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L); From 2459d0f2a6daa8550c3d06a37415e8ec61c22398 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 22 Aug 2008 12:51:40 +0000 Subject: [PATCH 032/192] Merged changes from sandbox, and regenerated the docs. [SVN r48294] --- doc/html/index.html | 2 +- doc/sf_and_dist/equations/acosh1.mml | 39 +++ doc/sf_and_dist/equations/acosh1.png | Bin 0 -> 2832 bytes doc/sf_and_dist/equations/acosh1.svg | 2 + doc/sf_and_dist/equations/acosh2.mml | 40 +++ doc/sf_and_dist/equations/acosh2.png | Bin 0 -> 3208 bytes doc/sf_and_dist/equations/acosh2.svg | 2 + doc/sf_and_dist/equations/acosh3.mml | 48 +++ doc/sf_and_dist/equations/acosh3.png | Bin 0 -> 4276 bytes doc/sf_and_dist/equations/acosh3.svg | 2 + doc/sf_and_dist/equations/acosh4.mml | 65 ++++ doc/sf_and_dist/equations/acosh4.png | Bin 0 -> 6077 bytes doc/sf_and_dist/equations/acosh4.svg | 2 + doc/sf_and_dist/equations/asinh1.mml | 39 +++ doc/sf_and_dist/equations/asinh1.png | Bin 0 -> 2784 bytes doc/sf_and_dist/equations/asinh1.svg | 2 + doc/sf_and_dist/equations/asinh2.mml | 51 ++++ doc/sf_and_dist/equations/asinh2.png | Bin 0 -> 3905 bytes doc/sf_and_dist/equations/asinh2.svg | 2 + doc/sf_and_dist/equations/asinh3.mml | 41 +++ doc/sf_and_dist/equations/asinh3.png | Bin 0 -> 2967 bytes doc/sf_and_dist/equations/asinh3.svg | 2 + doc/sf_and_dist/equations/asinh4.mml | 38 +++ doc/sf_and_dist/equations/asinh4.png | Bin 0 -> 4070 bytes doc/sf_and_dist/equations/asinh4.svg | 2 + doc/sf_and_dist/equations/atanh1.mml | 44 +++ doc/sf_and_dist/equations/atanh1.png | Bin 0 -> 2759 bytes doc/sf_and_dist/equations/atanh1.svg | 2 + doc/sf_and_dist/equations/atanh2.mml | 40 +++ doc/sf_and_dist/equations/atanh2.png | Bin 0 -> 2947 bytes doc/sf_and_dist/equations/atanh2.svg | 2 + doc/sf_and_dist/equations/atanh3.mml | 41 +++ doc/sf_and_dist/equations/atanh3.png | Bin 0 -> 4075 bytes doc/sf_and_dist/equations/atanh3.svg | 2 + doc/sf_and_dist/html/index.html | 4 +- .../backgrounders/implementation.html | 46 ++- .../math_toolkit/backgrounders/lanczos.html | 14 +- .../html/math_toolkit/backgrounders/refs.html | 6 +- .../backgrounders/relative_error.html | 2 +- .../math_toolkit/backgrounders/remez.html | 16 +- .../dist/dist_ref/dist_algorithms.html | 6 +- .../dist/dist_ref/dists/bernoulli_dist.html | 10 +- .../dist/dist_ref/dists/beta_dist.html | 20 +- .../dist/dist_ref/dists/binomial_dist.html | 26 +- .../dist/dist_ref/dists/cauchy_dist.html | 10 +- .../dist/dist_ref/dists/chi_squared_dist.html | 12 +- .../dist/dist_ref/dists/exp_dist.html | 10 +- .../dist/dist_ref/dists/extreme_dist.html | 8 +- .../dist/dist_ref/dists/f_dist.html | 10 +- .../dist/dist_ref/dists/gamma_dist.html | 8 +- .../dist/dist_ref/dists/lognormal_dist.html | 8 +- .../dist/dist_ref/dists/nc_beta_dist.html | 12 +- .../dist_ref/dists/nc_chi_squared_dist.html | 14 +- .../dist/dist_ref/dists/nc_f_dist.html | 10 +- .../dist/dist_ref/dists/nc_t_dist.html | 12 +- .../dists/negative_binomial_dist.html | 24 +- .../dist/dist_ref/dists/normal_dist.html | 8 +- .../dist/dist_ref/dists/pareto.html | 12 +- .../dist/dist_ref/dists/poisson_dist.html | 8 +- .../dist/dist_ref/dists/rayleigh.html | 12 +- .../dist/dist_ref/dists/students_t_dist.html | 10 +- .../dist/dist_ref/dists/triangular_dist.html | 10 +- .../dist/dist_ref/dists/uniform_dist.html | 10 +- .../dist/dist_ref/dists/weibull.html | 12 +- .../html/math_toolkit/dist/dist_ref/nmp.html | 54 ++-- .../html/math_toolkit/dist/future.html | 8 +- .../math_toolkit/dist/stat_tut/overview.html | 12 +- .../weg/binom_eg/binomial_quiz_example.html | 4 +- .../stat_tut/weg/cs_eg/chi_sq_intervals.html | 2 +- .../dist/stat_tut/weg/dist_construct_eg.html | 2 +- .../weg/find_eg/find_location_eg.html | 2 +- .../weg/find_eg/find_mean_and_sd_eg.html | 6 +- .../stat_tut/weg/find_eg/find_scale_eg.html | 2 +- .../weg/normal_example/normal_misc.html | 14 +- .../main_overview/compilers_overview.html | 4 +- .../main_overview/directories.html | 4 +- .../main_overview/error_handling.html | 40 +-- .../math_toolkit/main_overview/history1.html | 26 +- .../math_toolkit/main_overview/intro.html | 6 +- .../main_overview/navigation.html | 2 +- .../html/math_toolkit/main_overview/tr1.html | 10 +- .../math_toolkit/perf/comp_compilers.html | 2 +- .../html/math_toolkit/perf/comparisons.html | 30 +- .../html/math_toolkit/perf/getting_best.html | 2 +- .../html/math_toolkit/perf/tuning.html | 4 +- .../policy/pol_ref/discrete_quant_ref.html | 12 +- .../pol_ref/error_handling_policies.html | 14 +- .../policy/pol_ref/internal_promotion.html | 2 +- .../policy/pol_ref/policy_defaults.html | 32 +- .../pol_tutorial/understand_dis_quant.html | 2 +- .../math_toolkit/special/bessel/bessel.html | 14 +- .../special/bessel/bessel_over.html | 6 +- .../math_toolkit/special/bessel/mbessel.html | 14 +- .../special/bessel/sph_bessel.html | 10 +- .../math_toolkit/special/ellint/ellint_1.html | 12 +- .../math_toolkit/special/ellint/ellint_2.html | 12 +- .../math_toolkit/special/ellint/ellint_3.html | 12 +- .../special/ellint/ellint_carlson.html | 12 +- .../special/ellint/ellint_intro.html | 12 +- .../math_toolkit/special/expint/expint_i.html | 16 +- .../math_toolkit/special/expint/expint_n.html | 12 +- .../math_toolkit/special/extern_c/c99.html | 4 +- .../math_toolkit/special/extern_c/tr1.html | 10 +- .../special/extern_c/tr1_ref.html | 6 +- .../special/factorials/sf_binomial.html | 6 +- .../factorials/sf_double_factorial.html | 6 +- .../special/factorials/sf_factorial.html | 10 +- .../factorials/sf_falling_factorial.html | 6 +- .../factorials/sf_rising_factorial.html | 6 +- .../html/math_toolkit/special/fpclass.html | 4 +- .../math_toolkit/special/inv_hyper/acosh.html | 57 +++- .../math_toolkit/special/inv_hyper/asinh.html | 56 +++- .../math_toolkit/special/inv_hyper/atanh.html | 52 +++- .../special/next_float/float_advance.html | 4 +- .../special/next_float/float_distance.html | 4 +- .../special/next_float/float_next.html | 4 +- .../special/next_float/float_prior.html | 4 +- .../special/next_float/nextafter.html | 6 +- .../math_toolkit/special/powers/cbrt.html | 4 +- .../math_toolkit/special/powers/ct_pow.html | 14 +- .../math_toolkit/special/powers/expm1.html | 4 +- .../math_toolkit/special/powers/hypot.html | 2 +- .../math_toolkit/special/powers/log1p.html | 4 +- .../math_toolkit/special/powers/powm1.html | 4 +- .../math_toolkit/special/powers/sqrt1pm1.html | 4 +- .../special/sf_beta/beta_derivative.html | 8 +- .../special/sf_beta/beta_function.html | 12 +- .../special/sf_beta/ibeta_function.html | 18 +- .../special/sf_beta/ibeta_inv_function.html | 10 +- .../special/sf_erf/error_function.html | 14 +- .../special/sf_erf/error_inv.html | 10 +- .../special/sf_gamma/digamma.html | 10 +- .../special/sf_gamma/gamma_derivatives.html | 8 +- .../special/sf_gamma/gamma_ratios.html | 12 +- .../math_toolkit/special/sf_gamma/igamma.html | 20 +- .../special/sf_gamma/igamma_inv.html | 10 +- .../math_toolkit/special/sf_gamma/lgamma.html | 10 +- .../math_toolkit/special/sf_gamma/tgamma.html | 10 +- .../math_toolkit/special/sf_poly/hermite.html | 12 +- .../special/sf_poly/laguerre.html | 14 +- .../special/sf_poly/legendre.html | 16 +- .../special/sf_poly/sph_harm.html | 12 +- .../html/math_toolkit/special/zetas/zeta.html | 12 +- .../html/math_toolkit/status/compilers.html | 4 +- .../html/math_toolkit/status/history1.html | 26 +- .../html/math_toolkit/status/issues.html | 29 +- .../math_toolkit/toolkit/internals1/cf.html | 8 +- .../toolkit/internals1/minima.html | 6 +- .../toolkit/internals1/rational.html | 6 +- .../toolkit/internals1/roots.html | 12 +- .../toolkit/internals1/roots2.html | 6 +- .../toolkit/internals1/series_evaluation.html | 6 +- .../toolkit/internals2/error_test.html | 6 +- .../toolkit/internals2/polynomials.html | 4 +- .../toolkit/internals2/test_data.html | 12 +- .../html/math_toolkit/using_udt/concepts.html | 4 +- doc/sf_and_dist/implementation.qbk | 16 +- doc/sf_and_dist/inv_hyper.qbk | 116 ++++++- doc/sf_and_dist/issues.qbk | 7 + doc/sf_and_dist/roadmap.qbk | 7 +- .../boost/math/special_functions/acosh.hpp | 70 +++-- .../boost/math/special_functions/asinh.hpp | 67 ++-- .../boost/math/special_functions/atanh.hpp | 53 ++-- include/boost/math/tools/precision.hpp | 82 +++++ include/boost/math/tools/test.hpp | 10 + include/boost/math/tools/test_data.hpp | 10 +- test/Jamfile.v2 | 1 + test/acosh_data.ipp | 266 ++++++++++++++++ test/asinh_data.ipp | 286 ++++++++++++++++++ test/atanh_data.ipp | 265 ++++++++++++++++ test/handle_test_result.hpp | 8 + test/test_classify.cpp | 90 +++++- test/test_inv_hyp.cpp | 252 +++++++++++++++ tools/inv_hyp_data.cpp | 134 ++++++++ 174 files changed, 2940 insertions(+), 738 deletions(-) create mode 100644 doc/sf_and_dist/equations/acosh1.mml create mode 100644 doc/sf_and_dist/equations/acosh1.png create mode 100644 doc/sf_and_dist/equations/acosh1.svg create mode 100644 doc/sf_and_dist/equations/acosh2.mml create mode 100644 doc/sf_and_dist/equations/acosh2.png create mode 100644 doc/sf_and_dist/equations/acosh2.svg create mode 100644 doc/sf_and_dist/equations/acosh3.mml create mode 100644 doc/sf_and_dist/equations/acosh3.png create mode 100644 doc/sf_and_dist/equations/acosh3.svg create mode 100644 doc/sf_and_dist/equations/acosh4.mml create mode 100644 doc/sf_and_dist/equations/acosh4.png create mode 100644 doc/sf_and_dist/equations/acosh4.svg create mode 100644 doc/sf_and_dist/equations/asinh1.mml create mode 100644 doc/sf_and_dist/equations/asinh1.png create mode 100644 doc/sf_and_dist/equations/asinh1.svg create mode 100644 doc/sf_and_dist/equations/asinh2.mml create mode 100644 doc/sf_and_dist/equations/asinh2.png create mode 100644 doc/sf_and_dist/equations/asinh2.svg create mode 100644 doc/sf_and_dist/equations/asinh3.mml create mode 100644 doc/sf_and_dist/equations/asinh3.png create mode 100644 doc/sf_and_dist/equations/asinh3.svg create mode 100644 doc/sf_and_dist/equations/asinh4.mml create mode 100644 doc/sf_and_dist/equations/asinh4.png create mode 100644 doc/sf_and_dist/equations/asinh4.svg create mode 100644 doc/sf_and_dist/equations/atanh1.mml create mode 100644 doc/sf_and_dist/equations/atanh1.png create mode 100644 doc/sf_and_dist/equations/atanh1.svg create mode 100644 doc/sf_and_dist/equations/atanh2.mml create mode 100644 doc/sf_and_dist/equations/atanh2.png create mode 100644 doc/sf_and_dist/equations/atanh2.svg create mode 100644 doc/sf_and_dist/equations/atanh3.mml create mode 100644 doc/sf_and_dist/equations/atanh3.png create mode 100644 doc/sf_and_dist/equations/atanh3.svg create mode 100644 test/acosh_data.ipp create mode 100644 test/asinh_data.ipp create mode 100644 test/atanh_data.ipp create mode 100644 test/test_inv_hyp.cpp create mode 100644 tools/inv_hyp_data.cpp diff --git a/doc/html/index.html b/doc/html/index.html index aeb0573b8..b90343fb8 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -25,7 +25,7 @@
-

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

diff --git a/doc/sf_and_dist/equations/acosh1.mml b/doc/sf_and_dist/equations/acosh1.mml new file mode 100644 index 000000000..0d420a034 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh1.mml @@ -0,0 +1,39 @@ + +]> + +acosh1 + + + + + + acosh + + + x + + + = + ln + + + x + + + + + + x + 2 + + + 1 + + + + + + + + diff --git a/doc/sf_and_dist/equations/acosh1.png b/doc/sf_and_dist/equations/acosh1.png new file mode 100644 index 0000000000000000000000000000000000000000..71d7627d838ec162b749df61370473acf365298d GIT binary patch literal 2832 zcmeAS@N?(olHy`uVBq!ia0y~yV7SG=z#zrJ#=yXE@vBol0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw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flIeYN{>w&EcCwMn1tMszp({?vA6{3ndzI7e29C zi?Y?SoPRFGoYSR!(Pu%lR*WU%{cqPF=_mcxQ9PSmAYEfwz%G~jW=7RM{(p&gjQ;4n zlS*hZZT(l@YW=jkL7qAKLE2Mh$Ne%dCNI5PxT7g&>Y`e9{_gox7JWVXw`HZJ)28o} zp3hhiWgjzB&-3e7p9TE$Tqj;obN%mstbF~^A3tv#Sg~09UHQ8StIE~pU9`7xmF{I% z;9FI?pX*Ddih((IExS#U&0GuZ!{vQHE8Z+9ErP z=PQTs2h9gTzrVbT^pdSDm|U1|T)m>}(N&&FeoSq%BA;#a>TX%`_w1W}Ri^{JJ#O*z z&*9sAW3Rn&7n?$6^c|O*H~-X|Pl@_xldyN{grD*GE(%$i1yg2T)tS7X_o(wF*8`Kj zG+nx6H+dyT+Bfr>+50zKY030_{NYV&*y5B6KP-=3JW%@Z{ zAh_!A**CA0e!4Tou9Y(*}9`M;jydUCw+ZpF_x|1&&lSm@lf$>KNz P0|SGntDnm{r-UW|VpBXw literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh1.svg b/doc/sf_and_dist/equations/acosh1.svg new file mode 100644 index 000000000..c9ba67d3b --- /dev/null +++ b/doc/sf_and_dist/equations/acosh1.svg @@ -0,0 +1,2 @@ + +acosh(x)=ln(x+x2−1) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh2.mml b/doc/sf_and_dist/equations/acosh2.mml new file mode 100644 index 000000000..72ceb001a --- /dev/null +++ b/doc/sf_and_dist/equations/acosh2.mml @@ -0,0 +1,40 @@ + +]> + +acosh2 + + + + + + acosh + + + x + + + + ln + + + 2 + x + + + + ; + + x + > + + 1 + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/acosh2.png b/doc/sf_and_dist/equations/acosh2.png new file mode 100644 index 0000000000000000000000000000000000000000..0f5c76556cca0925ee989ffeef3b543bb1cb18a6 GIT binary patch literal 3208 zcmeAS@N?(olHy`uVBq!ia0y~yVEDnnz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|dDiu{Y@-|s)~ zxEIf~{pP%Da=DE=o0rsbnoG18)w6xs{x|H@ehG`i-;!qJi=6tKkpXV;=EV59Of5_HV|~xRC-e7BpIh-K|4v8; zOC?x*yRh`cnRKJbbVgg1x0;!Wp4Ecv$NNr9)Bgr)EHin`N~m_xTPt2zm*DtlJEvT+ d-@^awr$icm9{bp>%D}+D;OXk;vd$@?2>_Oi7Qz4k literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh2.svg b/doc/sf_and_dist/equations/acosh2.svg new file mode 100644 index 000000000..7bd99ad61 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh2.svg @@ -0,0 +1,2 @@ + +acosh(x)≈ln(2x);x>1ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh3.mml b/doc/sf_and_dist/equations/acosh3.mml new file mode 100644 index 000000000..bd0d479c5 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh3.mml @@ -0,0 +1,48 @@ + +]> + +acosh3 + + + + + + acosh + + + x + + + = + log1p + + + y + + + + + + y + 2 + + + + 2 + y + + + + + + ; + + y + = + x + + 1 + + + + diff --git a/doc/sf_and_dist/equations/acosh3.png b/doc/sf_and_dist/equations/acosh3.png new file mode 100644 index 0000000000000000000000000000000000000000..c49727d47b536ec90e1ed13c486beb619865660b GIT binary patch literal 4276 zcmeAS@N?(olHy`uVBq!ia0y~yU~Fe#V36WqV_;y2nK&Vwfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v>OEnpQ;+Z8e|X~RB18QZ8ZVYCNYm%Hxq#zdQOOx2 z-XJbh-%FgyZpWhQSn`>_U6h#3;(GC8Tkk>@Ev`(hWg1IGrpO7pc6bIyem-7h_Ga_> zy7kX%@7E^WyZ?N%{rj8eOW*#rsb2ea&DMF(Pn=n?xG&4$(zXKu#?=PdQC+P|)*X;< zuuu2(X8X}Svv)#?Si$P6GY|jIHc9h!kd0PX`O2Wi{C|?Eu418{4xx_!%x~B7lP+FP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zO|m(N6#gI*TWnr}Wz9DSxdVY^DnQCY9es2^YFQ>ceGws*pyY9<`qRHrFDDf8gqNx;@u%({&;T3Y};)!mX^)9 z{I~G3tGMy*#V4v_3teA7(wZdxbt`+`sd)+eW^PuSAb-_}&t5FeLbu;_rLwkk{M6jc zyB|IrS(J0@z``B1p^=yGb*0;Jl~2h#P|KR#aQs8SwV+#>2WI~Kbm3f1LcvTE*}nM) zx5~uteDXDX%U16Dg?kw9b6+@QfAyOFoR4dn{B$?o``#&gJt$Sm_~)|^y>sLl?9Wxr dx%KL6y|87Ik)%!#Cj$cmgQu&X%Q~loCIFUM4XgkF literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh3.svg b/doc/sf_and_dist/equations/acosh3.svg new file mode 100644 index 000000000..c79a4d132 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh3.svg @@ -0,0 +1,2 @@ + +acosh(x)=log1p(y+y2+2y);y=x−1 \ No newline at end of file diff --git a/doc/sf_and_dist/equations/acosh4.mml b/doc/sf_and_dist/equations/acosh4.mml new file mode 100644 index 000000000..77103f091 --- /dev/null +++ b/doc/sf_and_dist/equations/acosh4.mml @@ -0,0 +1,65 @@ + +]> + +acosh4 + + + + + + acosh + + + x + + + + + + 2 + y + + + + + 1 + + + + y + 12 + + + + + + 3 + + y + 2 + + + 160 + + + + + ; + + y + = + 1 + + x + + + + y + < + + ε + + + + + diff --git a/doc/sf_and_dist/equations/acosh4.png b/doc/sf_and_dist/equations/acosh4.png new file mode 100644 index 0000000000000000000000000000000000000000..395343d4e1c579ea09810ab62539c8765b446c81 GIT binary patch literal 6077 zcmeAS@N?(olHy`uVBq!ia0y~yVEn|uz@Wv!#=yYf(S1{mfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v@+qmVTif^F7ihO=FyLTPcIMM!7J9;Ksl$3QfkB0%gT*l* zfYCK@5@Udai%N%zql1da1Q`_%0hYi3hZKoL8vGN!RM)?;GG6XKzxemJx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_6pE}W(|F0LWb@vr^%HwzWzO`fNRM6YJFb>(Zi{VJll`jWprf*T+G>Z1iFy3D z|4VH6^x^wnGuHgpO+O1~{F>Em(Dy1?SuxZ0!Opyz4jZ0>8IB$5$w&sk<^zFz!AaP3zT<_jB*x z>;0GQ#^;&w?%|2hi^e>u=iXn9c&(fGJL7?_XEg7(drLem1a9oP?Ie?+;S@9RRf(Ht zw!o_G%UUWPncaH4`>wB@Q;W>IqoJ>tUwVA1CHskb$KrLjO>FDx(;9vX{XKc-u9}Fx zO7E2&SK@Aaw6(0heCy|ffL~|V^lfK~Ti06QD|#|4>)n!_e`N~JID9XeweZZ(#aC`#u5x(7d%^T6%C|0=MsBoo{b8e*{5!ol=TTI`xs)Xqk0x%>Dr_kZ*?v4o zMe_byrypD1MdyY5(p5996C#UdoXJ>m=5j*mqaCRlH(yCDIuU6w`K_|; zj)JMqZ_9ZfNP6yP`1d%b=j*IlLV0S>w*BR3-V-?0CF9CcGoRh-CabPh$ZT6>e4MFU z;Mw2ibGxoJ?{PX3_iyf7uhYM^a`tP!R64|8cj4uiDo)pRpB8san7MbxOs(6Q_HXyq zy<09AwlaEY@&7YhSDlfv@|Fu$dlIhPWWBZ5MA3}PJ}h&*t{HPln+(zp3Vtjem~^DjnJQciG$ID8WaT=Ty(dx?8CW{QL90yjnrj#y`UH zdtt4o@Y%I3AFm|&^hcS+drB7zUptk`*8Z9~o&S15HRtW~H|@5GJu*F;@Z0D1^j{xZ<>Nm+;`3xt)&%cFR(vs7ZeBb`umaly!dLD;% zHNT*3q4tA@Mb@E3?$+};T5YBk=vpt>abeOH`-#VQUA?f$)YMeD<3Dp}RkhLQ6R!6d Q7#J8lUHx3vIVCg!0NeTB2mk;8 literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/acosh4.svg b/doc/sf_and_dist/equations/acosh4.svg new file mode 100644 index 000000000..bdb6e538c --- /dev/null +++ b/doc/sf_and_dist/equations/acosh4.svg @@ -0,0 +1,2 @@ + +acosh(x)≈2y(1+y12+3y2160);y=1−x∧y<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh1.mml b/doc/sf_and_dist/equations/asinh1.mml new file mode 100644 index 000000000..17463c61c --- /dev/null +++ b/doc/sf_and_dist/equations/asinh1.mml @@ -0,0 +1,39 @@ + +]> + +asinh1 + + + + + + asinh + + + x + + + = + ln + + + x + + + + + + x + 2 + + + + 1 + + + + + + + + diff --git a/doc/sf_and_dist/equations/asinh1.png b/doc/sf_and_dist/equations/asinh1.png new file mode 100644 index 0000000000000000000000000000000000000000..69442140ba5e73aaf6835ec5b7b931924275e64b GIT binary patch literal 2784 zcmeAS@N?(olHy`uVBq!ia0y~yV7Sh}z#zrJ#=yX!!hP~S0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq^U5)5S5QV$R#y)f?h3iypVX|9X;wzS7r@2__ROOrn|&PSAWMXuM@&W@xlw zRM$##;iX=-t2*7gE5eeGNGOJCb!=-fkmU`^T&1NL+M6z{;V$j-J9xbk=gIJp0~_?zx8^Q{mo_EbA=~WF<0NN+p)NGCCj8;jNFaet)iy0 zJq&x0xM2U=nXTrtukW&o&EQb^%3Q}c=k~>2A&rU$oVV5AxY%VPG^tK&<@C3il~vOV zOPxHjn3gdm=dOQ~QM>AZK|-Co_C-Dm$%>Fmr?F||Z5g?v*JmP`o?e(QwltPmv zJ_K!bn#ATkOCxjJlFgH?_nbTM&HVt&gIhLxPw%jjRLSM}BeY{}bLdLet?y!%Gxjr@ zGc9KpHw#+H_Ruk5!V+g=r|Ho*eiq1Vxbp3^>{<_A2_~HtZVs2s4)|{SKX=`3#_66` zr(Xw{ocosL`JHh&)8&QP&tLWYQ2UVMt{ten>*l{DQjE8`jSqXx;N7!NPcn?JxFO%; zmypSg9V%bfJ8zr5ME8|U{b8+&-Peu7Y$sd^z7%G9;w#%X#ki#9PF;C=nGWH<8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&W>E>w&ycbdv0=6MVW)tN=rX%~c) zTBpr*v5X29j4E5(^g5|#X~u;h&Y&whf+YUAEb{s(d&zrp$e9z{{N8H2zB83FwO4ol zmBgq!Rch_b#dZ1a4=$-}_t)ZGt)Y3x<3^m{6NTBGD?WDx?U~f4dalE`6 zb6-TUMfxn7@;#*E;mTSC;krhS!}BNbU8ojhV;A(3=eWaJ6Mv~R@8s@1?0+n;7lzqR zu;0$3xnyboK6TyQu5o3PW#WYkcj$%k{NWJXms=Wt>Ee-}`RNbBZqN6uVv?Bq%zV8^ ze6(=o?&aNgvQ5~Qn8h#IbFA3w1#^z(%9CZ&{o;nHqveYx+EN&v+g^lkO$O{bfU~GjmCV4@+g181ad3;e6CPYRvsnp1gQ=;w^yNq;<)lV_3W9EHImKu*1p4DFv%WlK}X8Pi{{w*{5buJzM z)v~`nZfoLwsY6E&H{M@X>8oBh+q9=(bGi`sG0m31xs#vSP5x1svj56)fk!zv^sm2P z^QDgMd4|2B*g3(sw(HHF)$n|*UgPwu&ZYOsQp+fQC0!HAjCT%m%@scF`o8?Ry{N@P zrk(7Kk2hzlCM|DSlG`~qLwvbF9dB(9V;)o4hP(4jt9hNfuIX*Ndm?sO>;#($%sJ&Q zUCC=5gW@0PA9&{%=eFETkHPaeLvoIM+~PmXE>6EU9?QB`=h4`8yz|MkPkq;xb1P&r zOfw5@S>|Pv*N=LhGu!^g{LZ>oH=#sfL+9!rveDvF+@8!F+rMu+RQ;d*@1FE!Pp>9| P+OG_ru6{1-oD!M +asinh(x)=ln(x+x2+1) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh2.mml b/doc/sf_and_dist/equations/asinh2.mml new file mode 100644 index 000000000..c27843dba --- /dev/null +++ b/doc/sf_and_dist/equations/asinh2.mml @@ -0,0 +1,51 @@ + +]> + +asinh2 + + + + + + asinh + + + x + + + + ln + + + 2 + x + + + + + + 1 + + 4 + + x + 2 + + + + + ; + + x + > + + 1 + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/asinh2.png b/doc/sf_and_dist/equations/asinh2.png new file mode 100644 index 0000000000000000000000000000000000000000..a5ec5ab01bdeab6f558ea0c761b07a320c641ac2 GIT binary patch literal 3905 zcmeAS@N?(olHy`uVBq!ia0y~yU{q&dU{K>=V_;xtD~t_bU|?V=cJd72;Nak>;YjIV zU|`@Z@Q5sCU=S(+Va9uD@)ZmW43Z_T5hcO-X(i=}MX3zs<>h*rdD+Fui3O>8`9Gc@yCaE!6}q6S~*F_i#i zx7D7jl%!0R&SlKD2vI$zX&Ra>Fh@%CxWtBQ3#Dc|tnTobBEk`7DAe=s)A3vEeBbZ> ze)r*CEwknQ^UrI}?f(7l<(uO3R@v*feyiK$>*!eSbZOoJ%LAR;;$Ob`Cvv52$-^VH zzo)&uzUt}wn}75~MYixy+Q#C?!fXJ?{0P;*mXc^>y+0Q_ka}WZ+m{z zj(Nwn&A)>JthYVCCCBcwZh4I29Ijo;-PXIAS$RLUR~d;PTDib_)0)lJ0T%?`U!S~F zz>k%cHFlDdg{X)~i6_^?kbr;-s+ujqj*gDgm)vccyu{yQmQrR0b1J*{uAobSxf%7f zp6ypB{x9&%HoFzK*yC3CrC80hTlJT#C$X7EJQwi1y?tvwD{Jmj zThrwW4=gJfp4;;T0 zaNcTC9@Digdli<}^8MibAn?IBVcL>tm9?S%cemAZzfpL(d(xE*d2X&-Ub{KfZwEK7 z&H2CNToFIhbF*9PmYip}&wlJi-S)mRamI9}a<5yfE`ED`@Y~h{xo-om_BXD~JTvi& z;RCk^VhQOFLK5sgls-7b_N$Ux@MN{)-c;4zXxI{e8-lzCAR!c_uKM@(~X*wtWN#=<`>Q7ZN>Uy&D+eKPxdyx z&YhqA+w%5*4w-rTerGlN`ZDcPdf8n%?Y2zB{)1-Osh3OcEjju2k7>c&C7F}Hy=&O^ zYFECl+=;9*3D4{&|K3G@itWGjiR+qHxZQE~wOcQ9B{%jq?#?<9-KlxtK0|z_?&Kv~ zRsZ^2nmsAbzGf2cSeZD_^2nAl)@}c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OV0;4)^^P3if8`4 z?9*(4kN#>)J}@YK%PjKx&H5qp(Zk5L-F@A-}YncAkme1CA|p9g9EzLSst zRZW<#w*BJdipbfMer!?OZr!xO`5t@D{7Yuaaof%_SC@SI@%-1XB-@{<*1^xe`!oNU z@Ronl-It=bH&5zKRX>!lNB3dquH%^}J-R|qR^Jy}F1^)NFIV!z{v)?-&o@olbeco) z=gdhp{yUG{o_6osWX}G}pQdaxR`gkZ>z~2WwZ1yfXFMyI{Ot9QkXP63w#hHP=e}o1Sn&3>)uO%cnwG?NgsLCE9yBFWswru*_&$F(& zg{#dBE<2~XH{DuZ-;$$Z*OD`QE)ha4celzHtbKd*!dcVhJh!`Z=eug>eKY#9skUqO z_H(ONT1;E&li!q{p-@m7y(}nKk@NWL&Wc@buWvL9N{<7o=s`_8IrK;t#fX?FUNLK@04A8pG{dV_jtbYkpgyx~^McCCFQr7-Hgf3iy!7qK7NG>C#Cn@kW!c$W+_QS# z{#LPd%~39CSyIn@O=D)5zdF;(>uP0!2UW9e!n-qL9lyJ8Jb1IeVdL7JenQ_a&k^i#hf*Tawtq7wW)lfIOd33&T4 z99zCc{|Wb!7yqYcrp}(-bnfWJ>NK&>Q^ozbJ5|l!AME=SCF|aP z_P*rO!uv%nr%m@8w>Hls*1K&YSIj4OB=2hcz@W>zPb1U$LHSFK7f~@GvnJ&D7N2?& z>zG)q^+IgPiI2NGY_H7UV5@%gtdAm-dG+nOg~q=l0_M3*=l#p7D!Pv?S;0t(fq{X+ M)78&qol`;+0Pn?(+5i9m literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/asinh2.svg b/doc/sf_and_dist/equations/asinh2.svg new file mode 100644 index 000000000..7842a15bc --- /dev/null +++ b/doc/sf_and_dist/equations/asinh2.svg @@ -0,0 +1,2 @@ + +asinh(x)≈ln(2x)+14x2;x>1ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh3.mml b/doc/sf_and_dist/equations/asinh3.mml new file mode 100644 index 000000000..e5dc329c1 --- /dev/null +++ b/doc/sf_and_dist/equations/asinh3.mml @@ -0,0 +1,41 @@ + +]> + +asinh3 + + + + + + asinh + + + x + + + + x + + + + + x + 3 + + + 6 + + + ; + + x + < + + ε + + + + + diff --git a/doc/sf_and_dist/equations/asinh3.png b/doc/sf_and_dist/equations/asinh3.png new file mode 100644 index 0000000000000000000000000000000000000000..3d2d41ae02eec0aa357aff7e8f1c3c405c56b587 GIT binary patch literal 2967 zcmeAS@N?(olHy`uVBq!ia0y~yVEE3!z@Wy##=yWJ@s9T<0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq`4Z)5S5QV$Rz+m0w~niypVXAFtHu!V&5m5YiL)+2^I#ic4By+4GdzL>+ky zT_d&DT#)i!dNk;C$lFU^0#clv8&wx-war)@I*Uu|*n|&n<$v4kth`tKbMJTQytO};JFJl^U$^~D{IyTVKse&!x8Far!UFVzu()?ctG}NR_FzeqbKfi zPQ1eUBJKBOpQ!myMDKH2gk4HW;4`@KZO)t!-3-Q~vvvzBW~M$6Nig`ppWtBi)jPqW zVA|V2%a!35PKg}5%QIf%U`cIaf6^Yk^Q z!ls$*dXl-;_ z>wQStJ2UF?j^jd?_pE+>GUa#OgD-B{Q@2Ra_#mHV?P;5@QFA<%^SvYb*?M+gy>^H1{GG|XY5#Xj^qEv8z;7ON{lsMNZU5C@ zDm^IkjK2MEk)W*=(p!gz@NRpqs($v~q-DZ#pPRy5E`=TFbnsvBP*vTq$bXIb zTXB z+ooCDP6WeK$+z>)ePwH7y4>KXxmLZvVk4hj-;Ag`o;e5aaFm>!vX?R8LC7P? zN1dMU${m8k`i%TB;V?D>d zO!)Uv>*fCoL^m9CI(1VocJ+MYdhH_4q|Bm}wR^fhx8KOG-@NDU*5JFV8Gj4c&Hrlr zlDW~lA$4}(u}uduk9>QikuWvw+Fs_3OU~Ar=}(>+m8G5f(tG)~5<$T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*@r!fg{(ro;RrCL=xwso0JNZyOlXKBz zspnU2r=E(C{2{*a?Dacei|%?v%`5Qg+xj<8t=9a3=xzP&p?6J7q`X+}$t3-L_HEsM zpXs_CZq*VS*1k=%-+t#%)pylfKd<=Q$~y4OMf&{PR`!*-^KyP);d=f{kU3Xau=I!N z^62)uNavy%zA8=jZsrlkX1b)Dw_CgFj#A%}JQtT6LI+;8lyB2FIQnh1<;yGWH~gfg zxc}`|n)N?#_pZp0q|?$$UswHRY@WP+fu71*$2|fcK3u!H#(9IW;1lES8=5zJBR22V zc-ayqdAsQeqnuks2e(kKlvzo^V>XZAJFyLqFNZ9RTvB_`xT9lNS-FBPQ_kGJ>$mJ~ zeUm)$?at=|ODCD-r`P@x3{2d4MoP@xYEPlF&92O97R^QLW`5abd!*EcdEbn{Td5Tb zr%d=GHeK-TqX*wYj(uBVbA5Zaa(8Rt^bLPqWH +asinh(x)≈x−x36;x<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/asinh4.mml b/doc/sf_and_dist/equations/asinh4.mml new file mode 100644 index 000000000..a6a72d29c --- /dev/null +++ b/doc/sf_and_dist/equations/asinh4.mml @@ -0,0 +1,38 @@ + +]> + +asinh4 + + + + + + asinh + + + x + + + = + log1p + + + x + + + sqrtp1m1 + + + + x + 2 + + + + + + + + + diff --git a/doc/sf_and_dist/equations/asinh4.png b/doc/sf_and_dist/equations/asinh4.png new file mode 100644 index 0000000000000000000000000000000000000000..86c88dd7a45243d8dab29298a155f60a1b0ff51b GIT binary patch literal 4070 zcmeAS@N?(olHy`uVBq!ia0y~yVANt@U=ZhEV_;y|vy$lr0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq_5S)5S5QV$Rz+)qAFf&OE-KUwr4uP$5wvjwh?8dQ4lkU|CThccPDb!13tX zW1WE|9^USWOzifpGiO=Niae|^Ym)Q50C&|R2RcPm*0)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-x8Kk_bXI_C=uKVS{w-2HXRRyqDs@hQ;@?iJJ& zuPC1zn<~Top>E9zDTRDtgViB7cVA*R-&@Dtvoh#+aO3Gu_eAS<$xgUXHg$Jhs$*Sk zx=r2k6)|)8<}A5&J*!Mo<6aD(+QZ%NW|;)m&57q+6U6+_K16V5<(}e?-b>V{YOlYg z@wC#;catCx7NR!+_&wD z{z4P+hw-_NA5%{Hv#8j%&+ZA&XMIleVRt+Qk%qJl18a)u)v|9^9(joh|43 z)q+R&X%iMS@hJk^B!PC{xWt~$(696rW((C{L literal 0 HcmV?d00001 diff --git a/doc/sf_and_dist/equations/asinh4.svg b/doc/sf_and_dist/equations/asinh4.svg new file mode 100644 index 000000000..5c11b5ea5 --- /dev/null +++ b/doc/sf_and_dist/equations/asinh4.svg @@ -0,0 +1,2 @@ + +asinh(x)=log1p(x+sqrtp1m1(x2)) \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh1.mml b/doc/sf_and_dist/equations/atanh1.mml new file mode 100644 index 000000000..0561c1a18 --- /dev/null +++ b/doc/sf_and_dist/equations/atanh1.mml @@ -0,0 +1,44 @@ + +]> + +atanh1 + + + + + + atanh + + + x + + + = + + + ln + + + + + 1 + + + x + + + 1 + + x + + + + + + 2 + + + + + diff --git a/doc/sf_and_dist/equations/atanh1.png b/doc/sf_and_dist/equations/atanh1.png new file mode 100644 index 0000000000000000000000000000000000000000..8e51451a034d1af01b9ac5f62a2a19a561871cac GIT binary patch literal 2759 zcmeAS@N?(olHy`uVBq!ia0y~yV3@;fq~1#)5S5QV$Rz+l@nrJMUU0T8#$;6dmh^0A#g}4K+KUtVRnbkjQV(ps&sR40suHEEIXHYQgEM~@pxVbcT@PCl1kp8xFW z$9J=5nos_&cKG+IxYE1tF5i8AuRQPj&0nX?O4t0Ha7A1q_xHI)zs@$wGxFd5S1bDC zhLA+s?}b5cYs1W$OV`wSyyA~xwFwNl&;LWofbGTogBy>Pwu;~0+#u$8d}`Ku?wI!n zdJo*)c3)@B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ksg5o{H1?6Mva!Nm5XD&1>2-J<+5Vvt@n#Zn_8Mn(zChTLaIG8(e zQXIdha)a<3r~c6S`^`CHWS=T#Mk_TYO$oQX8gDE2is}2!hDW>eCO2%{wtLc>TdH5U zWY_h5@~C?2dmyv*kXoj$Cwu7R>AwsQ#_=6}{${yAdPKiB<1{-LmlqC?tPfv(ynNr% vZ*eNe|7 +atanh(x)=ln(1+x1−x)2 \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh2.mml b/doc/sf_and_dist/equations/atanh2.mml new file mode 100644 index 000000000..735fd86b6 --- /dev/null +++ b/doc/sf_and_dist/equations/atanh2.mml @@ -0,0 +1,40 @@ + +]> + +atanh2 + + + + + + atanh + + + x + + + + x + + + + + x + 3 + + 3 + + + ; + + x + < + + ε + + + + + + diff --git a/doc/sf_and_dist/equations/atanh2.png b/doc/sf_and_dist/equations/atanh2.png new file mode 100644 index 0000000000000000000000000000000000000000..4b5545e1fb77d6b08a90b04fb7ee7dd92e41f17d GIT binary patch literal 2947 zcmeAS@N?(olHy`uVBq!ia0y~yVEDnnz@Wy##=yYv@@ZHI0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq|RB)5S5QV$R#S)muVCMcen^-`f!*>T)zlV6POD>Mc`4fyp8lWKx{ZvS+MR zwab_=i>u9TMgx!OeP_?lfy>&0B$haf1nB)_s7cV;CuA%v%qjoV%W1}6!|RP_pV@q` zeRF#6Z|TQ9wdZaXuQfeySN(45wV2|y%Erpd%6&@|4@4gL-;jMar|y(is>%YbTvnqf zxk+WrW$fn|r!j6;DfJ6q-J_zBebD%k$E%Dq`PT2z4DT7Yrfsu{J!_<;ntjmNOey_N zV{C)A(c^n2CwXj?^(U=TmF2&~zh~|?JIRwLcx)C6WH-7VIC~&;Qrprs{%%a03@h9` zRbtt<7;m1K`Fc{I-K}166&dN=O6}O)$?qRjJ$aO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.svg new file mode 100644 index 000000000..dab81641a --- /dev/null +++ b/doc/sf_and_dist/equations/atanh2.svg @@ -0,0 +1,2 @@ + +atanh(x)≈x+x33;x<ε \ No newline at end of file diff --git a/doc/sf_and_dist/equations/atanh3.mml b/doc/sf_and_dist/equations/atanh3.mml new file mode 100644 index 000000000..1d839acfd --- /dev/null +++ b/doc/sf_and_dist/equations/atanh3.mml @@ -0,0 +1,41 @@ + +]> + +atanh3 + + + + + + atanh + + + x + + + = + + + log1p + + + x + + + + log1p + + + + x + + + + 2 + + + + + diff --git a/doc/sf_and_dist/equations/atanh3.png b/doc/sf_and_dist/equations/atanh3.png new file mode 100644 index 0000000000000000000000000000000000000000..36e3df0c8215f1d85792542a60a1809184c5c461 GIT binary patch literal 4075 zcmeAS@N?(olHy`uVBq!ia0y~yU=(6tU{K{?V_;zDvrlVcU|?V=cJd72;Nak>;YjIV zU|`@Z@Q5sCU=S(+Va9uD@)ZmW43Z_T5hcO-X(i=}MX3zs<>h*rdD+Fui3O>8`9~Ko@snPA?;Be8!#qg-t-yf&a z6H+BtBu@JAC^*sUXM<9_>xYXXhc{iC8DL`iHgTH1P~aK%MN5CMbY7LumVb8U;T`Mm zaqs3@8_&J}+;~3o?~UJX{l2sL+^yFe`_J_7Ty0zucp&A0obl|-T#q>|WGXJ42@7qg z<9}daynEk)Z}X2o|ChD1QZwPr-A2y?ztg_;hDjB(Y&dr2UmWADxsAbR->fRS%=e|5 z@%PM|XEVRf)iTUzo2HnlQo#0sbwPIP@kvWM4=g^Ql<=FYr%>Pn^Mh$hyL6e(O*Pqf z=g*VoC9#eAkDT_r$)0F*&%=}Vz~2M&L>K%wOi=uAy6AGBK+E4E&tjEYjmY_&le7+= zdB?1mzx3fY_G!%ip-mM(6yq7@q@?AG-#UNBj$s+o{YhKmRVz*#z6(B3xz;f3g2+E^ zn*haMcN^zFx^;qks)TaW%)gT25!=02^aZ{Y(m<127Tt~ z$4(nN2F2D)SRWL$b_wIbZ4=kWntSf$me60nO(9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c_OnO;PABfpO5( z_fa0nTe?{cXWp29I$W~sK_y#Yo@3nlzL|SfGWRWUZgBpPdv2G@{+Q0F{72Cx`Qvx2Dhj^k3*;gXOFVvs2Ri!)7k!>!0fJKmN|?%AOId zA{*^{&&n$6%o{^b?S{*TZwfYN{>nKRSy6LB=gw!wck^P~)UEFNb$p$$g-4ukb;0(x zF@J21zo^*L@7m0^-nV{%-Lv0)E!Pi3>^`?+!i}Jyy)#`8@h}+wb~m`i*EO9z+Rgq> zTyddBoY1oh&X;jBWecRw|J5v&yv5GPY$t!zo^i9v+QY>WY8xcg@1~#V*XT=0e^3%5 zy+i8zgEK7iHWe@!HY_<=Ve#3jy=(;pdascq>vV|qaH>K;5X-kwB-_6f`#PRYgyZEl76H8b$<2z4ZFcc^{!FMW0d8&K6kcy;{%Y-fB?>5ek z@KVcddvrl@o0+815y7N6=Z>HEJKN%+tstx-X(e(F{ z=XS@AHF-zu56RU!WO3WPEVe0FGt)Lo^qG}~k>jL=&I)smeAkd$IH&FSS)I4iyChFF b{AW~VxU>798 +atanh(x)=log1p(x)−log1p(−x)2 \ No newline at end of file diff --git a/doc/sf_and_dist/html/index.html b/doc/sf_and_dist/html/index.html index a981f0c41..ad65664fe 100644 --- a/doc/sf_and_dist/html/index.html +++ b/doc/sf_and_dist/html/index.html @@ -43,7 +43,7 @@
-

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

@@ -448,7 +448,7 @@

- +

Last revised: July 18, 2008 at 10:10:45 GMT

Last revised: August 22, 2008 at 12:37:17 GMT


diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html index 380e91ce6..171a156ec 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/implementation.html @@ -33,7 +33,7 @@ and reflect more the general implementation philosophy used.

- + Implemention philosophy
@@ -85,7 +85,7 @@ These could still provide sufficient accuracy for some speed-critical applications.

- + Accuracy and Representation of Test Values
@@ -130,7 +130,7 @@ binary value).

- + Tolerance of Tests
@@ -156,7 +156,7 @@ first that the suffix L is present, and then that the tolerance is big enough.

- + Handling Unsuitable Arguments
@@ -242,7 +242,7 @@

- + Handling of Functions that are Not Mathematically defined
@@ -276,7 +276,7 @@

- + Median of distributions
@@ -309,7 +309,7 @@ Basic Statistics. give more detail, in particular for discrete distributions.

- + Handling of Floating-Point Infinity
@@ -353,7 +353,7 @@ handling policies.

- + Scale, Shape and Location
@@ -380,7 +380,7 @@ functions, they can be added if required.

- + Notes on Implementation of Specific Functions & Distributions
@@ -392,7 +392,7 @@ 0 and upper = 1 would be more suitable.
- + Rational Approximations Used
@@ -435,7 +435,7 @@ to the "true" minimax solution.

- + Representation of Mathematical Constants
@@ -496,7 +496,7 @@ double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function
- + Thread safety
@@ -521,7 +521,7 @@ the right thing here at some point.

- + Sources of Test Data
@@ -565,7 +565,7 @@ the underlying special function is known to be difficult to implement.

- + Creating and Managing the Equations
@@ -726,23 +726,19 @@ done HTML: this needs further investigation.

- + Producing Graphs

- Graphs were mostly produced by a very laborious process entailing output - of columns of values from C++ programs to a .csv file, use of RJS - Graph to arrange the display and axes, and output to a .ps file, - followed by conversion to .png using Adobe Photoshop, or similar utility. - This rigmarole is not recommended! + Graphs were produced in SVG format and then converted to PNG's using the + same process as the equations.

- We plan to carry out this process in a single step using the Google - Summer of Code 2007 project of Jacob Voytko (whose work so far is - at .\boost-sandbox\SOC\2007\visualization) that should, when completed, allow - output of annotated graphs as Scalable Vector Graphic .svg files directly - from C++ programs. + The programs /libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp and /libs/math/doc/sf_and_dist/graphssf_graphs.cpp + generate the SVG's directly using the [@http:/code.google.com/soc/2007/boost/about.html + Google Summer of Code 2007] project of Jacob Voytko (whose work so far is + at .\boost-sandbox\SOC\2007\visualization).

diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html index 387c292ab..167af84be 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/lanczos.html @@ -27,7 +27,7 @@ The Lanczos Approximation
- + Motivation

@@ -98,7 +98,7 @@ functions divided by large powers into single (simpler) expressions.

- + The Approximation
@@ -160,7 +160,7 @@

- + Computing the Coefficients
@@ -204,7 +204,7 @@ multiplied by F as the last step.

- + Choosing the Right Parameters
@@ -228,7 +228,7 @@ computing to float precision with double precision arithmetic.

-

Table 53. Optimal choices for N and g when computing with +

Table 53. Optimal choices for N and g when computing with guard digits (source: Pugh)

@@ -371,7 +371,7 @@ exactly matches the machine epsilon for the type in question.

-

Table 54. Optimum value for N and g when computing at fixed +

Table 54. Optimum value for N and g when computing at fixed precision

@@ -536,7 +536,7 @@ is exact, and so isn't used for the gamma function.

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html index 483a6fdfe..6a7a45840 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/refs.html @@ -27,7 +27,7 @@ References
- + General references
@@ -91,7 +91,7 @@ Library (version 2), Walter E. Brown

- + Calculators* that we found (and used to cross-check - as far as their widely-varying accuracy allowed). @@ -101,7 +101,7 @@ Binomial Probability Distribution Calculator.

- + Other Libraries

diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html index 96d5d77ad..bc3c73e91 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/relative_error.html @@ -81,7 +81,7 @@

- + The Impossibility of Zero Error
diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html index 810201292..4b898ef58 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders/remez.html @@ -94,7 +94,7 @@ are located!

- + The Remez Method
@@ -174,7 +174,7 @@
- + Remez Step 1
@@ -205,7 +205,7 @@ to 5.6x10-4.

- + Remez Step 2
@@ -234,7 +234,7 @@ In our example we perform multi-point exchange.

- + Iteration

@@ -250,7 +250,7 @@ remez-4

- + Rational Approximations
@@ -299,7 +299,7 @@ number of terms overall.

- + Practical Considerations
@@ -407,7 +407,7 @@ desired minimax solution (5x10-4).

- + Remez Method Checklist
@@ -461,7 +461,7 @@
- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html index 51efec6e9..5fded32a6 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dist_algorithms.html @@ -28,7 +28,7 @@ Algorithms

- + Finding the Location and Scale for Normal and similar distributions
@@ -50,7 +50,7 @@ using boost::math::complement; // Will be needed by users who want to use complements.
- + find_location function
@@ -80,7 +80,7 @@ }} // namespaces
- + find_scale function
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html index 920247db3..aa4deaad4 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html @@ -87,7 +87,7 @@

- + Member Functions
@@ -103,7 +103,7 @@ Returns the success_fraction parameter of this distribution.

- + Non-member Accessors
@@ -128,7 +128,7 @@ exception and make an error message available.

- + Accuracy

@@ -136,7 +136,7 @@ and so should have errors within an epsilon or two.

- + Implementation

@@ -327,7 +327,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html index f53744e71..1b5a59d34 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html @@ -133,12 +133,12 @@ from the centre (where x = half).

    - + Member Functions
    - + Constructor
    beta_distribution(RealType alpha, RealType beta);
    @@ -165,7 +165,7 @@
                 yellow in the graph above).
               

    - + Parameter Accessors
    @@ -189,7 +189,7 @@ assert(mybeta.beta() == 5.); // mybeta.beta() returns 5
    - + Parameter Estimators
    @@ -242,7 +242,7 @@ from presumed-known mean and variance. Returns the value of β that gives: cdf(beta_distribution<RealType>(alpha, beta), x) == probability.

    - + Non-member Accessor Functions
    @@ -264,7 +264,7 @@ from presumed-known mean and variance. Mathworld.

    - + Applications

    @@ -277,7 +277,7 @@ from presumed-known mean and variance. statistical inference.

    - + Related distributions
    @@ -303,7 +303,7 @@ from presumed-known mean and variance. Distribution with its p parameter set to x.

    - + Accuracy

    @@ -315,7 +315,7 @@ from presumed-known mean and variance. please refer to these functions for information on accuracy.

    - + Implementation

    @@ -597,7 +597,7 @@ from presumed-known mean and variance.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html index 08e0b2a20..50db83f84 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/binomial_dist.html @@ -167,12 +167,12 @@

- + Member Functions
- + Construct
binomial_distribution(RealType n, RealType p);
@@ -189,7 +189,7 @@
             otherwise calls domain_error.
           

- + Accessors
RealType success_fraction() const;
@@ -205,7 +205,7 @@
             was constructed.
           

- + Lower Bound on the Success Fraction
@@ -311,7 +311,7 @@ limits illustrated in the case of the binomial. Biometrika 26 404-413.

- + Upper Bound on the Success Fraction
@@ -389,7 +389,7 @@
- + Estimating the Number of Trials Required for a Certain Number of Successes
@@ -431,7 +431,7 @@ of seeing 10 events that occur with frequency one half.

- + Estimating the Maximum Number of Trials to Ensure no more than a Certain Number of Successes @@ -479,7 +479,7 @@ Worked Example.

- + Non-member Accessors
@@ -504,7 +504,7 @@ in the context of this distribution:

-

Table 11. Meaning of the non-member accessors

+

Table 11. Meaning of the non-member accessors

@@ -627,7 +627,7 @@

- + Examples

@@ -635,7 +635,7 @@ examples are available illustrating the use of the binomial distribution.

- + Accuracy

@@ -645,7 +645,7 @@ please refer to these functions for information on accuracy.

- + Implementation

@@ -886,7 +886,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html index 20acfe90a..41de8d50e 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -114,7 +114,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -151,7 +151,7 @@ The domain of the random variable is [-[max_value], +[min_value]].

    - + Accuracy

    @@ -160,7 +160,7 @@ have very low error rates.

    - + Implementation

    @@ -276,7 +276,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html index fc8d9b113..9c0f889e0 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/chi_squared_dist.html @@ -87,7 +87,7 @@ independent, normally distributed random

    - + Member Functions
    @@ -170,7 +170,7 @@ independent, normally distributed random NIST Engineering Statistics Handbook, Section 7.2.3.2.

    - + Non-member Accessors
    @@ -196,7 +196,7 @@ independent, normally distributed random The domain of the random variable is [0, +∞].

    - + Examples

    @@ -204,7 +204,7 @@ independent, normally distributed random are available illustrating the use of the Chi Squared Distribution.

    - + Accuracy

    @@ -212,7 +212,7 @@ independent, normally distributed random gamma functions: please refer to the accuracy data for those functions.

    - + Implementation

    @@ -379,7 +379,7 @@ independent, normally distributed random

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html index 897038ca8..9083a6a85 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/exp_dist.html @@ -71,7 +71,7 @@

    - + Member Functions
    @@ -91,7 +91,7 @@ Accessor function returns the lambda parameter of the distribution.

    - + Non-member Accessors
    @@ -111,7 +111,7 @@ The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -122,7 +122,7 @@ should have very low error rates.

    - + Implementation

    @@ -283,7 +283,7 @@

- + references
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html index b83bc8758..43cd1f431 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/extreme_dist.html @@ -100,7 +100,7 @@

    - + Member Functions
    @@ -125,7 +125,7 @@ Returns the scale parameter of the distribution.

    - + Non-member Accessors
    @@ -145,7 +145,7 @@ The domain of the random parameter is [-∞, +∞].

    - + Accuracy

    @@ -154,7 +154,7 @@ very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html index 1a020f89c..3f88cae55 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/f_dist.html @@ -80,7 +80,7 @@

    - + Member Functions
    @@ -106,7 +106,7 @@ Returns the denominator degrees of freedom parameter of the distribution.

    - + Non-member Accessors
    @@ -126,7 +126,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -134,7 +134,7 @@ are available illustrating the use of the F Distribution.

    - + Accuracy

    @@ -143,7 +143,7 @@ refer to those functions for accuracy data.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html index 2a52a5a30..c8e9489f2 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html @@ -137,7 +137,7 @@ than a dedicated Erlang Distribution.

    - + Member Functions
    @@ -162,7 +162,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -182,7 +182,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -194,7 +194,7 @@ refer to the accuracy data for those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html index 6cc0cbd7b..7324d9805 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html @@ -88,7 +88,7 @@

    - + Member Functions
    @@ -121,7 +121,7 @@ Returns the scale parameter of this distribution.

    - + Non-member Accessors
    @@ -141,7 +141,7 @@ The domain of the random variable is [0,+∞].

    - + Accuracy

    @@ -150,7 +150,7 @@ function, and as such should have very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html index 90ad33af4..d0da1648a 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_beta_dist.html @@ -96,7 +96,7 @@ is a central χ2 random variable with

    - + Member Functions
    @@ -128,7 +128,7 @@ is a central χ2 random variable with was constructed.

    - + Non-member Accessors
    @@ -152,7 +152,7 @@ is a central χ2 random variable with The domain of the random variable is [0, 1].

    - + Accuracy

    @@ -168,7 +168,7 @@ is a central χ2 random variable with zero error.

    -

    Table 13. Errors In CDF of the Noncentral Beta

    +

    Table 13. Errors In CDF of the Noncentral Beta

    @@ -295,7 +295,7 @@ is a central χ2 random variable with functions are broadly similar.

    - + Tests

    @@ -307,7 +307,7 @@ is a central χ2 random variable with tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html index 6eb7f96dd..2255692a1 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html @@ -110,7 +110,7 @@

    - + Member Functions
    @@ -183,7 +183,7 @@ == q.

    - + Non-member Accessors
    @@ -203,7 +203,7 @@ The domain of the random variable is [0, +∞].

    - + Examples

    @@ -211,7 +211,7 @@ example for the noncentral chi-squared distribution.

    - + Accuracy

    @@ -223,7 +223,7 @@ zero error.

    -

    Table 14. Errors In CDF of the Noncentral Chi-Squared

    +

    Table 14. Errors In CDF of the Noncentral Chi-Squared

    @@ -359,7 +359,7 @@ produce an accuracy greater than the square root of the machine epsilon.

    - + Tests

    @@ -373,7 +373,7 @@ to at least 50 decimal digits - and is the used for our accuracy tests.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html index 975733c86..8a24828a5 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_f_dist.html @@ -95,7 +95,7 @@ random variable with v1

    - + Member Functions
    @@ -127,7 +127,7 @@ random variable with v1 which this object was constructed.

    - + Non-member Accessors
    @@ -147,7 +147,7 @@ random variable with v1 The domain of the random variable is [0, +∞].

    - + Accuracy

    @@ -155,7 +155,7 @@ random variable with v1 Beta Distribution: refer to that distribution for accuracy data.

    - + Tests

    @@ -164,7 +164,7 @@ random variable with v1 Math library statistical package and its pbeta and dbeta functions.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html index 1130acca9..3a68a3845 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/nc_t_dist.html @@ -85,7 +85,7 @@

    - + Member Functions
    @@ -111,7 +111,7 @@ which this object was constructed.

    - + Non-member Accessors
    @@ -131,7 +131,7 @@ The domain of the random variable is [-∞, +∞].

    - + Accuracy

    @@ -141,7 +141,7 @@ one shown will have effectively zero error.

    -

    Table 15. Errors In CDF of the Noncentral T Distribution

    +

    Table 15. Errors In CDF of the Noncentral T Distribution

    @@ -255,7 +255,7 @@ epsilon.

    - + Tests

    @@ -270,7 +270,7 @@ least 50 decimal places.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html index 8b49cb3c8..3489d1fbe 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html @@ -123,7 +123,7 @@

    - + Related Distributions
    @@ -200,12 +200,12 @@

    - + Member Functions
    - + Construct
    negative_binomial_distribution(RealType r, RealType p);
    @@ -221,7 +221,7 @@
                 <= 1.
               

    - + Accessors
    RealType success_fraction() const; // successes / trials (0 <= p <= 1)
    @@ -237,7 +237,7 @@
                 was constructed.
               

    - + Lower Bound on Parameter p
    @@ -298,7 +298,7 @@ vol. 48, no3, 605-621.

    - + Upper Bound on Parameter p
    @@ -358,7 +358,7 @@ vol. 48, no3, 605-621.

    - + Estimating Number of Trials to Ensure at Least a Certain Number of Failures
    @@ -409,7 +409,7 @@ probability of observing k failures or fewer.

    - + Estimating Number of Trials to Ensure a Maximum Number of Failures or Less
    @@ -457,7 +457,7 @@ probability of observing more than k failures.

    - + Non-member Accessors
    @@ -478,7 +478,7 @@ in the context of this distribution:

    -

    Table 12. Meaning of the non-member accessors.

    +

    Table 12. Meaning of the non-member accessors.

    @@ -603,7 +603,7 @@

    - + Accuracy

    @@ -613,7 +613,7 @@ please refer to these functions for information on accuracy.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html index 6384307b4..c213c3e9f 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/normal_dist.html @@ -79,7 +79,7 @@

    - + Member Functions
    @@ -109,7 +109,7 @@ be used generically).

    - + Non-member Accessors
    @@ -131,7 +131,7 @@ and complement cdf -∞ = 1 and +∞ = 0, if RealType permits.

    - + Accuracy

    @@ -139,7 +139,7 @@ function, and as such should have very low error rates.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html index 9f350580c..1300b6466 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/pareto.html @@ -86,12 +86,12 @@

    - + Related distributions
    - + Member Functions
    @@ -117,7 +117,7 @@ Returns the shape parameter of this distribution.

    - + Non-member Accessors
    @@ -137,7 +137,7 @@ The supported domain of the random variable is [location, ∞].

    - + Accuracy

    @@ -147,7 +147,7 @@ to unity.

    - + Implementation

    @@ -315,7 +315,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html index 6ab34b693..598c88d01 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html @@ -122,7 +122,7 @@

    - + Member Functions
    @@ -137,7 +137,7 @@ Returns the mean of this distribution.

    - + Non-member Accessors
    @@ -157,7 +157,7 @@ The domain of the random variable is [0, ∞].

    - + Accuracy

    @@ -171,7 +171,7 @@ using an iterative method with a lower tolerance to avoid excessive computation.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html index 100e6637f..57846e7c2 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/rayleigh.html @@ -86,7 +86,7 @@

    - + Related distributions
    @@ -102,7 +102,7 @@ distribution.

    - + Member Functions
    @@ -121,7 +121,7 @@ Returns the sigma parameter of this distribution.

    - + Non-member Accessors
    @@ -141,7 +141,7 @@ The domain of the random variable is [0, max_value].

    - + Accuracy

    @@ -151,7 +151,7 @@ using NTL RR type with 150-bit accuracy, about 50 decimal digits.

    - + Implementation

    @@ -320,7 +320,7 @@

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html index f6c961df0..17c71554c 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/students_t_dist.html @@ -97,7 +97,7 @@

    - + Member Functions
    @@ -174,7 +174,7 @@ Engineering Statistics Handbook.

    - + Non-member Accessors
    @@ -194,7 +194,7 @@ The domain of the random variable is [-∞, +∞].

    - + Examples

    @@ -202,7 +202,7 @@ are available illustrating the use of the Student's t distribution.

    - + Accuracy

    @@ -211,7 +211,7 @@ inverses, refer to accuracy data on those functions for more information.

    - + Implementation

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html index 337567942..0ed16dcf1 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/triangular_dist.html @@ -128,7 +128,7 @@

    - + Member Functions
    @@ -163,7 +163,7 @@ (default+1).

    - + Non-member Accessors
    @@ -184,7 +184,7 @@ range is lower <= x <= upper.

    - + Accuracy

    @@ -193,7 +193,7 @@ with arguments nearing the extremes of zero and unity.

    - + Implementation

    @@ -378,7 +378,7 @@ Calculate and plot probability distributions

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html index f73a13222..b4f955c6d 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/uniform_dist.html @@ -117,7 +117,7 @@

      - + Member Functions
      @@ -144,7 +144,7 @@ Returns the upper parameter of this distribution.

      - + Non-member Accessors
      @@ -165,7 +165,7 @@ range is only lower <= x <= upper.

      - + Accuracy

      @@ -173,7 +173,7 @@ and so should have errors within an epsilon or two.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html index d7f1ae4a7..6cbce9f7e 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html @@ -100,7 +100,7 @@

      - + Related distributions
      @@ -114,7 +114,7 @@ Distributions, Theory and Applications Samuel Kotz & Saralees Nadarajah.

      - + Member Functions
      @@ -140,7 +140,7 @@ Returns the scale parameter of this distribution.

      - + Non-member Accessors
      @@ -160,7 +160,7 @@ The domain of the random variable is [0, ∞].

      - + Accuracy

      @@ -170,7 +170,7 @@ as such should have very low error rates.

      - + Implementation

      @@ -337,7 +337,7 @@

    - + References
      diff --git a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html index 56198d16f..6c13bd090 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/nmp.html @@ -37,7 +37,7 @@ the function you want if you already know its name.

      - + Function Index
      @@ -93,7 +93,7 @@
    - + Conceptual Index
    @@ -174,7 +174,7 @@
- + Cumulative Distribution Function
@@ -198,7 +198,7 @@ cdf

- + Complement of the Cumulative Distribution Function
@@ -239,7 +239,7 @@ complement is useful and when it should be used.

- + Hazard Function
template <class RealType, class Policy>
@@ -267,7 +267,7 @@
           

- + Cumulative Hazard Function
@@ -295,7 +295,7 @@

- + mean
template<class RealType, class Policy>
@@ -310,7 +310,7 @@
           distribution).
         

- + median
template<class RealType, class Policy>
@@ -320,7 +320,7 @@
           Returns the median of the distribution dist.
         

- + mode
template<class RealType, Policy>
@@ -334,7 +334,7 @@
           if the distribution does not have a defined mode.
         

- + Probability Density Function
@@ -363,7 +363,7 @@ pdf

- + range
template<class RealType, class Policy>
@@ -373,7 +373,7 @@
           Returns the valid range of the random variable over distribution dist.
         

- + Quantile
template <class RealType, class Policy>
@@ -402,7 +402,7 @@
           quantile
         

- + Quantile from the complement of the probability.
@@ -448,7 +448,7 @@ survival_inv

- + Standard Deviation
@@ -463,7 +463,7 @@ if the distribution does not have a defined standard deviation.

- + support
template<class RealType, class Policy>
@@ -480,7 +480,7 @@
           where the pdf is zero, and the cdf zero or unity.
         

- + Variance
template <class RealType, class Policy>
@@ -494,7 +494,7 @@
           if the distribution does not have a defined variance.
         

- + Skewness
template <class RealType, class Policy>
@@ -508,7 +508,7 @@
           if the distribution does not have a defined skewness.
         

- + Kurtosis
template <class RealType, class Policy>
@@ -550,7 +550,7 @@
           'Proper' kurtosis can have a value from zero to + infinity.
         

- + Kurtosis excess
@@ -585,7 +585,7 @@ The kurtosis excess of a normal distribution is zero.

- + P and Q

@@ -595,7 +595,7 @@ returned by these functions.

- + Percent Point Function
@@ -604,7 +604,7 @@ the Quantile.

- + Inverse CDF Function.
@@ -613,7 +613,7 @@ Quantile.

- + Inverse Survival Function.
@@ -621,7 +621,7 @@ The inverse of the survival function, is the same as computing the quantile from the complement of the probability.

- + Probability Mass Function
@@ -635,7 +635,7 @@ applies to continuous distributions.

- + Lower Critical Value.
@@ -645,7 +645,7 @@ the Quantile.

- + Upper Critical Value.
@@ -656,7 +656,7 @@ complement of the probability.

- + Survival Function
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/future.html b/doc/sf_and_dist/html/math_toolkit/dist/future.html index d757fab28..1b2ce85dd 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/future.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/future.html @@ -27,7 +27,7 @@ Extras/Future Directions
- + Adding Additional Location and Scale Parameters
@@ -55,7 +55,7 @@ functions.

- + An "any_distribution" class
@@ -84,7 +84,7 @@ use case: this needs more investigation.

- + Higher Level Hypothesis Tests
@@ -104,7 +104,7 @@ expected_mean.

- + Integration With Statistical Accumulators
diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html index 698cc00ba..1fbafa28a 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/overview.html @@ -27,7 +27,7 @@ Overview
- + Headers and Namespaces
@@ -44,7 +44,7 @@ or <boost/math/distributions.hpp>

- + Distributions are Objects
@@ -131,7 +131,7 @@ and quantiles etc for these distributions.

- + Generic operations common to all distributions are non-member functions
@@ -326,7 +326,7 @@

- + Complements are supported too
@@ -461,7 +461,7 @@
- + Parameters can be calculated
@@ -492,7 +492,7 @@ sample size.

- + Summary
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html index 1152d142f..4f183efea 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html @@ -497,7 +497,7 @@ Probability of getting between 4 and 4 answers right by guessing is 0.2252

    - + Using Binomial distribution moments
    @@ -534,7 +534,7 @@ Skewness is 0.2887

    - + Quantiles

    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html index 73e9828c6..b523fec08 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/cs_eg/chi_sq_intervals.html @@ -139,7 +139,7 @@ _____________________________________________ is between 0.00551 and 0.00729.

    - + Confidence intervals as a function of the number of observations
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html index e27bbef91..a4901bf39 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/dist_construct_eg.html @@ -332,7 +332,7 @@ error C3861: 'mybetad0': identifier not found

    - + Default arguments to distribution constructors.
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html index 95a884007..bcf3ee936 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html @@ -175,7 +175,7 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999

    - + Controlling Error Handling from find_location
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html index f18fb754f..8eddfa34a 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html @@ -62,7 +62,7 @@

    - + Using find_location and find_scale to meet dispensing and measurement specifications
    @@ -246,7 +246,7 @@

    - + Using Cauchy-Lorentz instead of normal distribution
    @@ -397,7 +397,7 @@

    - + Changing the scale or standard deviation
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html index c6c0aef4b..66d46c5fe 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/find_eg/find_scale_eg.html @@ -179,7 +179,7 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999

    - + Controlling how Errors from find_scale are handled
    diff --git a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html index 8054208ac..68749a10d 100644 --- a/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html +++ b/doc/sf_and_dist/html/math_toolkit/dist/stat_tut/weg/normal_example/normal_misc.html @@ -32,7 +32,7 @@ illustrates their use.

    - + Traditional Tables
    @@ -278,7 +278,7 @@

    - + Standard deviations either side of the Mean
    @@ -346,12 +346,12 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Some simple examples
    - + Life of light bulbs
    @@ -435,7 +435,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + How many onions?
    @@ -494,7 +494,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Packing beef
    @@ -703,7 +703,7 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740

    - + Length of bolts
    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html b/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html index 4bc8ad5b1..8f4fab88f 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/compilers_overview.html @@ -37,7 +37,7 @@

    -

    Table 9. Supported/Tested Compilers

    +

    Table 9. Supported/Tested Compilers

    @@ -540,7 +540,7 @@


    -

    Table 10. Unsupported Compilers

    +

    Table 10. Unsupported Compilers

    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html index d790e9864..e805c33e9 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/directories.html @@ -28,7 +28,7 @@ File Structure
    - + boost/math
    @@ -73,7 +73,7 @@
    - + boost/libs
    diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html index ff58b9589..af715a84b 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/error_handling.html @@ -27,7 +27,7 @@ Error Handling
    - + Quick Reference
    @@ -134,7 +134,7 @@ the default action for each error shown in bold:

    -

    Table 1. Possible Actions for Domain Errors

    +

    Table 1. Possible Actions for Domain Errors

    @@ -209,7 +209,7 @@

    -

    Table 2. Possible Actions for Pole Errors

    +

    Table 2. Possible Actions for Pole Errors

    @@ -284,7 +284,7 @@

    -

    Table 3. Possible Actions for Overflow Errors

    +

    Table 3. Possible Actions for Overflow Errors

    @@ -359,7 +359,7 @@

    -

    Table 4. Possible Actions for Underflow Errors

    +

    Table 4. Possible Actions for Underflow Errors

    @@ -434,7 +434,7 @@

    -

    Table 5. Possible Actions for Denorm Errors

    +

    Table 5. Possible Actions for Denorm Errors

    @@ -509,7 +509,7 @@

    -

    Table 6. Possible Actions for Rounding Errors

    +

    Table 6. Possible Actions for Rounding Errors

    @@ -584,7 +584,7 @@

    -

    Table 7. Possible Actions for Internal Evaluation +

    Table 7. Possible Actions for Internal Evaluation Errors

    @@ -661,7 +661,7 @@

    -

    Table 8. Possible Actions for Indeterminate Result +

    Table 8. Possible Actions for Indeterminate Result Errors

    @@ -739,7 +739,7 @@

    - + Rationale

    @@ -758,7 +758,7 @@

- + Finding More Information
@@ -780,7 +780,7 @@ The various kind of errors are described in more detail below.

- + Domain Errors
@@ -873,7 +873,7 @@ for more details.

- + Evaluation at a pole
@@ -912,7 +912,7 @@ for more details.

- + Numeric Overflow
@@ -937,7 +937,7 @@ doesn't support infinities, the maximum value for the type is returned.

- + Numeric Underflow
@@ -960,7 +960,7 @@ an std::underflow_error C++ exception.

- + Denormalisation Errors
@@ -983,7 +983,7 @@ throws an std::underflow_error C++ exception.

- + Evaluation Errors
@@ -1020,7 +1020,7 @@ for more details.

- + Indeterminate Result Errors
@@ -1047,7 +1047,7 @@ the result of 00 is 1, even though the result is actually mathematically indeterminate.

- + Rounding Errors
@@ -1086,7 +1086,7 @@ for more details.

- + Errors from typecasts
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html index 2b9310cb4..22475666b 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/history1.html @@ -27,11 +27,23 @@ History and What's New +

+ +

+
+ + Boost-1.37.0 +
+

+

+
  • + Improved accuracy and testing of the inverse hypergeometric functions. +

- + Boost-1.36.0

@@ -69,7 +81,7 @@

- + Boost-1.35.0: Post Review First Official Release
@@ -106,7 +118,7 @@

- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -125,7 +137,7 @@

- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -158,7 +170,7 @@

- + Milestone 2: Released September 10th 2006
@@ -199,7 +211,7 @@

- + Milestone 1: Released March 31st 2006
@@ -234,7 +246,7 @@

- Sandbox and trunk last synchonised at revision: 47084. + Sandbox and trunk last synchonised at revision: 448300.

diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html index cc3f0245f..8ca01bc2f 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/intro.html @@ -30,7 +30,7 @@ This library is divided into three interconnected parts:

- + Statistical Distributions
@@ -56,7 +56,7 @@ tests.

- + Mathematical Special Functions
@@ -83,7 +83,7 @@ double.

- + Implementation Toolkit
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html index cd63ed10f..6f8bbeb62 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/navigation.html @@ -31,7 +31,7 @@ as handy shortcuts for common navigation tasks.

- + Shortcuts
diff --git a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html index 9893f9e17..e29377d62 100644 --- a/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html @@ -284,7 +284,7 @@

- + Usage Recomendations
@@ -336,7 +336,7 @@

- + Supported C99 Functions
@@ -440,7 +440,7 @@

- + Supported TR1 Functions
@@ -579,7 +579,7 @@

- + Currently Unsupported C99 Functions
@@ -650,7 +650,7 @@

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html b/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html index 3d15bddb5..c9e6de0ec 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/comp_compilers.html @@ -35,7 +35,7 @@ in this respect).

-

Table 48. Performance Comparison of Various Windows Compilers

+

Table 48. Performance Comparison of Various Windows Compilers

diff --git a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html index 1d6472a11..02d4930e8 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/comparisons.html @@ -46,7 +46,7 @@

- + Comparison to GSL-1.9 and Cephes
@@ -213,7 +213,7 @@

+INF - [1] + [1]

@@ -284,13 +284,13 @@ -

[1] +

[1] Cephes gets stuck in an infinite loop while trying to execute our test cases.

- + Comparison to the R Statistical Library on Windows
@@ -301,7 +301,7 @@ appears not to be buildable with Visual C++).

-

Table 51. A Comparison to the R Statistical Library on Windows +

Table 51. A Comparison to the R Statistical Library on Windows XP

@@ -374,7 +374,7 @@

74.66 - [1] + [1]

(4.905e-004s)

@@ -792,7 +792,7 @@

53.59 - [2] + [2]

(5.145e-004s)

@@ -1010,12 +1010,12 @@
-

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases @@ -1024,7 +1024,7 @@


- + Comparison to the R Statistical Library on Linux
@@ -1033,7 +1033,7 @@ Linux machine, with the test program and R-2.5.0 compiled with GNU G++ 4.2.0.

-

Table 52. A Comparison to the R Statistical Library on Linux

+

Table 52. A Comparison to the R Statistical Library on Linux

@@ -1104,7 +1104,7 @@

44.06 - [1] + [1]

(5.701e-004s)

@@ -1522,7 +1522,7 @@

30.07 - [2] + [2]

(5.490e-004s)

@@ -1740,12 +1740,12 @@
-

[1] +

[1] There are a small number of our test cases where the R library fails to converge on a result: these tend to dominate the performance result.

-

[2] +

[2] The R library appears to use a linear-search strategy, that can perform very badly in a small number of pathological cases, but may or may not be more efficient in "typical" cases diff --git a/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html b/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html index aa9f4bc65..b65028392 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/getting_best.html @@ -33,7 +33,7 @@ penalty for using the library in debug mode can be quite large.

-

Table 47. Performance Comparison of Release and Debug Settings

+

Table 47. Performance Comparison of Release and Debug Settings

diff --git a/doc/sf_and_dist/html/math_toolkit/perf/tuning.html b/doc/sf_and_dist/html/math_toolkit/perf/tuning.html index b73107b98..ebf8bfc12 100644 --- a/doc/sf_and_dist/html/math_toolkit/perf/tuning.html +++ b/doc/sf_and_dist/html/math_toolkit/perf/tuning.html @@ -234,7 +234,7 @@ highly vectorisable processors in the future.

-

Table 49. A Comparison of Polynomial Evaluation Methods

+

Table 49. A Comparison of Polynomial Evaluation Methods

@@ -634,7 +634,7 @@ tutorial.

-

Table 50. Performance Comparison with and Without Internal +

Table 50. Performance Comparison with and Without Internal Promotion to long double

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html index 5003c9c85..992f6199c 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/discrete_quant_ref.html @@ -55,7 +55,7 @@ can take have the following meanings:

- + real

@@ -93,7 +93,7 @@ = 68.1584.

- + integer_round_outwards

@@ -151,7 +151,7 @@ in each tail.

- + integer_round_inwards

@@ -214,7 +214,7 @@ in each tail.

- + integer_round_down

@@ -222,7 +222,7 @@ or a lower quantile.

- + integer_round_up

@@ -230,7 +230,7 @@ a lower quantile.

- + integer_round_nearest

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html index 54ccc639e..0fb00a411 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/error_handling_policies.html @@ -39,7 +39,7 @@

- + Available Actions When an Error is Raised
@@ -62,7 +62,7 @@ The various enumerated values have the following meanings:

- + throw_on_error

@@ -174,7 +174,7 @@

- + errno_on_error

@@ -287,7 +287,7 @@

- + ignore_error

@@ -400,7 +400,7 @@

- + user_error

@@ -449,7 +449,7 @@ here.

- + Kinds of Error Raised
@@ -688,7 +688,7 @@
- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html index c13b6d4f1..0be5553bd 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/internal_promotion.html @@ -84,7 +84,7 @@

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html index a295f655b..68810854c 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_ref/policy_defaults.html @@ -61,7 +61,7 @@ then you can do so by defining various macros in boost/math/tools/user.hpp.

- + BOOST_MATH_DOMAIN_ERROR_POLICY

@@ -71,7 +71,7 @@ ignore_error or user_error.

- + BOOST_MATH_POLE_ERROR_POLICY

@@ -81,7 +81,7 @@ ignore_error or user_error.

- + BOOST_MATH_OVERFLOW_ERROR_POLICY

@@ -91,7 +91,7 @@ ignore_error or user_error.

- + BOOST_MATH_ROUNDING_ERROR_POLICY

@@ -101,7 +101,7 @@ ignore_error or user_error.

- + BOOST_MATH_EVALUATION_ERROR_POLICY

@@ -111,7 +111,7 @@ ignore_error or user_error.

- + BOOST_MATH_UNDERFLOW_ERROR_POLICY

@@ -121,7 +121,7 @@ ignore_error or user_error.

- + BOOST_MATH_DENORM_ERROR_POLICY

@@ -131,7 +131,7 @@ ignore_error or user_error.

- + BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY

@@ -142,7 +142,7 @@ ignore_error or user_error.

- + BOOST_MATH_DIGITS10_POLICY

@@ -153,7 +153,7 @@ recommended that you change this from the default.

- + BOOST_MATH_PROMOTE_FLOAT_POLICY

@@ -165,7 +165,7 @@ off.

- + BOOST_MATH_PROMOTE_DOUBLE_POLICY

@@ -177,7 +177,7 @@ off.

- + BOOST_MATH_DISCRETE_QUANTILE_POLICY

@@ -188,7 +188,7 @@ Defaults to integer_round_outwards.

- + BOOST_MATH_ASSERT_UNDEFINED_POLICY

@@ -201,7 +201,7 @@ whether or not a particular property is well defined.

- + BOOST_MATH_MAX_SERIES_ITERATION_POLICY

@@ -210,7 +210,7 @@ Defaults to 1000000.

- + BOOST_MATH_MAX_ROOT_ITERATION_POLICY

@@ -219,7 +219,7 @@ Defaults to 200.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html index c67bbdd63..6db695ee4 100644 --- a/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html +++ b/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html @@ -177,7 +177,7 @@ base your comparisons on CDF's instead.

- + Other Rounding Policies are Available
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html index 3968e6746..83879458b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel.html @@ -28,7 +28,7 @@ of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_neumann(T1 v, T2 x, const Policy&);
 
- + Description

@@ -110,7 +110,7 @@

- + Testing

@@ -119,7 +119,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -135,7 +135,7 @@ zero error. All values are relative errors in units of epsilon.

-

Table 36. Errors Rates in cyl_bessel_j

+

Table 36. Errors Rates in cyl_bessel_j

@@ -304,7 +304,7 @@

-

Table 37. Errors Rates in cyl_neumann

+

Table 37. Errors Rates in cyl_neumann

@@ -494,7 +494,7 @@ were found.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html index 5d684ce8a..ea035f480 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html @@ -28,7 +28,7 @@ Overview

- + Ordinary Bessel Functions
@@ -103,7 +103,7 @@ and is known as either a Bessel

- + Modified Bessel Functions
@@ -167,7 +167,7 @@ respectively:

- + Spherical Bessel Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html index f5b28946f..f523d959d 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html @@ -28,7 +28,7 @@ Functions of the First and Second Kinds
- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type cyl_bessel_k(T1 v, T2 x, const Policy&);
 
- + Description

@@ -109,7 +109,7 @@

- + Testing

@@ -118,7 +118,7 @@ (with all the special case handling removed).

- + Accuracy

@@ -129,7 +129,7 @@ zero error. All values are relative errors in units of epsilon.

-

Table 38. Errors Rates in cyl_bessel_i

+

Table 38. Errors Rates in cyl_bessel_i

@@ -226,7 +226,7 @@

-

Table 39. Errors Rates in cyl_bessel_k

+

Table 39. Errors Rates in cyl_bessel_k

@@ -326,7 +326,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html index 80eecd7fc..b5e91fb85 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html +++ b/doc/sf_and_dist/html/math_toolkit/special/bessel/sph_bessel.html @@ -28,7 +28,7 @@ Bessel Functions of the First and Second Kinds

- + Synopsis
template <class T1, class T2>
@@ -44,7 +44,7 @@
 calculated-result-type sph_neumann(unsigned v, T2 x, const Policy&);
 
- + Description

@@ -97,7 +97,7 @@ for small x:

- + Testing

@@ -106,7 +106,7 @@ for small x: implementation (with all the special case handling removed).

- + Accuracy

@@ -116,7 +116,7 @@ for small x: refer to these functions for accuracy data.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html index 0ae4c0b37..63d17bea2 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_1.html @@ -28,7 +28,7 @@ of the First Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -123,7 +123,7 @@

- + Accuracy

@@ -134,7 +134,7 @@ All values are relative errors in units of epsilon.

-

Table 41. Errors Rates in the Elliptic Integrals of the +

Table 41. Errors Rates in the Elliptic Integrals of the First Kind

@@ -237,7 +237,7 @@

- + Testing

@@ -247,7 +247,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html index ca1e4dd12..f5d0c6c37 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_2.html @@ -28,7 +28,7 @@ of the Second Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -123,7 +123,7 @@

- + Accuracy

@@ -134,7 +134,7 @@ All values are relative errors in units of epsilon.

-

Table 42. Errors Rates in the Elliptic Integrals of the +

Table 42. Errors Rates in the Elliptic Integrals of the Second Kind

@@ -237,7 +237,7 @@

- + Testing

@@ -247,7 +247,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html index 9ac119935..631acc68d 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_3.html @@ -28,7 +28,7 @@ of the Third Kind - Legendre Form

- + Synopsis

@@ -55,7 +55,7 @@ }} // namespaces

- + Description

@@ -135,7 +135,7 @@ [opitonal_policy]

- + Accuracy

@@ -146,7 +146,7 @@ All values are relative errors in units of epsilon.

-

Table 43. Errors Rates in the Elliptic Integrals of the +

Table 43. Errors Rates in the Elliptic Integrals of the Third Kind

@@ -249,7 +249,7 @@

- + Testing

@@ -259,7 +259,7 @@ this implementation.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html index c845e247c..132b57b58 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_carlson.html @@ -28,7 +28,7 @@ Integrals - Carlson Form

- + Synopsis

@@ -100,7 +100,7 @@ }} // namespaces

- + Description

@@ -236,7 +236,7 @@

- + Testing

@@ -265,7 +265,7 @@ to verify their correctness: see the above Carlson paper for details.

- + Accuracy

@@ -276,7 +276,7 @@ All values are relative errors in units of epsilon.

-

Table 40. Errors Rates in the Carlson Elliptic Integrals

+

Table 40. Errors Rates in the Carlson Elliptic Integrals

@@ -419,7 +419,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html index 98bafabf8..d0f4c308b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html +++ b/doc/sf_and_dist/html/math_toolkit/special/ellint/ellint_intro.html @@ -61,14 +61,14 @@ Elliptic integral.

- + Notation

All variables are real numbers unless otherwise noted.

- + Definition

@@ -257,7 +257,7 @@

- + Duplication Theorem
@@ -269,7 +269,7 @@

- + Carlson's Formulas
@@ -287,7 +287,7 @@

- + Numerical Algorithms
@@ -301,7 +301,7 @@ integrals with satisfactory precisions.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html index 41bce3337..782dcf44c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_i.html @@ -28,7 +28,7 @@ Integral Ei

- + Synopsis

@@ -63,7 +63,7 @@

- + Description
template <class T>
@@ -83,7 +83,7 @@
           
         

- + Accuracy

@@ -95,7 +95,7 @@ error.

-

Table 46. Errors In the Function expint(z)

+

Table 46. Errors In the Function expint(z)

@@ -207,7 +207,7 @@ slightly over the range [4,6].

- + Testing

@@ -222,7 +222,7 @@ check.

- + Implementation

@@ -253,7 +253,7 @@ [-1,1]. Note that while the rational approximation over [0,6] converges rapidly to the minimax solution it is rather ill-conditioned in practice. Cody and Thacher - [1] + [1] experienced the same issue and converted the polynomials into Chebeshev form to ensure stable computation. By experiment we found that the polynomials are just as stable in polynomial as Chebyshev form, provided @@ -284,7 +284,7 @@



-

[1] +

[1] W. J. Cody and H. C. Thacher, Jr., Rational Chebyshev approximations for the exponential integral E1(x), Math. Comp. 22 (1968), 641-649, and W. J. Cody and H. C. Thacher, Jr., Chebyshev approximations for diff --git a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html index 079ba3a01..2873a5b1e 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html +++ b/doc/sf_and_dist/html/math_toolkit/special/expint/expint_n.html @@ -28,7 +28,7 @@ Integral En

- + Synopsis

@@ -63,7 +63,7 @@

- + Description
template <class T>
@@ -83,7 +83,7 @@
           
         

- + Accuracy

@@ -94,7 +94,7 @@ the one shown will have effectively zero error.

-

Table 45. Errors In the Function expint(n, z)

+

Table 45. Errors In the Function expint(n, z)

@@ -225,7 +225,7 @@

- + Testing

@@ -240,7 +240,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html index c4b422ae5..3cee318a8 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/c99.html @@ -27,7 +27,7 @@ C99 C Functions

- + Supported C99 Functions
@@ -138,7 +138,7 @@ acosh(2); // integer argument is treated as a double, returns double.
- + Quick Reference
diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html index dd3b75d63..3f7a9700c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1.html @@ -288,7 +288,7 @@

- + Usage Recomendations
@@ -341,7 +341,7 @@

- + Supported C99 Functions
@@ -445,7 +445,7 @@

- + Supported TR1 Functions
@@ -584,7 +584,7 @@

- + Currently Unsupported C99 Functions
@@ -655,7 +655,7 @@

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html index cdff14892..a4a6130d2 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html +++ b/doc/sf_and_dist/html/math_toolkit/special/extern_c/tr1_ref.html @@ -28,7 +28,7 @@ Quick Reference
- + Supported TR1 Functions
@@ -163,7 +163,7 @@ expint(2); // integer argument is treated as a double, returns double.
- + Quick Reference
@@ -495,7 +495,7 @@ for the full template (header only) version of this function.

- + Currently Unsupported TR1 Functions
diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html index 758805344..9d9488acf 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_binomial.html @@ -65,7 +65,7 @@ if the result is too large to represent in type T.

- + Accuracy

@@ -74,14 +74,14 @@ function for larger arguments.

- + Testing

The spot tests for the binomial coefficients use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html index 3b99b7551..57436a45b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_double_factorial.html @@ -64,7 +64,7 @@ of i! is possible.

- + Accuracy

@@ -72,14 +72,14 @@ so error rates should be no more than a couple of epsilon higher.

- + Testing

The spot tests for the double factorial use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html index 45dbe0eaf..80f6838a5 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_factorial.html @@ -27,7 +27,7 @@ Factorial

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
template <class T>
@@ -112,7 +112,7 @@
           the size of further tables that depend on the factorials.
         

- + Accuracy

@@ -121,7 +121,7 @@ will be the same as for tgamma.

- + Testing

@@ -130,7 +130,7 @@ function handle those cases already.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html index 7f3fc5014..2279f243d 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_falling_factorial.html @@ -76,7 +76,7 @@ the type of the result is T.

- + Accuracy

@@ -84,14 +84,14 @@ function.

- + Testing

The spot tests for the falling factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html index d960f2790..9107b6944 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html +++ b/doc/sf_and_dist/html/math_toolkit/special/factorials/sf_rising_factorial.html @@ -80,7 +80,7 @@ the type of the result is T.

- + Accuracy

@@ -88,14 +88,14 @@ function.

- + Testing

The spot tests for the rising factorials use data generated by functions.wolfram.com.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/fpclass.html b/doc/sf_and_dist/html/math_toolkit/special/fpclass.html index 8a3d79ee4..b0a0805b9 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/fpclass.html +++ b/doc/sf_and_dist/html/math_toolkit/special/fpclass.html @@ -28,7 +28,7 @@ Infinities and NaN's

- + Synopsis
#define FP_ZERO        /* implementation specific value */
@@ -58,7 +58,7 @@
         to use these functions.
       

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html index 01f805ae6..3ee351c41 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/acosh.html @@ -42,9 +42,7 @@

Computes the reciprocal of (the restriction to the range of [0;+∞[) the hyperbolic - cosine function, at x. Values returned are positive. Generalised - Taylor series are used near 1 and Laurent series are used near the infinity - to ensure accuracy. + cosine function, at x. Values returned are positive.

If x is in the range ]-∞;+1[ then returns the result @@ -68,6 +66,59 @@

+
+ + Accuracy +
+

+ Generally accuracy is to within 1 or 2 epsilon across all supported platforms. +

+
+ + Testing +
+

+ This function is tested using a combination of random test values designed + to give full function coverage computed at high precision using the "naive" + formula: +

+

+ +

+

+ along with a selection of sanity check values computed using functions.wolfram.com + to at least 50 decimal digits. +

+
+ + Implementation +
+

+ For sufficiently large x, we can use the approximation: +

+

+ +

+

+ For x sufficiently close to 1 we can use the approximation: +

+

+ +

+

+ Otherwise for x close to 1 we can use the following rearrangement of the + primary definition to preserve accuracy: +

+

+ +

+

+ Otherwise the primary + definition is used: +

+

+ +

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html index fc782e3b6..0014c2b76 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/asinh.html @@ -41,8 +41,7 @@

Computes the reciprocal of the - hyperbolic sine function. Taylor series are used at the origin and - Laurent series are used near the infinity to ensure accuracy. + hyperbolic sine function.

The return type of this function is computed using the result @@ -62,6 +61,59 @@

+
+ + Accuracy +
+

+ Generally accuracy is to within 1 or 2 epsilon across all supported platforms. +

+
+ + Testing +
+

+ This function is tested using a combination of random test values designed + to give full function coverage computed at high precision using the "naive" + formula: +

+

+ +

+

+ along with a selection of sanity check values computed using functions.wolfram.com + to at least 50 decimal digits. +

+
+ + Implementation +
+

+ For sufficiently large x we can use the approximation: +

+

+ +

+

+ While for very small x we can use the approximation: +

+

+ +

+

+ For 0.5 > x > ε the following rearrangement of the primary definition + is used: +

+

+ +

+

+ Otherwise evalution is via the primary + definition: +

+

+ +

diff --git a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html index 7008fbd6f..792695f01 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html +++ b/doc/sf_and_dist/html/math_toolkit/special/inv_hyper/atanh.html @@ -41,8 +41,7 @@

Computes the reciprocal of the - hyperbolic tangent function, at x. Taylor series are used at the - origin to ensure accuracy. + hyperbolic tangent function, at x.

@@ -76,6 +75,55 @@ denoting

+
+ + Accuracy +
+

+ Generally accuracy is to within 1 or 2 epsilon across all supported platforms. +

+
+ + Testing +
+

+ This function is tested using a combination of random test values designed + to give full function coverage computed at high precision using the "naive" + formula: +

+

+ +

+

+ along with a selection of sanity check values computed using functions.wolfram.com + to at least 50 decimal digits. +

+
+ + Implementation +
+

+ For sufficiently small x we can use the approximation: +

+

+ +

+

+ Otherwise the primary + definition: +

+

+ +

+

+ or it's equivalent form: +

+

+ +

+

+ is used. +

diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html index 89202b20b..5ec5ba0c1 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_advance.html @@ -32,7 +32,7 @@ number of ULP.

- + Synopsis

@@ -50,7 +50,7 @@ }} // namespaces

- + Description - float_advance
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html index d7a4eb6ef..50e59b5bd 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_distance.html @@ -34,7 +34,7 @@ different.

- + Synopsis

@@ -52,7 +52,7 @@ }} // namespaces

- + Description - float_distance
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html index c5e6ca2d0..eb43fbecc 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_next.html @@ -28,7 +28,7 @@ the Next Greater Representable Value (float_next)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_next
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html index 649ffc820..cbc48c23a 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/float_prior.html @@ -28,7 +28,7 @@ the Next Smaller Representable Value (float_prior)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - float_prior
diff --git a/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html b/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html index 09f5535f7..91ab28b6b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html +++ b/doc/sf_and_dist/html/math_toolkit/special/next_float/nextafter.html @@ -28,7 +28,7 @@ the Next Representable Value in a Specific Direction (nextafter)
- + Synopsis

@@ -46,7 +46,7 @@ }} // namespaces

- + Description - nextafter
@@ -76,7 +76,7 @@ returns an overflow_error.

- + Examples - nextafter
diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html index 58fa46399..6d30b2404 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/cbrt.html @@ -71,7 +71,7 @@

- + Accuracy

@@ -79,7 +79,7 @@ should have approximately 2 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html index 35b0968a7..8fdd60551 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/ct_pow.html @@ -32,7 +32,7 @@ computes the compile-time integral power of a run-time base.

- + Synopsis

@@ -49,7 +49,7 @@ }}

- + Rationale and Usage
@@ -91,7 +91,7 @@ Only 3 different products were actually computed.

- + Return Type

@@ -112,7 +112,7 @@

- + Policies

@@ -126,7 +126,7 @@

- + Error Handling
@@ -231,7 +231,7 @@ double result = pow<-5>(base);
- + Acknowledgements

@@ -242,7 +242,7 @@ improving the implementation.

- + References

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html index 77b05fdca..7c382a5fd 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/expm1.html @@ -80,7 +80,7 @@

- + Accuracy

@@ -88,7 +88,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html index cc982a8a8..8d57e147d 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/hypot.html @@ -58,7 +58,7 @@ in such a representable.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html index d54a2c962..39dd2c078 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/log1p.html @@ -93,7 +93,7 @@

- + Accuracy

@@ -101,7 +101,7 @@ should have approximately 1 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html index 74ee7d8d9..d1cb91675 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/powm1.html @@ -74,14 +74,14 @@

- + Accuracy

Should have approximately 2-3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html index 2e2965f6a..69041aef0 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html +++ b/doc/sf_and_dist/html/math_toolkit/special/powers/sqrt1pm1.html @@ -76,7 +76,7 @@

- + Accuracy

@@ -84,7 +84,7 @@ should have approximately 3 epsilon accuracy.

- + Testing

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html index da6ffe6df..bfce663e1 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_derivative.html @@ -28,7 +28,7 @@ of the Incomplete Beta Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -76,14 +76,14 @@

- + Accuracy

Almost identical to the incomplete beta function ibeta.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html index 6ec5db24a..b78d503ae 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/beta_function.html @@ -27,7 +27,7 @@ Beta

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -86,7 +86,7 @@ type calculation rules when T1 and T2 are different types.

- + Accuracy

@@ -98,7 +98,7 @@ zero error.

-

Table 22. Peak Errors In the Beta Function

+

Table 22. Peak Errors In the Beta Function

@@ -244,7 +244,7 @@ very small.

- + Testing

@@ -253,7 +253,7 @@ at 1000-bit precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html index d0bbf8a0f..40b405946 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html @@ -28,7 +28,7 @@ Beta Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -153,7 +153,7 @@

- + Accuracy

@@ -172,7 +172,7 @@ with the wider exponent range of the long double types.

-

Table 23. Errors In the Function ibeta(a,b,x)

+

Table 23. Errors In the Function ibeta(a,b,x)

@@ -359,7 +359,7 @@

-

Table 24. Errors In the Function ibetac(a,b,x)

+

Table 24. Errors In the Function ibetac(a,b,x)

@@ -526,7 +526,7 @@

-

Table 25. Errors In the Function beta(a, b, x)

+

Table 25. Errors In the Function beta(a, b, x)

@@ -693,7 +693,7 @@

-

Table 26. Errors In the Function betac(a,b,x)

+

Table 26. Errors In the Function betac(a,b,x)

@@ -860,7 +860,7 @@

- + Testing

@@ -878,7 +878,7 @@ have test data that is fully independent of the code.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html index d479571b0..ae8795511 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html @@ -87,7 +87,7 @@ }} // namespaces

- + Description

@@ -323,7 +323,7 @@

- + Accuracy

@@ -335,7 +335,7 @@ or 1.

- + Testing

@@ -359,7 +359,7 @@

- + Implementation of ibeta_inv and ibetac_inv
@@ -527,7 +527,7 @@ rapidly converges on the true value.

- + Implementation of inverses on the a and b parameters
diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html index b7f090dad..7da1293ad 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_function.html @@ -28,7 +28,7 @@ Functions
- + Synopsis

@@ -69,7 +69,7 @@

- + Description
template <class T>
@@ -106,7 +106,7 @@
           
         

- + Accuracy

@@ -119,7 +119,7 @@ the one shown will have effectively zero error.

-

Table 27. Errors In the Function erf(z)

+

Table 27. Errors In the Function erf(z)

@@ -325,7 +325,7 @@

-

Table 28. Errors In the Function erfc(z)

+

Table 28. Errors In the Function erfc(z)

@@ -531,7 +531,7 @@

- + Testing

@@ -546,7 +546,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html index 21745d2ff..94c705f37 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_erf/error_inv.html @@ -28,7 +28,7 @@ Inverses

- + Synopsis

@@ -69,7 +69,7 @@

- + Description
template <class T>
@@ -103,7 +103,7 @@
           
         

- + Accuracy

@@ -113,7 +113,7 @@ error functions.

- + Testing

@@ -135,7 +135,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html index 39e3c4b13..5df8f20de 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html @@ -27,7 +27,7 @@ Digamma

- + Synopsis

@@ -48,7 +48,7 @@ }} // namespaces

- + Description

@@ -82,7 +82,7 @@ T otherwise.

- + Accuracy

@@ -270,7 +270,7 @@ absolute error will remain very low.

- + Testing

@@ -280,7 +280,7 @@ see below).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html index 2a7b7f453..e2141808e 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_derivatives.html @@ -28,7 +28,7 @@ of the Incomplete Gamma Function

- + Synopsis

@@ -49,7 +49,7 @@ }} // namespaces

- + Description

@@ -80,7 +80,7 @@ otherwise the return type is simply T1.

- + Accuracy

@@ -88,7 +88,7 @@ refer to the documentation for that function for more information.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html index 3a1da2766..5a6d475b8 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/gamma_ratios.html @@ -51,7 +51,7 @@ }} // namespaces

- + Description
template <class T1, class T2> 
@@ -117,7 +117,7 @@
           
         

- + Accuracy

@@ -127,7 +127,7 @@ effectively zero error.

-

Table 16. Errors In the Function tgamma_delta_ratio(a, delta)

+

Table 16. Errors In the Function tgamma_delta_ratio(a, delta)

@@ -230,7 +230,7 @@

-

Table 17. Errors In the Function tgamma_ratio(a, +

Table 17. Errors In the Function tgamma_ratio(a, b)

@@ -329,7 +329,7 @@

- + Testing

@@ -338,7 +338,7 @@ a deliberately naive calculation of Γ(x)/Γ(y).

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html index 3a6ddb2de..f4baefaff 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html @@ -28,7 +28,7 @@ Functions

- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -160,7 +160,7 @@

- + Accuracy

@@ -185,7 +185,7 @@ All values are in units of epsilon.

-

Table 18. Errors In the Function gamma_p(a,z)

+

Table 18. Errors In the Function gamma_p(a,z)

@@ -372,7 +372,7 @@

-

Table 19. Errors In the Function gamma_q(a,z)

+

Table 19. Errors In the Function gamma_q(a,z)

@@ -558,7 +558,7 @@

-

Table 20. Errors In the Function tgamma_lower(a,z)

+

Table 20. Errors In the Function tgamma_lower(a,z)

@@ -693,7 +693,7 @@

-

Table 21. Errors In the Function tgamma(a,z)

+

Table 21. Errors In the Function tgamma(a,z)

@@ -828,7 +828,7 @@

- + Testing

@@ -844,7 +844,7 @@ fraction (see below) is unstable for small a and z.

- + Implementation

@@ -1013,7 +1013,7 @@ by Temme (see references below).

- + References
    diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html index 5aa48d5ae..24911bd2f 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html @@ -28,7 +28,7 @@ Gamma Function Inverses
- + Synopsis

@@ -67,7 +67,7 @@ }} // namespaces

- + Description

@@ -173,7 +173,7 @@ 0.

- + Accuracy

@@ -187,7 +187,7 @@ functions.

- + Testing

@@ -210,7 +210,7 @@

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html index ce56f1a00..70fbb6764 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html @@ -27,7 +27,7 @@ Log Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description

@@ -98,7 +98,7 @@ T otherwise.

- + Accuracy

@@ -349,7 +349,7 @@

- + Testing

@@ -360,7 +360,7 @@ Random tests in key problem areas are also used.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html index b1d8448e5..206b0a22c 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/tgamma.html @@ -27,7 +27,7 @@ Gamma

- + Synopsis

@@ -54,7 +54,7 @@ }} // namespaces

- + Description
template <class T>
@@ -129,7 +129,7 @@
 

- + Accuracy

@@ -384,7 +384,7 @@

- + Testing

@@ -399,7 +399,7 @@ a lanczos approximation accurate to around 100 decimal digits.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html index 214cc78bc..6e8a31852 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html @@ -27,7 +27,7 @@ Hermite Polynomials

- + Synopsis

@@ -51,7 +51,7 @@ }} // namespaces

- + Description

@@ -136,7 +136,7 @@

- + Accuracy

@@ -146,7 +146,7 @@ zero error.

-

Table 34. Peak Errors In the Hermite Polynomial

+

Table 34. Peak Errors In the Hermite Polynomial

@@ -253,7 +253,7 @@ is very close to a root.

- + Testing

@@ -263,7 +263,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html index 6b77c59dc..b0346c944 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/laguerre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -62,7 +62,7 @@ }} // namespaces

- + Description

@@ -210,7 +210,7 @@

- + Accuracy

@@ -220,7 +220,7 @@ zero error.

-

Table 32. Peak Errors In the Laguerre Polynomial

+

Table 32. Peak Errors In the Laguerre Polynomial

@@ -320,7 +320,7 @@

-

Table 33. Peak Errors In the Associated Laguerre +

Table 33. Peak Errors In the Associated Laguerre Polynomial

@@ -429,7 +429,7 @@ is very close to a root.

- + Testing

@@ -439,7 +439,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html index e8cae63aa..9bc7e9c0e 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html @@ -28,7 +28,7 @@ Associated) Polynomials

- + Synopsis

@@ -84,7 +84,7 @@

- + Description
template <class T>
@@ -292,7 +292,7 @@
 
 
 
- + Accuracy

@@ -302,7 +302,7 @@ zero error.

-

Table 29. Peak Errors In the Legendre P Function

+

Table 29. Peak Errors In the Legendre P Function

@@ -431,7 +431,7 @@

-

Table 30. Peak Errors In the Associated Legendre +

Table 30. Peak Errors In the Associated Legendre P Function

@@ -533,7 +533,7 @@

-

Table 31. Peak Errors In the Legendre Q Function

+

Table 31. Peak Errors In the Legendre Q Function

@@ -675,7 +675,7 @@ given here.

- + Testing

@@ -685,7 +685,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html index 786c22763..5149cf58b 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html +++ b/doc/sf_and_dist/html/math_toolkit/special/sf_poly/sph_harm.html @@ -27,7 +27,7 @@ Spherical Harmonics

- + Synopsis

@@ -60,7 +60,7 @@ }} // namespaces

- + Description

@@ -155,7 +155,7 @@

- + Accuracy

@@ -170,7 +170,7 @@ All values are in units of epsilon.

-

Table 35. Peak Errors In the Sperical Harmonic Functions

+

Table 35. Peak Errors In the Sperical Harmonic Functions

@@ -276,7 +276,7 @@ arbitrarily large when the function is very close to a root.

- + Testing

@@ -286,7 +286,7 @@ precision.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html index af4e6e3fa..4d7faf3d9 100644 --- a/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html +++ b/doc/sf_and_dist/html/math_toolkit/special/zetas/zeta.html @@ -27,7 +27,7 @@ Riemann Zeta Function

- + Synopsis

@@ -62,7 +62,7 @@

- + Description
template <class T>
@@ -85,7 +85,7 @@
           
         

- + Accuracy

@@ -97,7 +97,7 @@ shown will have effectively zero error.

-

Table 44. Errors In the Function zeta(z)

+

Table 44. Errors In the Function zeta(z)

@@ -234,7 +234,7 @@

- + Testing

@@ -249,7 +249,7 @@ check.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/status/compilers.html b/doc/sf_and_dist/html/math_toolkit/status/compilers.html index 5eaf376d1..b09f8da22 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/compilers.html +++ b/doc/sf_and_dist/html/math_toolkit/status/compilers.html @@ -37,7 +37,7 @@

-

Table 55. Supported/Tested Compilers

+

Table 55. Supported/Tested Compilers

@@ -540,7 +540,7 @@


-

Table 56. Unsupported Compilers

+

Table 56. Unsupported Compilers

diff --git a/doc/sf_and_dist/html/math_toolkit/status/history1.html b/doc/sf_and_dist/html/math_toolkit/status/history1.html index 71ce2e9f4..f7c9bd9f3 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/history1.html +++ b/doc/sf_and_dist/html/math_toolkit/status/history1.html @@ -26,11 +26,23 @@ +

+ +

+
+ + Boost-1.37.0 +
+

+

+
  • + Improved accuracy and testing of the inverse hypergeometric functions. +

- + Boost-1.36.0

@@ -68,7 +80,7 @@

- + Boost-1.35.0: Post Review First Official Release
@@ -105,7 +117,7 @@

- + Milestone 4: Second Review Candidate (1st March 2007)
@@ -124,7 +136,7 @@

- + Milestone 3: First Review Candidate (31st Dec 2006)
@@ -157,7 +169,7 @@

- + Milestone 2: Released September 10th 2006
@@ -198,7 +210,7 @@

- + Milestone 1: Released March 31st 2006
@@ -233,7 +245,7 @@

- Sandbox and trunk last synchonised at revision: 47084. + Sandbox and trunk last synchonised at revision: 448300.

diff --git a/doc/sf_and_dist/html/math_toolkit/status/issues.html b/doc/sf_and_dist/html/math_toolkit/status/issues.html index 553f9a118..fe7c12d04 100644 --- a/doc/sf_and_dist/html/math_toolkit/status/issues.html +++ b/doc/sf_and_dist/html/math_toolkit/status/issues.html @@ -43,7 +43,7 @@ with it.

- + tgamma
  • @@ -51,7 +51,7 @@ be optimized any further? (low priority)
- + Incomplete Beta
  • @@ -59,7 +59,7 @@ (medium priority).
- + Inverse Gamma
  • @@ -67,7 +67,7 @@ is good enough (Medium Priority).
- + Polynomials
  • @@ -77,7 +77,7 @@ not (Low Priority).
- + Elliptic Integrals
    @@ -127,7 +127,7 @@
- + Inverse Hyperbolic Functions
@@ -137,7 +137,7 @@ is probably only an issue for very high precision types (Low Priority).
- + Statistical distributions
@@ -146,7 +146,7 @@ for very large degrees of freedom?
- + Feature Requests

@@ -1318,6 +1318,19 @@

+

+ Also asked for more than once: +

+
    +
  • + Add support for interpolated distributions, possibly combine with numeric + integration and differentiation. +
  • +
  • + Add support for bivariate and multivariate distributions: most especially + the normal. +
  • +
diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html index 55d49d5d2..c33eae15d 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/cf.html @@ -28,7 +28,7 @@ Evaluation
- + Synopsis

@@ -59,7 +59,7 @@ }}} // namespaces

- + Description

@@ -157,7 +157,7 @@ a continued fraction for convergence.

- + Implementation

@@ -167,7 +167,7 @@ Lentz, W.J. 1976, Applied Optics, vol. 15, pp. 668-671.

- + Examples

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html index 6ee07143c..847d98c49 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/minima.html @@ -28,7 +28,7 @@ Minima

- + synopsis

@@ -45,7 +45,7 @@ std::pair<T, T> brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter);

- + Description

@@ -88,7 +88,7 @@ the abscissa at the minima and the value of f(x) at the minima.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html index 8615a9355..6628c3c22 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/rational.html @@ -28,7 +28,7 @@ and Rational Function Evaluation

- + synopsis

@@ -79,7 +79,7 @@ V evaluate_rational(const T* num, const U* denom, V z, unsigned count);

- + Description

@@ -193,7 +193,7 @@ evaluation with compile-time array sizes may offer slightly better performance.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html index 22c08d5d0..818bbc3df 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots.html @@ -28,7 +28,7 @@ With Derivatives

- + Synopsis

@@ -61,7 +61,7 @@ }}} // namespaces

- + Description

@@ -176,7 +176,7 @@

- + Newton Raphson Method
@@ -196,7 +196,7 @@

- + Halley's Method
@@ -220,7 +220,7 @@

- + Schroeder's Method
@@ -244,7 +244,7 @@ iteration.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html index a4ca7f9c7..d2fc1ef1e 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/roots2.html @@ -28,7 +28,7 @@ Without Derivatives

- + Synopsis

@@ -141,7 +141,7 @@ }}} // namespaces

- + Description

@@ -559,7 +559,7 @@ as soon as both ends of the interval round to the same nearest integer.

- + Implementation

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html index f496dded3..31d4d3209 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/series_evaluation.html @@ -28,7 +28,7 @@ Series Evaluation

- + Synopsis

@@ -61,7 +61,7 @@ }}} // namespaces

- + Description

@@ -117,7 +117,7 @@ summation in this way.

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html index 25d884939..e95b79634 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/error_test.html @@ -28,7 +28,7 @@ Error and Testing

- + Synopsis

@@ -45,7 +45,7 @@ test_result<see-below> test(const A& a, F1 test_func, F2 expect_func);

- + Description
template <class T>
@@ -165,7 +165,7 @@
           is mainly a debugging/development aid (and a good place for a breakpoint).
         

- + Example

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html index ccf6664a6..a1af60bf2 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/polynomials.html @@ -27,7 +27,7 @@ Polynomials

- + Synopsis

@@ -103,7 +103,7 @@ }}} // namespaces

- + Description

diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html index cd75caa69..894bae20f 100644 --- a/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/test_data.html @@ -46,7 +46,7 @@

- + Synopsis
namespace boost{ namespace math{ namespace tools{
@@ -147,7 +147,7 @@
 }}} // namespaces
 
- + Description

@@ -177,7 +177,7 @@

- + Example 1: Output Data for Graph Plotting
@@ -211,7 +211,7 @@

- + Example 2: Creating Test Data
@@ -375,7 +375,7 @@ used by default as it's rather hard on the compiler when the table is large.

- + Example 3: Profiling a Continued Fraction for Convergence and Accuracy
@@ -481,7 +481,7 @@ of a and z.

- + reference

diff --git a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html index 4dd44718e..33a71ba99 100644 --- a/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html +++ b/doc/sf_and_dist/html/math_toolkit/using_udt/concepts.html @@ -42,7 +42,7 @@ behaves just like a built in floating point type.

- + Basic Arithmetic Requirements
@@ -1034,7 +1034,7 @@
- + Standard Library Support Requirements
diff --git a/doc/sf_and_dist/implementation.qbk b/doc/sf_and_dist/implementation.qbk index ac647f7f8..8fda4a313 100644 --- a/doc/sf_and_dist/implementation.qbk +++ b/doc/sf_and_dist/implementation.qbk @@ -548,17 +548,15 @@ generated HTML: this needs further investigation. [h4 Producing Graphs] -Graphs were mostly produced by a very laborious process entailing output -of columns of values from C++ programs to a .csv file, -use of [@http://www.rjsweb.fsnet.co.uk/graph/ RJS Graph] to arrange the display and axes, -and output to a .ps file, followed by conversion to .png using Adobe Photoshop, -or similar utility. This rigmarole is *not* recommended! +Graphs were produced in SVG format and then converted to PNG's using the same +process as the equations. -We plan to carry out this process in a single step using the +The programs +/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp +and /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp +generate the SVG's directly using the [@http://code.google.com/soc/2007/boost/about.html Google Summer of Code 2007] -project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization) -that should, when completed, allow output of annotated graphs as -Scalable Vector Graphic .svg files directly from C++ programs. +project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization). [endsect] [/section:implementation Implementation Notes] diff --git a/doc/sf_and_dist/inv_hyper.qbk b/doc/sf_and_dist/inv_hyper.qbk index 05fc23a28..5666c6999 100644 --- a/doc/sf_and_dist/inv_hyper.qbk +++ b/doc/sf_and_dist/inv_hyper.qbk @@ -85,9 +85,7 @@ and can be computed as [equation special_functions_blurb18]. Computes the reciprocal of (the restriction to the range of __form1) [link math_toolkit.special.inv_hyper.inv_hyper_over -the hyperbolic cosine function], at x. Values returned are positive. Generalised -Taylor series are used near 1 and Laurent series are used near the -infinity to ensure accuracy. +the hyperbolic cosine function], at x. Values returned are positive. If x is in the range __form2 then returns the result of __domain_error. @@ -98,6 +96,45 @@ the return type is `double` when T is an integer type, and T otherwise. [graph acosh] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation acosh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently large x, we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/ +approximation]: + +[equation acosh2] + +For x sufficiently close to 1 we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/04/01/0001/ +approximation]: + +[equation acosh4] + +Otherwise for x close to 1 we can use the following rearrangement of the +primary definition to preserve accuracy: + +[equation acosh3] + +Otherwise the +[@http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/ +primary definition] is used: + +[equation acosh1] + [endsect] [section:asinh asinh] @@ -115,8 +152,6 @@ the return type is `double` when T is an integer type, and T otherwise. Computes the reciprocal of [link math_toolkit.special.inv_hyper.inv_hyper_over the hyperbolic sine function]. -Taylor series are used at the origin and Laurent series are used near the -infinity to ensure accuracy. The return type of this function is computed using the __arg_pomotion_rules: the return type is `double` when T is an integer type, and T otherwise. @@ -125,6 +160,44 @@ the return type is `double` when T is an integer type, and T otherwise. [optional_policy] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation asinh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently large x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/ +approximation]: + +[equation asinh2] + +While for very small x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/03/01/0001/ +approximation]: + +[equation asinh3] + +For 0.5 > x > [epsilon] the following rearrangement of the primary definition is used: + +[equation asinh4] + +Otherwise evalution is via the +[@http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/ +primary definition]: + +[equation asinh4] + [endsect] [section:atanh atanh] @@ -142,7 +215,6 @@ the return type is `double` when T is an integer type, and T otherwise. Computes the reciprocal of [link math_toolkit.special.inv_hyper.inv_hyper_over the hyperbolic tangent function], at x. -Taylor series are used at the origin to ensure accuracy. [optional_policy] @@ -170,6 +242,38 @@ the return type is `double` when T is an integer type, and T otherwise. [graph atanh] +[h4 Accuracy] + +Generally accuracy is to within 1 or 2 epsilon across all supported platforms. + +[h4 Testing] + +This function is tested using a combination of random test values designed to give +full function coverage computed at high precision using the "naive" formula: + +[equation atanh1] + +along with a selection of sanity check values +computed using functions.wolfram.com to at least 50 decimal digits. + +[h4 Implementation] + +For sufficiently small x we can use the +[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/06/01/03/01/ approximation]: + +[equation atanh2] + +Otherwise the +[@http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ primary definition]: + +[equation atanh1] + +or it's equivalent form: + +[equation atanh3] + +is used. + [endsect] [endsect] diff --git a/doc/sf_and_dist/issues.qbk b/doc/sf_and_dist/issues.qbk index c23e82a27..9a59a3174 100644 --- a/doc/sf_and_dist/issues.qbk +++ b/doc/sf_and_dist/issues.qbk @@ -132,6 +132,13 @@ is found, the higher the priority for implementing it: [[Reciprocal][-][-][-][X][-]] ] +Also asked for more than once: + +* Add support for interpolated distributions, possibly combine with numeric +integration and differentiation. +* Add support for bivariate and multivariate distributions: most especially the normal. + + [endsect][/section:issues Known Issues, and Todo List] [/ diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 3fb865024..ff529578d 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -1,5 +1,9 @@ [template history[] +[h4 Boost-1.37.0] + +* Improved accuracy and testing of the inverse hypergeometric functions. + [h4 Boost-1.36.0] * Added Noncentral Chi Squared Distribution. @@ -72,7 +76,7 @@ on error rates. SVN Revisions: -Sandbox and trunk last synchonised at revision: 47084. +Sandbox and trunk last synchonised at revision: 448300. ] [/ @@ -83,3 +87,4 @@ Sandbox and trunk last synchonised at revision: 47084. ] + diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 072e48802..f0a9a683e 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -1,6 +1,7 @@ // boost asinh.hpp header file // (C) Copyright Eric Ford 2001 & Hubert Holin. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +20,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic cosine function. @@ -42,68 +44,66 @@ namespace boost template inline T acosh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; + BOOST_MATH_STD_USING - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - - if(x < one) + if(x < 1) { return policies::raise_domain_error( "boost::math::acosh<%1%>(%1%)", "acosh requires x >= 1, but got x = %1%.", x, pol); } - else if (x >= taylor_n_bound) + else if ((x - 1) >= tools::root_epsilon()) { - if (x > upper_taylor_2_bound) + if (x > 1 / tools::root_epsilon()) { + // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/ // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x*two) ); + return( log( x * 2) ); + } + else if(x < 1.5f) + { + // This is just a rearrangement of the standard form below + // devised to minimse loss of precision when x ~ 1: + T y = x - 1; + return boost::math::log1p(y + sqrt(y * y + 2 * y), pol); } else { - return( log( x + sqrt(x*x-one) ) ); + // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/ + return( log( x + sqrt(x * x - 1) ) ); } } else { - T y = sqrt(x-one); + // see http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/04/01/0001/ + T y = x - 1; // approximation by taylor series in y at 0 up to order 2 - T result = y; - - if (y >= taylor_2_bound) - { - T y3 = y*y*y; - - // approximation by taylor series in y at 0 up to order 4 - result -= y3/static_cast(12); - } - - return(sqrt(static_cast(2))*result); + T result = sqrt(2 * y) * (1 + y /12 + 3 * y * y / 160); + return result; } } } template - inline typename tools::promote_args::type acosh(const T x, const Policy& pol) + inline typename tools::promote_args::type acosh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::acosh_imp( - static_cast(x), pol); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::acosh_imp(static_cast(x), forwarding_policy()), + "boost::math::acosh<%1%>(%1%)"); } template inline typename tools::promote_args::type acosh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::acosh_imp( - static_cast(x), policies::policy<>()); + return boost::math::acosh(x, policies::policy<>()); } } @@ -112,5 +112,3 @@ namespace boost #endif /* BOOST_ACOSH_HPP */ - - diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index f524b5f05..45e91da13 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -1,6 +1,7 @@ // boost asinh.hpp header file // (C) Copyright Eric Ford & Hubert Holin 2001. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +20,8 @@ #include #include #include +#include +#include // This is the inverse of the hyperbolic sine function. @@ -38,51 +41,41 @@ namespace boost using ::std::numeric_limits; #endif - template - inline T asinh_imp(const T x) + template + inline T asinh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; + BOOST_MATH_STD_USING - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - static T const upper_taylor_n_bound = one/taylor_n_bound; - - if (x >= +taylor_n_bound) + if (x >= tools::forth_root_epsilon()) { - if (x > upper_taylor_n_bound) + if (x > 1 / tools::root_epsilon()) { - if (x > upper_taylor_2_bound) - { - // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x * two) ); - } - else - { - // approximation by laurent series in 1/x at 0+ order from -1 to 1 - return( log( x*two + (one/(x*two)) ) ); - } + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/ + // approximation by laurent series in 1/x at 0+ order from -1 to 1 + return log(x * 2) + 1/ (4 * x * x); + } + else if(x < 0.5f) + { + // As below, but rearranged to preserve digits: + return boost::math::log1p(x + sqrt1pm1(x * x, pol), pol); } else { - return( log( x + sqrt(x*x+one) ) ); + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/ + return( log( x + sqrt(x*x+1) ) ); } } - else if (x <= -taylor_n_bound) + else if (x <= -tools::forth_root_epsilon()) { return(-asinh(-x)); } else { + // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/03/01/0001/ // approximation by taylor series in x at 0 up to order 2 T result = x; - if (abs(x) >= taylor_2_bound) + if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; @@ -98,16 +91,22 @@ namespace boost template inline typename tools::promote_args::type asinh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::asinh_imp( - static_cast(x)); + return boost::math::asinh(x, policies::policy<>()); } template inline typename tools::promote_args::type asinh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::asinh_imp( - static_cast(x)); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::asinh_imp(static_cast(x), forwarding_policy()), + "boost::math::asinh<%1%>(%1%)"); } } diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index 1771fecd1..ff17dc39e 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -1,6 +1,7 @@ // boost atanh.hpp header file // (C) Copyright Hubert Holin 2001. +// (C) Copyright John Maddock 2008. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +21,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic tangent function. @@ -45,52 +47,45 @@ namespace boost template inline T atanh_imp(const T x, const Policy& pol) { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(tools::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - + BOOST_MATH_STD_USING static const char* function = "boost::math::atanh<%1%>(%1%)"; - if (x < -one) + if(x < -1) { return policies::raise_domain_error( function, "atanh requires x >= -1, but got x = %1%.", x, pol); } - else if (x < -one + tools::epsilon()) + else if(x < -1 + tools::epsilon()) { // -Infinity: return -policies::raise_overflow_error(function, 0, pol); } - else if (x > one - tools::epsilon()) + else if(x > 1 - tools::epsilon()) { // Infinity: return -policies::raise_overflow_error(function, 0, pol); } - else if (x > +one) + else if(x > 1) { return policies::raise_domain_error( function, "atanh requires x <= 1, but got x = %1%.", x, pol); } - else if (abs(x) >= taylor_n_bound) + else if(abs(x) >= tools::forth_root_epsilon()) { - return(log( (one + x) / (one - x) ) / two); + // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ + if(abs(x) < 0.5f) + return (boost::math::log1p(x, pol) - boost::math::log1p(-x, pol)) / 2; + return(log( (1 + x) / (1 - x) ) / 2); } else { + // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/06/01/03/01/ // approximation by taylor series in x at 0 up to order 2 T result = x; - if (abs(x) >= taylor_2_bound) + if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; @@ -104,18 +99,24 @@ namespace boost } template - inline typename tools::promote_args::type atanh(const T x, const Policy& pol) + inline typename tools::promote_args::type atanh(const T x, const Policy&) { - typedef typename tools::promote_args::type result_type; - return detail::atanh_imp( - static_cast(x), pol); + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast( + detail::atanh_imp(static_cast(x), forwarding_policy()), + "boost::math::atanh<%1%>(%1%)"); } template inline typename tools::promote_args::type atanh(const T x) { - typedef typename tools::promote_args::type result_type; - return detail::atanh_imp( - static_cast(x), policies::policy<>()); + return boost::math::atanh(x, policies::policy<>()); } } diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 1f5029abc..c2866dca9 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -232,6 +232,88 @@ inline T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) #endif } +namespace detail{ + +template +inline T root_epsilon_imp(const mpl::int_<24>&) +{ + return static_cast(0.00034526698300124390839884978618400831996329879769945L); +} + +template +inline T root_epsilon_imp(const T*, const mpl::int_<53>&) +{ + return static_cast(0.1490116119384765625e-7L); +} + +template +inline T root_epsilon_imp(const T*, const mpl::int_<64>&) +{ + return static_cast(0.32927225399135962333569506281281311031656150598474e-9L); +} + +template +inline T root_epsilon_imp(const T*, const mpl::int_<113>&) +{ + return static_cast(0.1387778780781445675529539585113525390625e-16L); +} + +template +inline T root_epsilon_imp(const T*, const Tag&) +{ + BOOST_MATH_STD_USING + static const T r_eps = sqrt(tools::epsilon()); + return r_eps; +} + +template +inline T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) +{ + return static_cast(0.018581361171917516667460937040007436176452688944747L); +} + +template +inline T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) +{ + return static_cast(0.0001220703125L); +} + +template +inline T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) +{ + return static_cast(0.18145860519450699870567321328132261891067079047605e-4L); +} + +template +inline T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) +{ + return static_cast(0.37252902984619140625e-8L); +} + +template +inline T forth_root_epsilon_imp(const T*, const Tag&) +{ + BOOST_MATH_STD_USING + static const T r_eps = sqrt(sqrt(tools::epsilon())); + return r_eps; +} + +} + +template +inline T root_epsilon() +{ + typedef mpl::int_::digits> tag_type; + return detail::root_epsilon_imp(static_cast(0), tag_type()); +} + +template +inline T forth_root_epsilon() +{ + typedef mpl::int_::digits> tag_type; + return detail::forth_root_epsilon_imp(static_cast(0), tag_type()); +} + } // namespace tools } // namespace math } // namespace boost diff --git a/include/boost/math/tools/test.hpp b/include/boost/math/tools/test.hpp index 2dfd31425..c54e82727 100644 --- a/include/boost/math/tools/test.hpp +++ b/include/boost/math/tools/test.hpp @@ -151,9 +151,19 @@ inline double relative_error(double a, double b) } #endif +template +void set_output_precision(T) +{ + if(std::numeric_limits::digits10) + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } +} + template void print_row(const Seq& row) { + set_output_precision(row[0]); for(unsigned i = 0; i < row.size(); ++i) { if(i) diff --git a/include/boost/math/tools/test_data.hpp b/include/boost/math/tools/test_data.hpp index 3cc09c093..23a1abb56 100644 --- a/include/boost/math/tools/test_data.hpp +++ b/include/boost/math/tools/test_data.hpp @@ -328,8 +328,14 @@ private: template inline float test_data::truncate_to_float(float const * pf) { - extern_val = *pf; - return *pf; + BOOST_MATH_STD_USING + int expon; + float f = floor(ldexp(frexp(*pf, &expon), 22)); + f = ldexp(f, expon - 22); + return f; + + //extern_val = *pf; + //return *pf; } template diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 65b579d79..62b7e55c5 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -218,6 +218,7 @@ run test_igamma_inva.cpp TEST_REAL_CONCEPT : test_igamma_inva_real_concept ; run test_instantiate1.cpp test_instantiate2.cpp ; +run test_inv_hyp.cpp ; run test_laguerre.cpp ; run test_legendre.cpp ; run test_lognormal.cpp ; diff --git a/test/acosh_data.ipp b/test/acosh_data.ipp new file mode 100644 index 000000000..daa3f6b61 --- /dev/null +++ b/test/acosh_data.ipp @@ -0,0 +1,266 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 261> acosh_data = {{ + { SC_(1.000001430511474609375), SC_(0.001691455665129294448190238354291760044433) }, + { SC_(1.0000019073486328125), SC_(0.001953124689559275021527821917817027620963) }, + { SC_(1.000007152557373046875), SC_(0.003782208044661295168504799813496158490314) }, + { SC_(1.000013828277587890625), SC_(0.005258943946801101349061072655743616330534) }, + { SC_(1.0000171661376953125), SC_(0.005859366618129202398694086527594451883545) }, + { SC_(1.00006008148193359375), SC_(0.0109618319921888517811096976159923461784) }, + { SC_(1.000116825103759765625), SC_(0.01528547213183042467192017645636643040682) }, + { SC_(1.000148773193359375), SC_(0.01724931909352987823311560583970196658141) }, + { SC_(1.000398159027099609375), SC_(0.02821817173865537359266716853098519889415) }, + { SC_(1.000638484954833984375), SC_(0.03573281468231456624811499142438796295686) }, + { SC_(1.001071453094482421875), SC_(0.04628740247287877599360006621134226755174) }, + { SC_(1.003021717071533203125), SC_(0.07771996527168971264969648279358369972575) }, + { SC_(1.004993915557861328125), SC_(0.09989759308602780434912638996550489375369) }, + { SC_(1.00928401947021484375), SC_(0.1361593876803246479600670434737716450022) }, + { SC_(1.024169921875), SC_(0.2194227900495835483852561715845842241518) }, + { SC_(1.062277317047119140625), SC_(0.3511165938166054588185413287563455693446) }, + { SC_(1.12234401702880859375), SC_(0.4897502671128818535428474267470966393752) }, + { SC_(1.2495574951171875), SC_(0.6925568837084910405419269283192900693752) }, + { SC_(1.491221904754638671875), SC_(0.9545305722214140465734705961617555409538) }, + { SC_(1.983847141265869140625), SC_(1.307581416910453029674373062377350125402) }, + { SC_(2.15761280059814453125), SC_(1.403518877974133434572205965467405839077) }, + { SC_(2.40639781951904296875), SC_(1.525007084542751786819384889715403191957) }, + { SC_(3.38695812225341796875), SC_(1.890537201307279875549078665860235683411) }, + { SC_(4.4516773223876953125), SC_(2.173567339994825397387431806918552342932) }, + { SC_(6.9391326904296875), SC_(2.625091127868242256287879402513352014572) }, + { SC_(7.756023406982421875), SC_(2.737434918695162165715461546271032662695) }, + { SC_(8.8823699951171875), SC_(2.874031716780194544439172840789924579634) }, + { SC_(9.869171142578125), SC_(2.979986393289490221624555712675426245527) }, + { SC_(16.848876953125), SC_(3.516549380542481075157493697729821147595) }, + { SC_(16.88458251953125), SC_(3.518670034680249794623612003576884164306) }, + { SC_(18.18859100341796875), SC_(3.593185165198828891634086870735797352995) }, + { SC_(18.82012176513671875), SC_(3.627367214296338506596699897092700261917) }, + { SC_(19.18418121337890625), SC_(3.646553244410946142822321573885913155251) }, + { SC_(24.039520263671875), SC_(3.872413451393967155852229598937671193827) }, + { SC_(26.5569915771484375), SC_(3.97208556893332931613088010770137243142) }, + { SC_(27.92110443115234375), SC_(4.022209178119237972634584536383754567227) }, + { SC_(32.314666748046875), SC_(4.168428891496629419926716002725343213186) }, + { SC_(34.7300872802734375), SC_(4.24054622986100481621284684937772318866) }, + { SC_(36.51556396484375), SC_(4.290698214968890417003449585503652329902) }, + { SC_(38.851287841796875), SC_(4.352722738491573736218790864551080662126) }, + { SC_(49.46875), SC_(4.59438616262944868606926670858880728888) }, + { SC_(49.6726531982421875), SC_(4.598500387004538200979463375829093317529) }, + { SC_(55.821014404296875), SC_(4.715217340185609026248077357993388963859) }, + { SC_(57.119781494140625), SC_(4.738221040019820009132180121068224048563) }, + { SC_(60.3798370361328125), SC_(4.793733825338028989056646578701956447074) }, + { SC_(63.4661865234375), SC_(4.843592376953016901945130034442741537681) }, + { SC_(63.822418212890625), SC_(4.849190310904695081724453083230505499) }, + { SC_(64.366424560546875), SC_(4.857678972284480806836897045666147581194) }, + { SC_(65.82318115234375), SC_(4.880061548144127001309581646898589070845) }, + { SC_(68.60302734375), SC_(4.921430721025434361496543279369773904556) }, + { SC_(70.173583984375), SC_(4.944068352080570156852448111271304401145) }, + { SC_(71.80126953125), SC_(4.967000841791218009854450984654955748527) }, + { SC_(75.407867431640625), SC_(5.016014824864731856945880331601344083118) }, + { SC_(75.497711181640625), SC_(5.017205657609766266706283982466292758789) }, + { SC_(78.06475830078125), SC_(5.050644871655082237287791451581061020693) }, + { SC_(79.64892578125), SC_(5.070736320140527520131044330827542555678) }, + { SC_(79.8707275390625), SC_(5.073517411135062274633407326047677797493) }, + { SC_(82.14324951171875), SC_(5.101574796209937553992594384708408566472) }, + { SC_(86.422149658203125), SC_(5.152357710985635411723269669070507384393) }, + { SC_(87.758697509765625), SC_(5.167705692500116617668438212039278403675) }, + { SC_(94.249420166015625), SC_(5.239063709802807411774762976165711451289) }, + { SC_(95.002593994140625), SC_(5.24702367651990363562135237922593081374) }, + { SC_(96.06402587890625), SC_(5.258134994273664228925894855596706922092) }, + { SC_(99.10101318359375), SC_(5.289261389093961411474730159621540149161) }, + { SC_(104.825958251953125), SC_(5.345425863147170918152692907733404160171) }, + { SC_(105.894317626953125), SC_(5.355566478724588805787125327460047194459) }, + { SC_(106.750244140625), SC_(5.363617180711894834893456209993366372702) }, + { SC_(109.40167236328125), SC_(5.388152468690488330936438928871930644775) }, + { SC_(111.295989990234375), SC_(5.40532022596301299871913818031312501789) }, + { SC_(112.682159423828125), SC_(5.417698597745428582703028438959417637741) }, + { SC_(115.847869873046875), SC_(5.445406415908932972979361284782173288771) }, + { SC_(122.518951416015625), SC_(5.501396249028249309478903043850515943644) }, + { SC_(126.29083251953125), SC_(5.531718947357248141901016725943097821463) }, + { SC_(127.88677978515625), SC_(5.544277233951786833046255699209839124282) }, + { SC_(128.29241943359375), SC_(5.547444176085567387868629933507681372844) }, + { SC_(129.49658203125), SC_(5.556786759298987489018162005929203901677) }, + { SC_(138.73651123046875), SC_(5.625710723366437130110566517151979116591) }, + { SC_(139.18450927734375), SC_(5.628934733085021889655473009134778907233) }, + { SC_(139.9705810546875), SC_(5.63456668505549125187745033695013277031) }, + { SC_(143.6336669921875), SC_(5.660401141376928390068911580516739480767) }, + { SC_(149.2176513671875), SC_(5.698541939965667319302405718431306124964) }, + { SC_(150.61602783203125), SC_(5.707869896181299042045964962097048877529) }, + { SC_(151.65460205078125), SC_(5.714741890601692470131657476637875234333) }, + { SC_(154.77532958984375), SC_(5.735111323217677235163096422075933590581) }, + { SC_(158.9586181640625), SC_(5.76178119164116056169664536557902282984) }, + { SC_(159.23260498046875), SC_(5.76350337802895912932271749968885321291) }, + { SC_(166.89166259765625), SC_(5.810483079631769347906173026231591180669) }, + { SC_(169.22418212890625), SC_(5.824362807770767372309724658583543187687) }, + { SC_(170.85247802734375), SC_(5.833939098607024938518744061528880726076) }, + { SC_(175.641845703125), SC_(5.861586030831371111277316749706184493497) }, + { SC_(176.47808837890625), SC_(5.866335876872543841804521246497450515591) }, + { SC_(177.0284423828125), SC_(5.869449614294116474831852726381675383803) }, + { SC_(178.81622314453125), SC_(5.879497954012966336157412623485146460234) }, + { SC_(181.28570556640625), SC_(5.893213844044450514365554597289542581697) }, + { SC_(190.84246826171875), SC_(5.944588630523773589353947366401268565142) }, + { SC_(191.39764404296875), SC_(5.94749352592071287963619396611460598163) }, + { SC_(194.2606201171875), SC_(5.962341215900494050109187978733428591562) }, + { SC_(194.89630126953125), SC_(5.965608227627600046293288118981009401155) }, + { SC_(196.72125244140625), SC_(5.974928484931286802822226328854017998272) }, + { SC_(196.76788330078125), SC_(5.97516550017620215691682414383193227447) }, + { SC_(198.0592041015625), SC_(5.981706804024238659640680772319516752432) }, + { SC_(199.97052001953125), SC_(5.991310884439669647644011374615753552043) }, + { SC_(202.70001220703125), SC_(6.004868209578553896003834136537443847497) }, + { SC_(204.95684814453125), SC_(6.015940689286515853596140406483086930665) }, + { SC_(206.92059326171875), SC_(6.025476453825986378650455090165700700781) }, + { SC_(211.4588623046875), SC_(6.047172064627678522672151564001319932574) }, + { SC_(211.6217041015625), SC_(6.047941864223159215142104276243607189411) }, + { SC_(212.15936279296875), SC_(6.050479329955437674042299338123601544698) }, + { SC_(219.93341064453125), SC_(6.086466833749718691309844243695794396376) }, + { SC_(223.34747314453125), SC_(6.101870903204913623855234973179987714517) }, + { SC_(228.56036376953125), SC_(6.12494274439855238424605675602915271015) }, + { SC_(229.53656005859375), SC_(6.129204755426344240698049588914342485212) }, + { SC_(231.15753173828125), SC_(6.136241935513705416652882857399712029477) }, + { SC_(235.22589111328125), SC_(6.153688953514382528837249519861026992294) }, + { SC_(237.17108154296875), SC_(6.16192447986332112027066888322817886098) }, + { SC_(237.904541015625), SC_(6.165012268502458223847465413629334545746) }, + { SC_(243.202392578125), SC_(6.187036941752031847781237018817248226575) }, + { SC_(244.296875), SC_(6.191527178125453588013362995547294190556) }, + { SC_(245.39239501953125), SC_(6.196001570568187444354689455736723305464) }, + { SC_(245.80389404296875), SC_(6.197677082130341298614824238362609944761) }, + { SC_(249.68365478515625), SC_(6.213337906126028634019511362668656048871) }, + { SC_(252.32763671875), SC_(6.223871642756904989009941455863848621693) }, + { SC_(253.4725341796875), SC_(6.228398760115368978419785861340394334949) }, + { SC_(264.1583251953125), SC_(6.269692237869834655812588535960729291645) }, + { SC_(265.867919921875), SC_(6.276143287577458434544566538806340395227) }, + { SC_(273.893798828125), SC_(6.305884283737175999056149819356227140283) }, + { SC_(274.060546875), SC_(6.306492908028796208195612980534832526609) }, + { SC_(274.06298828125), SC_(6.306501816321711306242744764166827854238) }, + { SC_(275.31201171875), SC_(6.311048924823309539122894248298646711515) }, + { SC_(281.2171630859375), SC_(6.332271212543191917887016682596127229871) }, + { SC_(284.3428955078125), SC_(6.343324976847916523668021506516982451804) }, + { SC_(284.8428955078125), SC_(6.345081883725142172010442438360996090607) }, + { SC_(287.3035888671875), SC_(6.353683609448095450690653155116609411345) }, + { SC_(290.8973388671875), SC_(6.366114643735996187010064226141367713494) }, + { SC_(293.0467529296875), SC_(6.373476431987165195009419682926258568514) }, + { SC_(293.048583984375), SC_(6.3734826803404046607923256022891007467) }, + { SC_(296.819091796875), SC_(6.386267177599691603449621482941540136447) }, + { SC_(297.6572265625), SC_(6.389086936901673374370938395043767464615) }, + { SC_(308.40625), SC_(6.424562459508494815578189029717236448261) }, + { SC_(316.5472412109375), SC_(6.450617177370153067374226847837008577358) }, + { SC_(320.2418212890625), SC_(6.462221144761522067224169792659123404149) }, + { SC_(322.33642578125), SC_(6.468740575092417615259160797033210213863) }, + { SC_(323.5101318359375), SC_(6.472375224718483717268648919441488851024) }, + { SC_(327.8939208984375), SC_(6.485834999462653559161623555380871809288) }, + { SC_(328.0833740234375), SC_(6.486412623146554512400295875149968123595) }, + { SC_(328.214599609375), SC_(6.486812521370483270051173204357170113696) }, + { SC_(332.13916015625), SC_(6.498698952535686590971725425771901435577) }, + { SC_(339.6888427734375), SC_(6.521175044233962334855405597829204127829) }, + { SC_(340.171630859375), SC_(6.522595306993372841176959822169835487203) }, + { SC_(340.22998046875), SC_(6.522766822935215301119395768816736464171) }, + { SC_(340.9984130859375), SC_(6.525022854134450397488249525584977969848) }, + { SC_(347.719482421875), SC_(6.544541182598698837108180066568285561192) }, + { SC_(347.921142578125), SC_(6.545120967585682780158986289403626335039) }, + { SC_(349.8392333984375), SC_(6.550618853671590396954212923343777795426) }, + { SC_(353.1812744140625), SC_(6.560126626713879038902701972848577987576) }, + { SC_(353.3170166015625), SC_(6.560510895819138848557847535694659145744) }, + { SC_(354.9730224609375), SC_(6.56518699003913475265728787337345634833) }, + { SC_(355.6412353515625), SC_(6.567067660815945254763768403011524099801) }, + { SC_(363.193603515625), SC_(6.588081320423385926941395650884632048324) }, + { SC_(363.7503662109375), SC_(6.589613116365141119507599520545813820205) }, + { SC_(366.66650390625), SC_(6.597598047275183820713128823864925712214) }, + { SC_(370.5828857421875), SC_(6.608222493065004674432923629831401595644) }, + { SC_(371.822998046875), SC_(6.611563301604297330780249554012149222974) }, + { SC_(375.8822021484375), SC_(6.622421213257872616605790226875280590718) }, + { SC_(377.1107177734375), SC_(6.625684248051367798967594517111734939065) }, + { SC_(377.588623046875), SC_(6.626950731244344518396423054010667385835) }, + { SC_(378.8428955078125), SC_(6.630267034079058832474904688332205765807) }, + { SC_(379.1123046875), SC_(6.630977920761718188663355128303457269644) }, + { SC_(381.1038818359375), SC_(6.636217452968849140199299619634845177402) }, + { SC_(382.1112060546875), SC_(6.63885714989915892916806173377813464616) }, + { SC_(382.9927978515625), SC_(6.641161660644278254856011296094169025726) }, + { SC_(387.1845703125), SC_(6.652047018118426624071335253039983067027) }, + { SC_(389.669921875), SC_(6.658445560711747733097363184134660374201) }, + { SC_(389.804443359375), SC_(6.658790721334144459483338624834811878532) }, + { SC_(396.3114013671875), SC_(6.675345858154136306174834824525273599533) }, + { SC_(397.005126953125), SC_(6.677094789236718239327386065258295745882) }, + { SC_(397.1934814453125), SC_(6.677569116668089765968288575699796076917) }, + { SC_(397.8046875), SC_(6.679106750673113062518913783394959687397) }, + { SC_(398.8426513671875), SC_(6.681712590609844816466059398426090860379) }, + { SC_(399.1663818359375), SC_(6.682523938576487571986006995202709018951) }, + { SC_(399.2547607421875), SC_(6.682745323455160373493982153327465350514) }, + { SC_(400.33984375), SC_(6.68545941647717813159478393220239518843) }, + { SC_(403.9578857421875), SC_(6.6944562778394978005276529277337054901) }, + { SC_(404.279541015625), SC_(6.69525222285407608719250824812439781544) }, + { SC_(405.0574951171875), SC_(6.697174677114241660699777628750006369949) }, + { SC_(407.328125), SC_(6.702764738337774266407206003201536960489) }, + { SC_(407.547119140625), SC_(6.703302231179959306927821131625588949855) }, + { SC_(410.5994873046875), SC_(6.710763953621196143396177253879091429692) }, + { SC_(410.8016357421875), SC_(6.711256159037372934708585809074885390587) }, + { SC_(411.129638671875), SC_(6.712054288828398871484168355341928910672) }, + { SC_(411.9053955078125), SC_(6.71393940750234669898410033879058990879) }, + { SC_(415.5833740234375), SC_(6.722828986708716597641935076657699092718) }, + { SC_(417.669189453125), SC_(6.727835453862131466839432640652077316451) }, + { SC_(420.517822265625), SC_(6.734632628835640647510302384260878716087) }, + { SC_(424.3853759765625), SC_(6.743787740494532100937084679719803238806) }, + { SC_(424.7154541015625), SC_(6.744565219553757289338296980369793898726) }, + { SC_(436.3419189453125), SC_(6.771572021268065472972105624143419455948) }, + { SC_(438.501953125), SC_(6.776510146304200360440233381235270942742) }, + { SC_(439.3369140625), SC_(6.778412462065226061129312213528458641603) }, + { SC_(445.5606689453125), SC_(6.792479340600349658156225315328718026016) }, + { SC_(452.9901123046875), SC_(6.809016260337228831936738732897410136218) }, + { SC_(453.77490234375), SC_(6.810747231716348697176150895548602377257) }, + { SC_(456.7745361328125), SC_(6.817335895109250694056391088138248559173) }, + { SC_(457.9520263671875), SC_(6.819910421197310978529029433663908470507) }, + { SC_(458.6795654296875), SC_(6.821497844004013502448409287800537132756) }, + { SC_(460.5164794921875), SC_(6.825494642872147128332763285398798677976) }, + { SC_(461.8717041015625), SC_(6.828433164406686771701521855077910926631) }, + { SC_(464.7025146484375), SC_(6.834543470287694007429787493802694241702) }, + { SC_(467.0626220703125), SC_(6.839609377592375029558701051277174984946) }, + { SC_(467.0712890625), SC_(6.83962793384421245687931998241985864452) }, + { SC_(470.096923828125), SC_(6.846084943645238808995975141700921096311) }, + { SC_(475.1607666015625), SC_(6.856799276049143563229337105263608232029) }, + { SC_(477.5537109375), SC_(6.861822721577315741859023908594798480392) }, + { SC_(478.626220703125), SC_(6.864066049482580522441871176709541953581) }, + { SC_(478.7958984375), SC_(6.8644204973336804815313774177052514308) }, + { SC_(479.6864013671875), SC_(6.86627865397306926299976132455469132911) }, + { SC_(479.7867431640625), SC_(6.866487814627139251181098007832885765806) }, + { SC_(479.9122314453125), SC_(6.866749331118839213169502276407114725047) }, + { SC_(482.4793701171875), SC_(6.872084270243208288559827917865564857217) }, + { SC_(482.5181884765625), SC_(6.872164723177874204251489651336382789811) }, + { SC_(483.8797607421875), SC_(6.874982560453873383658251901541786496761) }, + { SC_(484.4649658203125), SC_(6.876191234145179554349993597841191267853) }, + { SC_(485.3258056640625), SC_(6.877966548833207350351265217595172972905) }, + { SC_(490.57373046875), SC_(6.888721726428236039221890401406352667404) }, + { SC_(493.7423095703125), SC_(6.895159895589969853078001763235883415882) }, + { SC_(494.272216796875), SC_(6.896232568812717932403585431953843090099) }, + { SC_(496.44775390625), SC_(6.900624415355815565025217006388610220335) }, + { SC_(497.0401611328125), SC_(6.901816998553274960978831433918910814375) }, + { SC_(498.234130859375), SC_(6.904216282287646841845864948036717548583) }, + { SC_(665.0791015625), SC_(7.193052598670792558912351099032198333184) }, + { SC_(1170.29150390625), SC_(7.758155143419731595147190189684865359835) }, + { SC_(2058.7958984375), SC_(8.323023697145112010072186763207801515396) }, + { SC_(5824.533203125), SC_(9.362981311610990187535171280837584820237) }, + { SC_(9114.30859375), SC_(9.810748008110925084589570791503788344652) }, + { SC_(31388.40625), SC_(11.04734105631420306080680845572519805956) }, + { SC_(53732.765625), SC_(11.58492543551253544550738607240822985131) }, + { SC_(117455.09375), SC_(12.3669585392073964063765790447351364021) }, + { SC_(246210.625), SC_(13.10708982832787479175510220013343945066) }, + { SC_(513670.125), SC_(13.84248373881161892648765606597953800527) }, + { SC_(788353.25), SC_(14.2708487357510805583139091933979145572) }, + { SC_(1736171.0), SC_(15.06033985221540896276800056693696357419) }, + { SC_(3770530.0), SC_(15.83587331365755605568701554508826253991) }, + { SC_(4344090.0), SC_(15.97747403917326507392988269405762331118) }, + { SC_(11419360.0), SC_(16.94396789915014469006155507384872743685) }, + { SC_(31023240.0), SC_(17.9433943395609684013300439026124645108) }, + { SC_(40665424.0), SC_(18.21403593674543079149440340324547029148) }, + { SC_(129788064.0), SC_(19.37456058170921543648305825985098346634) }, + { SC_(225668224.0), SC_(19.9277236237785460971743917048171789264) }, + { SC_(450631936.0), SC_(20.61930863840059519949232655148142693395) }, + { SC_(750941952.0), SC_(21.1299860930266968673735341410555546727) }, + { SC_(1887358976.0), SC_(22.05159150215413004649732665310838648331) }, + { SC_(3738011648.0), SC_(22.73496684263974142690946105862900518113) }, + { SC_(7486695424.0), SC_(23.42954051928097083366085869187241049078) }, + { SC_(12668080128.0), SC_(23.95549847139166892348970713379911103008) }, + { SC_(23918272512.0), SC_(24.59105572458284785473015955570721968617) }, + { SC_(48862560256.0), SC_(25.30542448179939429678484289438720749573) }, + { SC_(113763549184.0), SC_(26.15053518194943663075151882301281675861) }, + { SC_(161334755328.0), SC_(26.49989444953256419131899378956019192586) }, + { SC_(321933279232.0), SC_(27.19075733422631778452130090694771384112) }, + { SC_(715734122496.0), SC_(27.98972177820814613504868209029528272152) }, + { SC_(1875817529344.0), SC_(28.95321287653379863631300659442341812344) } + }}; +#undef SC_ + diff --git a/test/asinh_data.ipp b/test/asinh_data.ipp new file mode 100644 index 000000000..2ebda9344 --- /dev/null +++ b/test/asinh_data.ipp @@ -0,0 +1,286 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 281> asinh_data = {{ + { SC_(-497.181640625), SC_(-6.902103625349694816896128061929344488774) }, + { SC_(-495.216552734375), SC_(-6.898143347143858285101511567975488446084) }, + { SC_(-488.0980224609375), SC_(-6.883664481302669222996695409880306523751) }, + { SC_(-486.4609375), SC_(-6.880304842490272781295755933349565066089) }, + { SC_(-482.2261962890625), SC_(-6.87156154650904602462361416438487324277) }, + { SC_(-468.167236328125), SC_(-6.841973895837549314760586943747302390125) }, + { SC_(-465.553955078125), SC_(-6.836376331805492593765664636569933371943) }, + { SC_(-464.288330078125), SC_(-6.833654100575195198545828306587445927099) }, + { SC_(-463.558837890625), SC_(-6.832081663500904935919737735423649299577) }, + { SC_(-453.82861328125), SC_(-6.81086801736630853656142245668310545817) }, + { SC_(-448.7835693359375), SC_(-6.799689165151486910757237507031024212372) }, + { SC_(-446.0499267578125), SC_(-6.793579326246197169098958913912928750651) }, + { SC_(-432.4046630859375), SC_(-6.762510387544996144846476710732722287747) }, + { SC_(-424.145751953125), SC_(-6.74322572098922178423984261142063288429) }, + { SC_(-402.8682861328125), SC_(-6.69175839599430693315848859453612846314) }, + { SC_(-402.4595947265625), SC_(-6.690743430063694316478378930442947372479) }, + { SC_(-390.1383056640625), SC_(-6.65965012921145083591836824643494979965) }, + { SC_(-387.5355224609375), SC_(-6.652956360641761371501126846246743833405) }, + { SC_(-381.0023193359375), SC_(-6.635954365364266311169729037072694814964) }, + { SC_(-374.8172607421875), SC_(-6.619587562578274050554380148151080691039) }, + { SC_(-374.1033935546875), SC_(-6.617681179427804403332414367961774779791) }, + { SC_(-373.01318359375), SC_(-6.614762741096184771534770781005436075363) }, + { SC_(-370.0938720703125), SC_(-6.606905687537060691122483933557635629252) }, + { SC_(-364.5230712890625), SC_(-6.591738907156093293807291816593779744849) }, + { SC_(-361.3756103515625), SC_(-6.583066984213974024130269349536598335519) }, + { SC_(-358.1136474609375), SC_(-6.573999516974134646764605942478671320562) }, + { SC_(-350.8861083984375), SC_(-6.553610904389895936746972395658913458292) }, + { SC_(-350.7060546875), SC_(-6.553097634736137347416591397792124912806) }, + { SC_(-345.5616455078125), SC_(-6.538320325468201861196672683728074373679) }, + { SC_(-342.386962890625), SC_(-6.529090881007076202584033383216307968614) }, + { SC_(-341.9425048828125), SC_(-6.527791927233787108981347318463639017897) }, + { SC_(-337.3883056640625), SC_(-6.51438388615078099259979168949837683455) }, + { SC_(-328.8133544921875), SC_(-6.488639771044976384845381893407049569445) }, + { SC_(-326.1348876953125), SC_(-6.480460592697476652284072277108613530788) }, + { SC_(-313.12744140625), SC_(-6.439759999015992467577771895808599408942) }, + { SC_(-311.6180419921875), SC_(-6.434927968512049412470577925892037200619) }, + { SC_(-303.40478515625), SC_(-6.408217734896572191669656774970329190625) }, + { SC_(-291.9320068359375), SC_(-6.369671035834964490622480119650197877027) }, + { SC_(-289.791015625), SC_(-6.362310184909174825124230502026784750431) }, + { SC_(-288.07568359375), SC_(-6.356373428913315483326002974850146028147) }, + { SC_(-282.76220703125), SC_(-6.337756593913613854161781726501299103316) }, + { SC_(-278.9659423828125), SC_(-6.3242400970614694374776334482330766038) }, + { SC_(-276.1881103515625), SC_(-6.314232650754295158800596164826483845909) }, + { SC_(-269.843994140625), SC_(-6.290994606392703105943420882029653368811) }, + { SC_(-256.47509765625), SC_(-6.240182555852785458496224304526376585373) }, + { SC_(-248.91619873046875), SC_(-6.210267503979360726887449195178911415313) }, + { SC_(-245.71783447265625), SC_(-6.197335184435549180000272192577714732671) }, + { SC_(-244.9049072265625), SC_(-6.194021350132334791819182281057947070343) }, + { SC_(-242.49176025390625), SC_(-6.184119163536405964259882205805060501935) }, + { SC_(-223.97491455078125), SC_(-6.104686221071835053635371385862353306867) }, + { SC_(-223.0770263671875), SC_(-6.100669325836893543736746195548392269128) }, + { SC_(-221.50177001953125), SC_(-6.093582856519022569016903564242082589239) }, + { SC_(-214.1610107421875), SC_(-6.059880750068793807232821057354816859259) }, + { SC_(-202.9705810546875), SC_(-6.006214296526251845395554109089589227751) }, + { SC_(-200.1683349609375), SC_(-5.992312107336994557313003250781997964749) }, + { SC_(-198.0869140625), SC_(-5.981859446096082920408103292664994574137) }, + { SC_(-191.8330078125), SC_(-5.949779216585290285138095990044779123562) }, + { SC_(-183.4495849609375), SC_(-5.905094497458789993605346377453537455651) }, + { SC_(-182.9005126953125), SC_(-5.90209701227578839648368537690039781634) }, + { SC_(-167.5517578125), SC_(-5.814448391006795100253762785669751772879) }, + { SC_(-162.87738037109375), SC_(-5.786154254111213380715127555746974140457) }, + { SC_(-159.6142578125), SC_(-5.765917008989404365321507899157382728927) }, + { SC_(-150.01629638671875), SC_(-5.703902219845273396365649927451080691209) }, + { SC_(-148.34051513671875), SC_(-5.69266895044603959347064515800579166058) }, + { SC_(-147.23760986328125), SC_(-5.685206387751923160853276372644826819905) }, + { SC_(-143.65484619140625), SC_(-5.660572815631807047475426769799365771506) }, + { SC_(-138.70599365234375), SC_(-5.625516713960632970798501811037458042606) }, + { SC_(-119.554168701171875), SC_(-5.476934234171878793825519703714137456694) }, + { SC_(-118.441558837890625), SC_(-5.467584665632571047898569146378815818543) }, + { SC_(-112.7041015625), SC_(-5.41793267560343365856590869885928647495) }, + { SC_(-111.430206298828125), SC_(-5.406565756574078635952822819651240567772) }, + { SC_(-107.772979736328125), SC_(-5.373195678988387579981120804358907493552) }, + { SC_(-107.6795654296875), SC_(-5.372328571218373638952712194621628880899) }, + { SC_(-105.091796875), SC_(-5.348004040102252742967063201190196082691) }, + { SC_(-101.261474609375), SC_(-5.310877589708960332430067923458969169195) }, + { SC_(-95.79150390625), SC_(-5.255348419702703704863588329233038165262) }, + { SC_(-91.26885986328125), SC_(-5.206986845736275651134721240774128212633) }, + { SC_(-87.33349609375), SC_(-5.162914035396618398952584430311544798966) }, + { SC_(-78.238739013671875), SC_(-5.052952927749896114494197793427686940384) }, + { SC_(-77.912353515625), SC_(-5.048772883924985058524898899156261070079) }, + { SC_(-76.83489990234375), SC_(-5.03484848764480888947313271747141240657) }, + { SC_(-61.255645751953125), SC_(-4.808269821238498732397629948430226353629) }, + { SC_(-54.4138031005859375), SC_(-4.689849459883310559788337051110370703783) }, + { SC_(-43.967193603515625), SC_(-4.476720236388958724591705984989483327501) }, + { SC_(-42.0108489990234375), SC_(-4.431216695067421800858619793836241888979) }, + { SC_(-30.609375), SC_(-4.114720236218123790586146467787932912866) }, + { SC_(-26.7111663818359375), SC_(-3.978579083165602241813343216612781617222) }, + { SC_(-25.2413177490234375), SC_(-3.922021583095348294972916890287113874009) }, + { SC_(-14.624359130859375), SC_(-3.377002632462029261128559390722023174755) }, + { SC_(-12.431087493896484375), SC_(-3.214961448471211148851788664569558466737) }, + { SC_(-10.235607147216796875), SC_(-3.021397455139020950019259089284989476735) }, + { SC_(-9.41094970703125), SC_(-2.937831931335705068892682801940661221814) }, + { SC_(-1.635939121246337890625), SC_(-1.267878515574958901161281414987746394126) }, + { SC_(0.165048140085555239409131900174543261528e-11), SC_(0.1650481400855552394091318252402434490969e-11) }, + { SC_(0.2065420751096169738048047292977571487427e-11), SC_(0.2065420751096169738048045824476195851805e-11) }, + { SC_(0.6933230031758164102484442992135882377625e-11), SC_(0.6933230031758164102484387445779249960378e-11) }, + { SC_(0.1335144494962747785393730737268924713135e-10), SC_(0.1335144494962747785393691069885154254178e-10) }, + { SC_(0.1639981206391638579589198343455791473389e-10), SC_(0.1639981206391638579589124830249793630233e-10) }, + { SC_(0.5730159402528300915946601890027523040771e-10), SC_(0.5730159402528300915943466086387879674642e-10) }, + { SC_(0.1113731329382972035091370344161987304688e-9), SC_(0.1113731329382972035089067894949093881495e-9) }, + { SC_(0.1421470718909745301061775535345077514648e-9), SC_(0.1421470718909745301056988545527660628072e-9) }, + { SC_(0.3800632031314421510614920407533645629883e-9), SC_(0.3800632031314421510523421433949182208556e-9) }, + { SC_(0.6091627202664540163823403418064117431641e-9), SC_(0.6091627202664540163446657373156062782485e-9) }, + { SC_(0.1022164131114777774200774729251861572266e-8), SC_(0.1022164131114777774022778557990306872369e-8) }, + { SC_(0.2881922256392499548383057117462158203125e-8), SC_(0.2881922256392499544393767813667092771012e-8) }, + { SC_(0.4762776839584148547146469354629516601563e-8), SC_(0.476277683958414852913996340565203355397e-8) }, + { SC_(0.8854133426439148024655878543853759765625e-8), SC_(0.8854133426439147908968245283871083240172e-8) }, + { SC_(0.2305032609228874207474291324615478515625e-7), SC_(0.2305032609228874003356918102983865074646e-7) }, + { SC_(0.593924909253473742865025997161865234375e-7), SC_(0.5939249092534733936898428443727569533982e-7) }, + { SC_(0.116676488914890796877443790435791015625e-6), SC_(0.1166764889148905321500984793498641255822e-6) }, + { SC_(0.23799674409019644372165203094482421875e-6), SC_(0.2379967440901941969351979802846104416105e-6) }, + { SC_(0.468465941594331525266170501708984375e-6), SC_(0.4684659415943143903171559983024977629855e-6) }, + { SC_(0.938269977268646471202373504638671875e-6), SC_(0.9382699772685088034539126253793231155849e-6) }, + { SC_(0.11039855962735600769519805908203125e-5), SC_(0.1103985596273335823585612314642277768255e-5) }, + { SC_(0.3291776010883040726184844970703125e-5), SC_(0.3291776010877095894302224300936487731914e-5) }, + { SC_(0.7517213816754519939422607421875e-5), SC_(0.7517213816683722188794989550887653607132e-5) }, + { SC_(0.1511466689407825469970703125e-4), SC_(0.1511466689350275580917503171217159502838e-4) }, + { SC_(0.2986399340443313121795654296875e-4), SC_(0.2986399339999405714013629488236926241004e-4) }, + { SC_(0.338702811859548091888427734375e-4), SC_(0.3387028117947883430533095948345065139191e-4) }, + { SC_(0.906601198948919773101806640625e-4), SC_(0.906601197706988351306957830965994124706e-4) }, + { SC_(0.0002194953267462551593780517578125), SC_(0.0002194953249837736286256750985648679367941) }, + { SC_(0.000439521507360041141510009765625), SC_(0.0004395214932089767739989257698158711437628) }, + { SC_(0.000633315183222293853759765625), SC_(0.0006333151408864353233898099984279240916971) }, + { SC_(0.0011151232756674289703369140625), SC_(0.001115123044558274291478926657905120008324) }, + { SC_(0.001962467096745967864990234375), SC_(0.001962465837080717523701980763915077400694) }, + { SC_(0.00555375404655933380126953125), SC_(0.005553725496786973429128982795141683132844) }, + { SC_(0.0086911283433437347412109375), SC_(0.008691018931968293864799414130929206833958) }, + { SC_(0.0299333631992340087890625), SC_(0.02992889492062483965221469264905787460865) }, + { SC_(0.05124260485172271728515625), SC_(0.05122020579778826952521305025815121247091) }, + { SC_(0.1120129525661468505859375), SC_(0.1117800293787827963417928974597546321371) }, + { SC_(0.23480379581451416015625), SC_(0.2326980652154337550758180136962670174127) }, + { SC_(0.48987305164337158203125), SC_(0.4721357117742938088066477027937692054202) }, + { SC_(0.7518312931060791015625), SC_(0.6946115711893359819020679952345318169567) }, + { SC_(1.6557407379150390625), SC_(1.278160734826225530236928993772347284054) }, + { SC_(3.59585666656494140625), SC_(1.991726234324511503262116200593118895023) }, + { SC_(3.66270542144775390625), SC_(2.009484184971721909158848583710336926639) }, + { SC_(4.14284515380859375), SC_(2.128787712416204967344704932367445907457) }, + { SC_(5.957065582275390625), SC_(2.484696793415547705602607297785951657088) }, + { SC_(10.890350341796875), SC_(3.083125584533294091723482211217314707631) }, + { SC_(27.3714599609375), SC_(4.002981567623351049359177787856924686562) }, + { SC_(29.58606719970703125), SC_(4.080736210902825878904303085045024018186) }, + { SC_(30.79753875732421875), SC_(4.12084543001111324730244006549246292804) }, + { SC_(38.7815704345703125), SC_(4.351258506393415652318140630603706518075) }, + { SC_(46.8814849853515625), SC_(4.540883728536112674069796475595291204506) }, + { SC_(47.21551513671875), SC_(4.547981853382592216976253569088895438026) }, + { SC_(47.2205810546875), SC_(4.548089117076700023837192332723136228729) }, + { SC_(49.7236175537109375), SC_(4.599728302509060806991933759403338520635) }, + { SC_(61.557464599609375), SC_(4.813184271185753146544327202950243752583) }, + { SC_(67.821624755859375), SC_(4.910082619934557664814376219665476353171) }, + { SC_(68.823638916015625), SC_(4.924747230639766605446150280099353765226) }, + { SC_(73.754669189453125), SC_(4.993937439635390959095430118863527649672) }, + { SC_(80.956695556640625), SC_(5.087099712053553781191118720872632390369) }, + { SC_(85.264068603515625), SC_(5.138934697019629394937832600298516485788) }, + { SC_(85.2677001953125), SC_(5.138977285472120998185283011836704311053) }, + { SC_(92.8238525390625), SC_(5.223879832616765332217842454967156441878) }, + { SC_(94.503570556640625), SC_(5.241812789460326774676763952219373084611) }, + { SC_(116.044677734375), SC_(5.447141014648796298911597081177174321311) }, + { SC_(123.775543212890625), SC_(5.511633288238573314525515498135556594256) }, + { SC_(132.3592529296875), SC_(5.578681289305597653175233933020307342597) }, + { SC_(139.7633056640625), SC_(5.633110296634630769495301352527335620124) }, + { SC_(143.9609375), SC_(5.662701238627724704458477126104574527542) }, + { SC_(146.31298828125), SC_(5.67890694100532316423025711195756179793) }, + { SC_(155.0980224609375), SC_(5.737214893086865588590011960998256979258) }, + { SC_(155.47784423828125), SC_(5.739660763047893353413979379888554852015) }, + { SC_(155.74066162109375), SC_(5.741349685869528141606229427222705529931) }, + { SC_(163.60546875), SC_(5.790614371552514063824117620171866397141) }, + { SC_(178.735107421875), SC_(5.879059869096351492478036425245903640013) }, + { SC_(179.70269775390625), SC_(5.884458728291027196042299574564237490922) }, + { SC_(179.81976318359375), SC_(5.885109945587401516601219374963261030511) }, + { SC_(181.3594970703125), SC_(5.893636014368935823237345043968331464439) }, + { SC_(194.82861328125), SC_(5.965274032538233309914029311001854910366) }, + { SC_(195.23284912109375), SC_(5.967346683696556361432840609074921098744) }, + { SC_(199.07666015625), SC_(5.986843466070591664424697234367005123532) }, + { SC_(205.77423095703125), SC_(6.019932686217941432444903969630541836634) }, + { SC_(206.04608154296875), SC_(6.021252909681260874009121058600710829746) }, + { SC_(209.36480712890625), SC_(6.037231102920488838374618484909263149999) }, + { SC_(210.703857421875), SC_(6.043606439928323259236771869386592943524) }, + { SC_(215.2139892578125), SC_(6.064785410115010353953388909263073452906) }, + { SC_(225.83892822265625), SC_(6.112974120371601210219399663570367666925) }, + { SC_(226.95465087890625), SC_(6.117902255760310722524206309196088056026) }, + { SC_(232.79864501953125), SC_(6.143325688959409019088830019463644651492) }, + { SC_(240.647216796875), SC_(6.176483527820343060796486861138751990657) }, + { SC_(243.1324462890625), SC_(6.186757751007361577528719065211514303001) }, + { SC_(251.26702880859375), SC_(6.219667373726848075772693817688242362523) }, + { SC_(253.72906494140625), SC_(6.22941808808355428724031065923268579187) }, + { SC_(254.6866455078125), SC_(6.233184983047428276974209254934385269649) }, + { SC_(257.2001953125), SC_(6.243005711460191965779748682542918291165) }, + { SC_(257.7401123046875), SC_(6.245102704489326829989715358050375153164) }, + { SC_(261.731201171875), SC_(6.260468857392133508067336988271711266899) }, + { SC_(263.75), SC_(6.268152459140511369534885468430435001253) }, + { SC_(265.5167236328125), SC_(6.27482855458316535698354618677862660051) }, + { SC_(273.9171142578125), SC_(6.305976070434008107321296347063621346142) }, + { SC_(278.897705078125), SC_(6.323995460699820076921115676535829705602) }, + { SC_(279.167236328125), SC_(6.324961403980196616927106861416582346957) }, + { SC_(292.207275390625), SC_(6.370613506132747051155136954016356169709) }, + { SC_(293.5975341796875), SC_(6.375359978930308922973172601759003753776) }, + { SC_(293.9749755859375), SC_(6.37664472001459930030121377025213179339) }, + { SC_(295.1998291015625), SC_(6.380802563199264354475951774362027757146) }, + { SC_(297.2799072265625), SC_(6.387824152942428878634062028172724987619) }, + { SC_(297.9285888671875), SC_(6.390003820200830500292592492268074658657) }, + { SC_(298.1058349609375), SC_(6.390598568067900196600610103133530143627) }, + { SC_(300.2803955078125), SC_(6.397866642974941387667911791807820745523) }, + { SC_(307.531005859375), SC_(6.421725738171607321147138767579512701297) }, + { SC_(308.1754150390625), SC_(6.423818963102848059254801023392818581651) }, + { SC_(309.7344970703125), SC_(6.42886525591175973950489819292419777646) }, + { SC_(314.2847900390625), SC_(6.443449261058926842539512498259875923692) }, + { SC_(314.7236328125), SC_(6.444844602076255234209250709648120853169) }, + { SC_(320.8406982421875), SC_(6.464094341970106436820739729174428145587) }, + { SC_(321.2459716796875), SC_(6.465356699668166045068069215854964871388) }, + { SC_(321.9031982421875), SC_(6.467400466944124604717633061439316010097) }, + { SC_(323.457763671875), SC_(6.472218114936839319482664927965675017022) }, + { SC_(330.82861328125), SC_(6.494749921382326159049677218709809728653) }, + { SC_(335.008544921875), SC_(6.507305446835735629461798195367913785079) }, + { SC_(340.7171630859375), SC_(6.52420203343567514995053263208100130883) }, + { SC_(348.4677734375), SC_(6.546694993078936223411278280975538973745) }, + { SC_(349.1292724609375), SC_(6.548591493378012538030220208753185699103) }, + { SC_(372.4288330078125), SC_(6.613194950203131899741436452253747959432) }, + { SC_(376.7574462890625), SC_(6.624750543633906159543027563737013064495) }, + { SC_(378.4306640625), SC_(6.629181796246806383589594972543857520438) }, + { SC_(390.9031982421875), SC_(6.661608771130218794653929942801159149921) }, + { SC_(405.7918701171875), SC_(6.698989091751706872771950506377356853297) }, + { SC_(407.3646240234375), SC_(6.702857353572475083661986001523177171689) }, + { SC_(413.3758544921875), SC_(6.717505881986416333938861696792809072989) }, + { SC_(415.7354736328125), SC_(6.723197804327891152771611004762978333262) }, + { SC_(417.193603515625), SC_(6.726699007993022779613295744938090059081) }, + { SC_(420.874755859375), SC_(6.735483889307782773060913517308358177287) }, + { SC_(429.2635498046875), SC_(6.755219602793124098109976875531119009337) }, + { SC_(429.756103515625), SC_(6.756366380816258251898421006493740831209) }, + { SC_(433.9931640625), SC_(6.766177290841292993057892254025351144187) }, + { SC_(434.0106201171875), SC_(6.766217511883345263895227495273810179399) }, + { SC_(440.073974609375), SC_(6.780091308338912469861271641540800609593) }, + { SC_(450.2220458984375), SC_(6.802889310303153472760070274877750654792) }, + { SC_(455.017578125), SC_(6.813484439494547291485100306142865313692) }, + { SC_(457.1668701171875), SC_(6.818196843455478403993903909497663695391) }, + { SC_(457.5068359375), SC_(6.818940201487998386877795327256997263141) }, + { SC_(459.2913818359375), SC_(6.822833193143804950038640831090638344206) }, + { SC_(459.492431640625), SC_(6.823270835445770195995146570284994476855) }, + { SC_(459.743896484375), SC_(6.823817951018000432957797403476399271545) }, + { SC_(464.888427734375), SC_(6.834945773756887582002201745232432180165) }, + { SC_(464.96630859375), SC_(6.835113285253827054382848168952118996735) }, + { SC_(467.6949462890625), SC_(6.840964582694129262617973631406633110533) }, + { SC_(468.86767578125), SC_(6.843468905210339769583953244362473799296) }, + { SC_(470.5927734375), SC_(6.847141429556456346098564888170408445454) }, + { SC_(481.109619140625), SC_(6.869243403190376592226057897975831923528) }, + { SC_(487.4595947265625), SC_(6.882355637062963925878474710879054534122) }, + { SC_(488.521484375), SC_(6.884531678915821025400961463061609241284) }, + { SC_(492.8812255859375), SC_(6.893416432937340181639026008051884214636) }, + { SC_(494.0684814453125), SC_(6.895822338701104787981876142689381248646) }, + { SC_(496.4613037109375), SC_(6.900653737167637608469868350257964416187) }, + { SC_(716.154052734375), SC_(7.2670429692740963323840103680788401489) }, + { SC_(1799.92578125), SC_(8.18864796812207220842639194214816612374) }, + { SC_(3564.845703125), SC_(8.872023251113288479644702153534943187411) }, + { SC_(7139.869140625), SC_(9.566596912986166722124065953497502737374) }, + { SC_(12081.22265625), SC_(10.09255486190560839163513867694963651638) }, + { SC_(22810.2421875), SC_(10.72811211386442708825132311411659945728) }, + { SC_(46598.96875), SC_(11.44248087071561781484413254045580909559) }, + { SC_(108493.375), SC_(12.2875915707717694181967755881243802905) }, + { SC_(153860.8125), SC_(12.63695083834421849044542638165059455958) }, + { SC_(307019.5), SC_(13.32781372303006380727775468144124321804) }, + { SC_(682577.25), SC_(14.12677816700977652906247822629132152831) }, + { SC_(1788919.0), SC_(15.09026926533497056732451999718664988024) }, + { SC_(3769169.0), SC_(15.83551229128394411859348316953904317643) }, + { SC_(4327820.0), SC_(15.97372168955474121405849637207319473463) }, + { SC_(11044024.0), SC_(16.91054720571544732784968725481341574805) }, + { SC_(21423208.0), SC_(17.57313255890322504472542433762806340181) }, + { SC_(62828288.0), SC_(18.64906315643796382994112822618240813581) }, + { SC_(70207360.0), SC_(18.7601108873651530393019317938988457707) }, + { SC_(154231424.0), SC_(19.54711196618087428636344348941647974165) }, + { SC_(294509056.0), SC_(20.1939674915675244205666343569672677746) }, + { SC_(1070557184.0), SC_(21.48459226315622322979093631189365864251) }, + { SC_(1957922816.0), SC_(22.08829714102155481686957732827526425736) }, + { SC_(3912507392.0), SC_(22.78059146269991677250675041832419710247) }, + { SC_(7279233024.0), SC_(23.40143852031869095098313030835785443555) }, + { SC_(9665245184.0), SC_(23.68494949808078517275225570625127768937) }, + { SC_(22627590144.0), SC_(24.53558298204260156687347955127694595939) }, + { SC_(60601991168.0), SC_(25.52074076759958328225601044752066239618) }, + { SC_(134018236416.0), SC_(26.31438890085421876104087786768111623882) }, + { SC_(204864946176.0), SC_(26.73876398039978985836947169876252884996) }, + { SC_(284346286080.0), SC_(27.06660583008717947194092254982253381033) }, + { SC_(914576637952.0), SC_(28.23487428494463574299686107465880501208) }, + { SC_(1581915832320.0), SC_(28.7828049610810604762091293247739091717) } + }}; +#undef SC_ + diff --git a/test/atanh_data.ipp b/test/atanh_data.ipp new file mode 100644 index 000000000..aa2b36647 --- /dev/null +++ b/test/atanh_data.ipp @@ -0,0 +1,265 @@ +#define SC_(x) static_cast(BOOST_JOIN(x, L)) + static const boost::array, 260> atanh_data = {{ + { SC_(-0.9999983310699462890625), SC_(-6.998237084679026894944012639589359039154) }, + { SC_(-0.9999978542327880859375), SC_(-6.872579751329170618373487147465365112113) }, + { SC_(-0.999992847442626953125), SC_(-6.270592097465752658938563627507298840894) }, + { SC_(-0.999986171722412109375), SC_(-5.94096761408481303343713262973790932529) }, + { SC_(-0.9999828338623046875), SC_(-5.832855225378502201556044619092381320613) }, + { SC_(-0.99993991851806640625), SC_(-5.206463012087559958576821359878019831698) }, + { SC_(-0.9998834133148193359375), SC_(-4.874982184181078415951979525893507005727) }, + { SC_(-0.9998509883880615234375), SC_(-4.752279497280337973604777810710354182427) }, + { SC_(-0.9996016025543212890625), SC_(-4.260504202858904159948511594799808172686) }, + { SC_(-0.9993612766265869140625), SC_(-4.024433435320311666223352267171267188441) }, + { SC_(-0.9989283084869384765625), SC_(-3.765564108299923386710499391156429825334) }, + { SC_(-0.996978282928466796875), SC_(-3.246782610980921221976121268600437559073) }, + { SC_(-0.9950058460235595703125), SC_(-2.995067117994093910327278839368162513171) }, + { SC_(-0.9942638874053955078125), SC_(-2.925624274960953689217686505461794222524) }, + { SC_(-0.9907157421112060546875), SC_(-2.683964628330836423435761449812536808992) }, + { SC_(-0.990334033966064453125), SC_(-2.663723350226517894297444398633783948406) }, + { SC_(-0.9760982990264892578125), SC_(-2.207464998348322224447911930881940831481) }, + { SC_(-0.975830078125), SC_(-2.201817459680555978821333155035293326746) }, + { SC_(-0.972824573516845703125), SC_(-2.142454230829143642120980722087236052917) }, + { SC_(-0.964355945587158203125), SC_(-2.004668675602091699628236313728557407114) }, + { SC_(-0.9377224445343017578125), SC_(-1.718833734617706500332405835370646660471) }, + { SC_(-0.936240673065185546875), SC_(-1.706694048256515431631815885672233674251) }, + { SC_(-0.9310147762298583984375), SC_(-1.665954300553314591750124550883856364694) }, + { SC_(-0.9284839630126953125), SC_(-1.647283871876074775612635961977408037529) }, + { SC_(-0.92702484130859375), SC_(-1.636806734088156154435563850211913111601) }, + { SC_(-0.907566547393798828125), SC_(-1.513547347731111539787447924356304439238) }, + { SC_(-0.8974773883819580078125), SC_(-1.45909860863314960721683880733144126731) }, + { SC_(-0.89201068878173828125), SC_(-1.431681573516303182182852281763191690617) }, + { SC_(-0.87765598297119140625), SC_(-1.365471286049011032989426113780315638737) }, + { SC_(-0.864722728729248046875), SC_(-1.31177055834445394659795622633703969998) }, + { SC_(-0.8482067584991455078125), SC_(-1.249725893334944048400811976134680437019) }, + { SC_(-0.805655956268310546875), SC_(-1.114524602859225810626832366034868507092) }, + { SC_(-0.8048388957977294921875), SC_(-1.112200609756455010839566277837214844325) }, + { SC_(-0.780198574066162109375), SC_(-1.045877833082255648218230662475846475501) }, + { SC_(-0.774993419647216796875), SC_(-1.032711173436253036051634900441573817364) }, + { SC_(-0.761928558349609375), SC_(-1.000796728136218508274740551519944314059) }, + { SC_(-0.7504425048828125), SC_(-0.9739672824457071545212558891424185128762) }, + { SC_(-0.7495596408843994140625), SC_(-0.9719492983286864197920761015664283271976) }, + { SC_(-0.7481319904327392578125), SC_(-0.9686989420144869980652193388237565424316) }, + { SC_(-0.7459518909454345703125), SC_(-0.9637657636705832060477647484529718099027) }, + { SC_(-0.740113735198974609375), SC_(-0.9507308314464193446531653906278264445993) }, + { SC_(-0.7289731502532958984375), SC_(-0.926532531986765318247140551363667818701) }, + { SC_(-0.7226788997650146484375), SC_(-0.9132299082876395943553155758462776294309) }, + { SC_(-0.7161557674407958984375), SC_(-0.8997082193533088241452821117641146130759) }, + { SC_(-0.7017018795013427734375), SC_(-0.8706453720344795324137713806233471643566) }, + { SC_(-0.7013418674468994140625), SC_(-0.869936501309450037837255615527206388543) }, + { SC_(-0.6910541057586669921875), SC_(-0.8499705913361888274674607430873352657984) }, + { SC_(-0.6847054958343505859375), SC_(-0.8379194558420050243680161679293990119402) }, + { SC_(-0.683816432952880859375), SC_(-0.8362476144993315210191634049830735329595) }, + { SC_(-0.6747090816497802734375), SC_(-0.8193374156276963181623971413078624527231) }, + { SC_(-0.6575610637664794921875), SC_(-0.7885046044142132636244565971148537710756) }, + { SC_(-0.6522045135498046875), SC_(-0.7791255597799838714478027675042210151575) }, + { SC_(-0.6261923313140869140625), SC_(-0.7351275788820003190814567583601297864281) }, + { SC_(-0.62317371368408203125), SC_(-0.7301771459970386661436038123301221899899) }, + { SC_(-0.6067488193511962890625), SC_(-0.703759752613062694606340098389939027562) }, + { SC_(-0.583805561065673828125), SC_(-0.6682166303197607887197770868026216259119) }, + { SC_(-0.57952404022216796875), SC_(-0.6617457665293066615721543987931600748293) }, + { SC_(-0.5760939121246337890625), SC_(-0.6565964588573980673410012745962406194225) }, + { SC_(-0.56546783447265625), SC_(-0.6408350116350283247012343252539212893332) }, + { SC_(-0.557876110076904296875), SC_(-0.6297442839791668262390512924219530985196) }, + { SC_(-0.552320957183837890625), SC_(-0.6217149641475686188387285842099747744544) }, + { SC_(-0.5396339893341064453125), SC_(-0.6036390747171697770925487100621985766607) }, + { SC_(-0.512898921966552734375), SC_(-0.566655625606477066963814924576009526094) }, + { SC_(-0.5087778568267822265625), SC_(-0.5610793900942041010450981003401240686441) }, + { SC_(-0.49778258800506591796875), SC_(-0.5463539505715040435095828997881628670016) }, + { SC_(-0.49138653278350830078125), SC_(-0.5378865967606702825309467710240853062652) }, + { SC_(-0.48976075649261474609375), SC_(-0.5357455496477737185521806219611537015446) }, + { SC_(-0.4849350452423095703125), SC_(-0.5294166456244710849865087993139911130393) }, + { SC_(-0.447905063629150390625), SC_(-0.4820764946679978939347292302681479739796) }, + { SC_(-0.4461095333099365234375), SC_(-0.4798325976916710897104638200930521631286) }, + { SC_(-0.442959308624267578125), SC_(-0.4759065337156127733780647024545262009008) }, + { SC_(-0.4282791614532470703125), SC_(-0.4577873936293679104616687959332340265949) }, + { SC_(-0.40590059757232666015625), SC_(-0.4306933608076878743806295938648362982359) }, + { SC_(-0.40029656887054443359375), SC_(-0.4240020382545707218942432038948084774496) }, + { SC_(-0.3961341381072998046875), SC_(-0.4190551379319939121143095387765817810309) }, + { SC_(-0.38362753391265869140625), SC_(-0.4043062717590873607565891081374512836717) }, + { SC_(-0.3668625354766845703125), SC_(-0.3847928551425506989844364335805100378916) }, + { SC_(-0.36576449871063232421875), SC_(-0.383524642274593405044354917396013672621) }, + { SC_(-0.33507001399993896484375), SC_(-0.3485286317501441759395903809820783149922) }, + { SC_(-0.325722217559814453125), SC_(-0.3380352468276521988337991305273476357259) }, + { SC_(-0.3191967010498046875), SC_(-0.3307524237890151189189282578009246778706) }, + { SC_(-0.300002574920654296875), SC_(-0.3095224337886502772553678318463405679109) }, + { SC_(-0.296651363372802734375), SC_(-0.3058438250228024929192737081479944125667) }, + { SC_(-0.2944457530975341796875), SC_(-0.3034271164344304639271762476267134487006) }, + { SC_(-0.287281036376953125), SC_(-0.2956001834724682534366346933530868053292) }, + { SC_(-0.277384281158447265625), SC_(-0.2848460820316943671684268151981802822583) }, + { SC_(-0.239084422588348388671875), SC_(-0.2438028008332661157406055005411967471601) }, + { SC_(-0.23685944080352783203125), SC_(-0.2414442516939151847702918137086915005926) }, + { SC_(-0.2253856658935546875), SC_(-0.2293228153248167922436892209184552796457) }, + { SC_(-0.222838103771209716796875), SC_(-0.2266405306474514216815783549721039495306) }, + { SC_(-0.2155244350433349609375), SC_(-0.2189577360114399508892266906786141753798) }, + { SC_(-0.215337574481964111328125), SC_(-0.2187617810795299603977983273974692894269) }, + { SC_(-0.210162580013275146484375), SC_(-0.213341433207717363756996669992890635922) }, + { SC_(-0.202502727508544921875), SC_(-0.2053409277979887156428422481476167713845) }, + { SC_(-0.1915638446807861328125), SC_(-0.1939600847413307517360830799803393191118) }, + { SC_(-0.182519435882568359375), SC_(-0.1845877143932293893050297021219967479454) }, + { SC_(-0.1746494770050048828125), SC_(-0.1764584460861806768647912839605350112421) }, + { SC_(-0.15646183490753173828125), SC_(-0.1577576667718915543508871956214699612414) }, + { SC_(-0.155809104442596435546875), SC_(-0.1570886262196417664166148374546893502577) }, + { SC_(-0.15365445613861083984375), SC_(-0.1548811251554959173309605263848373765859) }, + { SC_(-0.1224990189075469970703125), SC_(-0.1231173360990485154969499505998906050858) }, + { SC_(-0.1088167130947113037109375), SC_(-0.1092492929673783678150776545155488162838) }, + { SC_(-0.0879255831241607666015625), SC_(-0.08815322150790301444935652020860591175639) }, + { SC_(-0.084013283252716064453125), SC_(-0.08421178632314607700273933837777975783955) }, + { SC_(-0.06121261417865753173828125), SC_(-0.06128924075509795947903082912344529497771) }, + { SC_(-0.0534169971942901611328125), SC_(-0.05346789060550385741248960046699294299987) }, + { SC_(-0.0504775941371917724609375), SC_(-0.0505205318923802872873054309617566051014) }, + { SC_(-0.029245793819427490234375), SC_(-0.02925413623733265658295603323356445573956) }, + { SC_(-0.024859689176082611083984375), SC_(-0.02486481220617492008704879514284669118942) }, + { SC_(-0.02046917378902435302734375), SC_(-0.02047203328100153078698678836073163016822) }, + { SC_(-0.0188200175762176513671875), SC_(-0.01882224002175634892911631496693598606876) }, + { SC_(-0.01615250110626220703125), SC_(-0.01615390607310920464304141890191065645265) }, + { SC_(-0.003271550871431827545166015625), SC_(-0.003271562543358962122360602166863449874156) }, + { SC_(0.165048140085555239409131900174543261528e-11), SC_(0.1650481400855552394091320500431428863902e-11) }, + { SC_(0.2065420751096169738048047292977571487427e-11), SC_(0.206542075109616973804805022998032275867e-11) }, + { SC_(0.6933230031758164102484442992135882377625e-11), SC_(0.6933230031758164102484554084849147212117e-11) }, + { SC_(0.1335144494962747785393730737268924713135e-10), SC_(0.1335144494962747785393810072036465631048e-10) }, + { SC_(0.1639981206391638579589198343455791473389e-10), SC_(0.16399812063916385795893453698677871597e-10) }, + { SC_(0.5730159402528300915946601890027523040771e-10), SC_(0.573015940252830091595287349730680977303e-10) }, + { SC_(0.1113731329382972035091370344161987304688e-9), SC_(0.1113731329382972035095975242587774151074e-9) }, + { SC_(0.1421470718909745301061775535345077514648e-9), SC_(0.1421470718909745301071349514979911287802e-9) }, + { SC_(0.3800632031314421510614920407533645629883e-9), SC_(0.3800632031314421510797918354702572472565e-9) }, + { SC_(0.6091627202664540163823403418064117431641e-9), SC_(0.6091627202664540164576895507880226730245e-9) }, + { SC_(0.1022164131114777774200774729251861572266e-8), SC_(0.1022164131114777774556767071774970972449e-8) }, + { SC_(0.2881922256392499548383057117462158203125e-8), SC_(0.288192225639249955636163572505228913693e-8) }, + { SC_(0.4762776839584148547146469354629516601563e-8), SC_(0.4762776839584148583159481252584483554515e-8) }, + { SC_(0.8854133426439148024655878543853759765625e-8), SC_(0.8854133426439148256031145063819131862293e-8) }, + { SC_(0.2305032609228874207474291324615478515625e-7), SC_(0.2305032609228874615709037767878933144975e-7) }, + { SC_(0.593924909253473742865025997161865234375e-7), SC_(0.5939249092534744412153923027426683753111e-7) }, + { SC_(0.116676488914890796877443790435791015625e-6), SC_(0.1166764889148913263321344126152128598244e-6) }, + { SC_(0.23799674409019644372165203094482421875e-6), SC_(0.2379967440902009372945601325325051016678e-6) }, + { SC_(0.468465941594331525266170501708984375e-6), SC_(0.4684659415943657951641995164188851895468e-6) }, + { SC_(0.938269977268646471202373504638671875e-6), SC_(0.9382699772689218066992955176687134214945e-6) }, + { SC_(0.11039855962735600769519805908203125e-5), SC_(0.1103985596274008583684717717140945872849e-5) }, + { SC_(0.3291776010883040726184844970703125e-5), SC_(0.3291776010894930389950221585822451540922e-5) }, + { SC_(0.7517213816754519939422607421875e-5), SC_(0.7517213816896115440686244581232090380807e-5) }, + { SC_(0.1511466689407825469970703125e-4), SC_(0.151146668952292524810471268542864819142e-4) }, + { SC_(0.2986399340443313121795654296875e-4), SC_(0.2986399341331127938191098992807520418566e-4) }, + { SC_(0.338702811859548091888427734375e-4), SC_(0.3387028119890675897146774685716560577438e-4) }, + { SC_(0.906601198948919773101806640625e-4), SC_(0.9066012014327826381277876686817592943471e-4) }, + { SC_(0.0002194953267462551593780517578125), SC_(0.0002194953302712183992004987083863068286575) }, + { SC_(0.000439521507360041141510009765625), SC_(0.0004395215356621756172832388067699815859163) }, + { SC_(0.000633315183222293853759765625), SC_(0.0006333152678940465733692213551976187060063) }, + { SC_(0.0011151232756674289703369140625), SC_(0.001115123737886341835357675971473032730801) }, + { SC_(0.001962467096745967864990234375), SC_(0.001962469616086656343101697360448994447248) }, + { SC_(0.00555375404655933380126953125), SC_(0.005553811147953337251608673095795926379418) }, + { SC_(0.0073246769607067108154296875), SC_(0.007324807956742500088707032291078962161983) }, + { SC_(0.0086911283433437347412109375), SC_(0.008691347183450786003338484767259005750621) }, + { SC_(0.01191294193267822265625), SC_(0.01191350553503790551712224267804100577312) }, + { SC_(0.0299333631992340087890625), SC_(0.02994230816857020273948279830730524489901) }, + { SC_(0.05124260485172271728515625), SC_(0.05128752666822782052568477249433836427776) }, + { SC_(0.05473744869232177734375), SC_(0.05479221508125443603584511761951841280462) }, + { SC_(0.0615889132022857666015625), SC_(0.0616669638195183068123715085691638305692) }, + { SC_(0.0937536060810089111328125), SC_(0.09402975380882211958737150286272764887037) }, + { SC_(0.0944215953350067138671875), SC_(0.09470370926367391764663232920446630580688) }, + { SC_(0.0944317281246185302734375), SC_(0.09471393321406025987803236345499696649722) }, + { SC_(0.099437296390533447265625), SC_(0.09976699249016486016395021218834536220752) }, + { SC_(0.1120129525661468505859375), SC_(0.1124849830355889429846170463794901835017) }, + { SC_(0.123102605342864990234375), SC_(0.1237301640233916802510730091978889755734) }, + { SC_(0.1356296539306640625), SC_(0.136470609508612479912140462032722727509) }, + { SC_(0.137633502483367919921875), SC_(0.1385125786609474520950316182245783874744) }, + { SC_(0.1474945545196533203125), SC_(0.1485782998046483417449330959482946265992) }, + { SC_(0.161897182464599609375), SC_(0.163334331667904492581671816308390067676) }, + { SC_(0.170511066913604736328125), SC_(0.1721929869363735526203806645402133592389) }, + { SC_(0.170518338680267333984375), SC_(0.1722004764629990854468820758107275101776) }, + { SC_(0.1856291294097900390625), SC_(0.1878064731815008603331954720151705472375) }, + { SC_(0.188988208770751953125), SC_(0.1912876932893582208057658208318612269009) }, + { SC_(0.23206615447998046875), SC_(0.2363721243391452317792593455314737006561) }, + { SC_(0.23480379581451416015625), SC_(0.2392675448267426979141683097039145007706) }, + { SC_(0.2646920680999755859375), SC_(0.271147290330230077990690324884981633411) }, + { SC_(0.27949869632720947265625), SC_(0.287138205934443267371748751232576707068) }, + { SC_(0.2878930568695068359375), SC_(0.2962673858386818760743191664695461734079) }, + { SC_(0.29259669780731201171875), SC_(0.3014037366523923189237135841752647308831) }, + { SC_(0.310164928436279296875), SC_(0.3207278827697849622886565511333038417846) }, + { SC_(0.31092464923858642578125), SC_(0.321568689394455844291345719208687599694) }, + { SC_(0.31145012378692626953125), SC_(0.3221505056451928603025272541357270447997) }, + { SC_(0.3271782398223876953125), SC_(0.339664946169947805312598648269899355103) }, + { SC_(0.3574345111846923828125), SC_(0.3739415343654542284372692080523616239196) }, + { SC_(0.35936939716339111328125), SC_(0.3761615922309022376646457727379955025932) }, + { SC_(0.35960352420806884765625), SC_(0.376430465969337149289307260724149960882) }, + { SC_(0.36268270015716552734375), SC_(0.3799714809649667171023188371749734970087) }, + { SC_(0.38961827754974365234375), SC_(0.4113499159905352551364249131399712396774) }, + { SC_(0.3904266357421875), SC_(0.4123033008021400244918917567469642157756) }, + { SC_(0.39811360836029052734375), SC_(0.4214052375603138698610724190400452927171) }, + { SC_(0.41150724887847900390625), SC_(0.4374243870957909704688484065341332398408) }, + { SC_(0.4120509624481201171875), SC_(0.438079118237434936389702798117975965435) }, + { SC_(0.41868770122528076171875), SC_(0.4460997186945703025969092767121680940872) }, + { SC_(0.4213654994964599609375), SC_(0.4493511447897728936819156706558562191803) }, + { SC_(0.4516327381134033203125), SC_(0.4867494899047367852559605895765155264024) }, + { SC_(0.45386397838592529296875), SC_(0.4895560176112374916678981118235718808999) }, + { SC_(0.46555078029632568359375), SC_(0.5043748446613432644265368658689527269923) }, + { SC_(0.48124635219573974609375), SC_(0.5246050193978662791545681419778026197093) }, + { SC_(0.4862163066864013671875), SC_(0.5310932154891663069921221983411478381793) }, + { SC_(0.48987305164337158203125), SC_(0.5358932909903700749055224508487508967699) }, + { SC_(0.502483844757080078125), SC_(0.5526234425942533333497748944931154989089) }, + { SC_(0.5074074268341064453125), SC_(0.5592320547729961905967162368329222398251) }, + { SC_(0.50932216644287109375), SC_(0.5618140818296767894194272698942620318047) }, + { SC_(0.5143489837646484375), SC_(0.5686253097655145706303693099066490153432) }, + { SC_(0.5154285430908203125), SC_(0.5700943191671631767428541315644447456688) }, + { SC_(0.5234100818634033203125), SC_(0.5810250825991417575052326759884079418476) }, + { SC_(0.527447223663330078125), SC_(0.5866018515043636631396476583453040565353) }, + { SC_(0.5309803485870361328125), SC_(0.5915094458340507867953465738492206518901) }, + { SC_(0.5477793216705322265625), SC_(0.615203099922968789392563855123133294432) }, + { SC_(0.5577394962310791015625), SC_(0.6295459624918965701898701179409871117547) }, + { SC_(0.558278560638427734375), SC_(0.6303287742357745455208912482493484545533) }, + { SC_(0.5843560695648193359375), SC_(0.6690521906099504661825293948827417437714) }, + { SC_(0.58713626861572265625), SC_(0.6732844960442398402790025978545962104976) }, + { SC_(0.587891101837158203125), SC_(0.6744372167164567880432735474026414000937) }, + { SC_(0.59034061431884765625), SC_(0.6781887236623533927703862563260315607999) }, + { SC_(0.5945003032684326171875), SC_(0.684597775489552027208298442397307157518) }, + { SC_(0.59579753875732421875), SC_(0.686606510213166504449707209584681039618) }, + { SC_(0.5961520671844482421875), SC_(0.6871563252400655469505525776500166368732) }, + { SC_(0.6005008220672607421875), SC_(0.6939300827887145041443406444376899260605) }, + { SC_(0.6150004863739013671875), SC_(0.7169242329194352408292786592670047478091) }, + { SC_(0.6162893772125244140625), SC_(0.718999805549710753361347867549953319929) }, + { SC_(0.6194069385528564453125), SC_(0.7240422748778544828852658840299672671419) }, + { SC_(0.62850666046142578125), SC_(0.7389438896054792083692956718844417119266) }, + { SC_(0.6293842792510986328125), SC_(0.7403958734869583175052115753160537014235) }, + { SC_(0.641617298126220703125), SC_(0.7609178886018203867768570854585116358618) }, + { SC_(0.6424276828765869140625), SC_(0.7622965466812235050838313606820415418465) }, + { SC_(0.643742084503173828125), SC_(0.7645378650643100878873860589743586646119) }, + { SC_(0.6468508243560791015625), SC_(0.7698647951781609863982541324817513695536) }, + { SC_(0.661591053009033203125), SC_(0.7956379107512945487304413199186620675388) }, + { SC_(0.669950008392333984375), SC_(0.8106524185805045490744310224054265386895) }, + { SC_(0.6813662052154541015625), SC_(0.8316597473423232100463095038096703191227) }, + { SC_(0.6968657970428466796875), SC_(0.861181279065929560893743209045814929335) }, + { SC_(0.69818878173828125), SC_(0.8637579113749143394578018115274414809977) }, + { SC_(0.7447831630706787109375), SC_(0.9611360201710216528199065175645895870797) }, + { SC_(0.7518312931060791015625), SC_(0.9771540941752986840434538256366757954859) }, + { SC_(0.753439426422119140625), SC_(0.9808634133542228689124290623167881332843) }, + { SC_(0.7567856311798095703125), SC_(0.9886489208209698781284720459176833206972) }, + { SC_(0.781728267669677734375), SC_(1.049799171982895646434536064092181561482) }, + { SC_(0.8115026950836181640625), SC_(1.13141414441875853996497925019619325203) }, + { SC_(0.8146479129791259765625), SC_(1.140694775558441751141132778566016009721) }, + { SC_(0.8266689777374267578125), SC_(1.177523083369968036920622084233473757412) }, + { SC_(0.8313877582550048828125), SC_(1.192613822570143323026054454909849845367) }, + { SC_(0.83430385589599609375), SC_(1.202132332303961254992584113869002097916) }, + { SC_(0.8416652679443359375), SC_(1.226857064433516189319978030947873360052) }, + { SC_(0.85844135284423828125), SC_(1.287389667157365295856183109440507044615) }, + { SC_(0.8678996562957763671875), SC_(1.324504043392939851303939943290664403741) }, + { SC_(0.8679344654083251953125), SC_(1.324645130926160707039340948233535357264) }, + { SC_(0.8800599575042724609375), SC_(1.376033487778217701076449442272672558944) }, + { SC_(0.900353908538818359375), SC_(1.474085296119410724208965851686464033313) }, + { SC_(0.909944057464599609375), SC_(1.527199085186199482742984118973093246969) }, + { SC_(0.9142425060272216796875), SC_(1.552776894827300414876536030721521100862) }, + { SC_(0.9149219989776611328125), SC_(1.556931837197935820864845994901316963069) }, + { SC_(0.918490886688232421875), SC_(1.579289662838161287932020406856633071199) }, + { SC_(0.91889286041259765625), SC_(1.581866335942762753838726342973068309432) }, + { SC_(0.919395923614501953125), SC_(1.585108284332000716017087123313008639504) }, + { SC_(0.9296839237213134765625), SC_(1.656055522329536863771852381599659592259) }, + { SC_(0.929839611053466796875), SC_(1.6572041418041492174589693922205395004) }, + { SC_(0.9352962970733642578125), SC_(1.69909864336192661532416961180476119912) }, + { SC_(0.937641620635986328125), SC_(1.718164398807964846646482962730886595432) }, + { SC_(0.9410912990570068359375), SC_(1.747508407724663243809927907107491941803) }, + { SC_(0.96212291717529296875), SC_(1.973718016345510160586126866935192466646) }, + { SC_(0.974821567535400390625), SC_(2.181122777108378116176876272951870175355) }, + { SC_(0.976945400238037109375), SC_(2.225721449969825368029395993270411091677) }, + { SC_(0.985663890838623046875), SC_(2.465463560165053850170474882317767473537) }, + { SC_(0.98803806304931640625), SC_(2.556586922814200202245299755886851508354) }, + { SC_(0.9928233623504638671875), SC_(2.813238353909419376753157236188061588174) } + }}; +#undef SC_ + diff --git a/test/handle_test_result.hpp b/test/handle_test_result.hpp index 21d768b88..9f6eb10dd 100644 --- a/test/handle_test_result.hpp +++ b/test/handle_test_result.hpp @@ -135,6 +135,14 @@ void handle_test_result(const boost::math::tools::test_result& result, { std::cout << "\n worst case at row: " << row << "\n { "; + if(std::numeric_limits::digits10) + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } + else + { + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); + } for(unsigned i = 0; i < worst.size(); ++i) { if(i) diff --git a/test/test_classify.cpp b/test/test_classify.cpp index 66394fcb3..5b661266b 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -23,6 +23,14 @@ void test_classify(T t, const char* type) T u = 2; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), true); if(std::numeric_limits::is_specialized) { t = (std::numeric_limits::max)(); @@ -31,6 +39,14 @@ void test_classify(T t, const char* type) t = (std::numeric_limits::min)(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), true); } if(std::numeric_limits::has_denorm) { @@ -39,12 +55,28 @@ void test_classify(T t, const char* type) { BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_SUBNORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } t = std::numeric_limits::denorm_min(); if((t != 0) && (t < (std::numeric_limits::min)())) { BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_SUBNORMAL); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_SUBNORMAL); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } } else @@ -54,10 +86,26 @@ void test_classify(T t, const char* type) t = 0; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_ZERO); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_ZERO); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); t /= -u; // create minus zero if it exists BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_ZERO); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_ZERO); - // inifinity: + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); + // infinity: if(std::numeric_limits::has_infinity) { // At least one std::numeric_limits::infinity)() returns zero @@ -65,6 +113,14 @@ void test_classify(T t, const char* type) t = (std::numeric_limits::infinity)(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); #if !defined(__BORLANDC__) && !(defined(__DECCXX) && !defined(_IEEE_FP)) // divide by zero on Borland triggers a C++ exception :-( // divide by zero on Compaq CXX triggers a C style signal :-( @@ -73,10 +129,26 @@ void test_classify(T t, const char* type) t /= u; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); t = -2; t /= u; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_INFINITE); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_INFINITE); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); #else std::cout << "Infinities from divide by zero not tested" << std::endl; #endif @@ -94,6 +166,14 @@ void test_classify(T t, const char* type) t = std::numeric_limits::quiet_NaN(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NAN); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NAN); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } else { @@ -104,6 +184,14 @@ void test_classify(T t, const char* type) t = std::numeric_limits::signaling_NaN(); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NAN); BOOST_CHECK_EQUAL((::boost::math::fpclassify)(-t), (int)FP_NAN); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isfinite)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isinf)(-t), false); + BOOST_CHECK_EQUAL((::boost::math::isnan)(t), true); + BOOST_CHECK_EQUAL((::boost::math::isnan)(-t), true); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(t), false); + BOOST_CHECK_EQUAL((::boost::math::isnormal)(-t), false); } else { diff --git a/test/test_inv_hyp.cpp b/test/test_inv_hyp.cpp new file mode 100644 index 000000000..fdf0e5a7b --- /dev/null +++ b/test/test_inv_hyp.cpp @@ -0,0 +1,252 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" + +// +// DESCRIPTION: +// ~~~~~~~~~~~~ +// +// This file tests the inverse hyperbolic functions. There are two sets of tests: +// 1) Sanity checks: comparison to test values created with the +// online calculator at functions.wolfram.com +// 2) Accuracy tests use values generated with NTL::RR at +// 1000-bit precision and our generic versions of these functions. +// +// Note that when this file is first run on a new platform many of +// these tests will fail: the default accuracy is 1 epsilon which +// is too tight for most platforms. In this situation you will +// need to cast a human eye over the error rates reported and make +// a judgement as to whether they are acceptable. Either way please +// report the results to the Boost mailing list. Acceptable rates of +// error are marked up below as a series of regular expressions that +// identify the compiler/stdlib/platform/data-type/test-data/test-function +// along with the maximum expected peek and RMS mean errors for that +// test. +// + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + const char* largest_type; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(boost::math::policies::digits >() == boost::math::policies::digits >()) + { + largest_type = "(long\\s+)?double"; + } + else + { + largest_type = "long double"; + } +#else + largest_type = "(long\\s+)?double"; +#endif + + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + ".*", // test data group + ".*", 4, 2); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 4, 1); // test function + + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template +void do_test_asinh(const T& data, const char* type_name, const char* test_name) +{ + // + // test asinh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::asinh; +#else + pg funcp = boost::math::asinh; +#endif + + boost::math::tools::test_result result; + // + // test asinh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::asinh", test_name); + std::cout << std::endl; +} + +template +void do_test_acosh(const T& data, const char* type_name, const char* test_name) +{ + // + // test acosh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::acosh; +#else + pg funcp = boost::math::acosh; +#endif + + boost::math::tools::test_result result; + // + // test acosh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::acosh", test_name); + std::cout << std::endl; +} + +template +void do_test_atanh(const T& data, const char* type_name, const char* test_name) +{ + // + // test atanh(T) against data: + // + using namespace std; + typedef typename T::value_type row_type; + typedef typename row_type::value_type value_type; + + std::cout << test_name << " with type " << type_name << std::endl; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::atanh; +#else + pg funcp = boost::math::atanh; +#endif + + boost::math::tools::test_result result; + // + // test atanh against data: + // + result = boost::math::tools::test( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::atanh", test_name); + std::cout << std::endl; +} + +template +void test_inv_hyperbolics(T, const char* name) +{ + // + // The actual test data is rather verbose, so it's in a separate file + // +#include "asinh_data.ipp" + do_test_asinh(asinh_data, name, "asinh"); +#include "acosh_data.ipp" + do_test_acosh(acosh_data, name, "acosh"); +#include "atanh_data.ipp" + do_test_atanh(atanh_data, name, "atanh"); +} + +extern "C" double zetac(double); + +template +void test_spots(T, const char* t) +{ + std::cout << "Testing basic sanity checks for type " << t << std::endl; + // + // Basic sanity checks, tolerance is either 5 or 10 epsilon + // expressed as a percentage: + // + T tolerance = boost::math::tools::epsilon() * 100 * + (boost::is_floating_point::value ? 5 : 10); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(262145)/262144L), static_cast(0.00276213498595136093375633956331651432309750291610866833462649L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(2)), static_cast(1.31695789692481670862504634730796844402698197146751647976847L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(40)), static_cast(4.38187034804006698696313269586603717076961771721038534547948L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::acosh(static_cast(262145L)), static_cast(13.1698002453253126137651962522659827810753786944786303017757L), tolerance); + + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(0)), static_cast(0), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(1)/262145L), static_cast(3.81468271375603081996185039385472561751449912305225962381803e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(0.25)), static_cast(0.247466461547263452944781549788359289253766903098567696469117L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(1)), static_cast(0.881373587019543025232609324979792309028160328261635410753296L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(10)), static_cast(2.99822295029796973884659553759645347660705805487730365573446L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::asinh(static_cast(262145L)), static_cast(13.1698002453325885158685460826511173257938039316922010439486L), tolerance); + + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(0)), static_cast(0), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(1)/262145L), static_cast(3.81468271378378607794264842456613940280945630999769224301574e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(-1)/262145L), static_cast(-3.81468271378378607794264842456613940280945630999769224301574e-6L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(0.5)), static_cast(0.549306144334054845697622618461262852323745278911374725867347L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::atanh(static_cast(-0.5)), static_cast(-0.549306144334054845697622618461262852323745278911374725867347L), tolerance); +} + +int test_main(int, char* []) +{ + expected_results(); + BOOST_MATH_CONTROL_FP; + + test_spots(0.0f, "float"); + test_spots(0.0, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_spots(0.0L, "long double"); + test_spots(boost::math::concepts::real_concept(0.1), "real_concept"); +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif + + test_inv_hyperbolics(0.1F, "float"); + test_inv_hyperbolics(0.1, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_inv_hyperbolics(0.1L, "long double"); + test_inv_hyperbolics(boost::math::concepts::real_concept(0.1), "real_concept"); +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif + return 0; +} + + + diff --git a/tools/inv_hyp_data.cpp b/tools/inv_hyp_data.cpp new file mode 100644 index 000000000..b18396722 --- /dev/null +++ b/tools/inv_hyp_data.cpp @@ -0,0 +1,134 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include + +#include + +using namespace boost::math::tools; +using namespace std; + +struct asinh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log(z + sqrt(z * z + 1)); + std::cout << result << std::endl; + return result; + } +}; + +struct acosh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log(z + sqrt(z * z - 1)); + std::cout << result << std::endl; + return result; + } +}; + +struct atanh_data_generator +{ + boost::math::ntl::RR operator()(boost::math::ntl::RR z) + { + std::cout << z << " "; + boost::math::ntl::RR result = log((z + 1) / (1 - z)) / 2; + std::cout << result << std::endl; + return result; + } +}; + +int test_main(int argc, char*argv []) +{ + boost::math::ntl::RR::SetPrecision(500); + boost::math::ntl::RR::SetOutputPrecision(40); + + parameter_info arg1; + test_data data; + std::ofstream ofs; + + bool cont; + std::string line; + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic sin function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(asinh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=asinh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "asinh_data.ipp"; + ofs.open(line.c_str()); + write_code(ofs, data, "asinh_data"); + data.clear(); + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic cos function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(acosh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=acosh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "acosh_data.ipp"; + ofs.close(); + ofs.open(line.c_str()); + write_code(ofs, data, "acosh_data"); + data.clear(); + + std::cout << "Welcome.\n" + "This program will generate spot tests for the inverse hyperbolic tan function:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "z")) + return 1; + data.insert(atanh_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=atanh_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "atanh_data.ipp"; + ofs.close(); + ofs.open(line.c_str()); + write_code(ofs, data, "atanh_data"); + + return 0; +} + From fb02817e6772d2fb9f2756bb7b61451742c4a7da Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 28 Aug 2008 15:57:06 +0000 Subject: [PATCH 033/192] Fix Intel-10.1 test failures, by adjusting the function signatures for the inverse hyper-geometric functions. [SVN r48420] --- include/boost/math/special_functions/acosh.hpp | 4 ++-- include/boost/math/special_functions/asinh.hpp | 4 ++-- include/boost/math/special_functions/atanh.hpp | 4 ++-- include/boost/math/special_functions/math_fwd.hpp | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index f0a9a683e..bd8330b6e 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -86,7 +86,7 @@ namespace boost } template - inline typename tools::promote_args::type acosh(const T x, const Policy&) + inline typename tools::promote_args::type acosh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; @@ -101,7 +101,7 @@ namespace boost "boost::math::acosh<%1%>(%1%)"); } template - inline typename tools::promote_args::type acosh(const T x) + inline typename tools::promote_args::type acosh(T x) { return boost::math::acosh(x, policies::policy<>()); } diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index 45e91da13..cf8a1327b 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -89,12 +89,12 @@ namespace boost } template - inline typename tools::promote_args::type asinh(const T x) + inline typename tools::promote_args::type asinh(T x) { return boost::math::asinh(x, policies::policy<>()); } template - inline typename tools::promote_args::type asinh(const T x, const Policy&) + inline typename tools::promote_args::type asinh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index ff17dc39e..5932af899 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -99,7 +99,7 @@ namespace boost } template - inline typename tools::promote_args::type atanh(const T x, const Policy&) + inline typename tools::promote_args::type atanh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; @@ -114,7 +114,7 @@ namespace boost "boost::math::atanh<%1%>(%1%)"); } template - inline typename tools::promote_args::type atanh(const T x) + inline typename tools::promote_args::type atanh(T x) { return boost::math::atanh(x, policies::policy<>()); } diff --git a/include/boost/math/special_functions/math_fwd.hpp b/include/boost/math/special_functions/math_fwd.hpp index e0690554c..1af0992ca 100644 --- a/include/boost/math/special_functions/math_fwd.hpp +++ b/include/boost/math/special_functions/math_fwd.hpp @@ -531,22 +531,22 @@ namespace boost // inverse hyperbolics: template - typename tools::promote_args::type asinh(const T x); + typename tools::promote_args::type asinh(T x); template - typename tools::promote_args::type asinh(const T x, const Policy&); + typename tools::promote_args::type asinh(T x, const Policy&); template - typename tools::promote_args::type acosh(const T x); + typename tools::promote_args::type acosh(T x); template - typename tools::promote_args::type acosh(const T x, const Policy&); + typename tools::promote_args::type acosh(T x, const Policy&); template - typename tools::promote_args::type atanh(const T x); + typename tools::promote_args::type atanh(T x); template - typename tools::promote_args::type atanh(const T x, const Policy&); + typename tools::promote_args::type atanh(T x, const Policy&); namespace detail{ From 7c545120dfdca19e1c669c43a39a4fcb988e8aa0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 28 Aug 2008 16:06:08 +0000 Subject: [PATCH 034/192] Fully qualify function calls to keep Borland happy. [SVN r48421] --- include/boost/math/special_functions/asinh.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index cf8a1327b..14289688b 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -57,7 +57,7 @@ namespace boost else if(x < 0.5f) { // As below, but rearranged to preserve digits: - return boost::math::log1p(x + sqrt1pm1(x * x, pol), pol); + return boost::math::log1p(x + boost::math::sqrt1pm1(x * x, pol), pol); } else { From f0ee51464cd2750daf6fad5a695fc515a2a181df Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 28 Aug 2008 16:07:08 +0000 Subject: [PATCH 035/192] Update expected error rates for 80-bit long double platforms. [SVN r48422] --- test/test_inv_hyp.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/test_inv_hyp.cpp b/test/test_inv_hyp.cpp index fdf0e5a7b..30e7cfe92 100644 --- a/test/test_inv_hyp.cpp +++ b/test/test_inv_hyp.cpp @@ -60,6 +60,20 @@ void expected_results() largest_type = "(long\\s+)?double"; #endif + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + "atanh.*", // test data group + ".*", 6, 2); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + "atanh.*", // test data group + ".*", 6, 1); // test function add_expected_result( ".*", // compiler ".*", // stdlib @@ -71,7 +85,7 @@ void expected_results() ".*", // compiler ".*", // stdlib ".*", // platform - ".*", // test type(s) + largest_type, // test type(s) ".*", // test data group ".*", 4, 1); // test function From 7b3bf1cc4c600f18e4f63dea39065e17158cae22 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 1 Sep 2008 11:08:33 +0000 Subject: [PATCH 036/192] Fix gcc-4.x errors. [SVN r48510] --- include/boost/math/concepts/std_real_concept.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index d16bc9241..ac1efa78e 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -316,7 +315,11 @@ inline std::basic_istream& operator>>(std::basic_istream + +namespace boost{ namespace math{ namespace tools { @@ -374,3 +377,4 @@ using concepts::llround; #endif // BOOST_MATH_STD_REAL_CONCEPT_HPP + From bb3859054ffaa62dffd7ec47017a72c61d7951a8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 3 Sep 2008 17:42:45 +0000 Subject: [PATCH 037/192] Apparently no full long double support on NetBSD. [SVN r48566] --- include/boost/math/tools/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 006295517..11ef6329d 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -23,7 +23,7 @@ #include #include -#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__hppa) +#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__hppa) # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) From de4fb969ada2850d28535aaeb08fa5f5081e2602 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 5 Sep 2008 10:39:14 +0000 Subject: [PATCH 038/192] Fix definition to match fwd declaration. [SVN r48607] --- include/boost/math/special_functions/log1p.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 6ce4777f0..d1ca859a5 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -452,7 +452,7 @@ inline typename tools::promote_args::type } template -inline T log1pmx(T x) +inline typename tools::promote_args::type log1pmx(T x) { return log1pmx(x, policies::policy<>()); } From 66d109e1b3ebee1ffe144b3463c1eb8831a23d6b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 8 Sep 2008 17:55:36 +0000 Subject: [PATCH 039/192] Break the test_binomial_real_concept test into 7 parts to reduce memory consumption. [SVN r48667] --- test/Jamfile.v2 | 45 ++++++++++++++++++++++++++++++++++- test/test_binomial.cpp | 54 +++++++++++++++++++++++++++++------------- 2 files changed, 82 insertions(+), 17 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 62b7e55c5..f22d95cc1 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -72,7 +72,50 @@ run test_binomial.cpp : # input files : # requirements TEST_REAL_CONCEPT - : test_binomial_real_concept ; + TEST_ROUNDING=0 + : test_binomial_real_concept0 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=1 + : test_binomial_real_concept1 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=2 + : test_binomial_real_concept2 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=3 + : test_binomial_real_concept3 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=4 + : test_binomial_real_concept4 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=5 + : test_binomial_real_concept5 ; +run test_binomial.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_ROUNDING=6 + : test_binomial_real_concept6 ; run test_binomial_coeff.cpp ; run test_carlson.cpp ; run test_cauchy.cpp ; diff --git a/test/test_binomial.cpp b/test/test_binomial.cpp index 33239bb8c..4234ec7cb 100644 --- a/test/test_binomial.cpp +++ b/test/test_binomial.cpp @@ -218,7 +218,8 @@ void test_spots(RealType) RealType tolerance = (std::max) (boost::math::tools::epsilon(), static_cast(std::numeric_limits::epsilon())); - tolerance *= 100 * 1000; + tolerance *= 100 * 1000; + RealType tol2 = boost::math::tools::epsilon() * 5 * 100; // 5 eps as a persent cout << "Tolerance = " << tolerance << "%." << endl; @@ -234,6 +235,7 @@ void test_spots(RealType) using ::boost::math::cdf; using ::boost::math::pdf; +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 0) // Test binomial using cdf spot values from MathCAD. // These test quantiles and complements as well. test_spot( @@ -438,7 +440,6 @@ void test_spots(RealType) static_cast(0.00001525878906250000000000000000), // k=8 p = 0.25 tolerance); - RealType tol2 = boost::math::tools::epsilon() * 5 * 100; // 5 eps as a persent binomial_distribution dist(static_cast(8), static_cast(0.25)); RealType x = static_cast(0.125); using namespace std; // ADL of std names. @@ -590,6 +591,8 @@ void test_spots(RealType) static_cast(7)), static_cast(0) ); +#endif + { // This is a visual sanity check that everything is OK: binomial_distribution my8dist(8., 0.25); // Note: double values (matching the distribution definition) avoid the need for any casting. @@ -623,7 +626,13 @@ void test_spots(RealType) //7 0.00036621093749999984 0.9999847412109375 //8 1.52587890625e-005 1 1 0 } +#if !defined(TEST_REAL_CONCEPT) #define T RealType +#else + // This reduces compile time and compiler memory usage by storing test data + // as an array of long double's rather than an array of real_concept's: +#define T long double +#endif #include "binomial_quantile.ipp" for(unsigned i = 0; i < binomial_quantile_data.size(); ++i) @@ -638,54 +647,67 @@ void test_spots(RealType) RealType tol = boost::math::tools::epsilon() * 500; if(!boost::is_floating_point::value) tol *= 10; // no lanczos approximation implies less accuracy + RealType x; +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 1) // // Check full real value first: // binomial_distribution p1(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); - RealType x = quantile(p1, binomial_quantile_data[i][2]); - BOOST_CHECK_CLOSE_FRACTION(x, binomial_quantile_data[i][3], tol); - x = quantile(complement(p1, binomial_quantile_data[i][2])); - BOOST_CHECK_CLOSE_FRACTION(x, binomial_quantile_data[i][4], tol); + x = quantile(p1, binomial_quantile_data[i][2]); + BOOST_CHECK_CLOSE_FRACTION(x, (RealType)binomial_quantile_data[i][3], tol); + x = quantile(complement(p1, (RealType)binomial_quantile_data[i][2])); + BOOST_CHECK_CLOSE_FRACTION(x, (RealType)binomial_quantile_data[i][4], tol); +#endif +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 2) // // Now with round down to integer: // binomial_distribution p2(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); x = quantile(p2, binomial_quantile_data[i][2]); - BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][3])); + BOOST_CHECK_EQUAL(x, (RealType)floor(binomial_quantile_data[i][3])); x = quantile(complement(p2, binomial_quantile_data[i][2])); - BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][4])); + BOOST_CHECK_EQUAL(x, (RealType)floor(binomial_quantile_data[i][4])); +#endif +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 3) // // Now with round up to integer: // binomial_distribution p3(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); x = quantile(p3, binomial_quantile_data[i][2]); - BOOST_CHECK_EQUAL(x, ceil(binomial_quantile_data[i][3])); + BOOST_CHECK_EQUAL(x, (RealType)ceil(binomial_quantile_data[i][3])); x = quantile(complement(p3, binomial_quantile_data[i][2])); - BOOST_CHECK_EQUAL(x, ceil(binomial_quantile_data[i][4])); + BOOST_CHECK_EQUAL(x, (RealType)ceil(binomial_quantile_data[i][4])); +#endif +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 4) // // Now with round to integer "outside": // binomial_distribution p4(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); x = quantile(p4, binomial_quantile_data[i][2]); - BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][3]) : ceil(binomial_quantile_data[i][3])); + BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][3]) : ceil(binomial_quantile_data[i][3]))); x = quantile(complement(p4, binomial_quantile_data[i][2])); - BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][4]) : floor(binomial_quantile_data[i][4])); + BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][4]) : floor(binomial_quantile_data[i][4]))); +#endif +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 5) // // Now with round to integer "inside": // binomial_distribution p5(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); x = quantile(p5, binomial_quantile_data[i][2]); - BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][3]) : floor(binomial_quantile_data[i][3])); + BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? ceil(binomial_quantile_data[i][3]) : floor(binomial_quantile_data[i][3]))); x = quantile(complement(p5, binomial_quantile_data[i][2])); - BOOST_CHECK_EQUAL(x, binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][4]) : ceil(binomial_quantile_data[i][4])); + BOOST_CHECK_EQUAL(x, (RealType)(binomial_quantile_data[i][2] < 0.5f ? floor(binomial_quantile_data[i][4]) : ceil(binomial_quantile_data[i][4]))); +#endif +#if !defined(TEST_ROUNDING) || (TEST_ROUNDING == 6) // // Now with round to nearest integer: // binomial_distribution p6(binomial_quantile_data[i][0], binomial_quantile_data[i][1]); x = quantile(p6, binomial_quantile_data[i][2]); - BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][3] + 0.5f)); + BOOST_CHECK_EQUAL(x, (RealType)(floor(binomial_quantile_data[i][3] + 0.5f))); x = quantile(complement(p6, binomial_quantile_data[i][2])); - BOOST_CHECK_EQUAL(x, floor(binomial_quantile_data[i][4] + 0.5f)); + BOOST_CHECK_EQUAL(x, (RealType)(floor(binomial_quantile_data[i][4] + 0.5f))); +#endif } } // template void test_spots(RealType) From 9dd7c7ffe3957441038876d9ee0ecc8284e9a479 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Sep 2008 09:32:54 +0000 Subject: [PATCH 040/192] Fix for EDG-245 compilers on DECCXX and Tru64. [SVN r48681] --- include/boost/math/special_functions/expm1.hpp | 4 ++-- include/boost/math/special_functions/log1p.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index 73b4f4584..e6068e6d2 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -81,7 +81,7 @@ T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol) return x; detail::expm1_series s(x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245) T result = tools::sum_series(s, policies::digits(), max_iter); #else T zero = 0; @@ -232,7 +232,7 @@ inline typename tools::promote_args::type expm1(T x, const Policy& /* pol */) # undef expm1 #endif -#ifdef BOOST_HAS_EXPM1 +#if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER)) # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); } inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); } diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index d1ca859a5..89ad880ea 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -94,7 +94,7 @@ T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&) return x; detail::log1p_series s(x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245) result_type result = tools::sum_series(s, policies::digits(), max_iter); #else result_type zero = 0; @@ -315,7 +315,7 @@ inline long double log1p(long double z) # undef log1p #endif -#ifdef BOOST_HAS_LOG1P +#if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER)) # if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \ || ((defined(linux) || defined(__linux) || defined(__linux__)) && !defined(__SUNPRO_CC)) \ || (defined(__hpux) && !defined(__hppa)) From 710c7ca47d80b8780851c9756bf98b99a64ec1e7 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Sep 2008 12:10:11 +0000 Subject: [PATCH 041/192] Split files into smaller tests. Fixes #2307. [SVN r48682] --- test/Jamfile.v2 | 65 ++++++++++++++++++++++++++++++++++++-- test/test_ibeta.cpp | 8 +++++ test/test_ibeta_inv.cpp | 8 +++++ test/test_ibeta_inv_ab.cpp | 9 ++++++ 4 files changed, 87 insertions(+), 3 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f22d95cc1..f264e0592 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -162,7 +162,29 @@ run test_ibeta.cpp : # input files : # requirements TEST_REAL_CONCEPT - : test_ibeta_real_concept ; + TEST_DATA=1 + : test_ibeta_real_concept1 ; +run test_ibeta.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=2 + : test_ibeta_real_concept2 ; +run test_ibeta.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=3 + : test_ibeta_real_concept3 ; +run test_ibeta.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=4 + : test_ibeta_real_concept4 ; run test_ibeta_inv.cpp : # command line : # input files @@ -186,7 +208,29 @@ run test_ibeta_inv.cpp : # input files : # requirements TEST_REAL_CONCEPT - : test_ibeta_inv_real_concept ; + TEST_DATA=1 + : test_ibeta_inv_real_concept1 ; +run test_ibeta_inv.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=2 + : test_ibeta_inv_real_concept2 ; +run test_ibeta_inv.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=3 + : test_ibeta_inv_real_concept3 ; +run test_ibeta_inv.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=4 + : test_ibeta_inv_real_concept4 ; run test_ibeta_inv_ab.cpp : # command line : # input files @@ -210,7 +254,22 @@ run test_ibeta_inv_ab.cpp : # input files : # requirements TEST_REAL_CONCEPT - : test_ibeta_inv_ab_real_concept ; + TEST_DATA=1 + : test_ibeta_inv_ab_real_concept1 ; +run test_ibeta_inv_ab.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=2 + : test_ibeta_inv_ab_real_concept2 ; +run test_ibeta_inv_ab.cpp + : # command line + : # input files + : # requirements + TEST_REAL_CONCEPT + TEST_DATA=3 + : test_ibeta_inv_ab_real_concept3 ; run test_igamma.cpp ; run test_igamma_inv.cpp : # command line diff --git a/test/test_ibeta.cpp b/test/test_ibeta.cpp index 40a4611f7..91c5be945 100644 --- a/test/test_ibeta.cpp +++ b/test/test_ibeta.cpp @@ -363,21 +363,29 @@ void test_beta(T, const char* name) // The contents are as follows, each row of data contains // five items, input value a, input value b, integration limits x, beta(a, b, x) and ibeta(a, b, x): // +#if !defined(TEST_DATA) || (TEST_DATA == 1) # include "ibeta_small_data.ipp" do_test_beta(ibeta_small_data, name, "Incomplete Beta Function: Small Values"); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 2) # include "ibeta_data.ipp" do_test_beta(ibeta_data, name, "Incomplete Beta Function: Medium Values"); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 3) # include "ibeta_large_data.ipp" do_test_beta(ibeta_large_data, name, "Incomplete Beta Function: Large and Diverse Values"); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 4) # include "ibeta_int_data.ipp" do_test_beta(ibeta_int_data, name, "Incomplete Beta Function: Small Integer Values"); +#endif } template diff --git a/test/test_ibeta_inv.cpp b/test/test_ibeta_inv.cpp index fb6a3705c..13d3a906e 100644 --- a/test/test_ibeta_inv.cpp +++ b/test/test_ibeta_inv.cpp @@ -278,21 +278,29 @@ void test_beta(T, const char* name) // The contents are as follows, each row of data contains // five items, input value a, input value b, integration limits x, beta(a, b, x) and ibeta(a, b, x): // +#if !defined(TEST_DATA) || (TEST_DATA == 1) # include "ibeta_small_data.ipp" test_inverses(ibeta_small_data); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 2) # include "ibeta_data.ipp" test_inverses(ibeta_data); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 3) # include "ibeta_large_data.ipp" test_inverses(ibeta_large_data); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 4) # include "ibeta_inv_data.ipp" test_inverses2(ibeta_inv_data, name, "Inverse incomplete beta"); +#endif } template diff --git a/test/test_ibeta_inv_ab.cpp b/test/test_ibeta_inv_ab.cpp index 3110e41bd..d7e6b67b8 100644 --- a/test/test_ibeta_inv_ab.cpp +++ b/test/test_ibeta_inv_ab.cpp @@ -254,17 +254,25 @@ void test_beta(T, const char* name) // std::cout << "Running sanity checks for type " << name << std::endl; +#if !defined(TEST_DATA) || (TEST_DATA == 1) # include "ibeta_small_data.ipp" test_inverses(ibeta_small_data); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 2) # include "ibeta_data.ipp" test_inverses(ibeta_data); +#endif +#if !defined(TEST_DATA) || (TEST_DATA == 3) # include "ibeta_large_data.ipp" test_inverses(ibeta_large_data); +#endif + +#if !defined(TEST_REAL_CONCEPT) || defined(FULL_TEST) #ifndef FULL_TEST if(boost::is_floating_point::value){ #endif @@ -280,6 +288,7 @@ void test_beta(T, const char* name) #ifndef FULL_TEST } #endif +#endif } int test_main(int, char* []) From 5cb4de411a0cd24591b87fd6f5f321533abdeb33 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 11 Sep 2008 17:58:11 +0000 Subject: [PATCH 042/192] Added mpfr support, and updated NTL::RR support. Added concept checks for those. Added type casts where required to get mpfr_class support working OK. [SVN r48737] --- .../math/bindings/detail/big_digamma.hpp | 294 ++++++ .../math/bindings/detail/big_lanczos.hpp | 887 ++++++++++++++++++ include/boost/math/bindings/mpfr.hpp | 850 +++++++++++++++++ include/boost/math/bindings/rr.hpp | 162 +++- include/boost/math/concepts/distributions.hpp | 2 + .../boost/math/concepts/real_type_concept.hpp | 109 +++ include/boost/math/distributions/binomial.hpp | 4 +- include/boost/math/distributions/cauchy.hpp | 2 +- .../detail/inv_discrete_quantile.hpp | 10 +- .../math/distributions/negative_binomial.hpp | 8 +- .../math/distributions/non_central_beta.hpp | 6 +- .../math/distributions/non_central_t.hpp | 4 +- include/boost/math/distributions/poisson.hpp | 4 +- .../boost/math/distributions/triangular.hpp | 4 +- .../boost/math/special_functions/bessel.hpp | 8 +- include/boost/math/special_functions/beta.hpp | 30 +- .../boost/math/special_functions/cos_pi.hpp | 2 +- .../special_functions/detail/bessel_ik.hpp | 6 +- .../special_functions/detail/bessel_jy.hpp | 18 +- .../detail/bessel_jy_asym.hpp | 2 +- .../special_functions/detail/gamma_inva.hpp | 4 +- .../special_functions/detail/ibeta_inv_ab.hpp | 16 +- .../detail/ibeta_inverse.hpp | 6 +- .../detail/igamma_inverse.hpp | 6 +- .../detail/t_distribution_inv.hpp | 93 +- .../boost/math/special_functions/ellint_1.hpp | 6 +- .../boost/math/special_functions/ellint_2.hpp | 4 +- .../boost/math/special_functions/ellint_3.hpp | 2 +- include/boost/math/special_functions/erf.hpp | 4 +- .../boost/math/special_functions/expint.hpp | 4 +- .../boost/math/special_functions/expm1.hpp | 2 +- .../math/special_functions/factorials.hpp | 2 +- .../boost/math/special_functions/gamma.hpp | 23 +- .../boost/math/special_functions/log1p.hpp | 4 +- include/boost/math/special_functions/next.hpp | 10 +- .../boost/math/special_functions/sin_pi.hpp | 2 +- .../special_functions/spherical_harmonic.hpp | 8 +- .../boost/math/special_functions/trunc.hpp | 2 +- include/boost/math/special_functions/zeta.hpp | 2 +- include/boost/math/tools/minima.hpp | 4 +- include/boost/math/tools/rational.hpp | 12 +- include/boost/math/tools/roots.hpp | 6 +- include/boost/math/tools/toms748_solve.hpp | 12 +- test/mpfr_concept_check.cpp | 32 + test/ntl_concept_check.cpp | 26 + 45 files changed, 2545 insertions(+), 159 deletions(-) create mode 100644 include/boost/math/bindings/detail/big_digamma.hpp create mode 100644 include/boost/math/bindings/detail/big_lanczos.hpp create mode 100644 include/boost/math/bindings/mpfr.hpp create mode 100644 include/boost/math/concepts/real_type_concept.hpp create mode 100644 test/mpfr_concept_check.cpp create mode 100644 test/ntl_concept_check.cpp diff --git a/include/boost/math/bindings/detail/big_digamma.hpp b/include/boost/math/bindings/detail/big_digamma.hpp new file mode 100644 index 000000000..3d7819b50 --- /dev/null +++ b/include/boost/math/bindings/detail/big_digamma.hpp @@ -0,0 +1,294 @@ +// (C) Copyright John Maddock 2006-8. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_NTL_DIGAMMA +#define BOOST_MATH_NTL_DIGAMMA + +#include +#include +#include + +namespace boost{ namespace math{ namespace detail{ + +template +T big_digamma_helper(T x) +{ + static const T P[61] = { + boost::lexical_cast("0.6660133691143982067148122682345055274952e81"), + boost::lexical_cast("0.6365271516829242456324234577164675383137e81"), + boost::lexical_cast("0.2991038873096202943405966144203628966976e81"), + boost::lexical_cast("0.9211116495503170498076013367421231351115e80"), + boost::lexical_cast("0.2090792764676090716286400360584443891749e80"), + boost::lexical_cast("0.3730037777359591428226035156377978092809e79"), + boost::lexical_cast("0.5446396536956682043376492370432031543834e78"), + boost::lexical_cast("0.6692523966335177847425047827449069256345e77"), + boost::lexical_cast("0.7062543624100864681625612653756619116848e76"), + boost::lexical_cast("0.6499914905966283735005256964443226879158e75"), + boost::lexical_cast("0.5280364564853225211197557708655426736091e74"), + boost::lexical_cast("0.3823205608981176913075543599005095206953e73"), + boost::lexical_cast("0.2486733714214237704739129972671154532415e72"), + boost::lexical_cast("0.1462562139602039577983434547171318011675e71"), + boost::lexical_cast("0.7821169065036815012381267259559910324285e69"), + boost::lexical_cast("0.3820552182348155468636157988764435365078e68"), + boost::lexical_cast("0.1711618296983598244658239925535632505062e67"), + boost::lexical_cast("0.7056661618357643731419080738521475204245e65"), + boost::lexical_cast("0.2685246896473614017356264531791459936036e64"), + boost::lexical_cast("0.9455168125599643085283071944864977592391e62"), + boost::lexical_cast("0.3087541626972538362237309145177486236219e61"), + boost::lexical_cast("0.9367928873352980208052601301625005737407e59"), + boost::lexical_cast("0.2645306130689794942883818547314327466007e58"), + boost::lexical_cast("0.6961815141171454309161007351079576190079e56"), + boost::lexical_cast("0.1709637824471794552313802669803885946843e55"), + boost::lexical_cast("0.3921553258481531526663112728778759311158e53"), + boost::lexical_cast("0.8409006354449988687714450897575728228696e51"), + boost::lexical_cast("0.1686755204461325935742097669030363344927e50"), + boost::lexical_cast("0.3166653542877070999007425197729038754254e48"), + boost::lexical_cast("0.5566029092358215049069560272835654229637e46"), + boost::lexical_cast("0.9161766287916328133080586672953875116242e44"), + boost::lexical_cast("1412317772330871298317974693514430627922000"), + boost::lexical_cast("20387991986727877473732570146112459874790"), + boost::lexical_cast("275557928713904105182512535678580359839.3"), + boost::lexical_cast("3485719851040516559072031256589598330.723"), + boost::lexical_cast("41247046743564028399938106707656877.40859"), + boost::lexical_cast("456274078125709314602601667471879.0147312"), + boost::lexical_cast("4714450683242899367025707077155.310613012"), + boost::lexical_cast("45453933537925041680009544258.75073849996"), + boost::lexical_cast("408437900487067278846361972.302331241052"), + boost::lexical_cast("3415719344386166273085838.705771571751035"), + boost::lexical_cast("26541502879185876562320.93134691487351145"), + boost::lexical_cast("191261415065918713661.1571433274648417668"), + boost::lexical_cast("1275349770108718421.645275944284937551702"), + boost::lexical_cast("7849171120971773.318910987434906905704272"), + boost::lexical_cast("44455946386549.80866460312682983576538056"), + boost::lexical_cast("230920362395.3198137186361608905136598046"), + boost::lexical_cast("1095700096.240863858624279930600654130254"), + boost::lexical_cast("4727085.467506050153744334085516289728134"), + boost::lexical_cast("18440.75118859447173303252421991479005424"), + boost::lexical_cast("64.62515887799460295677071749181651317052"), + boost::lexical_cast("0.201851568864688406206528472883512147547"), + boost::lexical_cast("0.0005565091674187978029138500039504078098143"), + boost::lexical_cast("0.1338097668312907986354698683493366559613e-5"), + boost::lexical_cast("0.276308225077464312820179030238305271638e-8"), + boost::lexical_cast("0.4801582970473168520375942100071070575043e-11"), + boost::lexical_cast("0.6829184144212920949740376186058541800175e-14"), + boost::lexical_cast("0.7634080076358511276617829524639455399182e-17"), + boost::lexical_cast("0.6290035083727140966418512608156646142409e-20"), + boost::lexical_cast("0.339652245667538733044036638506893821352e-23"), + boost::lexical_cast("0.9017518064256388530773585529891677854909e-27") + }; + static const T Q[61] = { + boost::lexical_cast("0"), + boost::lexical_cast("0.1386831185456898357379390197203894063459e81"), + boost::lexical_cast("0.6467076379487574703291056110838151259438e81"), + boost::lexical_cast("0.1394967823848615838336194279565285465161e82"), + boost::lexical_cast("0.1872927317344192945218570366455046340458e82"), + boost::lexical_cast("0.1772461045338946243584650759986310355937e82"), + boost::lexical_cast("0.1267294892200258648315971144069595555118e82"), + boost::lexical_cast("0.7157764838362416821508872117623058626589e81"), + boost::lexical_cast("0.329447266909948668265277828268378274513e81"), + boost::lexical_cast("0.1264376077317689779509250183194342571207e81"), + boost::lexical_cast("0.4118230304191980787640446056583623228873e80"), + boost::lexical_cast("0.1154393529762694616405952270558316515261e80"), + boost::lexical_cast("0.281655612889423906125295485693696744275e79"), + boost::lexical_cast("0.6037483524928743102724159846414025482077e78"), + boost::lexical_cast("0.1145927995397835468123576831800276999614e78"), + boost::lexical_cast("0.1938624296151985600348534009382865995154e77"), + boost::lexical_cast("0.293980925856227626211879961219188406675e76"), + boost::lexical_cast("0.4015574518216966910319562902099567437832e75"), + boost::lexical_cast("0.4961475457509727343545565970423431880907e74"), + boost::lexical_cast("0.5565482348278933960215521991000378896338e73"), + boost::lexical_cast("0.5686112924615820754631098622770303094938e72"), + boost::lexical_cast("0.5305988545844796293285410303747469932856e71"), + boost::lexical_cast("0.4533363413802585060568537458067343491358e70"), + boost::lexical_cast("0.3553932059473516064068322757331575565718e69"), + boost::lexical_cast("0.2561198565218704414618802902533972354203e68"), + boost::lexical_cast("0.1699519313292900324098102065697454295572e67"), + boost::lexical_cast("0.1039830160862334505389615281373574959236e66"), + boost::lexical_cast("0.5873082967977428281000961954715372504986e64"), + boost::lexical_cast("0.3065255179030575882202133042549783442446e63"), + boost::lexical_cast("0.1479494813481364701208655943688307245459e62"), + boost::lexical_cast("0.6608150467921598615495180659808895663164e60"), + boost::lexical_cast("0.2732535313770902021791888953487787496976e59"), + boost::lexical_cast("0.1046402297662493314531194338414508049069e58"), + boost::lexical_cast("0.3711375077192882936085049147920021549622e56"), + boost::lexical_cast("0.1219154482883895482637944309702972234576e55"), + boost::lexical_cast("0.3708359374149458741391374452286837880162e53"), + boost::lexical_cast("0.1044095509971707189716913168889769471468e52"), + boost::lexical_cast("0.271951506225063286130946773813524945052e50"), + boost::lexical_cast("0.6548016291215163843464133978454065823866e48"), + boost::lexical_cast("0.1456062447610542135403751730809295219344e47"), + boost::lexical_cast("0.2986690175077969760978388356833006028929e45"), + boost::lexical_cast("5643149706574013350061247429006443326844000"), + boost::lexical_cast("98047545414467090421964387960743688053480"), + boost::lexical_cast("1563378767746846395507385099301468978550"), + boost::lexical_cast("22823360528584500077862274918382796495"), + boost::lexical_cast("304215527004115213046601295970388750"), + boost::lexical_cast("3690289075895685793844344966820325"), + boost::lexical_cast("40584512015702371433911456606050"), + boost::lexical_cast("402834190897282802772754873905"), + boost::lexical_cast("3589522158493606918146495750"), + boost::lexical_cast("28530557707503483723634725"), + boost::lexical_cast("200714561335055753000730"), + boost::lexical_cast("1237953783437761888641"), + boost::lexical_cast("6614698701445762950"), + boost::lexical_cast("30155495647727505"), + boost::lexical_cast("114953256021450"), + boost::lexical_cast("356398020013"), + boost::lexical_cast("863113950"), + boost::lexical_cast("1531345"), + boost::lexical_cast("1770"), + boost::lexical_cast("1") + }; + static const T PD[60] = { + boost::lexical_cast("0.6365271516829242456324234577164675383137e81"), + 2*boost::lexical_cast("0.2991038873096202943405966144203628966976e81"), + 3*boost::lexical_cast("0.9211116495503170498076013367421231351115e80"), + 4*boost::lexical_cast("0.2090792764676090716286400360584443891749e80"), + 5*boost::lexical_cast("0.3730037777359591428226035156377978092809e79"), + 6*boost::lexical_cast("0.5446396536956682043376492370432031543834e78"), + 7*boost::lexical_cast("0.6692523966335177847425047827449069256345e77"), + 8*boost::lexical_cast("0.7062543624100864681625612653756619116848e76"), + 9*boost::lexical_cast("0.6499914905966283735005256964443226879158e75"), + 10*boost::lexical_cast("0.5280364564853225211197557708655426736091e74"), + 11*boost::lexical_cast("0.3823205608981176913075543599005095206953e73"), + 12*boost::lexical_cast("0.2486733714214237704739129972671154532415e72"), + 13*boost::lexical_cast("0.1462562139602039577983434547171318011675e71"), + 14*boost::lexical_cast("0.7821169065036815012381267259559910324285e69"), + 15*boost::lexical_cast("0.3820552182348155468636157988764435365078e68"), + 16*boost::lexical_cast("0.1711618296983598244658239925535632505062e67"), + 17*boost::lexical_cast("0.7056661618357643731419080738521475204245e65"), + 18*boost::lexical_cast("0.2685246896473614017356264531791459936036e64"), + 19*boost::lexical_cast("0.9455168125599643085283071944864977592391e62"), + 20*boost::lexical_cast("0.3087541626972538362237309145177486236219e61"), + 21*boost::lexical_cast("0.9367928873352980208052601301625005737407e59"), + 22*boost::lexical_cast("0.2645306130689794942883818547314327466007e58"), + 23*boost::lexical_cast("0.6961815141171454309161007351079576190079e56"), + 24*boost::lexical_cast("0.1709637824471794552313802669803885946843e55"), + 25*boost::lexical_cast("0.3921553258481531526663112728778759311158e53"), + 26*boost::lexical_cast("0.8409006354449988687714450897575728228696e51"), + 27*boost::lexical_cast("0.1686755204461325935742097669030363344927e50"), + 28*boost::lexical_cast("0.3166653542877070999007425197729038754254e48"), + 29*boost::lexical_cast("0.5566029092358215049069560272835654229637e46"), + 30*boost::lexical_cast("0.9161766287916328133080586672953875116242e44"), + 31*boost::lexical_cast("1412317772330871298317974693514430627922000"), + 32*boost::lexical_cast("20387991986727877473732570146112459874790"), + 33*boost::lexical_cast("275557928713904105182512535678580359839.3"), + 34*boost::lexical_cast("3485719851040516559072031256589598330.723"), + 35*boost::lexical_cast("41247046743564028399938106707656877.40859"), + 36*boost::lexical_cast("456274078125709314602601667471879.0147312"), + 37*boost::lexical_cast("4714450683242899367025707077155.310613012"), + 38*boost::lexical_cast("45453933537925041680009544258.75073849996"), + 39*boost::lexical_cast("408437900487067278846361972.302331241052"), + 40*boost::lexical_cast("3415719344386166273085838.705771571751035"), + 41*boost::lexical_cast("26541502879185876562320.93134691487351145"), + 42*boost::lexical_cast("191261415065918713661.1571433274648417668"), + 43*boost::lexical_cast("1275349770108718421.645275944284937551702"), + 44*boost::lexical_cast("7849171120971773.318910987434906905704272"), + 45*boost::lexical_cast("44455946386549.80866460312682983576538056"), + 46*boost::lexical_cast("230920362395.3198137186361608905136598046"), + 47*boost::lexical_cast("1095700096.240863858624279930600654130254"), + 48*boost::lexical_cast("4727085.467506050153744334085516289728134"), + 49*boost::lexical_cast("18440.75118859447173303252421991479005424"), + 50*boost::lexical_cast("64.62515887799460295677071749181651317052"), + 51*boost::lexical_cast("0.201851568864688406206528472883512147547"), + 52*boost::lexical_cast("0.0005565091674187978029138500039504078098143"), + 53*boost::lexical_cast("0.1338097668312907986354698683493366559613e-5"), + 54*boost::lexical_cast("0.276308225077464312820179030238305271638e-8"), + 55*boost::lexical_cast("0.4801582970473168520375942100071070575043e-11"), + 56*boost::lexical_cast("0.6829184144212920949740376186058541800175e-14"), + 57*boost::lexical_cast("0.7634080076358511276617829524639455399182e-17"), + 58*boost::lexical_cast("0.6290035083727140966418512608156646142409e-20"), + 59*boost::lexical_cast("0.339652245667538733044036638506893821352e-23"), + 60*boost::lexical_cast("0.9017518064256388530773585529891677854909e-27") + }; + static const T QD[60] = { + boost::lexical_cast("0.1386831185456898357379390197203894063459e81"), + 2*boost::lexical_cast("0.6467076379487574703291056110838151259438e81"), + 3*boost::lexical_cast("0.1394967823848615838336194279565285465161e82"), + 4*boost::lexical_cast("0.1872927317344192945218570366455046340458e82"), + 5*boost::lexical_cast("0.1772461045338946243584650759986310355937e82"), + 6*boost::lexical_cast("0.1267294892200258648315971144069595555118e82"), + 7*boost::lexical_cast("0.7157764838362416821508872117623058626589e81"), + 8*boost::lexical_cast("0.329447266909948668265277828268378274513e81"), + 9*boost::lexical_cast("0.1264376077317689779509250183194342571207e81"), + 10*boost::lexical_cast("0.4118230304191980787640446056583623228873e80"), + 11*boost::lexical_cast("0.1154393529762694616405952270558316515261e80"), + 12*boost::lexical_cast("0.281655612889423906125295485693696744275e79"), + 13*boost::lexical_cast("0.6037483524928743102724159846414025482077e78"), + 14*boost::lexical_cast("0.1145927995397835468123576831800276999614e78"), + 15*boost::lexical_cast("0.1938624296151985600348534009382865995154e77"), + 16*boost::lexical_cast("0.293980925856227626211879961219188406675e76"), + 17*boost::lexical_cast("0.4015574518216966910319562902099567437832e75"), + 18*boost::lexical_cast("0.4961475457509727343545565970423431880907e74"), + 19*boost::lexical_cast("0.5565482348278933960215521991000378896338e73"), + 20*boost::lexical_cast("0.5686112924615820754631098622770303094938e72"), + 21*boost::lexical_cast("0.5305988545844796293285410303747469932856e71"), + 22*boost::lexical_cast("0.4533363413802585060568537458067343491358e70"), + 23*boost::lexical_cast("0.3553932059473516064068322757331575565718e69"), + 24*boost::lexical_cast("0.2561198565218704414618802902533972354203e68"), + 25*boost::lexical_cast("0.1699519313292900324098102065697454295572e67"), + 26*boost::lexical_cast("0.1039830160862334505389615281373574959236e66"), + 27*boost::lexical_cast("0.5873082967977428281000961954715372504986e64"), + 28*boost::lexical_cast("0.3065255179030575882202133042549783442446e63"), + 29*boost::lexical_cast("0.1479494813481364701208655943688307245459e62"), + 30*boost::lexical_cast("0.6608150467921598615495180659808895663164e60"), + 31*boost::lexical_cast("0.2732535313770902021791888953487787496976e59"), + 32*boost::lexical_cast("0.1046402297662493314531194338414508049069e58"), + 33*boost::lexical_cast("0.3711375077192882936085049147920021549622e56"), + 34*boost::lexical_cast("0.1219154482883895482637944309702972234576e55"), + 35*boost::lexical_cast("0.3708359374149458741391374452286837880162e53"), + 36*boost::lexical_cast("0.1044095509971707189716913168889769471468e52"), + 37*boost::lexical_cast("0.271951506225063286130946773813524945052e50"), + 38*boost::lexical_cast("0.6548016291215163843464133978454065823866e48"), + 39*boost::lexical_cast("0.1456062447610542135403751730809295219344e47"), + 40*boost::lexical_cast("0.2986690175077969760978388356833006028929e45"), + 41*boost::lexical_cast("5643149706574013350061247429006443326844000"), + 42*boost::lexical_cast("98047545414467090421964387960743688053480"), + 43*boost::lexical_cast("1563378767746846395507385099301468978550"), + 44*boost::lexical_cast("22823360528584500077862274918382796495"), + 45*boost::lexical_cast("304215527004115213046601295970388750"), + 46*boost::lexical_cast("3690289075895685793844344966820325"), + 47*boost::lexical_cast("40584512015702371433911456606050"), + 48*boost::lexical_cast("402834190897282802772754873905"), + 49*boost::lexical_cast("3589522158493606918146495750"), + 50*boost::lexical_cast("28530557707503483723634725"), + 51*boost::lexical_cast("200714561335055753000730"), + 52*boost::lexical_cast("1237953783437761888641"), + 53*boost::lexical_cast("6614698701445762950"), + 54*boost::lexical_cast("30155495647727505"), + 55*boost::lexical_cast("114953256021450"), + 56*boost::lexical_cast("356398020013"), + 57*boost::lexical_cast("863113950"), + 58*boost::lexical_cast("1531345"), + 59*boost::lexical_cast("1770"), + 60*boost::lexical_cast("1") + }; + static const double g = 63.192152; + + T zgh = x + g - 0.5; + + T result = (x - 0.5) / zgh; + result += log(zgh); + result += tools::evaluate_polynomial(PD, x) / tools::evaluate_polynomial(P, x); + result -= tools::evaluate_polynomial(QD, x) / tools::evaluate_polynomial(Q, x); + result -= 1; + + return result; +} + +template +T big_digamma(T x) +{ + BOOST_MATH_STD_USING + if(x < 0) + { + return big_digamma_helper(static_cast(1-x)) + constants::pi() / tan(constants::pi() * (1-x)); + } + return big_digamma_helper(x); +} + +}}} + +#endif // include guard diff --git a/include/boost/math/bindings/detail/big_lanczos.hpp b/include/boost/math/bindings/detail/big_lanczos.hpp new file mode 100644 index 000000000..f12d2eb19 --- /dev/null +++ b/include/boost/math/bindings/detail/big_lanczos.hpp @@ -0,0 +1,887 @@ +// (C) Copyright John Maddock 2006-8. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BIG_LANCZOS_HPP +#define BOOST_BIG_LANCZOS_HPP + +#include +#include + +namespace boost{ namespace math{ namespace lanczos{ + +struct lanczos13UDT +{ + template + static T lanczos_sum(const T& z) + { + static const T num[13] = { + boost::lexical_cast("44012138428004.60895436261759919070125699"), + boost::lexical_cast("41590453358593.20051581730723108131357995"), + boost::lexical_cast("18013842787117.99677796276038389462742949"), + boost::lexical_cast("4728736263475.388896889723995205703970787"), + boost::lexical_cast("837910083628.4046470415724300225777912264"), + boost::lexical_cast("105583707273.4299344907359855510105321192"), + boost::lexical_cast("9701363618.494999493386608345339104922694"), + boost::lexical_cast("654914397.5482052641016767125048538245644"), + boost::lexical_cast("32238322.94213356530668889463945849409184"), + boost::lexical_cast("1128514.219497091438040721811544858643121"), + boost::lexical_cast("26665.79378459858944762533958798805525125"), + boost::lexical_cast("381.8801248632926870394389468349331394196"), + boost::lexical_cast("2.506628274631000502415763426076722427007"), + }; + static const boost::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 13); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[13] = { + boost::lexical_cast("86091529.53418537217994842267760536134841"), + boost::lexical_cast("81354505.17858011242874285785316135398567"), + boost::lexical_cast("35236626.38815461910817650960734605416521"), + boost::lexical_cast("9249814.988024471294683815872977672237195"), + boost::lexical_cast("1639024.216687146960253839656643518985826"), + boost::lexical_cast("206530.8157641225032631778026076868855623"), + boost::lexical_cast("18976.70193530288915698282139308582105936"), + boost::lexical_cast("1281.068909912559479885759622791374106059"), + boost::lexical_cast("63.06093343420234536146194868906771599354"), + boost::lexical_cast("2.207470909792527638222674678171050209691"), + boost::lexical_cast("0.05216058694613505427476207805814960742102"), + boost::lexical_cast("0.0007469903808915448316510079585999893674101"), + boost::lexical_cast("0.4903180573459871862552197089738373164184e-5"), + }; + static const boost::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 13); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[12] = { + boost::lexical_cast("4.832115561461656947793029596285626840312"), + boost::lexical_cast("-19.86441536140337740383120735104359034688"), + boost::lexical_cast("33.9927422807443239927197864963170585331"), + boost::lexical_cast("-31.41520692249765980987427413991250886138"), + boost::lexical_cast("17.0270866009599345679868972409543597821"), + boost::lexical_cast("-5.5077216950865501362506920516723682167"), + boost::lexical_cast("1.037811741948214855286817963800439373362"), + boost::lexical_cast("-0.106640468537356182313660880481398642811"), + boost::lexical_cast("0.005276450526660653288757565778182586742831"), + boost::lexical_cast("-0.0001000935625597121545867453746252064770029"), + boost::lexical_cast("0.462590910138598083940803704521211569234e-6"), + boost::lexical_cast("-0.1735307814426389420248044907765671743012e-9"), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[12] = { + boost::lexical_cast("26.96979819614830698367887026728396466395"), + boost::lexical_cast("-110.8705424709385114023884328797900204863"), + boost::lexical_cast("189.7258846119231466417015694690434770085"), + boost::lexical_cast("-175.3397202971107486383321670769397356553"), + boost::lexical_cast("95.03437648691551457087250340903980824948"), + boost::lexical_cast("-30.7406022781665264273675797983497141978"), + boost::lexical_cast("5.792405601630517993355102578874590410552"), + boost::lexical_cast("-0.5951993240669148697377539518639997795831"), + boost::lexical_cast("0.02944979359164017509944724739946255067671"), + boost::lexical_cast("-0.0005586586555377030921194246330399163602684"), + boost::lexical_cast("0.2581888478270733025288922038673392636029e-5"), + boost::lexical_cast("-0.9685385411006641478305219367315965391289e-9"), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 13.1445650000000000545696821063756942749; } +}; + + +// +// Lanczos Coefficients for N=22 G=22.61891 +// Max experimental error (with arbitary precision arithmetic) 2.9524e-38 +// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006 +// +struct lanczos22UDT +{ + template + static T lanczos_sum(const T& z) + { + static const T num[22] = { + boost::lexical_cast("46198410803245094237463011094.12173081986"), + boost::lexical_cast("43735859291852324413622037436.321513777"), + boost::lexical_cast("19716607234435171720534556386.97481377748"), + boost::lexical_cast("5629401471315018442177955161.245623932129"), + boost::lexical_cast("1142024910634417138386281569.245580222392"), + boost::lexical_cast("175048529315951173131586747.695329230778"), + boost::lexical_cast("21044290245653709191654675.41581372963167"), + boost::lexical_cast("2033001410561031998451380.335553678782601"), + boost::lexical_cast("160394318862140953773928.8736211601848891"), + boost::lexical_cast("10444944438396359705707.48957290388740896"), + boost::lexical_cast("565075825801617290121.1466393747967538948"), + boost::lexical_cast("25475874292116227538.99448534450411942597"), + boost::lexical_cast("957135055846602154.6720835535232270205725"), + boost::lexical_cast("29874506304047462.23662392445173880821515"), + boost::lexical_cast("769651310384737.2749087590725764959689181"), + boost::lexical_cast("16193289100889.15989633624378404096011797"), + boost::lexical_cast("273781151680.6807433264462376754578933261"), + boost::lexical_cast("3630485900.32917021712188739762161583295"), + boost::lexical_cast("36374352.05577334277856865691538582936484"), + boost::lexical_cast("258945.7742115532455441786924971194951043"), + boost::lexical_cast("1167.501919472435718934219997431551246996"), + boost::lexical_cast("2.50662827463100050241576528481104525333"), + }; + static const T denom[22] = { + boost::lexical_cast("0"), + boost::lexical_cast("2432902008176640000"), + boost::lexical_cast("8752948036761600000"), + boost::lexical_cast("13803759753640704000"), + boost::lexical_cast("12870931245150988800"), + boost::lexical_cast("8037811822645051776"), + boost::lexical_cast("3599979517947607200"), + boost::lexical_cast("1206647803780373360"), + boost::lexical_cast("311333643161390640"), + boost::lexical_cast("63030812099294896"), + boost::lexical_cast("10142299865511450"), + boost::lexical_cast("1307535010540395"), + boost::lexical_cast("135585182899530"), + boost::lexical_cast("11310276995381"), + boost::lexical_cast("756111184500"), + boost::lexical_cast("40171771630"), + boost::lexical_cast("1672280820"), + boost::lexical_cast("53327946"), + boost::lexical_cast("1256850"), + boost::lexical_cast("20615"), + boost::lexical_cast("210"), + boost::lexical_cast("1"), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 22); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[22] = { + boost::lexical_cast("6939996264376682180.277485395074954356211"), + boost::lexical_cast("6570067992110214451.87201438870245659384"), + boost::lexical_cast("2961859037444440551.986724631496417064121"), + boost::lexical_cast("845657339772791245.3541226499766163431651"), + boost::lexical_cast("171556737035449095.2475716923888737881837"), + boost::lexical_cast("26296059072490867.7822441885603400926007"), + boost::lexical_cast("3161305619652108.433798300149816829198706"), + boost::lexical_cast("305400596026022.4774396904484542582526472"), + boost::lexical_cast("24094681058862.55120507202622377623528108"), + boost::lexical_cast("1569055604375.919477574824168939428328839"), + boost::lexical_cast("84886558909.02047889339710230696942513159"), + boost::lexical_cast("3827024985.166751989686050643579753162298"), + boost::lexical_cast("143782298.9273215199098728674282885500522"), + boost::lexical_cast("4487794.24541641841336786238909171265944"), + boost::lexical_cast("115618.2025760830513505888216285273541959"), + boost::lexical_cast("2432.580773108508276957461757328744780439"), + boost::lexical_cast("41.12782532742893597168530008461874360191"), + boost::lexical_cast("0.5453771709477689805460179187388702295792"), + boost::lexical_cast("0.005464211062612080347167337964166505282809"), + boost::lexical_cast("0.388992321263586767037090706042788910953e-4"), + boost::lexical_cast("0.1753839324538447655939518484052327068859e-6"), + boost::lexical_cast("0.3765495513732730583386223384116545391759e-9"), + }; + static const T denom[22] = { + boost::lexical_cast("0"), + boost::lexical_cast("2432902008176640000"), + boost::lexical_cast("8752948036761600000"), + boost::lexical_cast("13803759753640704000"), + boost::lexical_cast("12870931245150988800"), + boost::lexical_cast("8037811822645051776"), + boost::lexical_cast("3599979517947607200"), + boost::lexical_cast("1206647803780373360"), + boost::lexical_cast("311333643161390640"), + boost::lexical_cast("63030812099294896"), + boost::lexical_cast("10142299865511450"), + boost::lexical_cast("1307535010540395"), + boost::lexical_cast("135585182899530"), + boost::lexical_cast("11310276995381"), + boost::lexical_cast("756111184500"), + boost::lexical_cast("40171771630"), + boost::lexical_cast("1672280820"), + boost::lexical_cast("53327946"), + boost::lexical_cast("1256850"), + boost::lexical_cast("20615"), + boost::lexical_cast("210"), + boost::lexical_cast("1"), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 22); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[21] = { + boost::lexical_cast("8.318998691953337183034781139546384476554"), + boost::lexical_cast("-63.15415991415959158214140353299240638675"), + boost::lexical_cast("217.3108224383632868591462242669081540163"), + boost::lexical_cast("-448.5134281386108366899784093610397354889"), + boost::lexical_cast("619.2903759363285456927248474593012711346"), + boost::lexical_cast("-604.1630177420625418522025080080444177046"), + boost::lexical_cast("428.8166750424646119935047118287362193314"), + boost::lexical_cast("-224.6988753721310913866347429589434550302"), + boost::lexical_cast("87.32181627555510833499451817622786940961"), + boost::lexical_cast("-25.07866854821128965662498003029199058098"), + boost::lexical_cast("5.264398125689025351448861011657789005392"), + boost::lexical_cast("-0.792518936256495243383586076579921559914"), + boost::lexical_cast("0.08317448364744713773350272460937904691566"), + boost::lexical_cast("-0.005845345166274053157781068150827567998882"), + boost::lexical_cast("0.0002599412126352082483326238522490030412391"), + boost::lexical_cast("-0.6748102079670763884917431338234783496303e-5"), + boost::lexical_cast("0.908824383434109002762325095643458603605e-7"), + boost::lexical_cast("-0.5299325929309389890892469299969669579725e-9"), + boost::lexical_cast("0.994306085859549890267983602248532869362e-12"), + boost::lexical_cast("-0.3499893692975262747371544905820891835298e-15"), + boost::lexical_cast("0.7260746353663365145454867069182884694961e-20"), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[21] = { + boost::lexical_cast("75.39272007105208086018421070699575462226"), + boost::lexical_cast("-572.3481967049935412452681346759966390319"), + boost::lexical_cast("1969.426202741555335078065370698955484358"), + boost::lexical_cast("-4064.74968778032030891520063865996757519"), + boost::lexical_cast("5612.452614138013929794736248384309574814"), + boost::lexical_cast("-5475.357667500026172903620177988213902339"), + boost::lexical_cast("3886.243614216111328329547926490398103492"), + boost::lexical_cast("-2036.382026072125407192448069428134470564"), + boost::lexical_cast("791.3727954936062108045551843636692287652"), + boost::lexical_cast("-227.2808432388436552794021219198885223122"), + boost::lexical_cast("47.70974355562144229897637024320739257284"), + boost::lexical_cast("-7.182373807798293545187073539819697141572"), + boost::lexical_cast("0.7537866989631514559601547530490976100468"), + boost::lexical_cast("-0.05297470142240154822658739758236594717787"), + boost::lexical_cast("0.00235577330936380542539812701472320434133"), + boost::lexical_cast("-0.6115613067659273118098229498679502138802e-4"), + boost::lexical_cast("0.8236417010170941915758315020695551724181e-6"), + boost::lexical_cast("-0.4802628430993048190311242611330072198089e-8"), + boost::lexical_cast("0.9011113376981524418952720279739624707342e-11"), + boost::lexical_cast("-0.3171854152689711198382455703658589996796e-14"), + boost::lexical_cast("0.6580207998808093935798753964580596673177e-19"), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 22.61890999999999962710717227309942245483; } +}; + +// +// Lanczos Coefficients for N=31 G=32.08067 +// Max experimental error (with arbitary precision arithmetic) 0.162e-52 +// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at May 9 2006 +// +struct lanczos31UDT +{ + template + static T lanczos_sum(const T& z) + { + static const T num[31] = { + boost::lexical_cast("0.2579646553333513328235723061836959833277e46"), + boost::lexical_cast("0.2444796504337453845497419271639377138264e46"), + boost::lexical_cast("0.1119885499016017172212179730662673475329e46"), + boost::lexical_cast("0.3301983829072723658949204487793889113715e45"), + boost::lexical_cast("0.7041171040503851585152895336505379417066e44"), + boost::lexical_cast("0.1156687509001223855125097826246939403504e44"), + boost::lexical_cast("1522559363393940883866575697565974893306000"), + boost::lexical_cast("164914363507650839510801418717701057005700"), + boost::lexical_cast("14978522943127593263654178827041568394060"), + boost::lexical_cast("1156707153701375383907746879648168666774"), + boost::lexical_cast("76739431129980851159755403434593664173.2"), + boost::lexical_cast("4407916278928188620282281495575981079.306"), + boost::lexical_cast("220487883931812802092792125175269667.3004"), + boost::lexical_cast("9644828280794966468052381443992828.433924"), + boost::lexical_cast("369996467042247229310044531282837.6549068"), + boost::lexical_cast("12468380890717344610932904378961.13494291"), + boost::lexical_cast("369289245210898235894444657859.0529720075"), + boost::lexical_cast("9607992460262594951559461829.34885209022"), + boost::lexical_cast("219225935074853412540086410.981421315799"), + boost::lexical_cast("4374309943598658046326340.720767382079549"), + boost::lexical_cast("76008779092264509404014.10530947173485581"), + boost::lexical_cast("1143503533822162444712.335663112617754987"), + boost::lexical_cast("14779233719977576920.37884890049671578409"), + boost::lexical_cast("162409028440678302.9992838032166348069916"), + boost::lexical_cast("1496561553388385.733407609544964535634135"), + boost::lexical_cast("11347624460661.81008311053190661436107043"), + boost::lexical_cast("68944915931.32004991941950530448472223832"), + boost::lexical_cast("322701221.6391432296123937035480931903651"), + boost::lexical_cast("1092364.213992634267819050120261755371294"), + boost::lexical_cast("2380.151399852411512711176940867823024864"), + boost::lexical_cast("2.506628274631000502415765284811045253007"), + }; + static const T denom[31] = { + boost::lexical_cast("0"), + boost::lexical_cast("0.8841761993739701954543616e31"), + boost::lexical_cast("0.3502799997985980526649278464e32"), + boost::lexical_cast("0.622621928420356134910574592e32"), + boost::lexical_cast("66951000306085302338993639424000"), + boost::lexical_cast("49361465831621147825759587123200"), + boost::lexical_cast("26751280755793398822580822142976"), + boost::lexical_cast("11139316913434780466101123891200"), + boost::lexical_cast("3674201658710345201899117607040"), + boost::lexical_cast("981347603630155088295475765440"), + boost::lexical_cast("215760462268683520394805979744"), + boost::lexical_cast("39539238727270799376544542000"), + boost::lexical_cast("6097272817323042122728617800"), + boost::lexical_cast("796974693974455191377937300"), + boost::lexical_cast("88776380550648116217781890"), + boost::lexical_cast("8459574446076318147830625"), + boost::lexical_cast("691254538651580660999025"), + boost::lexical_cast("48487623689430693038025"), + boost::lexical_cast("2918939500751087661105"), + boost::lexical_cast("150566737512021319125"), + boost::lexical_cast("6634460278534540725"), + boost::lexical_cast("248526574856284725"), + boost::lexical_cast("7860403394108265"), + boost::lexical_cast("207912996295875"), + boost::lexical_cast("4539323721075"), + boost::lexical_cast("80328850875"), + boost::lexical_cast("1122686019"), + boost::lexical_cast("11921175"), + boost::lexical_cast("90335"), + boost::lexical_cast("435"), + boost::lexical_cast("1"), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 31); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[31] = { + boost::lexical_cast("30137154810677525966583148469478.52374216"), + boost::lexical_cast("28561746428637727032849890123131.36314653"), + boost::lexical_cast("13083250730789213354063781611435.74046294"), + boost::lexical_cast("3857598154697777600846539129354.783647"), + boost::lexical_cast("822596651552555685068015316144.0952185852"), + boost::lexical_cast("135131964033213842052904200372.039133532"), + boost::lexical_cast("17787555889683709693655685146.19771358863"), + boost::lexical_cast("1926639793777927562221423874.149673297196"), + boost::lexical_cast("174989113988888477076973808.6991839697774"), + boost::lexical_cast("13513425905835560387095425.01158383184045"), + boost::lexical_cast("896521313378762433091075.1446749283094845"), + boost::lexical_cast("51496223433749515758124.71524415105430686"), + boost::lexical_cast("2575886794780078381228.37205955912263407"), + boost::lexical_cast("112677328855422964200.4155776009524490958"), + boost::lexical_cast("4322545967487943330.625233358130724324796"), + boost::lexical_cast("145663957202380774.0362027607207590519723"), + boost::lexical_cast("4314283729473470.686566233465428332496534"), + boost::lexical_cast("112246988185485.8877916434026906290603878"), + boost::lexical_cast("2561143864972.040563435178307062626388193"), + boost::lexical_cast("51103611767.9626550674442537989885239605"), + boost::lexical_cast("887985348.0369447209508500133077232094491"), + boost::lexical_cast("13359172.3954672607019822025834072685839"), + boost::lexical_cast("172660.8841147568768783928167105965064459"), + boost::lexical_cast("1897.370795407433013556725714874693719617"), + boost::lexical_cast("17.48383210090980598861217644749573257178"), + boost::lexical_cast("0.1325705316732132940835251054350153028901"), + boost::lexical_cast("0.0008054605783673449641889260501816356090452"), + boost::lexical_cast("0.377001130700104515644336869896819162464e-5"), + boost::lexical_cast("0.1276172868883867038813825443204454996531e-7"), + boost::lexical_cast("0.2780651912081116274907381023821492811093e-10"), + boost::lexical_cast("0.2928410648650955854121639682890739211234e-13"), + }; + static const T denom[31] = { + boost::lexical_cast("0"), + boost::lexical_cast("0.8841761993739701954543616e31"), + boost::lexical_cast("0.3502799997985980526649278464e32"), + boost::lexical_cast("0.622621928420356134910574592e32"), + boost::lexical_cast("66951000306085302338993639424000"), + boost::lexical_cast("49361465831621147825759587123200"), + boost::lexical_cast("26751280755793398822580822142976"), + boost::lexical_cast("11139316913434780466101123891200"), + boost::lexical_cast("3674201658710345201899117607040"), + boost::lexical_cast("981347603630155088295475765440"), + boost::lexical_cast("215760462268683520394805979744"), + boost::lexical_cast("39539238727270799376544542000"), + boost::lexical_cast("6097272817323042122728617800"), + boost::lexical_cast("796974693974455191377937300"), + boost::lexical_cast("88776380550648116217781890"), + boost::lexical_cast("8459574446076318147830625"), + boost::lexical_cast("691254538651580660999025"), + boost::lexical_cast("48487623689430693038025"), + boost::lexical_cast("2918939500751087661105"), + boost::lexical_cast("150566737512021319125"), + boost::lexical_cast("6634460278534540725"), + boost::lexical_cast("248526574856284725"), + boost::lexical_cast("7860403394108265"), + boost::lexical_cast("207912996295875"), + boost::lexical_cast("4539323721075"), + boost::lexical_cast("80328850875"), + boost::lexical_cast("1122686019"), + boost::lexical_cast("11921175"), + boost::lexical_cast("90335"), + boost::lexical_cast("435"), + boost::lexical_cast("1"), + }; + return boost::math::tools::evaluate_rational(num, denom, z, 31); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[30] = { + boost::lexical_cast("11.80038544942943603508206880307972596807"), + boost::lexical_cast("-130.6355975335626214564236363322099481079"), + boost::lexical_cast("676.2177719145993049893392276809256538927"), + boost::lexical_cast("-2174.724497783850503069990936574060452057"), + boost::lexical_cast("4869.877180638131076410069103742986502022"), + boost::lexical_cast("-8065.744271864238179992762265472478229172"), + boost::lexical_cast("10245.03825618572106228191509520638651539"), + boost::lexical_cast("-10212.83902362683215459850403668669647192"), + boost::lexical_cast("8110.289185383288952562767679576754140336"), + boost::lexical_cast("-5179.310892558291062401828964000776095156"), + boost::lexical_cast("2673.987492589052370230989109591011091273"), + boost::lexical_cast("-1118.342574651205183051884250033505609141"), + boost::lexical_cast("378.5812742511620662650096436471920295596"), + boost::lexical_cast("-103.3725999812126067084828735543906768961"), + boost::lexical_cast("22.62913974335996321848099677797888917792"), + boost::lexical_cast("-3.936414819950859548507275533569588041446"), + boost::lexical_cast("0.5376818198843817355682124535902641644854"), + boost::lexical_cast("-0.0567827903603478957483409124122554243201"), + boost::lexical_cast("0.004545544993648879420352693271088478106482"), + boost::lexical_cast("-0.0002689795568951033950042375135970897959935"), + boost::lexical_cast("0.1139493459006846530734617710847103572122e-4"), + boost::lexical_cast("-0.3316581197839213921885210451302820192794e-6"), + boost::lexical_cast("0.6285613334898374028443777562554713906213e-8"), + boost::lexical_cast("-0.7222145115734409070310317999856424167091e-10"), + boost::lexical_cast("0.4562976983547274766890241815002584238219e-12"), + boost::lexical_cast("-0.1380593023819058919640038942493212141072e-14"), + boost::lexical_cast("0.1629663871586410129307496385264268190679e-17"), + boost::lexical_cast("-0.5429994291916548849493889660077076739993e-21"), + boost::lexical_cast("0.2922682842441892106795386303084661338957e-25"), + boost::lexical_cast("-0.8456967065309046044689041041336866118459e-31"), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[30] = { + boost::lexical_cast("147.9979641587472136175636384176549713358"), + boost::lexical_cast("-1638.404318611773924210055619836375434296"), + boost::lexical_cast("8480.981744216135641122944743711911653273"), + boost::lexical_cast("-27274.93942104458448200467097634494071176"), + boost::lexical_cast("61076.98019918759324489193232276937262854"), + boost::lexical_cast("-101158.8762737154296509560513952101409264"), + boost::lexical_cast("128491.1252383947174824913796141607174379"), + boost::lexical_cast("-128087.2892038336581928787480535905496026"), + boost::lexical_cast("101717.5492545853663296795562084430123258"), + boost::lexical_cast("-64957.8330410311808907869707511362206858"), + boost::lexical_cast("33536.59139229792478811870738772305570317"), + boost::lexical_cast("-14026.01847115365926835980820243003785821"), + boost::lexical_cast("4748.087094096186515212209389240715050212"), + boost::lexical_cast("-1296.477510211815971152205100242259733245"), + boost::lexical_cast("283.8099337545793198947620951499958085157"), + boost::lexical_cast("-49.36969067101255103452092297769364837753"), + boost::lexical_cast("6.743492833270653628580811118017061581404"), + boost::lexical_cast("-0.7121578704864048548351804794951487823626"), + boost::lexical_cast("0.0570092738016915476694118877057948681298"), + boost::lexical_cast("-0.003373485297696102660302960722607722438643"), + boost::lexical_cast("0.0001429128843527532859999752593761934089751"), + boost::lexical_cast("-0.41595867130858508233493767243236888636e-5"), + boost::lexical_cast("0.7883284669307241040059778207492255409785e-7"), + boost::lexical_cast("-0.905786322462384670803148223703187214379e-9"), + boost::lexical_cast("0.5722790216999820323272452464661250331451e-11"), + boost::lexical_cast("-0.1731510870832349779315841757234562309727e-13"), + boost::lexical_cast("0.2043890314358438601429048378015983874378e-16"), + boost::lexical_cast("-0.6810185176079344204740000170500311171065e-20"), + boost::lexical_cast("0.3665567641131713928114853776588342403919e-24"), + boost::lexical_cast("-0.1060655106553177007425710511436497259484e-29"), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 32.08066999999999779902282170951366424561; } +}; + +// +// Lanczos Coefficients for N=61 G=63.192152 +// Max experimental error (with 1000-bit precision arithmetic) 3.740e-113 +// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 12 2006 +// +struct lanczos61UDT +{ + template + static T lanczos_sum(const T& z) + { + using namespace boost; + static const T d[61] = { + boost::lexical_cast("2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659584"), + boost::lexical_cast("13349415823254323512107320481.3495396037261649201426994438803767191136434970492309775123879"), + boost::lexical_cast("-300542621510568204264185787475.230003734889859348050696493467253861933279360152095861484548"), + boost::lexical_cast("3273919938390136737194044982676.40271056035622723775417608127544182097346526115858803376474"), + boost::lexical_cast("-22989594065095806099337396006399.5874206181563663855129141706748733174902067950115092492439"), + boost::lexical_cast("116970582893952893160414263796102.542775878583510989850142808618916073286745084692189044738"), + boost::lexical_cast("-459561969036479455224850813196807.283291532483532558959779434457349912822256480548436066098"), + boost::lexical_cast("1450959909778264914956547227964788.89797179379520834974601372820249784303794436366366810477"), + boost::lexical_cast("-3782846865486775046285288437885921.41537699732805465141128848354901016102326190612528503251"), + boost::lexical_cast("8305043213936355459145388670886540.09976337905520168067329932809302445437208115570138102767"), + boost::lexical_cast("-15580988484396722546934484726970745.4927787160273626078250810989811865283255762028143642311"), + boost::lexical_cast("25262722284076250779006793435537600.0822901485517345545978818780090308947301031347345640449"), + boost::lexical_cast("-35714428027687018805443603728757116.5304655170478705341887572982734901197345415291580897698"), + boost::lexical_cast("44334726194692443174715432419157343.2294160783772787096321009453791271387235388689346602833"), + boost::lexical_cast("-48599573547617297831555162417695106.187829304963846482633791012658974681648157963911491985"), + boost::lexical_cast("47258466493366798944386359199482189.0753349196625125615316002614813737880755896979754845101"), + boost::lexical_cast("-40913448215392412059728312039233342.142914753896559359297977982314043378636755884088383226"), + boost::lexical_cast("31626312914486892948769164616982902.7262756989418188077611392594232674722318027323102462687"), + boost::lexical_cast("-21878079174441332123064991795834438.4699982361692990285700077902601657354101259411789722708"), + boost::lexical_cast("13567268503974326527361474986354265.3136632133935430378937191911532112778452274286122946396"), + boost::lexical_cast("-7551494211746723529747611556474669.62996644923557605747803028485900789337467673523741066527"), + boost::lexical_cast("3775516572689476384052312341432597.70584966904950490541958869730702790312581801585742038997"), + boost::lexical_cast("-1696271471453637244930364711513292.79902955514107737992185368006225264329876265486853482449"), + boost::lexical_cast("684857608019352767999083000986166.20765273693720041519286231015176745354062413008561259139"), + boost::lexical_cast("-248397566275708464679881624417990.410438107634139924805871051723444048539177890346227250473"), + boost::lexical_cast("80880368999557992138783568858556.1512378233079327986518410244522800950609595592170022878937"), + boost::lexical_cast("-23618197945394013802495450485616.9025005749893350650829964098117490779655546610665927669729"), + boost::lexical_cast("6176884636893816103087134481332.06708966653493024119556843727320635285468825056891248447124"), + boost::lexical_cast("-1444348683723439589948246285262.64080678953468490544615312565485170860503207005915261691108"), + boost::lexical_cast("301342031656979076702313946827.961658905182634508217626783081241074250132289461989777865387"), + boost::lexical_cast("-55959656587719766738301589651.3940625826610668990368881615587469329021742236397809951765678"), + boost::lexical_cast("9223339169004064297247180402.36227016155682738556103138196079389248843082157924368301293963"), + boost::lexical_cast("-1344882881571942601385730283.42710150182526891377514071881534880944872423492272147871101373"), + boost::lexical_cast("172841913316760599352601139.54409257740173055624405575900164401527761357324625574736896079"), + boost::lexical_cast("-19496120443876233531343952.3802212016691702737346568192063937387825469602063310488794471653"), + boost::lexical_cast("1920907372583710284097959.44121420322495784420169085871802458519363819782779653621724219067"), + boost::lexical_cast("-164429314798240461613359.399597503536657962383155875723527581699785846599051112719962464604"), + boost::lexical_cast("12154026644351189572525.1452249886865981747374191977801688548318519692423556934568426042152"), + boost::lexical_cast("-770443988366210815096.519382051977221101156336663806705367929328924137169970381042234329058"), + boost::lexical_cast("41558909851418707920.4696085656889424895313728719601503526476333404973280596225722152966128"), + boost::lexical_cast("-1890879946549708819.24562220042687554209318172044783707920086716716717574156283898330017796"), + boost::lexical_cast("71844996557297623.9583461685535340440524052492427928388171299145330229958643439878608673403"), + boost::lexical_cast("-2253785109518255.55600197759875781765803818232939130127735487613049577235879610065545755637"), + boost::lexical_cast("57616883849355.997562563968344493719962252675875692642406455612671495250543228005045106721"), + boost::lexical_cast("-1182495730353.08218118278997948852215670614084013289033222774171548915344541249351599628436"), + boost::lexical_cast("19148649358.6196967288062261380599423925174178776792840639099120170800869284300966978300613"), + boost::lexical_cast("-239779605.891370259668403359614360511661030470269478602533200704639655585967442891496784613"), + boost::lexical_cast("2267583.00284368310957842936892685032434505866445291643236133553754152047677944820353796872"), + boost::lexical_cast("-15749.490806784673108773558070497383604733010677027764233749920147549999361110299643477893"), + boost::lexical_cast("77.7059495149052727171505425584459982871343274332635726864135949842508025564999785370162956"), + boost::lexical_cast("-0.261619987273930331397625130282851629108569607193781378836014468617185550622160348688297247"), + boost::lexical_cast("0.000572252321659691600529444769356185993188551770817110673186068921175991328434642504616377475"), + boost::lexical_cast("-0.765167220661540041663007112207436426423746402583423562585653954743978584117929356523307954e-6"), + boost::lexical_cast("0.579179571056209077507916813937971472839851499147582627425979879366849876944438724610663401e-9"), + boost::lexical_cast("-0.224804733043915149719206760378355636826808754704148660354494460792713189958510735070096991e-12"), + boost::lexical_cast("0.392711975389579343321746945135488409914483448652884894759297584020979857734289645857714768e-16"), + boost::lexical_cast("-0.258603588346412049542768766878162221817684639789901440429511261589010049357907537684380983e-20"), + boost::lexical_cast("0.499992460848751668441190360024540741752242879565548017176883304716370989218399797418478685e-25"), + boost::lexical_cast("-0.196211614533318174187346267877390498735734213905206562766348625767919122511096089367364025e-30"), + boost::lexical_cast("0.874722648949676363732094858062907290148733370978226751462386623191111439121706262759209573e-37"), + boost::lexical_cast("-0.163907874717737848669759890242660846846105433791283903651924563157080252845636658802930428e-44"), + }; + T result = d[0]; + for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) + { + result += d[k]/(z+(k-1)); + } + return result; + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + using namespace boost; + static const T d[61] = { + boost::lexical_cast("0.901751806425638853077358552989167785490911341809902155556127108480303870921448984935411583e-27"), + boost::lexical_cast("4.80241125306810017699523302110401965428995345115391817406006361151407344955277298373661032"), + boost::lexical_cast("-108.119283021710869401330097315436214587270846871451487282117128515476478251641970487922552"), + boost::lexical_cast("1177.78262074811362219818923738088833932279000985161077740440010901595132448469513438139561"), + boost::lexical_cast("-8270.43570321334374279057432173814835581983913167617217749736484999327758232081395983082867"), + boost::lexical_cast("42079.807161997077661752306902088979258826568702655699995911391774839958572703348502730394"), + boost::lexical_cast("-165326.003834443330215001219988296482004968548294447320869281647211603153902436231468280089"), + boost::lexical_cast("521978.361504895300685499370463597042533432134369277742485307843747923127933979566742421213"), + boost::lexical_cast("-1360867.51629992863544553419296636395576666570468519805449755596254912681418267100657262281"), + boost::lexical_cast("2987713.73338656161102517003716335104823650191612448011720936412226357385029800040631754755"), + boost::lexical_cast("-5605212.64915921452169919008770165304171481697939254152852673009005154549681704553438450709"), + boost::lexical_cast("9088186.58332916818449459635132673652700922052988327069535513580836143146727832380184335474"), + boost::lexical_cast("-12848155.5543636394746355365819800465364996596310467415907815393346205151090486190421959769"), + boost::lexical_cast("15949281.2867656960575878805158849857756293807220033618942867694361569866468996967761600898"), + boost::lexical_cast("-17483546.9948295433308250581770557182576171673272450149400973735206019559576269174369907171"), + boost::lexical_cast("17001087.8599749419660906448951424280111036786456594738278573653160553115681287326064596964"), + boost::lexical_cast("-14718487.0643665950346574802384331125115747311674609017568623694516187494204567579595827859"), + boost::lexical_cast("11377468.7255609717716845971105161298889777425898291183866813269222281486121330837791392732"), + boost::lexical_cast("-7870571.64253038587947746661946939286858490057774448573157856145556080330153403858747655263"), + boost::lexical_cast("4880783.08440908743641723492059912671377140680710345996273343885045364205895751515063844239"), + boost::lexical_cast("-2716626.7992639625103140035635916455652302249897918893040695025407382316653674141983775542"), + boost::lexical_cast("1358230.46602865696544327299659410214201327791319846880787515156343361311278133805428800255"), + boost::lexical_cast("-610228.440751458395860905749312275043435828322076830117123636938979942213530882048883969802"), + boost::lexical_cast("246375.416501158654327780901087115642493055617468601787093268312234390446439555559050129729"), + boost::lexical_cast("-89360.2599028475206119333931211015869139511677735549267100272095432140508089207221096740632"), + boost::lexical_cast("29096.4637987498328341260960356772198979319790332957125131055960448759586930781530063775634"), + boost::lexical_cast("-8496.57401431514433694413130585404918350686834939156759654375188338156288564260152505382438"), + boost::lexical_cast("2222.11523574301594407443285016240908726891841242444092960094015874546135316534057865883047"), + boost::lexical_cast("-519.599993280949289705514822058693289933461756514489674453254304308040888101533569480646682"), + boost::lexical_cast("108.406868361306987817730701109400305482972790224573776407166683184990131682003417239181112"), + boost::lexical_cast("-20.1313142142558596796857948064047373605439974799116521459977609253211918146595346493447238"), + boost::lexical_cast("3.31806787671783168020012913552384112429614503798293169239082032849759155847394955909684383"), + boost::lexical_cast("-0.483817477111537877685595212919784447924875428848331771524426361483392903320495411973587861"), + boost::lexical_cast("0.0621793463102927384924303843912913542297042029136293808338022462765755471002366206711862637"), + boost::lexical_cast("-0.00701366932085103924241526535768453911099671087892444015581511551813219720807206445462785293"), + boost::lexical_cast("0.000691040514756294308758606917671220770856269030526647010461217455799229645004351524024364997"), + boost::lexical_cast("-0.591529398871361458428147660822525365922497109038495896497692806150033516658042357799869656e-4"), + boost::lexical_cast("0.437237367535177689875119370170434437030440227275583289093139147244747901678407875809020739e-5"), + boost::lexical_cast("-0.277164853397051135996651958345647824709602266382721185838782221179129726200661453504250697e-6"), + boost::lexical_cast("0.149506899012035980148891401548317536032574502641368034781671941165064546410613201579653674e-7"), + boost::lexical_cast("-0.68023824066463262779882895193964639544061678698791279217407325790147925675797085217462974e-9"), + boost::lexical_cast("0.258460163734186329938721529982859244969655253624066115559707985878606277800329299821882688e-10"), + boost::lexical_cast("-0.810792256024669306744649981276512583535251727474303382740940985102669076169168931092026491e-12"), + boost::lexical_cast("0.207274966207031327521921078048021807442500113231320959236850963529304158700096495799022922e-13"), + boost::lexical_cast("-0.425399199286327802950259994834798737777721414442095221716122926637623478450472871269742436e-15"), + boost::lexical_cast("0.688866766744198529064607574117697940084548375790020728788313274612845280173338912495478431e-17"), + boost::lexical_cast("-0.862599751805643281578607291655858333628582704771553874199104377131082877406179933909898885e-19"), + boost::lexical_cast("0.815756005678735657200275584442908437977926312650210429668619446123450972547018343768177988e-21"), + boost::lexical_cast("-0.566583084099007858124915716926967268295318152203932871370429534546567151650626184750291695e-23"), + boost::lexical_cast("0.279544761599725082805446124351997692260093135930731230328454667675190245860598623539891708e-25"), + boost::lexical_cast("-0.941169851584987983984201821679114408126982142904386301937192011680047611188837432096199601e-28"), + boost::lexical_cast("0.205866011331040736302780507155525142187875191518455173304638008169488993406425201915370746e-30"), + boost::lexical_cast("-0.27526655245712584371295491216289353976964567057707464008951584303679019796521332324352501e-33"), + boost::lexical_cast("0.208358067979444305082929004102609366169534624348056112144990933897581971394396210379638792e-36"), + boost::lexical_cast("-0.808728107661779323263133007119729988596844663194254976820030366188579170595441991680169012e-40"), + boost::lexical_cast("0.141276924383478964519776436955079978012672985961918248012931336621229652792338950573694356e-43"), + boost::lexical_cast("-0.930318449287651389310440021745842417218125582685428432576258687100661462527604238849332053e-48"), + boost::lexical_cast("0.179870748819321661641184169834635133045197146966203370650788171790610563029431722308057539e-52"), + boost::lexical_cast("-0.705865243912790337263229413370018392321238639017433365017168104310561824133229343750737083e-58"), + boost::lexical_cast("0.3146787805734405996448268100558028857930560442377698646099945108125281507396722995748398e-64"), + boost::lexical_cast("-0.589653534231618730406843260601322236697428143603814281282790370329151249078338470962782338e-72"), + }; + T result = d[0]; + for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) + { + result += d[k]/(z+(k-1)); + } + return result; + } + + template + static T lanczos_sum_near_1(const T& dz) + { + using namespace boost; + static const T d[60] = { + boost::lexical_cast("23.2463658527729692390378860713647146932236940604550445351214987229819352880524561852919518"), + boost::lexical_cast("-523.358012551815715084547614110229469295755088686612838322817729744722233637819564673967396"), + boost::lexical_cast("5701.12892340421080714956066268650092612647620400476183901625272640935853188559347587495571"), + boost::lexical_cast("-40033.5506451901904954336453419007623117537868026994808919201793803506999271787018654246699"), + boost::lexical_cast("203689.884259074923009439144410340256983393397995558814367995938668111650624499963153485034"), + boost::lexical_cast("-800270.648969745331278757692597096167418585957703057412758177038340791380011708874081291202"), + boost::lexical_cast("2526668.23380061659863999395867315313385499515711742092815402701950519696944982260718031476"), + boost::lexical_cast("-6587362.57559198722630391278043503867973853468105110382293763174847657538179665571836023631"), + boost::lexical_cast("14462211.3454541602975917764900442754186801975533106565506542322063393991552960595701762805"), + boost::lexical_cast("-27132375.1879227404375395522940895789625516798992585980380939378508607160857820002128106898"), + boost::lexical_cast("43991923.8735251977856804364757478459275087361742168436524951824945035673768875988985478116"), + boost::lexical_cast("-62192284.0030124679010201921841372967696262036115679150017649233887633598058364494608060812"), + boost::lexical_cast("77203473.0770033513405070667417251568915937590689150831268228886281254637715669678358204991"), + boost::lexical_cast("-84630180.2217173903516348977915150565994784278120192219937728967986198118628659866582594874"), + boost::lexical_cast("82294807.2253549409847505891112074804416229757832871133388349982640444405470371147991706317"), + boost::lexical_cast("-71245738.2484649177928765605893043553453557808557887270209768163561363857395639001251515788"), + boost::lexical_cast("55073334.3180266913441333534260714059077572215147571872597651029894142803987981342430068594"), + boost::lexical_cast("-38097984.1648990787690036742690550656061009857688125101191167768314179751258568264424911474"), + boost::lexical_cast("23625729.5032184580395130592017474282828236643586203914515183078852982915252442161768527976"), + boost::lexical_cast("-13149998.4348054726172055622442157883429575511528431835657668083088902165366619827169829685"), + boost::lexical_cast("6574597.77221556423683199818131482663205682902023554728024972161230111356285973623550338976"), + boost::lexical_cast("-2953848.1483469149918109110050192571921018042012905892107136410603990336401921230407043408"), + boost::lexical_cast("1192595.29584357246380113611351829515963605337523874715861849584306265512819543347806085356"), + boost::lexical_cast("-432553.812019608638388918135375154289816441900572658692369491476137741687213006403648722272"), + boost::lexical_cast("140843.215385933866391177743292449477205328233960902455943995092958295858485718885800427129"), + boost::lexical_cast("-41128.186992679630058614841985110676526199977321524879849001760603476646382839182691529968"), + boost::lexical_cast("10756.2849191854701631989789887757784944313743544315113894758328432005767448056040879337769"), + boost::lexical_cast("-2515.15559672041299884426826962296210458052543246529646213159169885444118227871246315458787"), + boost::lexical_cast("524.750087004805200600237632074908875763734578390662349666321453103782638818305404274166951"), + boost::lexical_cast("-97.4468596421732493988298219295878130651986131393383646674144877163795143930682205035917965"), + boost::lexical_cast("16.0613108128210806736384551896802799172445298357754547684100294231532127326987175444453058"), + boost::lexical_cast("-2.34194813526540240672426202485306862230641838409943369059203455578340880900483887447559874"), + boost::lexical_cast("0.300982934748016059399829007219431333744032924923669397318820178988611410275964499475465815"), + boost::lexical_cast("-0.033950095985367909789000959795708551814461844488183964432565731809399824963680858993718525"), + boost::lexical_cast("0.00334502394288921146242772614150438404658527112198421937945605441697314216921393987758378122"), + boost::lexical_cast("-0.000286333429067523984607730553301991502191011265745476190940771685897687956262049750683013485"), + boost::lexical_cast("0.211647426149364947402896718485536530479491688838087899435991994237067890628274492042231115e-4"), + boost::lexical_cast("-0.134163345121302758109675190598169832775248626443483098532368562186356128620805552609175683e-5"), + boost::lexical_cast("0.723697303042715085329782938306424498336642078597508935450663080894255773653328980495047891e-7"), + boost::lexical_cast("-0.329273487343139063533251321553223583999676337945788660475231347828772272134656322947906888e-8"), + boost::lexical_cast("0.12510922551028971731767784013117088894558604838820475961392154031378891971216135267744134e-9"), + boost::lexical_cast("-0.392468958215589939603666430583400537413757786057185505426804034745840192914621891690369903e-11"), + boost::lexical_cast("0.100332717101049934370760667782927946803279422001380028508200697081188326364078428184546051e-12"), + boost::lexical_cast("-0.205917088291197705194762747639836655808855850989058813560983717575008725393428497910009756e-14"), + boost::lexical_cast("0.333450178247893143608439314203175490705783992567107481617660357577257627854979230819461489e-16"), + boost::lexical_cast("-0.417546693906616047110563550428133589051498362676394888715581845170969319500638944065594319e-18"), + boost::lexical_cast("0.394871691642184410859178529844325390739857256666676534513661579365702353214518478078730801e-20"), + boost::lexical_cast("-0.274258012587811199757875927548699264063511843669070634471054184977334027224611843434000922e-22"), + boost::lexical_cast("0.135315354265459854889496635967343027244391821142592599244505313738163473730636430399785048e-24"), + boost::lexical_cast("-0.455579032003288910408487905303223613382276173706542364543918076752861628464036586507967767e-27"), + boost::lexical_cast("0.99650703862462739161520123768147312466695159780582506041370833824093136783202694548427718e-30"), + boost::lexical_cast("-0.1332444609228706921659395801935919548447859029572115502899861345555006827214220195650058e-32"), + boost::lexical_cast("0.100856999148765307000182397631280249632761913433008379786888200467467364474581430670889392e-35"), + boost::lexical_cast("-0.39146979455613683472384690509165395074425354524713697428673406058157887065953366609738731e-39"), + boost::lexical_cast("0.683859606707931248105140296850112494069265272540298100341919970496564103098283709868586478e-43"), + boost::lexical_cast("-0.450326344248604222735147147805963966503893913752040066400766411031387063854141246972061792e-47"), + boost::lexical_cast("0.870675378039492904184581895322153006461319724931909799151743284769901586333730037761678891e-52"), + boost::lexical_cast("-0.341678395249272265744518787745356400350877656459401143889000625280131819505857966769964401e-57"), + boost::lexical_cast("0.152322191370871666358069530949353871960316638394428595988162174042653299702098929238880862e-63"), + boost::lexical_cast("-0.285425405297633795767452984791738825078111150078605004958179057245980222485147999495352632e-71"), + }; + T result = 0; + for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + using namespace boost; + static const T d[60] = { + boost::lexical_cast("557.56438192770795764344217888434355281097193198928944200046501607026919782564033547346298"), + boost::lexical_cast("-12552.748616427645475141433405567201788681683808077269330800392600825597799119572762385222"), + boost::lexical_cast("136741.650054039199076788077149441364242294724343897779563222338447737802381279007988884806"), + boost::lexical_cast("-960205.223613240309942047656967301131022760634321049075674684679438471862998829007639437133"), + boost::lexical_cast("4885504.47588736223774859617054275229642041717942140469884121916073195308537421162982679289"), + boost::lexical_cast("-19194501.738192166918904824982935279260356575935661514109550613809352009246483412530545583"), + boost::lexical_cast("60602169.8633537742937457094837494059849674261357199218329545854990149896822944801504450843"), + boost::lexical_cast("-157997975.522506767297528502540724511908584668874487506510120462561270100749019845014382885"), + boost::lexical_cast("346876323.86092543685419723290495817330608574729543216092477261152247521712190505658568876"), + boost::lexical_cast("-650770365.471136883718747607976242475416651908858429752332176373467422603953536408709972919"), + boost::lexical_cast("1055146856.05909309330903130910708372830487315684258450293308627289334336871273080305128138"), + boost::lexical_cast("-1491682726.25614447429071368736790697283307005456720192465860871846879804207692411263924608"), + boost::lexical_cast("1851726287.94866167094858600116562210167031458934987154557042242638980748286188183300900268"), + boost::lexical_cast("-2029855953.68334371445800569238095379629407314338521720558391277508374519526853827142679839"), + boost::lexical_cast("1973842002.53354868177824629525448788555435194808657489238517523691040148611221295436287925"), + boost::lexical_cast("-1708829941.98209573247426625323314413060108441455314880934710595647408841619484540679859098"), + boost::lexical_cast("1320934627.12433688699625456833930317624783222321555050330381730035733198249283009357314954"), + boost::lexical_cast("-913780636.858542526294419197161614811332299249415125108737474024007693329922089123296358727"), + boost::lexical_cast("566663423.929632170286007468016419798879660054391183200464733820209439185545886930103546787"), + boost::lexical_cast("-315402880.436816230388857961460509181823167373029384218959199936902955049832392362044305869"), + boost::lexical_cast("157691811.550465734461741500275930418786875005567018699867961482249002625886064187146134966"), + boost::lexical_cast("-70848085.5705405970640618473551954585013808128304384354476488268600720054598122945113512731"), + boost::lexical_cast("28604413.4050137708444142264980840059788755325900041515286382001704951527733220637586013815"), + boost::lexical_cast("-10374808.7067303054787164054055989420809074792801592763124972441820101840292558840131568633"), + boost::lexical_cast("3378126.32016207486657791623723515804931231041318964254116390764473281291389374196880720069"), + boost::lexical_cast("-986460.090390653140964189383080344920103075349535669020623874668558777188889544398718979744"), + boost::lexical_cast("257989.631187387317948158483575125380011593209850756066176921901006833159795100137743395985"), + boost::lexical_cast("-60326.0391159227288325790327830741260824763549807922845004854215660451399733578621565837087"), + boost::lexical_cast("12586.1375399649496159880821645216260841794563919652590583420570326276086323953958907053394"), + boost::lexical_cast("-2337.26417330316922535871922886167444795452055677161063205953141105726549966801856628447293"), + boost::lexical_cast("385.230745012608736644117458716226876976056390433401632749144285378123105481506733917763829"), + boost::lexical_cast("-56.1716559403731491675970177460841997333796694857076749852739159067307309470690838101179615"), + boost::lexical_cast("7.21907953468550196348585224042498727840087634483369357697580053424523903859773769748599575"), + boost::lexical_cast("-0.814293485887386870805786409956942772883474224091975496298369877683530509729332902182019049"), + boost::lexical_cast("0.0802304419995150047616460464220884371214157889148846405799324851793571580868840034085001373"), + boost::lexical_cast("-0.00686771095380619535195996193943858680694970000948742557733102777115482017857981277171196115"), + boost::lexical_cast("0.000507636621977556438232617777542864427109623356049335590894564220687567763620803789858345916"), + boost::lexical_cast("-0.32179095465362720747836116655088181481893063531138957363431280817392443948706754917605911e-4"), + boost::lexical_cast("0.173578890579848508947329833426585354230744194615295570820295052665075101971588563893718407e-5"), + boost::lexical_cast("-0.789762880006288893888161070734302768702358633525134582027140158619195373770299678322596835e-7"), + boost::lexical_cast("0.300074637200885066788470310738617992259402710843493097610337134266720909870967550606601658e-8"), + boost::lexical_cast("-0.941337297619721713151110244242536308266701344868601679868536153775533330272973088246835359e-10"), + boost::lexical_cast("0.24064815013182536657310186836079333949814111498828401548170442715552017773994482539471456e-11"), + boost::lexical_cast("-0.493892399304811910466345686492277504628763169549384435563232052965821874553923373100791477e-13"), + boost::lexical_cast("0.799780678476644196901221989475355609743387528732994566453160178199295104357319723742820593e-15"), + boost::lexical_cast("-0.100148627870893347527249092785257443532967736956154251497569191947184705954310833302770086e-16"), + boost::lexical_cast("0.947100256812658897084619699699028861352615460106539259289295071616221848196411749449858071e-19"), + boost::lexical_cast("-0.657808193528898116367845405906343884364280888644748907819280236995018351085371701094007759e-21"), + boost::lexical_cast("0.324554050057463845012469010247790763753999056976705084126950591088538742509983426730851614e-23"), + boost::lexical_cast("-0.10927068902162908990029309141242256163212535730975970310918370355165185052827948996110107e-25"), + boost::lexical_cast("0.239012340507870646690121104637467232366271566488184795459093215303237974655782634371712486e-28"), + boost::lexical_cast("-0.31958700972990573259359660326375143524864710953063781494908314884519046349402409667329667e-31"), + boost::lexical_cast("0.241905641292988284384362036555782113275737930713192053073501265726048089991747342247551645e-34"), + boost::lexical_cast("-0.93894080230619233745797029179332447129464915420290457418429337322820997038069119047864035e-38"), + boost::lexical_cast("0.164023814025085488413251990798690797467351995518990067783355251949198292596815470576539877e-41"), + boost::lexical_cast("-0.108010831192689925518484618970761942019888832176355541674171850211917230280206410356465451e-45"), + boost::lexical_cast("0.208831600642796805563854019033577205240227465154130766898180386564934443551840379116390645e-50"), + boost::lexical_cast("-0.819516067465171848863933747691434138146789031214932473898084756489529673230665363014007306e-56"), + boost::lexical_cast("0.365344970579318347488211604761724311582675708113250505307342682118101409913523622073678179e-62"), + boost::lexical_cast("-0.684593199208628857931267904308244537968349564351534581234005234847904343404822808648361291e-70"), + }; + T result = 0; + T z = dz + 2; + for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 63.19215200000000010049916454590857028961181640625; } +}; + +}}} // namespaces + +#endif + + diff --git a/include/boost/math/bindings/mpfr.hpp b/include/boost/math/bindings/mpfr.hpp new file mode 100644 index 000000000..25336cadc --- /dev/null +++ b/include/boost/math/bindings/mpfr.hpp @@ -0,0 +1,850 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Wrapper that works with mpfr_class defined in gmpfrxx.h +// See http://math.berkeley.edu/~wilken/code/gmpfrxx/ +// Also requires the gmp and mpfr libraries. +// + +#ifndef BOOST_MATH_MPLFR_BINDINGS_HPP +#define BOOST_MATH_MPLFR_BINDINGS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +inline mpfr_class fabs(const mpfr_class& v) +{ + return abs(v); +} + +inline mpfr_class pow(const mpfr_class& b, const mpfr_class e) +{ + mpfr_class result; + mpfr_pow(result.__get_mp(), b.__get_mp(), e.__get_mp(), GMP_RNDN); + return result; +} + +inline mpfr_class ldexp(const mpfr_class& v, int e) +{ + //int e = mpfr_get_exp(*v.__get_mp()); + mpfr_class result(v); + mpfr_set_exp(result.__get_mp(), e); + return result; +} + +inline mpfr_class frexp(const mpfr_class& v, int* expon) +{ + int e = mpfr_get_exp(v.__get_mp()); + mpfr_class result(v); + mpfr_set_exp(result.__get_mp(), 0); + *expon = e; + return result; +} + +mpfr_class fmod(const mpfr_class& v1, const mpfr_class& v2) +{ + mpfr_class n; + if(v1 < 0) + n = ceil(v1 / v2); + else + n = floor(v1 / v2); + return v1 - n * v2; +} + +template +inline mpfr_class modf(const mpfr_class& v, long long* ipart, const Policy& pol) +{ + *ipart = lltrunc(v, pol); + return v - boost::math::tools::real_cast(*ipart); +} +template +inline int iround(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline long lround(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline long long llround(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline int itrunc(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +template +inline long ltrunc(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +template +inline long long lltrunc(mpfr_class const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +namespace boost{ namespace math{ + +#if defined(__GNUC__) && (__GNUC__ < 4) + using ::iround; + using ::lround; + using ::llround; + using ::itrunc; + using ::ltrunc; + using ::lltrunc; + using ::modf; +#endif + +namespace lanczos{ + +struct mpfr_lanczos +{ + static mpfr_class lanczos_sum(const mpfr_class& z) + { + unsigned long p = z.get_dprec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum(z); + } + static mpfr_class lanczos_sum_expG_scaled(const mpfr_class& z) + { + unsigned long p = z.get_dprec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_expG_scaled(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_expG_scaled(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_expG_scaled(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_expG_scaled(z); + } + static mpfr_class lanczos_sum_near_1(const mpfr_class& z) + { + unsigned long p = z.get_dprec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_near_1(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_near_1(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_near_1(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_near_1(z); + } + static mpfr_class lanczos_sum_near_2(const mpfr_class& z) + { + unsigned long p = z.get_dprec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_near_2(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_near_2(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_near_2(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_near_2(z); + } + static mpfr_class g() + { + unsigned long p = mpfr_class::get_dprec(); + if(p <= 72) + return lanczos13UDT::g(); + else if(p <= 120) + return lanczos22UDT::g(); + else if(p <= 170) + return lanczos31UDT::g(); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::g(); + } +}; + +template +struct lanczos +{ + typedef mpfr_lanczos type; +}; + +} // namespace lanczos + +namespace tools +{ + +template +struct promote_arg<__gmp_expr > +{ // If T is integral type, then promote to double. + typedef mpfr_class type; +}; + +template<> +inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + return mpfr_class::get_dprec(); +} + +namespace detail{ + +template +void convert_to_long_result(mpfr_class const& r, I& result) +{ + result = 0; + I last_result(0); + mpfr_class t(r); + double term; + do + { + term = real_cast(t); + last_result = result; + result += static_cast(term); + t -= term; + }while(result != last_result); +} + +} + +template <> +inline mpfr_class real_cast(long long t) +{ + mpfr_class result; + int expon = 0; + int sign = 1; + if(t < 0) + { + sign = -1; + t = -t; + } + while(t) + { + result += ldexp((double)(t & 0xffffL), expon); + expon += 32; + t >>= 32; + } + return result * sign; +} +template <> +inline unsigned real_cast(mpfr_class t) +{ + return t.get_ui(); +} +template <> +inline int real_cast(mpfr_class t) +{ + return t.get_si(); +} +template <> +inline double real_cast(mpfr_class t) +{ + return t.get_d(); +} +template <> +inline float real_cast(mpfr_class t) +{ + return static_cast(t.get_d()); +} +template <> +inline long real_cast(mpfr_class t) +{ + long result; + detail::convert_to_long_result(t, result); + return result; +} +template <> +inline long long real_cast(mpfr_class t) +{ + long long result; + detail::convert_to_long_result(t, result); + return result; +} + +template <> +inline mpfr_class max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + static bool has_init = false; + static mpfr_class val; + if(!has_init) + { + val = 0.5; + mpfr_set_exp(val.__get_mp(), mpfr_get_emax()); + has_init = true; + } + return val; +} + +template <> +inline mpfr_class min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + static bool has_init = false; + static mpfr_class val; + if(!has_init) + { + val = 0.5; + mpfr_set_exp(val.__get_mp(), mpfr_get_emin()); + has_init = true; + } + return val; +} + +template <> +inline mpfr_class log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + static bool has_init = false; + static mpfr_class val = max_value(); + if(!has_init) + { + val = log(val); + has_init = true; + } + return val; +} + +template <> +inline mpfr_class log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + static bool has_init = false; + static mpfr_class val = max_value(); + if(!has_init) + { + val = log(val); + has_init = true; + } + return val; +} + +template <> +inline mpfr_class epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr_class)) +{ + return ldexp(mpfr_class(1), 1-boost::math::policies::digits >()); +} + +} // namespace tools + +namespace policies{ + +template +struct evaluation<__gmp_expr, Policy> +{ + typedef mpfr_class type; +}; + +} + +template +inline mpfr_class skewness(const extreme_value_distribution& /*dist*/) +{ + // + // This is 12 * sqrt(6) * zeta(3) / pi^3: + // See http://mathworld.wolfram.com/ExtremeValueDistribution.html + // + return boost::lexical_cast("1.1395470994046486574927930193898461120875997958366"); +} + +template +inline mpfr_class skewness(const rayleigh_distribution& /*dist*/) +{ + // using namespace boost::math::constants; + return boost::lexical_cast("0.63111065781893713819189935154422777984404221106391"); + // Computed using NTL at 150 bit, about 50 decimal digits. + // return 2 * root_pi() * pi_minus_three() / pow23_four_minus_pi(); +} + +template +inline mpfr_class kurtosis(const rayleigh_distribution& /*dist*/) +{ + // using namespace boost::math::constants; + return boost::lexical_cast("3.2450893006876380628486604106197544154170667057995"); + // Computed using NTL at 150 bit, about 50 decimal digits. + // return 3 - (6 * pi() * pi() - 24 * pi() + 16) / + // (four_minus_pi() * four_minus_pi()); +} + +template +inline mpfr_class kurtosis_excess(const rayleigh_distribution& /*dist*/) +{ + //using namespace boost::math::constants; + // Computed using NTL at 150 bit, about 50 decimal digits. + return boost::lexical_cast("0.2450893006876380628486604106197544154170667057995"); + // return -(6 * pi() * pi() - 24 * pi() + 16) / + // (four_minus_pi() * four_minus_pi()); +} // kurtosis + +namespace detail{ + +// +// Version of Digamma accurate to ~100 decimal digits. +// +template +mpfr_class digamma_imp(mpfr_class x, const mpl::int_<0>* , const Policy& pol) +{ + // + // This handles reflection of negative arguments, and all our + // empfr_classor handling, then forwards to the T-specific approximation. + // + BOOST_MATH_STD_USING // ADL of std functions. + + mpfr_class result = 0; + // + // Check for negative arguments and use reflection: + // + if(x < 0) + { + // Reflect: + x = 1 - x; + // Argument reduction for tan: + mpfr_class remainder = x - floor(x); + // Shift to negative if > 0.5: + if(remainder > 0.5) + { + remainder -= 1; + } + // + // check for evaluation at a negative pole: + // + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + result += big_digamma(x); + return result; +} +// +// Specialisations of this function provides the initial +// starting guess for Halley iteration: +// +template +mpfr_class erf_inv_imp(const mpfr_class& p, const mpfr_class& q, const Policy&, const boost::mpl::int_<64>*) +{ + BOOST_MATH_STD_USING // for ADL of std names. + + mpfr_class result = 0; + + if(p <= 0.5) + { + // + // Evaluate inverse erf using the rational approximation: + // + // x = p(p+10)(Y+R(p)) + // + // Where Y is a constant, and R(p) is optimised for a low + // absolute empfr_classor compared to |Y|. + // + // double: Max empfr_classor found: 2.001849e-18 + // long double: Max empfr_classor found: 1.017064e-20 + // Maximum Deviation Found (actual empfr_classor term at infinite precision) 8.030e-21 + // + static const float Y = 0.0891314744949340820313f; + static const mpfr_class P[] = { + -0.000508781949658280665617, + -0.00836874819741736770379, + 0.0334806625409744615033, + -0.0126926147662974029034, + -0.0365637971411762664006, + 0.0219878681111168899165, + 0.00822687874676915743155, + -0.00538772965071242932965 + }; + static const mpfr_class Q[] = { + 1, + -0.970005043303290640362, + -1.56574558234175846809, + 1.56221558398423026363, + 0.662328840472002992063, + -0.71228902341542847553, + -0.0527396382340099713954, + 0.0795283687341571680018, + -0.00233393759374190016776, + 0.000886216390456424707504 + }; + mpfr_class g = p * (p + 10); + mpfr_class r = tools::evaluate_polynomial(P, p) / tools::evaluate_polynomial(Q, p); + result = g * Y + g * r; + } + else if(q >= 0.25) + { + // + // Rational approximation for 0.5 > q >= 0.25 + // + // x = sqrt(-2*log(q)) / (Y + R(q)) + // + // Where Y is a constant, and R(q) is optimised for a low + // absolute empfr_classor compared to Y. + // + // double : Max empfr_classor found: 7.403372e-17 + // long double : Max empfr_classor found: 6.084616e-20 + // Maximum Deviation Found (empfr_classor term) 4.811e-20 + // + static const float Y = 2.249481201171875f; + static const mpfr_class P[] = { + -0.202433508355938759655, + 0.105264680699391713268, + 8.37050328343119927838, + 17.6447298408374015486, + -18.8510648058714251895, + -44.6382324441786960818, + 17.445385985570866523, + 21.1294655448340526258, + -3.67192254707729348546 + }; + static const mpfr_class Q[] = { + 1, + 6.24264124854247537712, + 3.9713437953343869095, + -28.6608180499800029974, + -20.1432634680485188801, + 48.5609213108739935468, + 10.8268667355460159008, + -22.6436933413139721736, + 1.72114765761200282724 + }; + mpfr_class g = sqrt(-2 * log(q)); + mpfr_class xs = q - 0.25; + mpfr_class r = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = g / (Y + r); + } + else + { + // + // For q < 0.25 we have a series of rational approximations all + // of the general form: + // + // let: x = sqrt(-log(q)) + // + // Then the result is given by: + // + // x(Y+R(x-B)) + // + // where Y is a constant, B is the lowest value of x for which + // the approximation is valid, and R(x-B) is optimised for a low + // absolute empfr_classor compared to Y. + // + // Note that almost all code will really go through the first + // or maybe second approximation. After than we're dealing with very + // small input values indeed: 80 and 128 bit long double's go all the + // way down to ~ 1e-5000 so the "tail" is rather long... + // + mpfr_class x = sqrt(-log(q)); + if(x < 3) + { + // Max empfr_classor found: 1.089051e-20 + static const float Y = 0.807220458984375f; + static const mpfr_class P[] = { + -0.131102781679951906451, + -0.163794047193317060787, + 0.117030156341995252019, + 0.387079738972604337464, + 0.337785538912035898924, + 0.142869534408157156766, + 0.0290157910005329060432, + 0.00214558995388805277169, + -0.679465575181126350155e-6, + 0.285225331782217055858e-7, + -0.681149956853776992068e-9 + }; + static const mpfr_class Q[] = { + 1, + 3.46625407242567245975, + 5.38168345707006855425, + 4.77846592945843778382, + 2.59301921623620271374, + 0.848854343457902036425, + 0.152264338295331783612, + 0.01105924229346489121 + }; + mpfr_class xs = x - 1.125; + mpfr_class R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 6) + { + // Max empfr_classor found: 8.389174e-21 + static const float Y = 0.93995571136474609375f; + static const mpfr_class P[] = { + -0.0350353787183177984712, + -0.00222426529213447927281, + 0.0185573306514231072324, + 0.00950804701325919603619, + 0.00187123492819559223345, + 0.000157544617424960554631, + 0.460469890584317994083e-5, + -0.230404776911882601748e-9, + 0.266339227425782031962e-11 + }; + static const mpfr_class Q[] = { + 1, + 1.3653349817554063097, + 0.762059164553623404043, + 0.220091105764131249824, + 0.0341589143670947727934, + 0.00263861676657015992959, + 0.764675292302794483503e-4 + }; + mpfr_class xs = x - 3; + mpfr_class R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 18) + { + // Max empfr_classor found: 1.481312e-19 + static const float Y = 0.98362827301025390625f; + static const mpfr_class P[] = { + -0.0167431005076633737133, + -0.00112951438745580278863, + 0.00105628862152492910091, + 0.000209386317487588078668, + 0.149624783758342370182e-4, + 0.449696789927706453732e-6, + 0.462596163522878599135e-8, + -0.281128735628831791805e-13, + 0.99055709973310326855e-16 + }; + static const mpfr_class Q[] = { + 1, + 0.591429344886417493481, + 0.138151865749083321638, + 0.0160746087093676504695, + 0.000964011807005165528527, + 0.275335474764726041141e-4, + 0.282243172016108031869e-6 + }; + mpfr_class xs = x - 6; + mpfr_class R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 44) + { + // Max empfr_classor found: 5.697761e-20 + static const float Y = 0.99714565277099609375f; + static const mpfr_class P[] = { + -0.0024978212791898131227, + -0.779190719229053954292e-5, + 0.254723037413027451751e-4, + 0.162397777342510920873e-5, + 0.396341011304801168516e-7, + 0.411632831190944208473e-9, + 0.145596286718675035587e-11, + -0.116765012397184275695e-17 + }; + static const mpfr_class Q[] = { + 1, + 0.207123112214422517181, + 0.0169410838120975906478, + 0.000690538265622684595676, + 0.145007359818232637924e-4, + 0.144437756628144157666e-6, + 0.509761276599778486139e-9 + }; + mpfr_class xs = x - 18; + mpfr_class R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else + { + // Max empfr_classor found: 1.279746e-20 + static const float Y = 0.99941349029541015625f; + static const mpfr_class P[] = { + -0.000539042911019078575891, + -0.28398759004727721098e-6, + 0.899465114892291446442e-6, + 0.229345859265920864296e-7, + 0.225561444863500149219e-9, + 0.947846627503022684216e-12, + 0.135880130108924861008e-14, + -0.348890393399948882918e-21 + }; + static const mpfr_class Q[] = { + 1, + 0.0845746234001899436914, + 0.00282092984726264681981, + 0.468292921940894236786e-4, + 0.399968812193862100054e-6, + 0.161809290887904476097e-8, + 0.231558608310259605225e-11 + }; + mpfr_class xs = x - 44; + mpfr_class R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + } + return result; +} + +mpfr_class bessel_i0(mpfr_class x) +{ + static const mpfr_class P1[] = { + boost::lexical_cast("-2.2335582639474375249e+15"), + boost::lexical_cast("-5.5050369673018427753e+14"), + boost::lexical_cast("-3.2940087627407749166e+13"), + boost::lexical_cast("-8.4925101247114157499e+11"), + boost::lexical_cast("-1.1912746104985237192e+10"), + boost::lexical_cast("-1.0313066708737980747e+08"), + boost::lexical_cast("-5.9545626019847898221e+05"), + boost::lexical_cast("-2.4125195876041896775e+03"), + boost::lexical_cast("-7.0935347449210549190e+00"), + boost::lexical_cast("-1.5453977791786851041e-02"), + boost::lexical_cast("-2.5172644670688975051e-05"), + boost::lexical_cast("-3.0517226450451067446e-08"), + boost::lexical_cast("-2.6843448573468483278e-11"), + boost::lexical_cast("-1.5982226675653184646e-14"), + boost::lexical_cast("-5.2487866627945699800e-18"), + }; + static const mpfr_class Q1[] = { + boost::lexical_cast("-2.2335582639474375245e+15"), + boost::lexical_cast("7.8858692566751002988e+12"), + boost::lexical_cast("-1.2207067397808979846e+10"), + boost::lexical_cast("1.0377081058062166144e+07"), + boost::lexical_cast("-4.8527560179962773045e+03"), + boost::lexical_cast("1.0"), + }; + static const mpfr_class P2[] = { + boost::lexical_cast("-2.2210262233306573296e-04"), + boost::lexical_cast("1.3067392038106924055e-02"), + boost::lexical_cast("-4.4700805721174453923e-01"), + boost::lexical_cast("5.5674518371240761397e+00"), + boost::lexical_cast("-2.3517945679239481621e+01"), + boost::lexical_cast("3.1611322818701131207e+01"), + boost::lexical_cast("-9.6090021968656180000e+00"), + }; + static const mpfr_class Q2[] = { + boost::lexical_cast("-5.5194330231005480228e-04"), + boost::lexical_cast("3.2547697594819615062e-02"), + boost::lexical_cast("-1.1151759188741312645e+00"), + boost::lexical_cast("1.3982595353892851542e+01"), + boost::lexical_cast("-6.0228002066743340583e+01"), + boost::lexical_cast("8.5539563258012929600e+01"), + boost::lexical_cast("-3.1446690275135491500e+01"), + boost::lexical_cast("1.0"), + }; + mpfr_class value, factor, r; + + BOOST_MATH_STD_USING + using namespace boost::math::tools; + + if (x < 0) + { + x = -x; // even function + } + if (x == 0) + { + return static_cast(1); + } + if (x <= 15) // x in (0, 15] + { + mpfr_class y = x * x; + value = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); + } + else // x in (15, \infty) + { + mpfr_class y = 1 / x - 1 / 15; + r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); + factor = exp(x) / sqrt(x); + value = factor * r; + } + + return value; +} + +mpfr_class bessel_i1(mpfr_class x) +{ + static const mpfr_class P1[] = { + static_cast("-1.4577180278143463643e+15"), + static_cast("-1.7732037840791591320e+14"), + static_cast("-6.9876779648010090070e+12"), + static_cast("-1.3357437682275493024e+11"), + static_cast("-1.4828267606612366099e+09"), + static_cast("-1.0588550724769347106e+07"), + static_cast("-5.1894091982308017540e+04"), + static_cast("-1.8225946631657315931e+02"), + static_cast("-4.7207090827310162436e-01"), + static_cast("-9.1746443287817501309e-04"), + static_cast("-1.3466829827635152875e-06"), + static_cast("-1.4831904935994647675e-09"), + static_cast("-1.1928788903603238754e-12"), + static_cast("-6.5245515583151902910e-16"), + static_cast("-1.9705291802535139930e-19"), + }; + static const mpfr_class Q1[] = { + static_cast("-2.9154360556286927285e+15"), + static_cast("9.7887501377547640438e+12"), + static_cast("-1.4386907088588283434e+10"), + static_cast("1.1594225856856884006e+07"), + static_cast("-5.1326864679904189920e+03"), + static_cast("1.0"), + }; + static const mpfr_class P2[] = { + static_cast("1.4582087408985668208e-05"), + static_cast("-8.9359825138577646443e-04"), + static_cast("2.9204895411257790122e-02"), + static_cast("-3.4198728018058047439e-01"), + static_cast("1.3960118277609544334e+00"), + static_cast("-1.9746376087200685843e+00"), + static_cast("8.5591872901933459000e-01"), + static_cast("-6.0437159056137599999e-02"), + }; + static const mpfr_class Q2[] = { + static_cast("3.7510433111922824643e-05"), + static_cast("-2.2835624489492512649e-03"), + static_cast("7.4212010813186530069e-02"), + static_cast("-8.5017476463217924408e-01"), + static_cast("3.2593714889036996297e+00"), + static_cast("-3.8806586721556593450e+00"), + static_cast("1.0"), + }; + mpfr_class value, factor, r, w; + + BOOST_MATH_STD_USING + using namespace boost::math::tools; + + w = abs(x); + if (x == 0) + { + return static_cast(0); + } + if (w <= 15) // w in (0, 15] + { + mpfr_class y = x * x; + r = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); + factor = w; + value = factor * r; + } + else // w in (15, \infty) + { + mpfr_class y = 1 / w - mpfr_class(1) / 15; + r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); + factor = exp(w) / sqrt(w); + value = factor * r; + } + + if (x < 0) + { + value *= -value; // odd function + } + return value; +} + +} // namespace detail + +}} + +#endif // BOOST_MATH_MPLFR_BINDINGS_HPP + diff --git a/include/boost/math/bindings/rr.hpp b/include/boost/math/bindings/rr.hpp index 00db1fc40..7eba8eee5 100644 --- a/include/boost/math/bindings/rr.hpp +++ b/include/boost/math/bindings/rr.hpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_MATH_NTL_RR_HPP +#define BOOST_MATH_NTL_RR_HPP #include #include @@ -11,15 +13,14 @@ #include #include #include +#include +#include #include #include #include #include -#ifndef BOOST_MATH_NTL_RR_HPP -#define BOOST_MATH_NTL_RR_HPP - namespace boost{ namespace math{ namespace ntl @@ -421,6 +422,80 @@ inline std::basic_istream& operator>>(std::basic_istream +struct lanczos +{ + typedef ntl_lanczos type; +}; + +} // namespace lanczos + namespace tools { @@ -487,7 +562,21 @@ inline unsigned real_cast(boost::math::ntl::RR t template <> inline int real_cast(boost::math::ntl::RR t) { - unsigned result; + int result; + detail::convert_to_long_result(t.value(), result); + return result; +} +template <> +inline long real_cast(boost::math::ntl::RR t) +{ + long result; + detail::convert_to_long_result(t.value(), result); + return result; +} +template <> +inline long long real_cast(boost::math::ntl::RR t) +{ + long long result; detail::convert_to_long_result(t.value(), result); return result; } @@ -703,14 +792,79 @@ namespace ntl{ return tools::real_cast(round(x, pol)); } + template + inline long lround(RR const& x, const Policy& pol) + { + return tools::real_cast(round(x, pol)); + } + + template + inline long long llround(RR const& x, const Policy& pol) + { + return tools::real_cast(round(x, pol)); + } + template inline int itrunc(RR const& x, const Policy& pol) { return tools::real_cast(trunc(x, pol)); } + template + inline long ltrunc(RR const& x, const Policy& pol) + { + return tools::real_cast(trunc(x, pol)); + } + + template + inline long long lltrunc(RR const& x, const Policy& pol) + { + return tools::real_cast(trunc(x, pol)); + } + } // namespace ntl +namespace detail{ + +template +ntl::RR digamma_imp(ntl::RR x, const mpl::int_<0>* t, const Policy& pol) +{ + // + // This handles reflection of negative arguments, and all our + // error handling, then forwards to the T-specific approximation. + // + BOOST_MATH_STD_USING // ADL of std functions. + + ntl::RR result = 0; + // + // Check for negative arguments and use reflection: + // + if(x < 0) + { + // Reflect: + x = 1 - x; + // Argument reduction for tan: + ntl::RR remainder = x - floor(x); + // Shift to negative if > 0.5: + if(remainder > 0.5) + { + remainder -= 1; + } + // + // check for evaluation at a negative pole: + // + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + result += big_digamma(x); + return result; +} + +} // namespace detail + } // namespace math } // namespace boost diff --git a/include/boost/math/concepts/distributions.hpp b/include/boost/math/concepts/distributions.hpp index 3773cf050..7e656990c 100644 --- a/include/boost/math/concepts/distributions.hpp +++ b/include/boost/math/concepts/distributions.hpp @@ -162,6 +162,7 @@ struct DistributionConcept v = quantile(complement(dist, d)); v = hazard(dist, d); v = chf(dist, d); +#ifndef TEST_MPFR long double ld = 1; v = cdf(dist, ld); v = cdf(complement(dist, ld)); @@ -170,6 +171,7 @@ struct DistributionConcept v = quantile(complement(dist, ld)); v = hazard(dist, ld); v = chf(dist, ld); +#endif int i = 1; v = cdf(dist, i); v = cdf(complement(dist, i)); diff --git a/include/boost/math/concepts/real_type_concept.hpp b/include/boost/math/concepts/real_type_concept.hpp new file mode 100644 index 000000000..481c82774 --- /dev/null +++ b/include/boost/math/concepts/real_type_concept.hpp @@ -0,0 +1,109 @@ +// Copyright John Maddock 2007-8. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_REAL_TYPE_CONCEPT_HPP +#define BOOST_MATH_REAL_TYPE_CONCEPT_HPP + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable: 4100) +#pragma warning(disable: 4510) +#pragma warning(disable: 4610) +#endif +#include +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +#include +#include + + +namespace boost{ namespace math{ namespace concepts{ + +template +struct RealTypeConcept +{ + template + void check_binary_ops(Other o) + { + RealType r(o); + r = o; + r -= o; + r += o; + r *= o; + r /= o; + r = r - o; + r = o - r; + r = r + o; + r = o + r; + r = o * r; + r = r * o; + r = r / o; + r = o / r; + bool b; + b = r == o; + b = o == r; + b = r != o; + b = o != r; + b = r <= o; + b = o <= r; + b = r >= o; + b = o >= r; + b = r < o; + b = o < r; + b = r > o; + b = o > r; + } + + void constraints() + { + BOOST_MATH_STD_USING + + RealType r; + check_binary_ops(r); + check_binary_ops(0.5f); + check_binary_ops(0.5); + //check_binary_ops(0.5L); + check_binary_ops(1); + //check_binary_ops(1u); + check_binary_ops(1L); + //check_binary_ops(1uL); +#ifndef BOOST_HAS_LONG_LONG + check_binary_ops(1LL); +#endif + RealType r2 = +r; + r2 = -r; + + r2 = fabs(r); + r2 = abs(r); + r2 = ceil(r); + r2 = floor(r); + r2 = exp(r); + r2 = pow(r, r2); + r2 = sqrt(r); + r2 = log(r); + r2 = cos(r); + r2 = sin(r); + r2 = tan(r); + r2 = asin(r); + r2 = acos(r); + r2 = atan(r); + int i; + r2 = ldexp(r, i); + r2 = frexp(r, &i); + i = boost::math::tools::digits(); + r2 = boost::math::tools::max_value(); + r2 = boost::math::tools::min_value(); + r2 = boost::math::tools::log_max_value(); + r2 = boost::math::tools::log_min_value(); + r2 = boost::math::tools::epsilon(); + } +}; // struct DistributionConcept + + +}}} // namespaces + +#endif + diff --git a/include/boost/math/distributions/binomial.hpp b/include/boost/math/distributions/binomial.hpp index 5dd476262..e6c451a12 100644 --- a/include/boost/math/distributions/binomial.hpp +++ b/include/boost/math/distributions/binomial.hpp @@ -649,13 +649,13 @@ namespace boost template inline RealType quantile(const binomial_distribution& dist, const RealType& p) { - return binomial_detail::quantile_imp(dist, p, 1-p); + return binomial_detail::quantile_imp(dist, p, RealType(1-p)); } // quantile template RealType quantile(const complemented2_type, RealType>& c) { - return binomial_detail::quantile_imp(c.dist, 1-c.param, c.param); + return binomial_detail::quantile_imp(c.dist, RealType(1-c.param), c.param); } // quantile template diff --git a/include/boost/math/distributions/cauchy.hpp b/include/boost/math/distributions/cauchy.hpp index de6f6b643..0a818568c 100644 --- a/include/boost/math/distributions/cauchy.hpp +++ b/include/boost/math/distributions/cauchy.hpp @@ -140,7 +140,7 @@ RealType quantile_imp( return location; } result = -scale / tan(constants::pi() * P); - return complement ? location - result : location + result; + return complement ? RealType(location - result) : RealType(location + result); } // quantile } // namespace detail diff --git a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp index 202602791..d4f424c8e 100644 --- a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +++ b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp @@ -128,7 +128,7 @@ typename Dist::value_type else { b = a; - a = (std::max)(b - 1, value_type(0)); + a = (std::max)(value_type(b - 1), value_type(0)); if(a < min_bound) a = min_bound; fa = f(a); @@ -158,7 +158,7 @@ typename Dist::value_type } else { - b = (std::max)(a - adder, value_type(0)); + b = (std::max)(value_type(a - adder), value_type(0)); if(b < min_bound) b = min_bound; } @@ -182,7 +182,7 @@ typename Dist::value_type } else { - b = (std::max)(a - adder, value_type(0)); + b = (std::max)(value_type(a - adder), value_type(0)); if(b < min_bound) b = min_bound; } @@ -330,7 +330,7 @@ inline typename Dist::value_type dist, p, q, - (guess < 1 ? value_type(1) : floor(guess)), + (guess < 1 ? value_type(1) : (value_type)floor(guess)), multiplier, adder, tools::equal_floor(), @@ -340,7 +340,7 @@ inline typename Dist::value_type dist, p, q, - ceil(guess), + (value_type)ceil(guess), multiplier, adder, tools::equal_ceil(), diff --git a/include/boost/math/distributions/negative_binomial.hpp b/include/boost/math/distributions/negative_binomial.hpp index ccc8127b1..f9a24e824 100644 --- a/include/boost/math/distributions/negative_binomial.hpp +++ b/include/boost/math/distributions/negative_binomial.hpp @@ -468,14 +468,14 @@ namespace boost RealType guess = 0; RealType factor = 5; if(r * r * r * P * p > 0.005) - guess = detail::inverse_negative_binomial_cornish_fisher(r, p, 1-p, P, 1-P, Policy()); + guess = detail::inverse_negative_binomial_cornish_fisher(r, p, RealType(1-p), P, RealType(1-P), Policy()); if(guess < 10) { // // Cornish-Fisher Negative binomial approximation not accurate in this area: // - guess = (std::min)(r * 2, RealType(10)); + guess = (std::min)(RealType(r * 2), RealType(10)); } else factor = (1-P < sqrt(tools::epsilon())) ? 2 : (guess < 20 ? 1.2f : 1.1f); @@ -545,14 +545,14 @@ namespace boost RealType guess = 0; RealType factor = 5; if(r * r * r * (1-Q) * p > 0.005) - guess = detail::inverse_negative_binomial_cornish_fisher(r, p, 1-p, 1-Q, Q, Policy()); + guess = detail::inverse_negative_binomial_cornish_fisher(r, p, RealType(1-p), RealType(1-Q), Q, Policy()); if(guess < 10) { // // Cornish-Fisher Negative binomial approximation not accurate in this area: // - guess = (std::min)(r * 2, RealType(10)); + guess = (std::min)(RealType(r * 2), RealType(10)); } else factor = (Q < sqrt(tools::epsilon())) ? 2 : (guess < 20 ? 1.2f : 1.1f); diff --git a/include/boost/math/distributions/non_central_beta.hpp b/include/boost/math/distributions/non_central_beta.hpp index 5e9eef2fe..30fb0924b 100644 --- a/include/boost/math/distributions/non_central_beta.hpp +++ b/include/boost/math/distributions/non_central_beta.hpp @@ -597,7 +597,7 @@ namespace boost if(l == 0) return pdf(boost::math::beta_distribution(dist.alpha(), dist.beta()), x); return policies::checked_narrowing_cast( - non_central_beta_pdf(a, b, l, static_cast(x), 1 - static_cast(x), forwarding_policy()), + non_central_beta_pdf(a, b, l, static_cast(x), value_type(1 - static_cast(x)), forwarding_policy()), "function"); } @@ -781,7 +781,7 @@ namespace boost if(l == 0) return cdf(beta_distribution(a, b), x); - return detail::non_central_beta_cdf(x, 1 - x, a, b, l, false, Policy()); + return detail::non_central_beta_cdf(x, RealType(1 - x), a, b, l, false, Policy()); } // cdf template @@ -818,7 +818,7 @@ namespace boost if(l == 0) return cdf(complement(beta_distribution(a, b), x)); - return detail::non_central_beta_cdf(x, 1 - x, a, b, l, true, Policy()); + return detail::non_central_beta_cdf(x, RealType(1 - x), a, b, l, true, Policy()); } // ccdf template diff --git a/include/boost/math/distributions/non_central_t.hpp b/include/boost/math/distributions/non_central_t.hpp index f68efe6ce..a0d0b87e3 100644 --- a/include/boost/math/distributions/non_central_t.hpp +++ b/include/boost/math/distributions/non_central_t.hpp @@ -1042,7 +1042,7 @@ namespace boost { // Quantile (or Percent Point) function. RealType v = dist.degrees_of_freedom(); RealType l = dist.non_centrality(); - return detail::non_central_t_quantile(v, l, p, 1-p, Policy()); + return detail::non_central_t_quantile(v, l, p, RealType(1-p), Policy()); } // quantile template @@ -1052,7 +1052,7 @@ namespace boost RealType q = c.param; RealType v = dist.degrees_of_freedom(); RealType l = dist.non_centrality(); - return detail::non_central_t_quantile(v, l, 1-q, q, Policy()); + return detail::non_central_t_quantile(v, l, RealType(1-q), q, Policy()); } // quantile complement. } // namespace math diff --git a/include/boost/math/distributions/poisson.hpp b/include/boost/math/distributions/poisson.hpp index b57ba6fbc..3b215d0e2 100644 --- a/include/boost/math/distributions/poisson.hpp +++ b/include/boost/math/distributions/poisson.hpp @@ -479,7 +479,7 @@ namespace boost if(z < 1) guess = z; else - guess = boost::math::detail::inverse_poisson_cornish_fisher(z, p, 1-p, Policy()); + guess = boost::math::detail::inverse_poisson_cornish_fisher(z, p, RealType(1-p), Policy()); if(z > 5) { if(z > 1000) @@ -547,7 +547,7 @@ namespace boost if(z < 1) guess = z; else - guess = boost::math::detail::inverse_poisson_cornish_fisher(z, 1-q, q, Policy()); + guess = boost::math::detail::inverse_poisson_cornish_fisher(z, RealType(1-q), q, Policy()); if(z > 5) { if(z > 1000) diff --git a/include/boost/math/distributions/triangular.hpp b/include/boost/math/distributions/triangular.hpp index 520a350a9..5030081db 100644 --- a/include/boost/math/distributions/triangular.hpp +++ b/include/boost/math/distributions/triangular.hpp @@ -214,11 +214,11 @@ namespace boost{ namespace math } if (x == lower) { // (mode - lower) == 0 which would lead to divide by zero! - return (mode == lower) ? 2 / (upper - lower) : 0; + return (mode == lower) ? 2 / (upper - lower) : RealType(0); } else if (x == upper) { - return (mode == upper) ? 2 / (upper - lower) : 0; + return (mode == upper) ? 2 / (upper - lower) : RealType(0); } else if (x <= mode) { diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp index 043b7a38a..9d30f2c86 100644 --- a/include/boost/math/special_functions/bessel.hpp +++ b/include/boost/math/special_functions/bessel.hpp @@ -128,7 +128,7 @@ T cyl_bessel_j_imp(T v, T x, const bessel_no_int_tag& t, const Policy& pol) // better have integer v: if(floor(v) == v) { - T r = cyl_bessel_j_imp(v, -x, t, pol); + T r = cyl_bessel_j_imp(v, T(-x), t, pol); if(iround(v, pol) & 1) r = -r; return r; @@ -209,7 +209,7 @@ inline T sph_bessel_j_imp(unsigned n, T x, const Policy& pol) // Default case is just a naive evaluation of the definition: // return sqrt(constants::pi() / (2 * x)) - * cyl_bessel_j_imp(T(n)+T(0.5f), x, bessel_no_int_tag(), pol); + * cyl_bessel_j_imp(T(T(n)+T(0.5f)), x, bessel_no_int_tag(), pol); } template @@ -227,7 +227,7 @@ T cyl_bessel_i_imp(T v, T x, const Policy& pol) // better have integer v: if(floor(v) == v) { - T r = cyl_bessel_i_imp(v, -x, pol); + T r = cyl_bessel_i_imp(v, T(-x), pol); if(iround(v, pol) & 1) r = -r; return r; @@ -380,7 +380,7 @@ inline T sph_neumann_imp(unsigned v, T x, const Policy& pol) if(x < 2 * tools::min_value()) return -policies::raise_overflow_error(function, 0, pol); - T result = cyl_neumann_imp(T(v)+0.5f, x, bessel_no_int_tag(), pol); + T result = cyl_neumann_imp(T(T(v)+0.5f), x, bessel_no_int_tag(), pol); T tx = sqrt(constants::pi() / (2 * x)); if((tx > 1) && (tools::max_value() / tx < result)) diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 63552a0b1..ad94705d8 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -822,7 +822,7 @@ inline T binomial_ccdf(T n, T k, T x, T y) BOOST_MATH_STD_USING // ADL of std names T result = pow(x, n); T term = result; - for(unsigned i = itrunc(n - 1); i > k; --i) + for(unsigned i = itrunc(T(n - 1)); i > k; --i) { term *= ((i + 1) * y) / ((n - i) * x) ; result += term; @@ -874,15 +874,15 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de { if(p_derivative) { - *p_derivative = (a == 1) ? 1 : (a < 1) ? tools::max_value() / 2 : tools::min_value() * 2; + *p_derivative = (a == 1) ? (T)1 : (a < 1) ? T(tools::max_value() / 2) : T(tools::min_value() * 2); } - return (invert ? (normalised ? 1 : boost::math::beta(a, b, pol)) : 0); + return (invert ? (normalised ? T(1) : boost::math::beta(a, b, pol)) : T(0)); } if(x == 1) { if(p_derivative) { - *p_derivative = (b == 1) ? 1 : (b < 1) ? tools::max_value() / 2 : tools::min_value() * 2; + *p_derivative = (b == 1) ? T(1) : (b < 1) ? T(tools::max_value() / 2) : T(tools::min_value() * 2); } return (invert == 0 ? (normalised ? 1 : boost::math::beta(a, b, pol)) : 0); } @@ -931,7 +931,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de T prefix; if(!normalised) { - prefix = rising_factorial_ratio(a+b, a, 20); + prefix = rising_factorial_ratio(T(a+b), a, 20); } else { @@ -939,12 +939,12 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); if(!invert) - fract = beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; - fract = -beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); } } } @@ -997,7 +997,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de T prefix; if(!normalised) { - prefix = rising_factorial_ratio(a+b, a, 20); + prefix = rising_factorial_ratio(T(a+b), a, 20); } else { @@ -1005,12 +1005,12 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); if(!invert) - fract = beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; - fract = -beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); } } } @@ -1060,14 +1060,14 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de else if(a > 15) { // sidestep so we can use the series representation: - int n = itrunc(floor(b), pol); + int n = itrunc(T(floor(b)), pol); if(n == b) --n; T bbar = b - n; T prefix; if(!normalised) { - prefix = rising_factorial_ratio(a+bbar, bbar, n); + prefix = rising_factorial_ratio(T(a+bbar), bbar, n); } else { @@ -1082,7 +1082,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de // the formula here for the non-normalised case is tricky to figure // out (for me!!), and requires two pochhammer calculations rather // than one, so leave it for now.... - int n = itrunc(floor(b), pol); + int n = itrunc(T(floor(b)), pol); T bbar = b - n; if(bbar <= 0) { @@ -1094,7 +1094,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de if(invert) fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); //fract = ibeta_series(a+20, bbar, x, fract, l, normalised, p_derivative, y); - fract = beta_small_b_large_a_series(a+20, bbar, x, y, fract, T(1), pol, normalised); + fract = beta_small_b_large_a_series(T(a+20), bbar, x, y, fract, T(1), pol, normalised); if(invert) { fract = -fract; @@ -1167,7 +1167,7 @@ T ibeta_derivative_imp(T a, T b, T x, const Policy& pol) // Now the regular cases: // typedef typename lanczos::lanczos::type lanczos_type; - T f1 = ibeta_power_terms(a, b, x, 1 - x, lanczos_type(), true, pol); + T f1 = ibeta_power_terms(a, b, x, 1 - x, lanczos_type(), true, pol); T y = (1 - x) * x; if(f1 == 0) diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 3a83ed525..489c2b81a 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -44,7 +44,7 @@ T cos_pi_imp(T x, const Policy& pol) return 0; rem = cos(constants::pi() * rem); - return invert ? -rem : rem; + return invert ? T(-rem) : rem; } } // namespace detail diff --git a/include/boost/math/special_functions/detail/bessel_ik.hpp b/include/boost/math/special_functions/detail/bessel_ik.hpp index 5d771d88e..94b5314d3 100644 --- a/include/boost/math/special_functions/detail/bessel_ik.hpp +++ b/include/boost/math/special_functions/detail/bessel_ik.hpp @@ -49,11 +49,11 @@ int temme_ik(T v, T x, T* K, T* K1, const Policy& pol) b = exp(v * a); sigma = -a * v; c = abs(v) < tools::epsilon() ? - 1 : boost::math::sin_pi(v) / (v * pi()); + T(1) : T(boost::math::sin_pi(v) / (v * pi())); d = abs(sigma) < tools::epsilon() ? - 1 : sinh(sigma) / sigma; + T(1) : T(sinh(sigma) / sigma); gamma1 = abs(v) < tools::epsilon() ? - -euler() : (0.5f / v) * (gp - gm) * c; + T(-euler()) : T((0.5f / v) * (gp - gm) * c); gamma2 = (2 + gp + gm) * c / 2; // initial values diff --git a/include/boost/math/special_functions/detail/bessel_jy.hpp b/include/boost/math/special_functions/detail/bessel_jy.hpp index 4ef0deeea..a13b99852 100644 --- a/include/boost/math/special_functions/detail/bessel_jy.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy.hpp @@ -55,12 +55,12 @@ int temme_jy(T v, T x, T* Y, T* Y1, const Policy& pol) sigma = -a * v; d = abs(sigma) < tools::epsilon() ? T(1) : sinh(sigma) / sigma; - e = abs(v) < tools::epsilon() ? v*pi()*pi() / 2 - : 2 * spv2 * spv2 / v; + e = abs(v) < tools::epsilon() ? T(v*pi()*pi() / 2) + : T(2 * spv2 * spv2 / v); - T g1 = (v == 0) ? -euler() : (gp - gm) / ((1 + gp) * (1 + gm) * 2 * v); + T g1 = (v == 0) ? T(-euler()) : T((gp - gm) / ((1 + gp) * (1 + gm) * 2 * v)); T g2 = (2 + gp + gm) / ((1 + gp) * (1 + gm) * 2); - T vspv = (fabs(v) < tools::epsilon()) ? 1/constants::pi() : v / spv; + T vspv = (fabs(v) < tools::epsilon()) ? T(1/constants::pi()) : T(v / spv); f = (g1 * cosh(sigma) - g2 * a * d) * 2 * vspv; p = vspv / (xp * (1 + gm)); @@ -118,7 +118,7 @@ int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol) tolerance = 2 * tools::epsilon(); tiny = sqrt(tools::min_value()); C = f = tiny; // b0 = 0, replace with tiny - D = 0.0L; + D = 0; for (k = 1; k < policies::get_max_series_iterations() * 100; k++) { a = -1; @@ -131,7 +131,7 @@ int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol) delta = C * D; f *= delta; if (D < 0) { s = -s; } - if (abs(delta - 1.0L) < tolerance) + if (abs(delta - 1) < tolerance) { break; } } policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF1_jy", k / 100, pol); @@ -158,7 +158,7 @@ int CF2_jy(T v, T x, T* p, T* q, const Policy& pol) typedef typename complex_trait::type complex_type; complex_type C, D, f, a, b, delta, one(1); - T tiny, zero(0.0L); + T tiny, zero(0); unsigned long k; // |x| >= |v|, CF2_jy converges rapidly @@ -169,7 +169,7 @@ int CF2_jy(T v, T x, T* p, T* q, const Policy& pol) // Lentz, Applied Optics, vol 15, 668 (1976) T tolerance = 2 * tools::epsilon(); tiny = sqrt(tools::min_value()); - C = f = complex_type(-0.5f/x, 1.0L); + C = f = complex_type(-0.5f/x, 1); D = 0; for (k = 1; k < policies::get_max_series_iterations(); k++) { @@ -289,7 +289,7 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) if(kind&need_y) { Yu = asymptotic_bessel_y_large_x_2(u, x); - Yu1 = asymptotic_bessel_y_large_x_2(u + 1, x); + Yu1 = asymptotic_bessel_y_large_x_2(T(u + 1), x); } else Yu = std::numeric_limits::quiet_NaN(); // any value will do, we're not using it. diff --git a/include/boost/math/special_functions/detail/bessel_jy_asym.hpp b/include/boost/math/special_functions/detail/bessel_jy_asym.hpp index 098cb8b14..be4cfcc44 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_asym.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_asym.hpp @@ -208,7 +208,7 @@ inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<0>&) { // default case: BOOST_MATH_STD_USING - T v2 = (std::max)(T(3), v * v); + T v2 = (std::max)(T(3), T(v * v)); return v2 / pow(100 * tools::epsilon() / T(2e-5f), T(0.17f)); } template diff --git a/include/boost/math/special_functions/detail/gamma_inva.hpp b/include/boost/math/special_functions/detail/gamma_inva.hpp index 62adac86e..549bc3d55 100644 --- a/include/boost/math/special_functions/detail/gamma_inva.hpp +++ b/include/boost/math/special_functions/detail/gamma_inva.hpp @@ -176,7 +176,7 @@ inline typename tools::promote_args::type detail::gamma_inva_imp( static_cast(x), static_cast(p), - 1 - static_cast(p), + static_cast(1 - static_cast(p)), pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); } @@ -205,7 +205,7 @@ inline typename tools::promote_args::type return policies::checked_narrowing_cast( detail::gamma_inva_imp( static_cast(x), - 1 - static_cast(q), + static_cast(1 - static_cast(q)), static_cast(q), pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); } diff --git a/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp b/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp index 55e2c65b6..8318a2845 100644 --- a/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp @@ -120,11 +120,11 @@ T ibeta_inv_ab_imp(const T& b, const T& z, const T& p, const T& q, bool swap_ab, // if((p < q) != swap_ab) { - guess = (std::min)(b * 2, T(1)); + guess = (std::min)(T(b * 2), T(1)); } else { - guess = (std::min)(b / 2, T(1)); + guess = (std::min)(T(b / 2), T(1)); } } if(n * n * n * u * sf > 0.005) @@ -137,11 +137,11 @@ T ibeta_inv_ab_imp(const T& b, const T& z, const T& p, const T& q, bool swap_ab, // if((p < q) != swap_ab) { - guess = (std::min)(b * 2, T(10)); + guess = (std::min)(T(b * 2), T(10)); } else { - guess = (std::min)(b / 2, T(10)); + guess = (std::min)(T(b / 2), T(10)); } } else @@ -186,7 +186,7 @@ typename tools::promote_args::type static_cast(b), static_cast(x), static_cast(p), - 1 - static_cast(p), + static_cast(1 - static_cast(p)), false, pol), "boost::math::ibeta_inva<%1%>(%1%,%1%,%1%)"); } @@ -217,7 +217,7 @@ typename tools::promote_args::type detail::ibeta_inv_ab_imp( static_cast(b), static_cast(x), - 1 - static_cast(q), + static_cast(1 - static_cast(q)), static_cast(q), false, pol), "boost::math::ibetac_inva<%1%>(%1%,%1%,%1%)"); @@ -250,7 +250,7 @@ typename tools::promote_args::type static_cast(a), static_cast(x), static_cast(p), - 1 - static_cast(p), + static_cast(1 - static_cast(p)), true, pol), "boost::math::ibeta_invb<%1%>(%1%,%1%,%1%)"); } @@ -281,7 +281,7 @@ typename tools::promote_args::type detail::ibeta_inv_ab_imp( static_cast(a), static_cast(x), - 1 - static_cast(q), + static_cast(1 - static_cast(q)), static_cast(q), true, pol), "boost::math::ibetac_invb<%1%>(%1%,%1%,%1%)"); diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index 0c1ae76f2..1486d9cdc 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -106,7 +106,7 @@ T temme_method_1_ibeta_inverse(T a, T b, T z, const Policy& pol) // // Bring them together to get a final estimate for eta: // - T eta = tools::evaluate_polynomial(terms, 1/a, 4); + T eta = tools::evaluate_polynomial(terms, T(1/a), 4); // // now we need to convert eta to x, by solving the appropriate // quadratic equation: @@ -207,7 +207,7 @@ T temme_method_2_ibeta_inverse(T /*a*/, T /*b*/, T z, T r, T theta, const Policy // Bring the correction terms together to evaluate eta, // this is the last equation on page 151: // - T eta = tools::evaluate_polynomial(terms, 1/r, 4); + T eta = tools::evaluate_polynomial(terms, T(1/r), 4); // // Now that we have eta we need to back solve for x, // we seek the value of x that gives eta in Eq 3.2. @@ -660,7 +660,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) // T lx = log(p * a * boost::math::beta(a, b, pol)) / a; x = exp(lx); - y = x < 0.9 ? 1 - x : -boost::math::expm1(lx, pol); + y = x < 0.9 ? T(1 - x) : (T)(-boost::math::expm1(lx, pol)); if((b < a) && (x < 0.2)) { diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index ff182bb2d..83e83e0cd 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -209,7 +209,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) } else { - T D = (std::max)(T(2), a * (a - 1)); + T D = (std::max)(T(2), T(a * (a - 1))); T lg = boost::math::lgamma(a, pol); T lb = log(q) + lg; if(lb < -D * 2.3) @@ -357,7 +357,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) return tools::max_value(); if(p == 0) return 0; - T guess = detail::find_inverse_gamma(a, p, 1 - p, pol); + T guess = detail::find_inverse_gamma(a, p, 1 - p, pol); T lower = tools::min_value(); if(guess <= lower) guess = tools::min_value(); @@ -399,7 +399,7 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) return tools::max_value(); if(q == 1) return 0; - T guess = detail::find_inverse_gamma(a, 1 - q, q, pol); + T guess = detail::find_inverse_gamma(a, 1 - q, q, pol); T lower = tools::min_value(); if(guess <= lower) guess = tools::min_value(); diff --git a/include/boost/math/special_functions/detail/t_distribution_inv.hpp b/include/boost/math/special_functions/detail/t_distribution_inv.hpp index 1ae2033cd..920430b31 100644 --- a/include/boost/math/special_functions/detail/t_distribution_inv.hpp +++ b/include/boost/math/special_functions/detail/t_distribution_inv.hpp @@ -142,35 +142,60 @@ T inverse_students_t_body_series(T df, T u, const Policy& pol) // Figure out what the coefficients are, note these depend // only on the degrees of freedom (Eq 57 of Shaw): // - c[2] = T(1) / 6 + T(1) / (6 * df); + c[2] = 0.16666666666666666667 + 0.16666666666666666667 / df; T in = 1 / df; - c[3] = (((T(1) / 120) * in) + (T(1) / 15)) * in + (T(7) / 120); - c[4] = ((((T(1) / 5040) * in + (T(1) / 560)) * in + (T(3) / 112)) * in + T(127) / 5040); - c[5] = ((((T(1) / 362880) * in + (T(17) / 45360)) * in + (T(67) / 60480)) * in + (T(479) / 45360)) * in + (T(4369) / 362880); - c[6] = ((((((T(1) / 39916800) * in + (T(2503) / 39916800)) * in + (T(11867) / 19958400)) * in + (T(1285) / 798336)) * in + (T(153161) / 39916800)) * in + (T(34807) / 5702400)); - c[7] = (((((((T(1) / 6227020800LL) * in + (T(37) / 2402400)) * in + - (T(339929) / 2075673600LL)) * in + (T(67217) / 97297200)) * in + - (T(870341) / 691891200LL)) * in + (T(70691) / 64864800LL)) * in + - (T(20036983LL) / 6227020800LL)); - c[8] = (((((((T(1) / 1307674368000LL) * in + (T(1042243LL) / 261534873600LL)) * in + - (T(21470159) / 435891456000LL)) * in + (T(326228899LL) / 1307674368000LL)) * in + - (T(843620579) / 1307674368000LL)) * in + (T(332346031LL) / 435891456000LL)) * in + - (T(43847599) / 1307674368000LL)) * in + (T(2280356863LL) / 1307674368000LL); - c[9] = (((((((((T(1) / 355687428096000LL)) * in + (T(24262727LL) / 22230464256000LL)) * in + - (T(123706507LL) / 8083805184000LL)) * in + (T(404003599LL) / 4446092851200LL)) * in + - (T(51811946317LL) / 177843714048000LL)) * in + (T(91423417LL) / 177843714048LL)) * in + - (T(32285445833LL) / 88921857024000LL)) * in + (T(531839683LL) / 1710035712000LL)) * in + - (T(49020204823LL) / 50812489728000LL); - c[10] = (((((((((T(1) / 121645100408832000LL) * in + - (T(4222378423LL) / 13516122267648000LL)) * in + - (T(49573465457LL) / 10137091700736000LL)) * in + - (T(176126809LL) / 5304600576000LL)) * in + - (T(44978231873LL) / 355687428096000LL)) * in + - (T(5816850595639LL) / 20274183401472000LL)) * in + - (T(73989712601LL) / 206879422464000LL)) * in + - (T(26591354017LL) / 259925428224000LL)) * in + - (T(14979648446341LL) / 40548366802944000LL)) * in + - (T(65967241200001LL) / 121645100408832000LL); + c[3] = (0.0083333333333333333333 * in + + 0.066666666666666666667) * in + + 0.058333333333333333333; + c[4] = ((0.00019841269841269841270 * in + + 0.0017857142857142857143) * in + + 0.026785714285714285714) * in + + 0.025198412698412698413; + c[5] = (((2.7557319223985890653e10-6 * in + + 0.00037477954144620811287) * in + - 0.0011078042328042328042) * in + + 0.010559964726631393298) * in + + 0.012039792768959435626; + c[6] = ((((2.5052108385441718775e-8 * in + - 0.000062705427288760622094) * in + + 0.00059458674042007375341) * in + - 0.0016095979637646304313) * in + + 0.0061039211560044893378) * in + + 0.0038370059724226390893; + c[7] = (((((1.6059043836821614599e-10 * in + + 0.000015401265401265401265) * in + - 0.00016376804137220803887) * in + + 0.00069084207973096861986) * in + - 0.0012579159844784844785) * in + + 0.0010898206731540064873) * in + + 0.0032177478835464946576; + c[8] = ((((((7.6471637318198164759e-13 * in + - 3.9851014346715404916e-6) * in + + 0.000049255746366361445727) * in + - 0.00024947258047043099953) * in + + 0.00064513046951456342991) * in + - 0.00076245135440323932387) * in + + 0.000033530976880017885309) * in + + 0.0017438262298340009980; + c[9] = (((((((2.8114572543455207632e-15 * in + + 1.0914179173496789432e-6) * in + - 0.000015303004486655377567) * in + + 0.000090867107935219902229) * in + - 0.00029133414466938067350) * in + + 0.00051406605788341121363) * in + - 0.00036307660358786885787) * in + - 0.00031101086326318780412) * in + + 0.00096472747321388644237; + c[10] = ((((((((8.2206352466243297170e-18 * in + - 3.1239569599829868045e-7) * in + + 4.8903045291975346210e-6) * in + - 0.000033202652391372058698) * in + + 0.00012645437628698076975) * in + - 0.00028690924218514613987) * in + + 0.00035764655430568632777) * in + - 0.00010230378073700412687) * in + - 0.00036942667800009661203) * in + + 0.00054229262813129686486; // // The result is then a polynomial in v (see Eq 56 of Shaw): // @@ -240,7 +265,7 @@ T inverse_students_t(T df, T u, T v, const Policy& pol, bool* pexact = 0) T root_alpha = sqrt(alpha); T r = 4 * cos(acos(root_alpha) / 3) / root_alpha; T x = sqrt(r - 4); - result = u - 0.5f < 0 ? -x : x; + result = u - 0.5f < 0 ? (T)-x : x; if(pexact) *pexact = true; break; @@ -259,7 +284,7 @@ T inverse_students_t(T df, T u, T v, const Policy& pol, bool* pexact = 0) // T a = 4 * (u - u * u);//1 - 4 * (u - 0.5f) * (u - 0.5f); T b = boost::math::cbrt(a); - static const T c = 0.85498797333834849467655443627193L; + static const T c = 0.85498797333834849467655443627193; T p = 6 * (1 + c * (1 / b - 1)); T p0; do{ @@ -274,7 +299,7 @@ T inverse_students_t(T df, T u, T v, const Policy& pol, bool* pexact = 0) // Use Eq 45 to extract the result: // p = sqrt(p - df); - result = (u - 0.5f) < 0 ? -p : p; + result = (u - 0.5f) < 0 ? (T)-p : p; break; } #if 0 @@ -369,7 +394,7 @@ calculate_real: // where we use Shaw's tail series. // The crossover point is roughly exponential in -df: // - T crossover = ldexp(1.0f, iround(df / -0.654f, pol)); + T crossover = ldexp(1.0f, iround(T(df / -0.654f), pol)); if(u > crossover) { result = boost::math::detail::inverse_students_t_hill(df, u, pol); @@ -380,13 +405,13 @@ calculate_real: } } } - return invert ? -result : result; + return invert ? (T)-result : result; } template inline T find_ibeta_inv_from_t_dist(T a, T p, T q, T* py, const Policy& pol) { - T u = (p > q) ? 0.5f - q / 2 : p / 2; + T u = (p > q) ? T(0.5f - q) / T(2) : T(p / 2); T v = 1 - u; // u < 0.5 so no cancellation error T df = a * 2; T t = boost::math::detail::inverse_students_t(df, u, v, pol); diff --git a/include/boost/math/special_functions/ellint_1.hpp b/include/boost/math/special_functions/ellint_1.hpp index 9de2f66f6..30fd53319 100644 --- a/include/boost/math/special_functions/ellint_1.hpp +++ b/include/boost/math/special_functions/ellint_1.hpp @@ -88,7 +88,7 @@ T ellint_f_imp(T phi, T k, const Policy& pol) // so rewritten to use fmod instead: // BOOST_MATH_INSTRUMENT_CODE("pi/2 = " << constants::pi() / 2); - T rphi = boost::math::tools::fmod_workaround(phi, constants::pi() / 2); + T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi() / 2)); BOOST_MATH_INSTRUMENT_VARIABLE(rphi); T m = 2 * (phi - rphi) / constants::pi(); BOOST_MATH_INSTRUMENT_VARIABLE(m); @@ -104,7 +104,7 @@ T ellint_f_imp(T phi, T k, const Policy& pol) T cosp = cos(rphi); BOOST_MATH_INSTRUMENT_VARIABLE(sinp); BOOST_MATH_INSTRUMENT_VARIABLE(cosp); - result = s * sinp * ellint_rf_imp(cosp * cosp, 1 - k * k * sinp * sinp, T(1), pol); + result = s * sinp * ellint_rf_imp(T(cosp * cosp), T(1 - k * k * sinp * sinp), T(1), pol); BOOST_MATH_INSTRUMENT_VARIABLE(result); if(m != 0) { @@ -112,7 +112,7 @@ T ellint_f_imp(T phi, T k, const Policy& pol) BOOST_MATH_INSTRUMENT_VARIABLE(result); } } - return invert ? -result : result; + return invert ? T(-result) : result; } // Complete elliptic integral (Legendre form) of the first kind diff --git a/include/boost/math/special_functions/ellint_2.hpp b/include/boost/math/special_functions/ellint_2.hpp index 182157833..5d0415dde 100644 --- a/include/boost/math/special_functions/ellint_2.hpp +++ b/include/boost/math/special_functions/ellint_2.hpp @@ -74,7 +74,7 @@ T ellint_e_imp(T phi, T k, const Policy& pol) // but that fails if T has more digits than a long long, // so rewritten to use fmod instead: // - T rphi = boost::math::tools::fmod_workaround(phi, constants::pi() / 2); + T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi() / 2)); T m = 2 * (phi - rphi) / constants::pi(); int s = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) @@ -93,7 +93,7 @@ T ellint_e_imp(T phi, T k, const Policy& pol) if(m != 0) result += m * ellint_e_imp(k, pol); } - return invert ? -result : result; + return invert ? T(-result) : result; } // Complete elliptic integral (Legendre form) of the second kind diff --git a/include/boost/math/special_functions/ellint_3.hpp b/include/boost/math/special_functions/ellint_3.hpp index b3b8e7df0..e0532cb10 100644 --- a/include/boost/math/special_functions/ellint_3.hpp +++ b/include/boost/math/special_functions/ellint_3.hpp @@ -182,7 +182,7 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) } else { - T rphi = boost::math::tools::fmod_workaround(fabs(phi), constants::pi() / 2); + T rphi = boost::math::tools::fmod_workaround(fabs(phi), T(constants::pi() / 2)); T m = 2 * (fabs(phi) - rphi) / constants::pi(); int sign = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 2f3455b1c..62492597f 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -122,9 +122,9 @@ T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) if(z < 0) { if(!invert) - return -erf_imp(-z, invert, pol, t); + return -erf_imp(T(-z), invert, pol, t); else - return 1 + erf_imp(-z, false, pol, t); + return 1 + erf_imp(T(-z), false, pol, t); } T result; diff --git a/include/boost/math/special_functions/expint.hpp b/include/boost/math/special_functions/expint.hpp index 71b851185..bd469199e 100644 --- a/include/boost/math/special_functions/expint.hpp +++ b/include/boost/math/special_functions/expint.hpp @@ -436,7 +436,7 @@ T expint_imp(unsigned n, T z, const Policy& pol, const Tag& tag) if(z < 0) return policies::raise_domain_error(function, "Function requires z >= 0 but got %1%.", z, pol); if(z == 0) - return n == 1 ? policies::raise_overflow_error(function, 0, pol) : 1 / (static_cast(n - 1)); + return n == 1 ? policies::raise_overflow_error(function, 0, pol) : T(1 / (static_cast(n - 1))); T result; @@ -504,7 +504,7 @@ T expint_i_imp(T z, const Policy& pol, const Tag& tag) { static const char* function = "boost::math::expint<%1%>(%1%)"; if(z < 0) - return -expint_imp(1, -z, pol, tag); + return -expint_imp(1, T(-z), pol, tag); if(z == 0) return -policies::raise_overflow_error(function, 0, pol); return expint_i_as_series(z, pol); diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index 73b4f4584..44c443713 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -75,7 +75,7 @@ T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol) BOOST_MATH_STD_USING T a = fabs(x); - if(a > T(0.5L)) + if(a > T(0.5f)) return exp(x) - T(1); if(a < tools::epsilon()) return x; diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index 4b484a7cb..718230c1d 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -163,7 +163,7 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) // handle it, split the product up into three parts: // T xp1 = x + 1; - unsigned n2 = itrunc(floor(xp1), pol); + unsigned n2 = itrunc((T)floor(xp1), pol); if(n2 == xp1) return 0; T result = boost::math::tgamma_delta_ratio(xp1, -static_cast(n2), pol); diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 04126bb62..d8ff27db3 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -148,7 +149,7 @@ T gamma_imp(T z, const Policy& pol, const L& l) return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); if(z <= -20) { - result = gamma_imp(-z, pol, l) * sinpx(z); + result = gamma_imp(T(-z), pol, l) * sinpx(z); if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); result = -boost::math::constants::pi() / result; @@ -236,13 +237,19 @@ T lgamma_imp(T z, const Policy& pol, const L& l, int* sign = 0) { typedef typename policies::precision::type precision_type; typedef typename mpl::if_< - mpl::less_equal >, + mpl::and_< + mpl::less_equal >, + mpl::greater > + >, mpl::int_<64>, typename mpl::if_< - mpl::less_equal >, + mpl::and_< + mpl::less_equal >, + mpl::greater > + >, mpl::int_<113>, mpl::int_<0> >::type >::type tag_type; - result = lgamma_small_imp(z, z - 1, z - 2, tag_type(), pol, l); + result = lgamma_small_imp(z, z - 1, z - 2, tag_type(), pol, l); } else if((z >= 3) && (z < 100)) { @@ -465,7 +472,7 @@ T tgammap1m1_imp(T dz, Policy const& pol, const L& l) { // Use expm1 on lgamma: result = boost::math::expm1(-boost::math::log1p(dz, pol) - + lgamma_small_imp(dz+2, dz + 1, dz, tag_type(), pol, l)); + + lgamma_small_imp(dz+2, dz + 1, dz, tag_type(), pol, l)); BOOST_MATH_INSTRUMENT_CODE(result); } } @@ -474,7 +481,7 @@ T tgammap1m1_imp(T dz, Policy const& pol, const L& l) if(dz < 2) { // Use expm1 on lgamma: - result = boost::math::expm1(lgamma_small_imp(dz+1, dz, dz-1, tag_type(), pol, l), pol); + result = boost::math::expm1(lgamma_small_imp(dz+1, dz, dz-1, tag_type(), pol, l), pol); BOOST_MATH_INSTRUMENT_CODE(result); } else @@ -1097,7 +1104,7 @@ T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) // if((z <= max_factorial::value) && (z + delta <= max_factorial::value)) { - return unchecked_factorial((unsigned)itrunc(z, pol) - 1) / unchecked_factorial((unsigned)itrunc(z + delta) - 1); + return unchecked_factorial((unsigned)itrunc(z, pol) - 1) / unchecked_factorial((unsigned)itrunc(T(z + delta)) - 1); } } if(fabs(delta) < 20) @@ -1428,7 +1435,7 @@ inline typename tools::promote_args::type policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(a), static_cast(b) - static_cast(a), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); + return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(a), static_cast(static_cast(b) - static_cast(a)), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 6ce4777f0..7c6907a0c 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -86,7 +86,7 @@ T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&) function, 0, pol); result_type a = abs(result_type(x)); - if(a > result_type(0.5L)) + if(a > result_type(0.5f)) return log(1 + result_type(x)); // Note that without numeric_limits specialisation support, // epsilon just returns zero, and our "optimisation" will always fail: @@ -432,7 +432,7 @@ inline typename tools::promote_args::type function, 0, pol); result_type a = abs(result_type(x)); - if(a > result_type(0.95L)) + if(a > result_type(0.95f)) return log(1 + result_type(x)) - result_type(x); // Note that without numeric_limits specialisation support, // epsilon just returns zero, and our "optimisation" will always fail: diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index a79b05fa0..c123c412b 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -183,18 +183,18 @@ T float_distance(const T& a, const T& b, const Policy& pol) if(a == b) return 0; if(a == 0) - return 1 + fabs(float_distance(boost::math::sign(b) * detail::get_smallest_value(), b, pol)); + return 1 + fabs(float_distance(static_cast(boost::math::sign(b) * detail::get_smallest_value()), b, pol)); if(b == 0) - return 1 + fabs(float_distance(boost::math::sign(a) * detail::get_smallest_value(), a, pol)); + return 1 + fabs(float_distance(static_cast(boost::math::sign(a) * detail::get_smallest_value()), a, pol)); if(boost::math::sign(a) != boost::math::sign(b)) - return 2 + fabs(float_distance(boost::math::sign(b) * detail::get_smallest_value(), b, pol)) - + fabs(float_distance(boost::math::sign(a) * detail::get_smallest_value(), a, pol)); + return 2 + fabs(float_distance(static_cast(boost::math::sign(b) * detail::get_smallest_value()), b, pol)) + + fabs(float_distance(static_cast(boost::math::sign(a) * detail::get_smallest_value()), a, pol)); // // By the time we get here, both a and b must have the same sign, we want // b > a and both postive for the following logic: // if(a < 0) - return float_distance(-b, -a); + return float_distance(static_cast(-b), static_cast(-a)); BOOST_ASSERT(a >= 0); BOOST_ASSERT(b >= a); diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 8a706a1d7..38c02bc99 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -46,7 +46,7 @@ T sin_pi_imp(T x, const Policy& pol) return static_cast(invert ? -1 : 1); rem = sin(constants::pi() * rem); - return invert ? -rem : rem; + return invert ? T(-rem) : rem; } } // namespace detail diff --git a/include/boost/math/special_functions/spherical_harmonic.hpp b/include/boost/math/special_functions/spherical_harmonic.hpp index bd0c7eef0..37968eadc 100644 --- a/include/boost/math/special_functions/spherical_harmonic.hpp +++ b/include/boost/math/special_functions/spherical_harmonic.hpp @@ -61,7 +61,7 @@ T spherical_harmonic_r(unsigned n, int m, T theta, T phi, const Policy& pol) if(m&1) { // Check phase if theta is outside [0, PI]: - T mod = boost::math::tools::fmod_workaround(theta, 2 * constants::pi()); + T mod = boost::math::tools::fmod_workaround(theta, T(2 * constants::pi())); if(mod < 0) mod += 2 * constants::pi(); if(mod > constants::pi()) @@ -70,7 +70,7 @@ T spherical_harmonic_r(unsigned n, int m, T theta, T phi, const Policy& pol) // Get the value and adjust sign as required: T prefix = spherical_harmonic_prefix(n, m, theta, pol); prefix *= cos(m * phi); - return sign ? -prefix : prefix; + return sign ? T(-prefix) : prefix; } template @@ -88,7 +88,7 @@ T spherical_harmonic_i(unsigned n, int m, T theta, T phi, const Policy& pol) if(m&1) { // Check phase if theta is outside [0, PI]: - T mod = boost::math::tools::fmod_workaround(theta, 2 * constants::pi()); + T mod = boost::math::tools::fmod_workaround(theta, T(2 * constants::pi())); if(mod < 0) mod += 2 * constants::pi(); if(mod > constants::pi()) @@ -97,7 +97,7 @@ T spherical_harmonic_i(unsigned n, int m, T theta, T phi, const Policy& pol) // Get the value and adjust sign as required: T prefix = spherical_harmonic_prefix(n, m, theta, pol); prefix *= sin(m * phi); - return sign ? -prefix : prefix; + return sign ? T(-prefix) : prefix; } template diff --git a/include/boost/math/special_functions/trunc.hpp b/include/boost/math/special_functions/trunc.hpp index 6a19e81d1..630bd5938 100644 --- a/include/boost/math/special_functions/trunc.hpp +++ b/include/boost/math/special_functions/trunc.hpp @@ -22,7 +22,7 @@ inline T trunc(const T& v, const Policy& pol) BOOST_MATH_STD_USING if(!(boost::math::isfinite)(v)) return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, v, pol); - return (v >= 0) ? floor(v) : ceil(v); + return (v >= 0) ? static_cast(floor(v)) : static_cast(ceil(v)); } template inline T trunc(const T& v) diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 7e2ac109d..c04194325 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -884,7 +884,7 @@ inline typename tools::promote_args::type zeta(T s, const Policy&) return policies::checked_narrowing_cast(detail::zeta_imp( static_cast(s), - 1 - static_cast(s), + static_cast(1 - static_cast(s)), forwarding_policy(), tag_type()), "boost::math::zeta<%1%>(%1%)"); } diff --git a/include/boost/math/tools/minima.hpp b/include/boost/math/tools/minima.hpp index 625368c52..3dc5356f3 100644 --- a/include/boost/math/tools/minima.hpp +++ b/include/boost/math/tools/minima.hpp @@ -77,7 +77,7 @@ std::pair brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& delta = p / q; u = x + delta; if(((u - min) < fract2) || ((max- u) < fract2)) - delta = (mid - x) < 0 ? -fabs(fract1) : fabs(fract1); + delta = (mid - x) < 0 ? (T)-fabs(fract1) : (T)fabs(fract1); } } else @@ -87,7 +87,7 @@ std::pair brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& delta = golden * delta2; } // update current position: - u = (fabs(delta) >= fract1) ? x + delta : (delta > 0 ? x + fabs(fract1) : x - fabs(fract1)); + u = (fabs(delta) >= fract1) ? T(x + delta) : (delta > 0 ? T(x + fabs(fract1)) : T(x - fabs(fract1))); fu = f(u); if(fu <= fx) { diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index b49d5c815..accffeaf2 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -220,19 +220,19 @@ inline V evaluate_polynomial(const boost::array& a, const V& val) template inline U evaluate_even_polynomial(const T* poly, U z, std::size_t count) { - return evaluate_polynomial(poly, z*z, count); + return evaluate_polynomial(poly, U(z*z), count); } template inline V evaluate_even_polynomial(const T(&a)[N], const V& z) { - return evaluate_polynomial(a, z*z); + return evaluate_polynomial(a, V(z*z)); } template inline V evaluate_even_polynomial(const boost::array& a, const V& z) { - return evaluate_polynomial(a, z*z); + return evaluate_polynomial(a, V(z*z)); } // // Odd polynomials come next: @@ -240,21 +240,21 @@ inline V evaluate_even_polynomial(const boost::array& a, const V& z) template inline U evaluate_odd_polynomial(const T* poly, U z, std::size_t count) { - return poly[0] + z * evaluate_polynomial(poly+1, z*z, count-1); + return poly[0] + z * evaluate_polynomial(poly+1, U(z*z), count-1); } template inline V evaluate_odd_polynomial(const T(&a)[N], const V& z) { typedef mpl::int_ tag_type; - return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a) + 1, z*z, static_cast(0)); + return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a) + 1, V(z*z), static_cast(0)); } template inline V evaluate_odd_polynomial(const boost::array& a, const V& z) { typedef mpl::int_ tag_type; - return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a.data()) + 1, z*z, static_cast(0)); + return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a.data()) + 1, V(z*z), static_cast(0)); } template diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index 0a356b44c..013e92d7b 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -279,7 +279,7 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i T result = guess; T factor = static_cast(ldexp(1.0, 1 - digits)); - T delta = (std::max)(10000000 * guess, T(10000000)); // arbitarily large delta + T delta = (std::max)(T(10000000 * guess), T(10000000)); // arbitarily large delta T last_f0 = 0; T delta1 = delta; T delta2 = delta; @@ -347,7 +347,7 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i // check for out of bounds step: if(result < min) { - T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(min))) ? 1000 : result / min; + T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(min))) ? T(1000) : T(result / min); if(fabs(diff) < 1) diff = 1 / diff; if(!out_of_bounds_sentry && (diff > 0) && (diff < 3)) @@ -368,7 +368,7 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i } else if(result > max) { - T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(max))) ? 1000 : result / max; + T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(max))) ? T(1000) : T(result / max); if(fabs(diff) < 1) diff = 1 / diff; if(!out_of_bounds_sentry && (diff > 0) && (diff < 3)) diff --git a/include/boost/math/tools/toms748_solve.hpp b/include/boost/math/tools/toms748_solve.hpp index 1ab96d5f6..e7ada1743 100644 --- a/include/boost/math/tools/toms748_solve.hpp +++ b/include/boost/math/tools/toms748_solve.hpp @@ -26,7 +26,7 @@ public: eps_tolerance(unsigned bits) { BOOST_MATH_STD_USING - eps = (std::max)(T(ldexp(1.0F, 1-bits)), 2 * tools::epsilon()); + eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(2 * tools::epsilon())); } bool operator()(const T& a, const T& b) { @@ -193,9 +193,9 @@ T quadratic_interpolate(const T& a, const T& b, T const& d, // // Start by obtaining the coefficients of the quadratic polynomial: // - T B = safe_div(fb - fa, b - a, tools::max_value()); - T A = safe_div(fd - fb, d - b, tools::max_value()); - A = safe_div(A - B, d - a, T(0)); + T B = safe_div(T(fb - fa), T(b - a), tools::max_value()); + T A = safe_div(T(fd - fb), T(d - b), tools::max_value()); + A = safe_div(T(A - B), T(d - a), T(0)); if(a == 0) { @@ -220,7 +220,7 @@ T quadratic_interpolate(const T& a, const T& b, T const& d, for(unsigned i = 1; i <= count; ++i) { //c -= safe_div(B * c, (B + A * (2 * c - a - b)), 1 + c - a); - c -= safe_div(fa+(B+A*(c-b))*(c-a), (B + A * (2 * c - a - b)), 1 + c - a); + c -= safe_div(T(fa+(B+A*(c-b))*(c-a)), T(B + A * (2 * c - a - b)), T(1 + c - a)); } if((c <= a) || (c >= b)) { @@ -436,7 +436,7 @@ std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const // e = d; fe = fd; - detail::bracket(f, a, b, a + (b - a) / 2, fa, fb, d, fd); + detail::bracket(f, a, b, T(a + (b - a) / 2), fa, fb, d, fd); --count; BOOST_MATH_INSTRUMENT_CODE("Not converging: Taking a bisection!!!!"); BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b); diff --git a/test/mpfr_concept_check.cpp b/test/mpfr_concept_check.cpp new file mode 100644 index 000000000..c36c2b084 --- /dev/null +++ b/test/mpfr_concept_check.cpp @@ -0,0 +1,32 @@ +// Copyright John Maddock 2007-8. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// This tests two things: that mpfr_class meets our +// conceptual requirements, and that we can instantiate +// all our distributions and special functions on this type. +// +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#define TEST_MPFR + +#pragma warning(disable:4800) +#pragma warning(disable:4512) +#pragma warning(disable:4127) + +#include +#include +#include "compile_test/instantiate.hpp" + +void foo() +{ + instantiate(mpfr_class()); +} + +int main() +{ + BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept)); +} + + diff --git a/test/ntl_concept_check.cpp b/test/ntl_concept_check.cpp new file mode 100644 index 000000000..99acb1abb --- /dev/null +++ b/test/ntl_concept_check.cpp @@ -0,0 +1,26 @@ +// Copyright John Maddock 2007-8. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// This tests two things: that boost::math::ntl::RR meets our +// conceptual requirements, and that we can instantiate +// all our distributions and special functions on this type. +// +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false + +#include +#include +#include "compile_test/instantiate.hpp" + +void foo() +{ + instantiate(boost::math::ntl::RR()); +} + +int main() +{ + BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept)); +} + From dda431bf588b018b2c39d77fe8b737e1afff2910 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 19 Sep 2008 09:12:33 +0000 Subject: [PATCH 043/192] Fix missing #include. [SVN r48883] --- include/boost/math/concepts/real_concept.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index c396dd4fe..eaaadecd5 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -20,6 +20,9 @@ // but note minor additions are needed - see ntl.diff and documentation // "Using With NTL - a High-Precision Floating-Point Library". +#ifndef BOOST_MATH_REAL_CONCEPT_HPP +#define BOOST_MATH_REAL_CONCEPT_HPP + #include #include #include @@ -35,8 +38,9 @@ #include #include // fmodl -#ifndef BOOST_MATH_REAL_CONCEPT_HPP -#define BOOST_MATH_REAL_CONCEPT_HPP +#if defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__) +# include +#endif namespace boost{ namespace math{ From 6f07ae4be5a20cb2351d561410a961bf35f22d1d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 19 Sep 2008 16:42:41 +0000 Subject: [PATCH 044/192] Add support for ellint_3 in the difficult previously unsupported region. [SVN r48899] --- include/boost/math/special_functions/ellint_3.hpp | 8 ++++++-- test/test_ellint_3.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/boost/math/special_functions/ellint_3.hpp b/include/boost/math/special_functions/ellint_3.hpp index e0532cb10..f8fcf7cc7 100644 --- a/include/boost/math/special_functions/ellint_3.hpp +++ b/include/boost/math/special_functions/ellint_3.hpp @@ -191,7 +191,10 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) sign = -1; rphi = constants::pi() / 2 - rphi; } - +#if 0 + // + // This wasn't supported but is now... probably! + // if((m > 0) && (v > 1)) { // @@ -202,6 +205,7 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) function, "Got v = %1%, but this is only supported for 0 <= phi <= pi/2", v, pol); } +#endif T sinp = sin(rphi); T cosp = cos(rphi); x = cosp * cosp; @@ -213,7 +217,7 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) else p = x + vc * t; value = sign * sinp * (ellint_rf_imp(x, y, z, pol) + v * t * ellint_rj_imp(x, y, z, p, pol) / 3); - if(m > 0) + if((m > 0) && (vc > 0)) value += m * ellint_pi_imp(v, k, vc, pol); } diff --git a/test/test_ellint_3.cpp b/test/test_ellint_3.cpp index 006f41ead..745ee834e 100644 --- a/test/test_ellint_3.cpp +++ b/test/test_ellint_3.cpp @@ -159,7 +159,7 @@ void test_spots(T, const char* type_name) { // function values calculated on http://functions.wolfram.com/ #define SC_(x) static_cast(BOOST_JOIN(x, L)) - static const boost::array, 21> data1 = { + static const boost::array, 25> data1 = { SC_(1), SC_(-1), SC_(0), SC_(-1.557407724654902230506974807458360173087), SC_(0), SC_(-4), SC_(0.4), SC_(-4.153623371196831087495427530365430979011), SC_(0), SC_(8), SC_(-0.6), SC_(8.935930619078575123490612395578518914416), @@ -181,8 +181,10 @@ void test_spots(T, const char* type_name) 1-SC_(1) / 1024, SC_(1e+20), SC_(0.875), SC_(6.43274293944380717581167058274600202023334985100499739678963e21), SC_(50), SC_(0.1), SC_(0.25), SC_(0.124573770342749525407523258569507331686458866564082916835900), SC_(1.125), SC_(1), SC_(0.25), SC_(1.77299767784815770192352979665283069318388205110727241629752), - //SC_(1.125), SC_(10), SC_(0.25), SC_(0.662467818678976949597336360256848770217429434745967677192487), - //SC_(1.125), SC_(3), SC_(0.25), SC_(-0.142697285116693775525461312178015106079842313950476205580178), + SC_(1.125), SC_(10), SC_(0.25), SC_(0.662467818678976949597336360256848770217429434745967677192487), + SC_(1.125), SC_(3), SC_(0.25), SC_(-0.142697285116693775525461312178015106079842313950476205580178), + SC_(257)/256, SC_(1.5), SC_(0.1), SC_(22.2111124684047142809404895720078056163182744133864821626782), + SC_(257)/256, SC_(21.5), SC_(0.1), SC_(-0.535282720703701002972775208780096689181320029073372524045546), }; #undef SC_ From 85bac4d14e0b9bf9efca84035728ccb73150b3c1 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 21 Sep 2008 10:01:46 +0000 Subject: [PATCH 045/192] Update docs to match changes to ellint_3. [SVN r48913] --- doc/sf_and_dist/ellint_legendre.qbk | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/doc/sf_and_dist/ellint_legendre.qbk b/doc/sf_and_dist/ellint_legendre.qbk index b964391cd..0808058df 100644 --- a/doc/sf_and_dist/ellint_legendre.qbk +++ b/doc/sf_and_dist/ellint_legendre.qbk @@ -257,11 +257,6 @@ would be complex). [optional_policy] -[caution In addition, the region where ['n > 1] and [phi][space] ['is not in the range] -\[0, [pi]\/2\] is currently unsupported and returns the result of __domain_error. -For this reason it is recomended that you keep [phi][space] inside its "natural" range -of \[0, [pi]\/2\].] - template ``__sf_result`` ellint_3(T1 k, T2 n); @@ -275,7 +270,7 @@ Returns the complete elliptic integral of the first kind ['[Pi](n, k)]: Requires ['-1 <= k <= 1] and ['n < 1], otherwise returns the result of __domain_error (outside this range the result would be complex). -[opitonal_policy] +[optional_policy] [heading Accuracy] @@ -322,7 +317,13 @@ Then the relations: ['[Pi](n, -[phi], k) = -[Pi](n, [phi], k)] -['[Pi](n, [phi]+m[pi], k) = [Pi](n, [phi], k) + 2m[Pi](n, k)] +['[Pi](n, [phi]+m[pi], k) = [Pi](n, [phi], k) + 2m[Pi](n, k) ; n <= 1] + +['[Pi](n, [phi]+m[pi], k) = [Pi](n, [phi], k) ; n > 1] +[footnote I haven't been able to find a literature reference for this +relation, but it appears to be the convention used by Mathematica. +Intuitively the first ['2 * m * [Pi](n, k)] terms cancel out as the +derivative alternates between +[infin] and -[infin].] are used to move [phi][space] to the range \[0, [pi]\/2\]. @@ -335,9 +336,4 @@ and [equation ellint26] -The remaining problem area occurs when n > 1 and [phi][space] is outside -the range \[0, [pi]\/2\]. In this range the reduction formula for -large [phi][space] can no longer be applied. Likewise the identities 17.7.7/8 -in A&S for reducing n to the range \[0,1\] appear to be no longer applicable. - [endsect] From 42f52d1993260672bafab0eab32d420938c86de7 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 25 Sep 2008 12:21:04 +0000 Subject: [PATCH 046/192] Fix for GLIBC platforms that don't have long double support. [SVN r48964] --- include/boost/math/special_functions/log1p.hpp | 2 ++ include/boost/math/tools/config.hpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 89ad880ea..28fd48740 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -330,6 +330,7 @@ inline float log1p(float x, const Policy& pol) "log1p<%1%>(%1%)", 0, pol); return ::log1pf(x); } +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template inline long double log1p(long double x, const Policy& pol) { @@ -341,6 +342,7 @@ inline long double log1p(long double x, const Policy& pol) "log1p<%1%>(%1%)", 0, pol); return ::log1pl(x); } +#endif #else template inline float log1p(float x, const Policy& pol) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 11ef6329d..d53ae99a2 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -23,7 +23,8 @@ #include #include -#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__hppa) +#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ + || defined(__hppa) || defined(__NO_LONG_DOUBLE_MATH) # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) From df7ad868e7af3795d8031c36ed03534d1e7e1a76 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 2 Oct 2008 09:37:29 +0000 Subject: [PATCH 047/192] Added mpfr docs, and updated the NTL usage docs. Updated bindings tests to run automatically when the appropriate libraries are present. [SVN r49110] --- build/Jamfile.v2 | 2 + build/has_mpfr_class.cpp | 7 +++ build/has_ntl_rr.cpp | 7 +++ doc/sf_and_dist/concepts.qbk | 57 ++++++++++++++++--- .../math/bindings/detail/big_lanczos.hpp | 8 +-- test/Jamfile.v2 | 4 +- test/mpfr_concept_check.cpp | 8 ++- 7 files changed, 77 insertions(+), 16 deletions(-) create mode 100644 build/has_mpfr_class.cpp create mode 100644 build/has_ntl_rr.cpp diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 82ef52982..a7e5844c3 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -52,6 +52,8 @@ sph_neumann ; compile has_long_double_support.cpp ; +compile has_mpfr_class.cpp ; +compile has_ntl_rr.cpp ; lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp : diff --git a/build/has_mpfr_class.cpp b/build/has_mpfr_class.cpp new file mode 100644 index 000000000..b660f112e --- /dev/null +++ b/build/has_mpfr_class.cpp @@ -0,0 +1,7 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + diff --git a/build/has_ntl_rr.cpp b/build/has_ntl_rr.cpp new file mode 100644 index 000000000..6d058fa90 --- /dev/null +++ b/build/has_ntl_rr.cpp @@ -0,0 +1,7 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + diff --git a/doc/sf_and_dist/concepts.qbk b/doc/sf_and_dist/concepts.qbk index 3345006c7..775345154 100644 --- a/doc/sf_and_dist/concepts.qbk +++ b/doc/sf_and_dist/concepts.qbk @@ -14,17 +14,58 @@ replacement for the "real" NTL::RR that adds some syntactic sugar to keep this library happy, plus some of the standard library functions not implemented in NTL. -Finally there is a high precision __lanczos suitable for use with `boost::math::ntl::RR`, -used at 1000-bit precision in -[@../../../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp]. -The approximation has a theoretical precision of > 90 decimal digits, -and an experimental precision of > 100 decimal digits. To use that -approximation, just include that header before any of the special -function headers (if you don't use it, you'll get a slower, but -fully generic implementation for all of the gamma-like functions). +For those functions that are based upon the __lanczos, the bindings +defines a series of approximations with up to 61 terms and accuracy +up to approximately 3e-113. This therefore sets the upper limit for accuracy +to the majority of functions defined this library when used with `NTL::RR`. + +There is a concept checking test program for NTL support +[@../../../../../libs/math/test/ntl_concept_check.cpp here]. [endsect][/section:use_ntl Using With NTL - a High Precision Floating-Point Library] +[section:use_mpfr Using With MPFR / GMP - a High-Precision Floating-Point Library] + +The special functions and tools in this library can be used with +[@http://www.mpfr.org MPFR (an arbitrary precision number type based on the GMP library)], +via the bindings in [@../../../../../boost/math/bindings/mpfr.hpp boost/math/bindings/mpfr.hpp]. + +In order to use these binings you will need to have installed [@http://www.mpfr.org MPFR] +plus it's dependency the [@http://gmplib.org GMP library] and the C++ wrapper for MPFR known as +[@http://math.berkeley.edu/~wilken/code/gmpfrxx/ gmpfrxx (or mpfr_class)]. + +Unfortunately `mpfr_class` doesn't quite satisfy our conceptual requirements, +so there is a very thin set of additional interfaces and some helper traits defined in +[@../../../../../boost/math/bindings/mpfr.hpp boost/math/bindings/mpfr.hpp] that you +should use in place of including 'gmpfrxx.h' directly. The existing mpfr_class is +then usable unchanged once this header is included, so it's performance-enhancing +expression templates are preserved and fully supported by this library: + + #include + #include + + int main() + { + mpfr_class::set_dprec(500); // 500 bit precision + // + // Note that the argument to tgamma is an expression template, + // that's just fine here: + // + mpfr_class v = boost::math::tgamma(sqrt(mpfr_class(2))); + std::cout << std::setprecision(50) << v << std::endl; + } + + +For those functions that are based upon the __lanczos, the bindings +defines a series of approximations with up to 61 terms and accuracy +up to approximately 3e-113. This therefore sets the upper limit for accuracy +to the majority of functions defined this library when used with `mpfr_class`. + +There is a concept checking test program for mpfr support +[@../../../../../libs/math/test/mpfr_concept_check.cpp here]. + +[endsect][/section:use_mpfr Using With MPFR / GMP - a High-Precision Floating-Point Library] + [section:concepts Conceptual Requirements for Real Number Types] The functions, and statistical distributions in this library can be used with diff --git a/include/boost/math/bindings/detail/big_lanczos.hpp b/include/boost/math/bindings/detail/big_lanczos.hpp index f12d2eb19..ddd98a645 100644 --- a/include/boost/math/bindings/detail/big_lanczos.hpp +++ b/include/boost/math/bindings/detail/big_lanczos.hpp @@ -646,7 +646,7 @@ struct lanczos61UDT boost::lexical_cast("-0.163907874717737848669759890242660846846105433791283903651924563157080252845636658802930428e-44"), }; T result = d[0]; - for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) + for(unsigned k = 1; k < sizeof(d)/sizeof(d[0]); ++k) { result += d[k]/(z+(k-1)); } @@ -721,7 +721,7 @@ struct lanczos61UDT boost::lexical_cast("-0.589653534231618730406843260601322236697428143603814281282790370329151249078338470962782338e-72"), }; T result = d[0]; - for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) + for(unsigned k = 1; k < sizeof(d)/sizeof(d[0]); ++k) { result += d[k]/(z+(k-1)); } @@ -795,7 +795,7 @@ struct lanczos61UDT boost::lexical_cast("-0.285425405297633795767452984791738825078111150078605004958179057245980222485147999495352632e-71"), }; T result = 0; - for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } @@ -870,7 +870,7 @@ struct lanczos61UDT }; T result = 0; T z = dz + 2; - for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7fac3388c..a70f2690d 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -399,6 +399,7 @@ run test_tr1.cpp ../build//boost_math_c99l : : : TEST_LD=1 + ../build//has_long_double_support : test_tr1_long_double ; @@ -491,5 +492,6 @@ compile compile_test/tools_test_data_inc_test.cpp ; compile compile_test/tools_test_inc_test.cpp ; compile compile_test/tools_toms748_inc_test.cpp ; - +compile ntl_concept_check.cpp : ../build//has_ntl_rr ; +compile mpfr_concept_check.cpp : ../build//has_mpfr_class ; diff --git a/test/mpfr_concept_check.cpp b/test/mpfr_concept_check.cpp index c36c2b084..c00231f8d 100644 --- a/test/mpfr_concept_check.cpp +++ b/test/mpfr_concept_check.cpp @@ -11,9 +11,11 @@ #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false #define TEST_MPFR -#pragma warning(disable:4800) -#pragma warning(disable:4512) -#pragma warning(disable:4127) +#ifdef _MSC_VER +# pragma warning(disable:4800) +# pragma warning(disable:4512) +# pragma warning(disable:4127) +#endif #include #include From 1169a0b20fe8c2339647e90a8a324d075474f3eb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 6 Oct 2008 12:43:46 +0000 Subject: [PATCH 048/192] Fixes for Sun C++ on Linux. [SVN r49141] --- include/boost/math/distributions/non_central_f.hpp | 5 +++-- include/boost/math/special_functions/expint.hpp | 3 ++- src/tr1/llround.cpp | 5 +++++ src/tr1/llroundf.cpp | 6 ++++++ src/tr1/llroundl.cpp | 5 +++++ test/Jamfile.v2 | 1 + 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/boost/math/distributions/non_central_f.hpp b/include/boost/math/distributions/non_central_f.hpp index 19dbde761..41bd3569b 100644 --- a/include/boost/math/distributions/non_central_f.hpp +++ b/include/boost/math/distributions/non_central_f.hpp @@ -12,6 +12,7 @@ #include #include +#include namespace boost { @@ -253,8 +254,8 @@ namespace boost + 4 * (10 + m) * (-2 + m + n) * l3 + (10 + m) * l4)) / - ((-8 + m) * (-6 + m) * pow(n * (-2 + m + n) - + 2 * (-2 + m + n) * l + l2, 2)); + ((-8 + m) * (-6 + m) * boost::math::pow<2>(n * (-2 + m + n) + + 2 * (-2 + m + n) * l + l2)); return result; } // kurtosis_excess diff --git a/include/boost/math/special_functions/expint.hpp b/include/boost/math/special_functions/expint.hpp index 71b851185..c5b2addbf 100644 --- a/include/boost/math/special_functions/expint.hpp +++ b/include/boost/math/special_functions/expint.hpp @@ -17,6 +17,7 @@ #include #include #include +#include namespace boost{ namespace math{ @@ -416,7 +417,7 @@ inline T expint_as_series(unsigned n, T z, const Policy& pol) fact *= ++k; } BOOST_MATH_INSTRUMENT_VARIABLE(result) - result += pow(-z, (int)n - 1) + result += pow(-z, static_cast(n - 1)) * (boost::math::digamma(static_cast(n)) - log(z)) / fact; BOOST_MATH_INSTRUMENT_VARIABLE(result) diff --git a/src/tr1/llround.cpp b/src/tr1/llround.cpp index 02fd019f8..8617e100c 100644 --- a/src/tr1/llround.cpp +++ b/src/tr1/llround.cpp @@ -5,6 +5,9 @@ // #define BOOST_MATH_TR1_SOURCE #include + +#ifdef BOOST_HAS_LONG_LONG + #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTIO } }}} + +#endif diff --git a/src/tr1/llroundf.cpp b/src/tr1/llroundf.cpp index 04c915bfa..b245541ae 100644 --- a/src/tr1/llroundf.cpp +++ b/src/tr1/llroundf.cpp @@ -5,6 +5,9 @@ // #define BOOST_MATH_TR1_SOURCE #include + +#ifdef BOOST_HAS_LONG_LONG + #include #include "c_policy.hpp" @@ -16,3 +19,6 @@ extern "C" long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + +#endif + diff --git a/src/tr1/llroundl.cpp b/src/tr1/llroundl.cpp index dde7ebdc8..8ab9786da 100644 --- a/src/tr1/llroundl.cpp +++ b/src/tr1/llroundl.cpp @@ -5,6 +5,9 @@ // #define BOOST_MATH_TR1_SOURCE #include + +#ifdef BOOST_HAS_LONG_LONG + #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + +#endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f264e0592..9891f4f03 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -34,6 +34,7 @@ project # Sunpro has problems building regex as a shared lib: sun:static BOOST_ALL_NO_LIB=1 + BOOST_UBLAS_UNSUPPORTED_COMPILER=0 ; run hypot_test.cpp ; From cddabd5ab1ac9041cdc8206fbdf150303228a7aa Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 11 Oct 2008 15:46:53 +0000 Subject: [PATCH 049/192] Fix inspection report issues. [SVN r49282] --- .../toolkit/internals1/constants.html | 383 ++++++++++++++++++ minimax/f.cpp | 2 +- test/acosh_data.ipp | 7 + test/asinh_data.ipp | 7 + test/atanh_data.ipp | 7 + 5 files changed, 405 insertions(+), 1 deletion(-) create mode 100644 doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html diff --git a/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html new file mode 100644 index 000000000..13f6c6d10 --- /dev/null +++ b/doc/sf_and_dist/html/math_toolkit/toolkit/internals1/constants.html @@ -0,0 +1,383 @@ + + + +Numeric Constants + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + Synopsis +
+

+ +

+
#include <boost/math/constants/constants.hpp>
+
+

+

+
namespace boost{ namespace math{ namespace constants{
+
+template <class T> T pi();
+template <class T> T root_pi();
+template <class T> T root_half_pi();
+template <class T> T root_two_pi();
+template <class T> T root_ln_four();
+template <class T> T e();
+template <class T> T half();
+template <class T> T euler();
+template <class T> T root_two();
+template <class T> T ln_two();
+template <class T> T ln_ln_two();
+template <class T> T third();
+template <class T> T twothirds();
+template <class T> T pi_minus_three();
+template <class T> T four_minus_pi();
+
+}}} // namespaces
+
+
+ + Description +
+

+ The header boost/math/constants/constants.hpp contains some numeric constants that + we have found useful in the development of this library. New constants + are added on an ad-hock basis based on need. +

+

+ Usage is like this: +

+
template <class T>
+T circumference(T r)
+{
+   return 2 * boost::math::constants::pi<T>() * r;
+}
+
+

+ All the constants are accurate to at least the 34 decimal digits required + for 128-bit long doubles, and most are accurate to 100 digits or more when + used with a suitable arbitrary precision type. +

+

+ The following table summarises the constants we have at present: +

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Constant +

+
+

+ Meaning +

+
+

+ Value +

+
+

+ pi +

+
+

+ π +

+
+

+ 3.1415926535897932384... +

+
+

+ root_pi +

+
+

+ √π +

+
+

+ 1.772453850905516027... +

+
+

+ root_half_pi +

+
+

+ √(π/2) +

+
+

+ 1.253314137315500251... +

+
+

+ root_two_pi +

+
+

+ √(2*π) +

+
+

+ 2.506628274631000502... +

+
+

+ root_ln_four +

+
+

+ √(ln(4)) +

+
+

+ 1.17741002251547469... +

+
+

+ e +

+
+

+ e +

+
+

+ 2.71828182845904523536... +

+
+

+ half +

+
+

+ 0.5 +

+
+

+ 0.5 +

+
+

+ euler +

+
+

+ Euler's constant +

+
+

+ 0.577215664901532860606 +

+
+

+ root_two +

+
+

+ √2 +

+
+

+ 1.4142135623730950488... +

+
+

+ ln_two +

+
+

+ ln(2) +

+
+

+ 0.6931471805599453094... +

+
+

+ ln_ln_two +

+
+

+ ln(ln(2)) +

+
+

+ -0.3665129205816643... +

+
+

+ third +

+
+

+ 1/3 +

+
+

+ 0.333333333333333333... +

+
+

+ twothirds +

+
+

+ 2/3 +

+
+

+ 0.666666666666666666... +

+
+

+ pi_minus_three +

+
+

+ π-3 +

+
+

+ 0.14159265358979323846... +

+
+

+ four_minus_pi +

+
+

+ 4-π +

+
+

+ 0.85840734641020676153735... +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/minimax/f.cpp b/minimax/f.cpp index 28338fa94..6850d27ab 100644 --- a/minimax/f.cpp +++ b/minimax/f.cpp @@ -312,7 +312,7 @@ boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant) } case 28: { - // log1p over [-0.5,0.5] + // log1p over [-0.5,0.5] boost::math::ntl::RR y = x; if(fabs(y) < 1e-100) y = (y == 0) ? 1e-100 : boost::math::sign(y) * 1e-100; diff --git a/test/acosh_data.ipp b/test/acosh_data.ipp index daa3f6b61..31680ea3d 100644 --- a/test/acosh_data.ipp +++ b/test/acosh_data.ipp @@ -1,3 +1,10 @@ +// Copyright John Maddock 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 261> acosh_data = {{ { SC_(1.000001430511474609375), SC_(0.001691455665129294448190238354291760044433) }, diff --git a/test/asinh_data.ipp b/test/asinh_data.ipp index 2ebda9344..3ae264f0b 100644 --- a/test/asinh_data.ipp +++ b/test/asinh_data.ipp @@ -1,3 +1,10 @@ +// Copyright John Maddock 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 281> asinh_data = {{ { SC_(-497.181640625), SC_(-6.902103625349694816896128061929344488774) }, diff --git a/test/atanh_data.ipp b/test/atanh_data.ipp index aa2b36647..5b5b4b25e 100644 --- a/test/atanh_data.ipp +++ b/test/atanh_data.ipp @@ -1,3 +1,10 @@ +// Copyright John Maddock 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + #define SC_(x) static_cast(BOOST_JOIN(x, L)) static const boost::array, 260> atanh_data = {{ { SC_(-0.9999983310699462890625), SC_(-6.998237084679026894944012639589359039154) }, From c3367bf1bb805572a722c7efef289075ca2c0c88 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 20 Oct 2008 16:54:24 +0000 Subject: [PATCH 050/192] Added some specializations of the policy classes to reduce compile times. Updated history. [SVN r49405] --- doc/sf_and_dist/roadmap.qbk | 5 ++ include/boost/math/policies/policy.hpp | 17 ++++ include/boost/math/tools/promotion.hpp | 24 ++++++ src/tr1/c_policy.hpp | 106 ++++++++++++++++++++++++- 4 files changed, 150 insertions(+), 2 deletions(-) diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index f1696a2cc..30b8f787c 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -1,5 +1,10 @@ [template history[] +[h4 Boost-1.38.0] + +* Added support for MPFR as a bignum type. +* Added some full specializations of the policy classes to reduce compile times. + [h4 Boost-1.37.0] * Improved accuracy and testing of the inverse hypergeometric functions. diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 8cd2566b3..9e87ad39e 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -603,6 +603,23 @@ struct normalise, typedef policy type; }; +template <> +struct normalise, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy type; +}; + inline policy<> make_policy() { return policy<>(); } diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index e2e6fd1cc..83772f52e 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -69,6 +69,12 @@ namespace boost { // If T is integral type, then promote to double. typedef typename mpl::if_, double, T>::type type; }; + // These full specialisations reduce mpl::if_ usage and speed up + // compilation: + template <> struct promote_arg { typedef float type; }; + template <> struct promote_arg{ typedef double type; }; + template <> struct promote_arg { typedef long double type; }; + template <> struct promote_arg { typedef double type; }; template struct promote_args_2 @@ -89,6 +95,24 @@ namespace boost // else one or the other is a user-defined type: typename mpl::if_< ::boost::is_convertible, T2P, T1P>::type>::type type; }; // promote_arg2 + // These full specialisations reduce mpl::if_ usage and speed up + // compilation: + template <> struct promote_args_2 { typedef float type; }; + template <> struct promote_args_2{ typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; template struct promote_args diff --git a/src/tr1/c_policy.hpp b/src/tr1/c_policy.hpp index 0ab7eeeb8..cf1951334 100644 --- a/src/tr1/c_policy.hpp +++ b/src/tr1/c_policy.hpp @@ -6,6 +6,108 @@ #include #include +namespace boost{ namespace math{ namespace policies{ + +template <> +struct policy< + domain_error, + pole_error, + overflow_error, + evaluation_error, + rounding_error, + default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> +{ +public: + typedef domain_error domain_error_type; + typedef pole_error pole_error_type; + typedef overflow_error overflow_error_type; + typedef underflow_error underflow_error_type; + typedef denorm_error denorm_error_type; + typedef evaluation_error evaluation_error_type; + typedef rounding_error rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; +#if BOOST_MATH_DIGITS10_POLICY == 0 + typedef digits2<> precision_type; +#else + typedef detail::precision, digits2<> >::type precision_type; +#endif + typedef promote_float<> promote_float_type; + typedef promote_double<> promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template <> +struct policy< + domain_error, + pole_error, + overflow_error, + evaluation_error, + rounding_error, + detail::forwarding_arg1, + detail::forwarding_arg2, + default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> +{ +public: + typedef domain_error domain_error_type; + typedef pole_error pole_error_type; + typedef overflow_error overflow_error_type; + typedef underflow_error underflow_error_type; + typedef denorm_error denorm_error_type; + typedef evaluation_error evaluation_error_type; + typedef rounding_error rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; +#if BOOST_MATH_DIGITS10_POLICY == 0 + typedef digits2<> precision_type; +#else + typedef detail::precision, digits2<> >::type precision_type; +#endif + typedef promote_float promote_float_type; + typedef promote_double promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template <> +struct normalise, pole_error, overflow_error, evaluation_error, rounding_error >, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy, pole_error, overflow_error, evaluation_error, rounding_error, detail::forwarding_arg1, detail::forwarding_arg2> type; +}; + +template <> +struct normalise, pole_error, overflow_error, evaluation_error, rounding_error, detail::forwarding_arg1, detail::forwarding_arg2 >, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy, pole_error, overflow_error, evaluation_error, rounding_error, detail::forwarding_arg1, detail::forwarding_arg2> type; +}; + +}}} // namespaces + namespace c_policies{ using boost::math::policies::policy; @@ -20,8 +122,8 @@ typedef policy< domain_error, pole_error, overflow_error, - rounding_error, - evaluation_error + evaluation_error, + rounding_error > c_policy; BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(c_policy) From 87b93dab9f2376a60928addab1a30d44862710d0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 21 Oct 2008 12:46:34 +0000 Subject: [PATCH 051/192] Add pch support. [SVN r49418] --- build/Jamfile.v2 | 24 ++++++++++++++++++------ src/tr1/acosh.cpp | 7 ++++++- src/tr1/acoshf.cpp | 7 ++++++- src/tr1/acoshl.cpp | 7 ++++++- src/tr1/asinh.cpp | 7 ++++++- src/tr1/asinhf.cpp | 7 ++++++- src/tr1/asinhl.cpp | 7 ++++++- src/tr1/assoc_laguerre.cpp | 7 ++++++- src/tr1/assoc_laguerref.cpp | 7 ++++++- src/tr1/assoc_laguerrel.cpp | 7 ++++++- src/tr1/assoc_legendre.cpp | 7 ++++++- src/tr1/assoc_legendref.cpp | 7 ++++++- src/tr1/assoc_legendrel.cpp | 7 ++++++- src/tr1/atanh.cpp | 7 ++++++- src/tr1/atanhf.cpp | 7 ++++++- src/tr1/atanhl.cpp | 7 ++++++- src/tr1/beta.cpp | 7 ++++++- src/tr1/betaf.cpp | 7 ++++++- src/tr1/betal.cpp | 7 ++++++- src/tr1/cbrt.cpp | 7 ++++++- src/tr1/cbrtf.cpp | 7 ++++++- src/tr1/cbrtl.cpp | 7 ++++++- src/tr1/comp_ellint_1.cpp | 7 ++++++- src/tr1/comp_ellint_1f.cpp | 7 ++++++- src/tr1/comp_ellint_1l.cpp | 7 ++++++- src/tr1/comp_ellint_2.cpp | 7 ++++++- src/tr1/comp_ellint_2f.cpp | 7 ++++++- src/tr1/comp_ellint_2l.cpp | 7 ++++++- src/tr1/comp_ellint_3.cpp | 7 ++++++- src/tr1/comp_ellint_3f.cpp | 7 ++++++- src/tr1/comp_ellint_3l.cpp | 7 ++++++- src/tr1/copysign.cpp | 7 ++++++- src/tr1/copysignf.cpp | 7 ++++++- src/tr1/copysignl.cpp | 7 ++++++- src/tr1/cyl_bessel_i.cpp | 7 ++++++- src/tr1/cyl_bessel_if.cpp | 7 ++++++- src/tr1/cyl_bessel_il.cpp | 7 ++++++- src/tr1/cyl_bessel_j.cpp | 7 ++++++- src/tr1/cyl_bessel_jf.cpp | 7 ++++++- src/tr1/cyl_bessel_jl.cpp | 7 ++++++- src/tr1/cyl_bessel_k.cpp | 7 ++++++- src/tr1/cyl_bessel_kf.cpp | 7 ++++++- src/tr1/cyl_bessel_kl.cpp | 7 ++++++- src/tr1/cyl_neumann.cpp | 7 ++++++- src/tr1/cyl_neumannf.cpp | 7 ++++++- src/tr1/cyl_neumannl.cpp | 7 ++++++- src/tr1/ellint_1.cpp | 7 ++++++- src/tr1/ellint_1f.cpp | 7 ++++++- src/tr1/ellint_1l.cpp | 7 ++++++- src/tr1/ellint_2.cpp | 7 ++++++- src/tr1/ellint_2f.cpp | 7 ++++++- src/tr1/ellint_2l.cpp | 7 ++++++- src/tr1/ellint_3.cpp | 7 ++++++- src/tr1/ellint_3f.cpp | 7 ++++++- src/tr1/ellint_3l.cpp | 7 ++++++- src/tr1/erf.cpp | 7 ++++++- src/tr1/erfc.cpp | 7 ++++++- src/tr1/erfcf.cpp | 7 ++++++- src/tr1/erfcl.cpp | 7 ++++++- src/tr1/erff.cpp | 7 ++++++- src/tr1/erfl.cpp | 7 ++++++- src/tr1/expint.cpp | 7 ++++++- src/tr1/expintf.cpp | 7 ++++++- src/tr1/expintl.cpp | 7 ++++++- src/tr1/expm1.cpp | 7 ++++++- src/tr1/expm1f.cpp | 7 ++++++- src/tr1/expm1l.cpp | 7 ++++++- src/tr1/fmax.cpp | 7 ++++++- src/tr1/fmaxf.cpp | 7 ++++++- src/tr1/fmaxl.cpp | 7 ++++++- src/tr1/fmin.cpp | 7 ++++++- src/tr1/fminf.cpp | 7 ++++++- src/tr1/fminl.cpp | 7 ++++++- src/tr1/fpclassify.cpp | 7 ++++++- src/tr1/fpclassifyf.cpp | 7 ++++++- src/tr1/fpclassifyl.cpp | 7 ++++++- src/tr1/hermite.cpp | 7 ++++++- src/tr1/hermitef.cpp | 7 ++++++- src/tr1/hermitel.cpp | 7 ++++++- src/tr1/hypot.cpp | 7 ++++++- src/tr1/hypotf.cpp | 7 ++++++- src/tr1/hypotl.cpp | 7 ++++++- src/tr1/laguerre.cpp | 7 ++++++- src/tr1/laguerref.cpp | 7 ++++++- src/tr1/laguerrel.cpp | 7 ++++++- src/tr1/legendre.cpp | 7 ++++++- src/tr1/legendref.cpp | 7 ++++++- src/tr1/legendrel.cpp | 7 ++++++- src/tr1/lgamma.cpp | 7 ++++++- src/tr1/lgammaf.cpp | 7 ++++++- src/tr1/lgammal.cpp | 7 ++++++- src/tr1/llround.cpp | 7 ++++++- src/tr1/llroundf.cpp | 7 ++++++- src/tr1/llroundl.cpp | 7 ++++++- src/tr1/log1p.cpp | 7 ++++++- src/tr1/log1pf.cpp | 7 ++++++- src/tr1/log1pl.cpp | 7 ++++++- src/tr1/lround.cpp | 7 ++++++- src/tr1/lroundf.cpp | 7 ++++++- src/tr1/lroundl.cpp | 7 ++++++- src/tr1/nextafter.cpp | 7 ++++++- src/tr1/nextafterf.cpp | 7 ++++++- src/tr1/nextafterl.cpp | 7 ++++++- src/tr1/nexttoward.cpp | 7 ++++++- src/tr1/nexttowardf.cpp | 7 ++++++- src/tr1/nexttowardl.cpp | 7 ++++++- src/tr1/pch.hpp | 13 +++++++++++++ src/tr1/riemann_zeta.cpp | 7 ++++++- src/tr1/riemann_zetaf.cpp | 7 ++++++- src/tr1/riemann_zetal.cpp | 7 ++++++- src/tr1/round.cpp | 7 ++++++- src/tr1/roundf.cpp | 7 ++++++- src/tr1/roundl.cpp | 7 ++++++- src/tr1/sph_bessel.cpp | 7 ++++++- src/tr1/sph_besself.cpp | 7 ++++++- src/tr1/sph_bessell.cpp | 7 ++++++- src/tr1/sph_legendre.cpp | 7 ++++++- src/tr1/sph_legendref.cpp | 7 ++++++- src/tr1/sph_legendrel.cpp | 7 ++++++- src/tr1/sph_neumann.cpp | 7 ++++++- src/tr1/sph_neumannf.cpp | 7 ++++++- src/tr1/sph_neumannl.cpp | 7 ++++++- src/tr1/tgamma.cpp | 7 ++++++- src/tr1/tgammaf.cpp | 7 ++++++- src/tr1/tgammal.cpp | 7 ++++++- src/tr1/trunc.cpp | 7 ++++++- src/tr1/truncf.cpp | 7 ++++++- src/tr1/truncl.cpp | 7 ++++++- 128 files changed, 787 insertions(+), 132 deletions(-) create mode 100644 src/tr1/pch.hpp diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index a7e5844c3..dd75574d7 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -5,6 +5,8 @@ import testing ; +cpp-pch pch : ../src/tr1/pch.hpp : ../src/tr1 shared:BOOST_MATH_TR1_DYN_LINK=1 ; + C99_SOURCES = acosh asinh atanh @@ -55,39 +57,49 @@ compile has_long_double_support.cpp ; compile has_mpfr_class.cpp ; compile has_ntl_rr.cpp ; -lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp +lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 + ../src/tr1 ; -lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp +lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 + ../src/tr1 ; -lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp +lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 + ../src/tr1 has_long_double_support ; -lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp +lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 + ../src/tr1 ; -lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp +lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 + ../src/tr1 ; -lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp +lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 has_long_double_support + ../src/tr1 ; #boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; + + + + diff --git a/src/tr1/acosh.cpp b/src/tr1/acosh.cpp index 934edb652..bceedeae1 100644 --- a/src/tr1/acosh.cpp +++ b/src/tr1/acosh.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(dou { return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/acoshf.cpp b/src/tr1/acoshf.cpp index 11f8a2e2a..aa6e552e0 100644 --- a/src/tr1/acoshf.cpp +++ b/src/tr1/acoshf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(flo { return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/acoshl.cpp b/src/tr1/acoshl.cpp index e0ba58b5d..eb93d60d7 100644 --- a/src/tr1/acoshl.cpp +++ b/src/tr1/acoshl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/asinh.cpp b/src/tr1/asinh.cpp index 95b6d48db..efe2b8cd6 100644 --- a/src/tr1/asinh.cpp +++ b/src/tr1/asinh.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(dou { return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/asinhf.cpp b/src/tr1/asinhf.cpp index b7f430daf..cdfe813c6 100644 --- a/src/tr1/asinhf.cpp +++ b/src/tr1/asinhf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(flo { return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/asinhl.cpp b/src/tr1/asinhl.cpp index 3baf6d156..fac9d5a7f 100644 --- a/src/tr1/asinhl.cpp +++ b/src/tr1/asinhl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::asinh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/assoc_laguerre.cpp b/src/tr1/assoc_laguerre.cpp index 84626d443..d1589c394 100644 --- a/src/tr1/assoc_laguerre.cpp +++ b/src/tr1/assoc_laguerre.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } + + diff --git a/src/tr1/assoc_laguerref.cpp b/src/tr1/assoc_laguerref.cpp index 0d611431a..ac3a74e0c 100644 --- a/src/tr1/assoc_laguerref.cpp +++ b/src/tr1/assoc_laguerref.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } + + diff --git a/src/tr1/assoc_laguerrel.cpp b/src/tr1/assoc_laguerrel.cpp index a1078e2cf..c120332cd 100644 --- a/src/tr1/assoc_laguerrel.cpp +++ b/src/tr1/assoc_laguerrel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_S { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x); } + + diff --git a/src/tr1/assoc_legendre.cpp b/src/tr1/assoc_legendre.cpp index 95318d5f9..73b948cfb 100644 --- a/src/tr1/assoc_legendre.cpp +++ b/src/tr1/assoc_legendre.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTIT { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } + + diff --git a/src/tr1/assoc_legendref.cpp b/src/tr1/assoc_legendref.cpp index 49745e1b7..aecd5b9e4 100644 --- a/src/tr1/assoc_legendref.cpp +++ b/src/tr1/assoc_legendref.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTIT { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } + + diff --git a/src/tr1/assoc_legendrel.cpp b/src/tr1/assoc_legendrel.cpp index 1ff5d1880..b2788d7f3 100644 --- a/src/tr1/assoc_legendrel.cpp +++ b/src/tr1/assoc_legendrel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_S { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); } + + diff --git a/src/tr1/atanh.cpp b/src/tr1/atanh.cpp index 02bc18bcf..dc0546010 100644 --- a/src/tr1/atanh.cpp +++ b/src/tr1/atanh.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(dou { return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/atanhf.cpp b/src/tr1/atanhf.cpp index 6628c7319..e7025ce2d 100644 --- a/src/tr1/atanhf.cpp +++ b/src/tr1/atanhf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(flo { return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/atanhl.cpp b/src/tr1/atanhl.cpp index 7d3e3d856..7321b79f6 100644 --- a/src/tr1/atanhl.cpp +++ b/src/tr1/atanhl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::atanh BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/beta.cpp b/src/tr1/beta.cpp index 096e627f8..235ef7bd6 100644 --- a/src/tr1/beta.cpp +++ b/src/tr1/beta.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(doub { return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + + diff --git a/src/tr1/betaf.cpp b/src/tr1/betaf.cpp index 9f9a412bb..eed8cea12 100644 --- a/src/tr1/betaf.cpp +++ b/src/tr1/betaf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(floa { return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + + diff --git a/src/tr1/betal.cpp b/src/tr1/betal.cpp index 75d848772..f1590ac1b 100644 --- a/src/tr1/betal.cpp +++ b/src/tr1/betal.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTIO { return c_policies::beta BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + + diff --git a/src/tr1/cbrt.cpp b/src/tr1/cbrt.cpp index 47a2a1ffe..a236f7537 100644 --- a/src/tr1/cbrt.cpp +++ b/src/tr1/cbrt.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(doub { return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/cbrtf.cpp b/src/tr1/cbrtf.cpp index f416cb16c..f5a16ccd6 100644 --- a/src/tr1/cbrtf.cpp +++ b/src/tr1/cbrtf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(floa { return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/cbrtl.cpp b/src/tr1/cbrtl.cpp index 37ceb3db3..01107e74b 100644 --- a/src/tr1/cbrtl.cpp +++ b/src/tr1/cbrtl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTIO { return c_policies::cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_1.cpp b/src/tr1/comp_ellint_1.cpp index bc0079bf1..f38cb2386 100644 --- a/src/tr1/comp_ellint_1.cpp +++ b/src/tr1/comp_ellint_1.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_1f.cpp b/src/tr1/comp_ellint_1f.cpp index 3942d223d..23d9c66cc 100644 --- a/src/tr1/comp_ellint_1f.cpp +++ b/src/tr1/comp_ellint_1f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_1l.cpp b/src/tr1/comp_ellint_1l.cpp index 7912d980f..1eec18b7a 100644 --- a/src/tr1/comp_ellint_1l.cpp +++ b/src/tr1/comp_ellint_1l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SU { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_2.cpp b/src/tr1/comp_ellint_2.cpp index 31cef22b6..677a6a590 100644 --- a/src/tr1/comp_ellint_2.cpp +++ b/src/tr1/comp_ellint_2.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_2f.cpp b/src/tr1/comp_ellint_2f.cpp index 1401a7496..29c7b47f9 100644 --- a/src/tr1/comp_ellint_2f.cpp +++ b/src/tr1/comp_ellint_2f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_2l.cpp b/src/tr1/comp_ellint_2l.cpp index ee9252307..41048c775 100644 --- a/src/tr1/comp_ellint_2l.cpp +++ b/src/tr1/comp_ellint_2l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SU { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/comp_ellint_3.cpp b/src/tr1/comp_ellint_3.cpp index ff1878502..6d60186e0 100644 --- a/src/tr1/comp_ellint_3.cpp +++ b/src/tr1/comp_ellint_3.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } + + diff --git a/src/tr1/comp_ellint_3f.cpp b/src/tr1/comp_ellint_3f.cpp index 1caefb442..738b28de6 100644 --- a/src/tr1/comp_ellint_3f.cpp +++ b/src/tr1/comp_ellint_3f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } + + diff --git a/src/tr1/comp_ellint_3l.cpp b/src/tr1/comp_ellint_3l.cpp index b3f7c7f6b..fdd269dca 100644 --- a/src/tr1/comp_ellint_3l.cpp +++ b/src/tr1/comp_ellint_3l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SU { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu); } + + diff --git a/src/tr1/copysign.cpp b/src/tr1/copysign.cpp index debeab23b..0b8a74437 100644 --- a/src/tr1/copysign.cpp +++ b/src/tr1/copysign.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION( } #endif + + diff --git a/src/tr1/copysignf.cpp b/src/tr1/copysignf.cpp index c87ab5735..a310d2c12 100644 --- a/src/tr1/copysignf.cpp +++ b/src/tr1/copysignf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION( } #endif + + diff --git a/src/tr1/copysignl.cpp b/src/tr1/copysignl.cpp index 2431de9e6..536ce44e1 100644 --- a/src/tr1/copysignl.cpp +++ b/src/tr1/copysignl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTIT { return boost::math::copysign BOOST_PREVENT_MACRO_SUBSTITUTION(x, y); } + + diff --git a/src/tr1/cyl_bessel_i.cpp b/src/tr1/cyl_bessel_i.cpp index dd5cfbb09..d7a5896d1 100644 --- a/src/tr1/cyl_bessel_i.cpp +++ b/src/tr1/cyl_bessel_i.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_if.cpp b/src/tr1/cyl_bessel_if.cpp index 81e862543..411e3ed1d 100644 --- a/src/tr1/cyl_bessel_if.cpp +++ b/src/tr1/cyl_bessel_if.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_il.cpp b/src/tr1/cyl_bessel_il.cpp index e939b190f..727fe844e 100644 --- a/src/tr1/cyl_bessel_il.cpp +++ b/src/tr1/cyl_bessel_il.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUB { return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_j.cpp b/src/tr1/cyl_bessel_j.cpp index 5a2dbba8b..063ecdc11 100644 --- a/src/tr1/cyl_bessel_j.cpp +++ b/src/tr1/cyl_bessel_j.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_jf.cpp b/src/tr1/cyl_bessel_jf.cpp index 5d0e20c91..bc84941e5 100644 --- a/src/tr1/cyl_bessel_jf.cpp +++ b/src/tr1/cyl_bessel_jf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_jl.cpp b/src/tr1/cyl_bessel_jl.cpp index 0d026318c..fbac1cf8c 100644 --- a/src/tr1/cyl_bessel_jl.cpp +++ b/src/tr1/cyl_bessel_jl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUB { return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_k.cpp b/src/tr1/cyl_bessel_k.cpp index 0f16a283b..d9c148379 100644 --- a/src/tr1/cyl_bessel_k.cpp +++ b/src/tr1/cyl_bessel_k.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_kf.cpp b/src/tr1/cyl_bessel_kf.cpp index bbc173316..09a11a6fb 100644 --- a/src/tr1/cyl_bessel_kf.cpp +++ b/src/tr1/cyl_bessel_kf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_bessel_kl.cpp b/src/tr1/cyl_bessel_kl.cpp index 7d6be5ad6..e705b2fe3 100644 --- a/src/tr1/cyl_bessel_kl.cpp +++ b/src/tr1/cyl_bessel_kl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUB { return c_policies::cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_neumann.cpp b/src/tr1/cyl_neumann.cpp index ca9a874a0..80f642091 100644 --- a/src/tr1/cyl_neumann.cpp +++ b/src/tr1/cyl_neumann.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_neumannf.cpp b/src/tr1/cyl_neumannf.cpp index fbd219077..e4eaaf166 100644 --- a/src/tr1/cyl_neumannf.cpp +++ b/src/tr1/cyl_neumannf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/cyl_neumannl.cpp b/src/tr1/cyl_neumannl.cpp index 690e43957..13556b13e 100644 --- a/src/tr1/cyl_neumannl.cpp +++ b/src/tr1/cyl_neumannl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBS { return c_policies::cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); } + + diff --git a/src/tr1/ellint_1.cpp b/src/tr1/ellint_1.cpp index a10403e69..92da54583 100644 --- a/src/tr1/ellint_1.cpp +++ b/src/tr1/ellint_1.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_1f.cpp b/src/tr1/ellint_1f.cpp index f48cbaaa2..6e9227911 100644 --- a/src/tr1/ellint_1f.cpp +++ b/src/tr1/ellint_1f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_1l.cpp b/src/tr1/ellint_1l.cpp index f2c856309..8517a1180 100644 --- a/src/tr1/ellint_1l.cpp +++ b/src/tr1/ellint_1l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_2.cpp b/src/tr1/ellint_2.cpp index 3ee322672..c8d7c4348 100644 --- a/src/tr1/ellint_2.cpp +++ b/src/tr1/ellint_2.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_2f.cpp b/src/tr1/ellint_2f.cpp index 2d93c91b8..0f2e37efd 100644 --- a/src/tr1/ellint_2f.cpp +++ b/src/tr1/ellint_2f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_2l.cpp b/src/tr1/ellint_2l.cpp index 7ea4d8d6c..389460d1c 100644 --- a/src/tr1/ellint_2l.cpp +++ b/src/tr1/ellint_2l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(k, phi); } + + diff --git a/src/tr1/ellint_3.cpp b/src/tr1/ellint_3.cpp index 3f7720124..16adc9b3f 100644 --- a/src/tr1/ellint_3.cpp +++ b/src/tr1/ellint_3.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } + + diff --git a/src/tr1/ellint_3f.cpp b/src/tr1/ellint_3f.cpp index ad97aa9d1..2fbd0ae70 100644 --- a/src/tr1/ellint_3f.cpp +++ b/src/tr1/ellint_3f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } + + diff --git a/src/tr1/ellint_3l.cpp b/src/tr1/ellint_3l.cpp index 2415ba57c..253f64557 100644 --- a/src/tr1/ellint_3l.cpp +++ b/src/tr1/ellint_3l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu, phi); } + + diff --git a/src/tr1/erf.cpp b/src/tr1/erf.cpp index 177ebc040..6a8ac898c 100644 --- a/src/tr1/erf.cpp +++ b/src/tr1/erf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(doubl { return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/erfc.cpp b/src/tr1/erfc.cpp index a4db7c229..02cb5dc4b 100644 --- a/src/tr1/erfc.cpp +++ b/src/tr1/erfc.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(doub { return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/erfcf.cpp b/src/tr1/erfcf.cpp index 0a177ee0c..c85f55a73 100644 --- a/src/tr1/erfcf.cpp +++ b/src/tr1/erfcf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(floa { return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/erfcl.cpp b/src/tr1/erfcl.cpp index e5dd4aa6c..eef69f9a5 100644 --- a/src/tr1/erfcl.cpp +++ b/src/tr1/erfcl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTIO { return c_policies::erfc BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/erff.cpp b/src/tr1/erff.cpp index 1ecb69336..ccaf9495e 100644 --- a/src/tr1/erff.cpp +++ b/src/tr1/erff.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float { return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/erfl.cpp b/src/tr1/erfl.cpp index f1295aa3d..85ab95647 100644 --- a/src/tr1/erfl.cpp +++ b/src/tr1/erfl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION { return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expint.cpp b/src/tr1/expint.cpp index 710c116ba..8f05123b1 100644 --- a/src/tr1/expint.cpp +++ b/src/tr1/expint.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(do { return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expintf.cpp b/src/tr1/expintf.cpp index 9c077f602..7305ee735 100644 --- a/src/tr1/expintf.cpp +++ b/src/tr1/expintf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(fl { return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expintl.cpp b/src/tr1/expintl.cpp index e795e7431..e2e1bf3b2 100644 --- a/src/tr1/expintl.cpp +++ b/src/tr1/expintl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::expint BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expm1.cpp b/src/tr1/expm1.cpp index c30c41be6..6c1c89f9a 100644 --- a/src/tr1/expm1.cpp +++ b/src/tr1/expm1.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expm1f.cpp b/src/tr1/expm1f.cpp index 1953f4737..8516b5467 100644 --- a/src/tr1/expm1f.cpp +++ b/src/tr1/expm1f.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/expm1l.cpp b/src/tr1/expm1l.cpp index 5b71ee151..19111837f 100644 --- a/src/tr1/expm1l.cpp +++ b/src/tr1/expm1l.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBS { return c_policies::expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/fmax.cpp b/src/tr1/fmax.cpp index 65209750a..a44d968ba 100644 --- a/src/tr1/fmax.cpp +++ b/src/tr1/fmax.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(doub return x; return (std::max)(x, y); } + + diff --git a/src/tr1/fmaxf.cpp b/src/tr1/fmaxf.cpp index b668e9d64..f25a2ca35 100644 --- a/src/tr1/fmaxf.cpp +++ b/src/tr1/fmaxf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -20,3 +23,5 @@ extern "C" float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(floa } #endif + + diff --git a/src/tr1/fmaxl.cpp b/src/tr1/fmaxl.cpp index ca221d077..92165ffa3 100644 --- a/src/tr1/fmaxl.cpp +++ b/src/tr1/fmaxl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTIO return x; return (std::max)(x, y); } + + diff --git a/src/tr1/fmin.cpp b/src/tr1/fmin.cpp index 284f1ed17..839d126e1 100644 --- a/src/tr1/fmin.cpp +++ b/src/tr1/fmin.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(doub return x; return (std::min)(x, y); } + + diff --git a/src/tr1/fminf.cpp b/src/tr1/fminf.cpp index 93917783f..28c15529a 100644 --- a/src/tr1/fminf.cpp +++ b/src/tr1/fminf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -20,3 +23,5 @@ extern "C" float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(floa } #endif + + diff --git a/src/tr1/fminl.cpp b/src/tr1/fminl.cpp index ca708a66b..e3980ade6 100644 --- a/src/tr1/fminl.cpp +++ b/src/tr1/fminl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTIO return x; return (std::min)(x, y); } + + diff --git a/src/tr1/fpclassify.cpp b/src/tr1/fpclassify.cpp index b871c4f39..4e763d9bc 100644 --- a/src/tr1/fpclassify.cpp +++ b/src/tr1/fpclassify.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include @@ -42,3 +45,5 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTIT } }}} + + diff --git a/src/tr1/fpclassifyf.cpp b/src/tr1/fpclassifyf.cpp index 761341857..efc8d42ec 100644 --- a/src/tr1/fpclassifyf.cpp +++ b/src/tr1/fpclassifyf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include @@ -42,3 +45,5 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITU } }}} + + diff --git a/src/tr1/fpclassifyl.cpp b/src/tr1/fpclassifyl.cpp index 0e393ef4b..f5cabaf2e 100644 --- a/src/tr1/fpclassifyl.cpp +++ b/src/tr1/fpclassifyl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include @@ -42,3 +45,5 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SU } }}} + + diff --git a/src/tr1/hermite.cpp b/src/tr1/hermite.cpp index 7b0d73f3d..fc24a21cc 100644 --- a/src/tr1/hermite.cpp +++ b/src/tr1/hermite.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(u { return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/hermitef.cpp b/src/tr1/hermitef.cpp index 0e2066c9f..27dffe6d6 100644 --- a/src/tr1/hermitef.cpp +++ b/src/tr1/hermitef.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(u { return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/hermitel.cpp b/src/tr1/hermitel.cpp index eef803d0e..3391c5fdd 100644 --- a/src/tr1/hermitel.cpp +++ b/src/tr1/hermitel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITU { return c_policies::hermite BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/hypot.cpp b/src/tr1/hypot.cpp index fd13620d9..e076e06d3 100644 --- a/src/tr1/hypot.cpp +++ b/src/tr1/hypot.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(dou } }}} + + diff --git a/src/tr1/hypotf.cpp b/src/tr1/hypotf.cpp index 7aa2c7aff..e963c7c03 100644 --- a/src/tr1/hypotf.cpp +++ b/src/tr1/hypotf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(flo } }}} + + diff --git a/src/tr1/hypotl.cpp b/src/tr1/hypotl.cpp index 7e4547a7a..38f2dfa70 100644 --- a/src/tr1/hypotl.cpp +++ b/src/tr1/hypotl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/laguerre.cpp b/src/tr1/laguerre.cpp index b0bc0b628..3d9907a20 100644 --- a/src/tr1/laguerre.cpp +++ b/src/tr1/laguerre.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/laguerref.cpp b/src/tr1/laguerref.cpp index 341dc8324..c0c8bb1d7 100644 --- a/src/tr1/laguerref.cpp +++ b/src/tr1/laguerref.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/laguerrel.cpp b/src/tr1/laguerrel.cpp index b43418d1a..f0a6c2121 100644 --- a/src/tr1/laguerrel.cpp +++ b/src/tr1/laguerrel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/legendre.cpp b/src/tr1/legendre.cpp index d7e41cdda..0139453ba 100644 --- a/src/tr1/legendre.cpp +++ b/src/tr1/legendre.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/legendref.cpp b/src/tr1/legendref.cpp index 318064f21..f135e0be7 100644 --- a/src/tr1/legendref.cpp +++ b/src/tr1/legendref.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION( { return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/legendrel.cpp b/src/tr1/legendrel.cpp index ee7ed5a21..d8fc7e677 100644 --- a/src/tr1/legendrel.cpp +++ b/src/tr1/legendrel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTIT { return c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/lgamma.cpp b/src/tr1/lgamma.cpp index 8c6b05eaf..15ed262db 100644 --- a/src/tr1/lgamma.cpp +++ b/src/tr1/lgamma.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(do } }}} + + diff --git a/src/tr1/lgammaf.cpp b/src/tr1/lgammaf.cpp index b5e3f6f5f..94afa6fb2 100644 --- a/src/tr1/lgammaf.cpp +++ b/src/tr1/lgammaf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(fl } }}} + + diff --git a/src/tr1/lgammal.cpp b/src/tr1/lgammal.cpp index 636f1df6d..b29d7c65d 100644 --- a/src/tr1/lgammal.cpp +++ b/src/tr1/lgammal.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUT } }}} + + diff --git a/src/tr1/llround.cpp b/src/tr1/llround.cpp index 02fd019f8..fd2e98cc0 100644 --- a/src/tr1/llround.cpp +++ b/src/tr1/llround.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTIO } }}} + + diff --git a/src/tr1/llroundf.cpp b/src/tr1/llroundf.cpp index 04c915bfa..8280c228f 100644 --- a/src/tr1/llroundf.cpp +++ b/src/tr1/llroundf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long long BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/llroundl.cpp b/src/tr1/llroundl.cpp index dde7ebdc8..e8fa0b3c8 100644 --- a/src/tr1/llroundl.cpp +++ b/src/tr1/llroundl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long long BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/log1p.cpp b/src/tr1/log1p.cpp index bf0a43950..5a8630ff7 100644 --- a/src/tr1/log1p.cpp +++ b/src/tr1/log1p.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/log1pf.cpp b/src/tr1/log1pf.cpp index f394c9262..fd061cd40 100644 --- a/src/tr1/log1pf.cpp +++ b/src/tr1/log1pf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/log1pl.cpp b/src/tr1/log1pl.cpp index 0ecd89333..507b25377 100644 --- a/src/tr1/log1pl.cpp +++ b/src/tr1/log1pl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBS } }}} + + diff --git a/src/tr1/lround.cpp b/src/tr1/lround.cpp index 4233d37f8..597ecc76b 100644 --- a/src/tr1/lround.cpp +++ b/src/tr1/lround.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(doub } }}} + + diff --git a/src/tr1/lroundf.cpp b/src/tr1/lroundf.cpp index d576ba6e0..635e2ff7e 100644 --- a/src/tr1/lroundf.cpp +++ b/src/tr1/lroundf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(flo } }}} + + diff --git a/src/tr1/lroundl.cpp b/src/tr1/lroundl.cpp index a0db94232..57b6da425 100644 --- a/src/tr1/lroundl.cpp +++ b/src/tr1/lroundl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(lon } }}} + + diff --git a/src/tr1/nextafter.cpp b/src/tr1/nextafter.cpp index ea26a5ce1..672926720 100644 --- a/src/tr1/nextafter.cpp +++ b/src/tr1/nextafter.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTI } }}} + + diff --git a/src/tr1/nextafterf.cpp b/src/tr1/nextafterf.cpp index 0f7036690..928d355bc 100644 --- a/src/tr1/nextafterf.cpp +++ b/src/tr1/nextafterf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTI } }}} + + diff --git a/src/tr1/nextafterl.cpp b/src/tr1/nextafterl.cpp index 037f3e889..48d84393f 100644 --- a/src/tr1/nextafterl.cpp +++ b/src/tr1/nextafterl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_ } }}} + + diff --git a/src/tr1/nexttoward.cpp b/src/tr1/nexttoward.cpp index f1878bd0e..052120f46 100644 --- a/src/tr1/nexttoward.cpp +++ b/src/tr1/nexttoward.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTIO } }}} + + diff --git a/src/tr1/nexttowardf.cpp b/src/tr1/nexttowardf.cpp index f9ea7e575..6b3af12c0 100644 --- a/src/tr1/nexttowardf.cpp +++ b/src/tr1/nexttowardf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTIO } }}} + + diff --git a/src/tr1/nexttowardl.cpp b/src/tr1/nexttowardl.cpp index 9f992fcfe..a5c29d460 100644 --- a/src/tr1/nexttowardl.cpp +++ b/src/tr1/nexttowardl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBST } }}} + + diff --git a/src/tr1/pch.hpp b/src/tr1/pch.hpp new file mode 100644 index 000000000..de6753be6 --- /dev/null +++ b/src/tr1/pch.hpp @@ -0,0 +1,13 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef BOOST_BUILD_PCH_ENABLED + +#define BOOST_MATH_TR1_SOURCE +//#include "c_policy.hpp" +#include +//#include + +#endif diff --git a/src/tr1/riemann_zeta.cpp b/src/tr1/riemann_zeta.cpp index 0ef523674..dcb2e76f8 100644 --- a/src/tr1/riemann_zeta.cpp +++ b/src/tr1/riemann_zeta.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/riemann_zetaf.cpp b/src/tr1/riemann_zetaf.cpp index 0387d0250..2b9eb5e2f 100644 --- a/src/tr1/riemann_zetaf.cpp +++ b/src/tr1/riemann_zetaf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUT { return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/riemann_zetal.cpp b/src/tr1/riemann_zetal.cpp index a9ea46ba8..f67cf8325 100644 --- a/src/tr1/riemann_zetal.cpp +++ b/src/tr1/riemann_zetal.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUB { return c_policies::zeta BOOST_PREVENT_MACRO_SUBSTITUTION(x); } + + diff --git a/src/tr1/round.cpp b/src/tr1/round.cpp index d64bd4e48..f282bb367 100644 --- a/src/tr1/round.cpp +++ b/src/tr1/round.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(dou } }}} + + diff --git a/src/tr1/roundf.cpp b/src/tr1/roundf.cpp index e051b5be2..ca53cdb29 100644 --- a/src/tr1/roundf.cpp +++ b/src/tr1/roundf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(flo } }}} + + diff --git a/src/tr1/roundl.cpp b/src/tr1/roundl.cpp index 49dbcc64f..ec4df5db5 100644 --- a/src/tr1/roundl.cpp +++ b/src/tr1/roundl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + diff --git a/src/tr1/sph_bessel.cpp b/src/tr1/sph_bessel.cpp index c1e66c90a..321600f51 100644 --- a/src/tr1/sph_bessel.cpp +++ b/src/tr1/sph_bessel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTIO { return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/sph_besself.cpp b/src/tr1/sph_besself.cpp index 40bd63017..6e15779a6 100644 --- a/src/tr1/sph_besself.cpp +++ b/src/tr1/sph_besself.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTIO { return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/sph_bessell.cpp b/src/tr1/sph_bessell.cpp index c38f16f3b..0b33031d5 100644 --- a/src/tr1/sph_bessell.cpp +++ b/src/tr1/sph_bessell.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBST { return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/sph_legendre.cpp b/src/tr1/sph_legendre.cpp index 714ee6d58..3c8dd1268 100644 --- a/src/tr1/sph_legendre.cpp +++ b/src/tr1/sph_legendre.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUT { return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0); } + + diff --git a/src/tr1/sph_legendref.cpp b/src/tr1/sph_legendref.cpp index 6ff2ddb4b..5e924f5e3 100644 --- a/src/tr1/sph_legendref.cpp +++ b/src/tr1/sph_legendref.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUT { return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0f); } + + diff --git a/src/tr1/sph_legendrel.cpp b/src/tr1/sph_legendrel.cpp index 4f0c8e0c0..430e6041d 100644 --- a/src/tr1/sph_legendrel.cpp +++ b/src/tr1/sph_legendrel.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUB { return (m & 1 ? -1 : 1) * c_policies::spherical_harmonic_r BOOST_PREVENT_MACRO_SUBSTITUTION(n, m, x, 0.0L); } + + diff --git a/src/tr1/sph_neumann.cpp b/src/tr1/sph_neumann.cpp index 08791518e..1640796bf 100644 --- a/src/tr1/sph_neumann.cpp +++ b/src/tr1/sph_neumann.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/sph_neumannf.cpp b/src/tr1/sph_neumannf.cpp index 5905bb19f..d8b800f11 100644 --- a/src/tr1/sph_neumannf.cpp +++ b/src/tr1/sph_neumannf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTI { return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/sph_neumannl.cpp b/src/tr1/sph_neumannl.cpp index 32f8613ec..534a88f45 100644 --- a/src/tr1/sph_neumannl.cpp +++ b/src/tr1/sph_neumannl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -12,3 +15,5 @@ extern "C" long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBS { return c_policies::sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(n, x); } + + diff --git a/src/tr1/tgamma.cpp b/src/tr1/tgamma.cpp index 4735be40d..67d738f6e 100644 --- a/src/tr1/tgamma.cpp +++ b/src/tr1/tgamma.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(do } }}} + + diff --git a/src/tr1/tgammaf.cpp b/src/tr1/tgammaf.cpp index 02d63292e..872ebf92c 100644 --- a/src/tr1/tgammaf.cpp +++ b/src/tr1/tgammaf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(fl } }}} + + diff --git a/src/tr1/tgammal.cpp b/src/tr1/tgammal.cpp index f62cdc8e8..4642873df 100644 --- a/src/tr1/tgammal.cpp +++ b/src/tr1/tgammal.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUT } }}} + + diff --git a/src/tr1/trunc.cpp b/src/tr1/trunc.cpp index e1e06a111..d0f579c13 100644 --- a/src/tr1/trunc.cpp +++ b/src/tr1/trunc.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(dou } }}} + + diff --git a/src/tr1/truncf.cpp b/src/tr1/truncf.cpp index 719d8b431..787e79182 100644 --- a/src/tr1/truncf.cpp +++ b/src/tr1/truncf.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(flo } }}} + + diff --git a/src/tr1/truncl.cpp b/src/tr1/truncl.cpp index 9b77963c1..bdce453e1 100644 --- a/src/tr1/truncl.cpp +++ b/src/tr1/truncl.cpp @@ -3,7 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#define BOOST_MATH_TR1_SOURCE +# include +#ifndef BOOST_MATH_TR1_SOURCE +# define BOOST_MATH_TR1_SOURCE +#endif #include #include #include "c_policy.hpp" @@ -16,3 +19,5 @@ extern "C" long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTI } }}} + + From eb9b7a8839de872da814705f95a2f7859916131f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 23 Oct 2008 12:24:45 +0000 Subject: [PATCH 052/192] Improve pch support. Move configuration tests to their own directory so they're only run when required. [SVN r49442] --- build/Jamfile.v2 | 10 +- config/Jamfile.v2 | 12 ++ {build => config}/has_long_double_support.cpp | 0 {build => config}/has_mpfr_class.cpp | 0 {build => config}/has_ntl_rr.cpp | 0 src/tr1/pch.hpp | 2 - test/Jamfile.v2 | 165 +++++++++--------- test/hypot_test.cpp | 2 + test/log1p_expm1_test.cpp | 2 + test/pch.hpp | 21 +++ test/pow_test.cpp | 1 - test/powm1_sqrtp1m1_test.cpp | 2 + test/test_bessel_i.cpp | 2 + test/test_bessel_j.cpp | 2 + test/test_bessel_k.cpp | 2 + test/test_bessel_y.cpp | 2 + test/test_beta.cpp | 2 + test/test_binomial_coeff.cpp | 2 + test/test_carlson.cpp | 2 + test/test_cbrt.cpp | 2 + test/test_classify.cpp | 2 + test/test_constants.cpp | 2 + test/test_digamma.cpp | 2 + test/test_ellint_1.cpp | 2 + test/test_ellint_2.cpp | 2 + test/test_ellint_3.cpp | 2 + test/test_erf.cpp | 2 + test/test_expint.cpp | 2 + test/test_factorials.cpp | 2 + test/test_find_location.cpp | 2 + test/test_find_scale.cpp | 2 + test/test_gamma.cpp | 2 + test/test_gamma_dist.cpp | 2 + test/test_hermite.cpp | 2 + test/test_ibeta.cpp | 2 + test/test_ibeta_inv.cpp | 2 + test/test_ibeta_inv_ab.cpp | 2 + test/test_igamma.cpp | 2 + test/test_igamma_inv.cpp | 2 + test/test_igamma_inva.cpp | 2 + test/test_inv_hyp.cpp | 2 + test/test_laguerre.cpp | 2 + test/test_legendre.cpp | 2 + test/test_minima.cpp | 2 + test/test_nc_beta.cpp | 2 + test/test_nc_chi_squared.cpp | 2 + test/test_nc_f.cpp | 2 + test/test_nc_t.cpp | 2 + test/test_next.cpp | 2 + test/test_normal.cpp | 2 + test/test_remez.cpp | 2 + test/test_roots.cpp | 2 + test/test_round.cpp | 2 + test/test_spherical_harmonic.cpp | 2 + test/test_tgamma_ratio.cpp | 2 + test/test_toms748_solve.cpp | 2 + test/test_triangular.cpp | 2 + test/test_uniform.cpp | 2 + test/test_zeta.cpp | 2 + 59 files changed, 221 insertions(+), 90 deletions(-) create mode 100644 config/Jamfile.v2 rename {build => config}/has_long_double_support.cpp (100%) rename {build => config}/has_mpfr_class.cpp (100%) rename {build => config}/has_ntl_rr.cpp (100%) create mode 100644 test/pch.hpp diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index dd75574d7..897da9a04 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -53,10 +53,6 @@ sph_legendre sph_neumann ; -compile has_long_double_support.cpp ; -compile has_mpfr_class.cpp ; -compile has_ntl_rr.cpp ; - lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 @@ -73,7 +69,7 @@ lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 ../src/tr1 - has_long_double_support + ../config//has_long_double_support ; lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp pch @@ -91,7 +87,7 @@ lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp pch lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch : shared:BOOST_MATH_TR1_DYN_LINK=1 - has_long_double_support + ../config//has_long_double_support ../src/tr1 ; @@ -103,3 +99,5 @@ lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch + + diff --git a/config/Jamfile.v2 b/config/Jamfile.v2 new file mode 100644 index 000000000..976e8433b --- /dev/null +++ b/config/Jamfile.v2 @@ -0,0 +1,12 @@ +# copyright John Maddock 2008 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt. + +import testing ; + +compile has_long_double_support.cpp ; +compile has_mpfr_class.cpp ; +compile has_ntl_rr.cpp ; + + diff --git a/build/has_long_double_support.cpp b/config/has_long_double_support.cpp similarity index 100% rename from build/has_long_double_support.cpp rename to config/has_long_double_support.cpp diff --git a/build/has_mpfr_class.cpp b/config/has_mpfr_class.cpp similarity index 100% rename from build/has_mpfr_class.cpp rename to config/has_mpfr_class.cpp diff --git a/build/has_ntl_rr.cpp b/config/has_ntl_rr.cpp similarity index 100% rename from build/has_ntl_rr.cpp rename to config/has_ntl_rr.cpp diff --git a/src/tr1/pch.hpp b/src/tr1/pch.hpp index de6753be6..24248edc0 100644 --- a/src/tr1/pch.hpp +++ b/src/tr1/pch.hpp @@ -6,8 +6,6 @@ #ifdef BOOST_BUILD_PCH_ENABLED #define BOOST_MATH_TR1_SOURCE -//#include "c_policy.hpp" #include -//#include #endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index a70f2690d..65814800d 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -34,20 +34,23 @@ project # Sunpro has problems building regex as a shared lib: sun:static BOOST_ALL_NO_LIB=1 + . ; -run hypot_test.cpp ; +cpp-pch pch : pch.hpp ; + +run hypot_test.cpp pch ; run pow_test.cpp ; -run log1p_expm1_test.cpp ; -run powm1_sqrtp1m1_test.cpp ; +run log1p_expm1_test.cpp pch ; +run powm1_sqrtp1m1_test.cpp pch ; run special_functions_test.cpp /boost/unit_test//boost_unit_test_framework/static ; run test_bernoulli.cpp ; -run test_constants.cpp ; -run test_bessel_j.cpp ; -run test_bessel_y.cpp ; -run test_bessel_i.cpp ; -run test_bessel_k.cpp ; -run test_beta.cpp ; +run test_constants.cpp pch ; +run test_bessel_j.cpp pch ; +run test_bessel_y.cpp pch ; +run test_bessel_i.cpp pch ; +run test_bessel_k.cpp pch ; +run test_beta.cpp pch ; run test_beta_dist.cpp ; run test_binomial.cpp : # command line @@ -73,255 +76,255 @@ run test_binomial.cpp : # requirements TEST_REAL_CONCEPT : test_binomial_real_concept ; -run test_binomial_coeff.cpp ; -run test_carlson.cpp ; +run test_binomial_coeff.cpp pch ; +run test_carlson.cpp pch ; run test_cauchy.cpp ; -run test_cbrt.cpp ; +run test_cbrt.cpp pch ; run test_chi_squared.cpp ; -run test_classify.cpp ; -run test_digamma.cpp ; +run test_classify.cpp pch ; +run test_digamma.cpp pch ; run test_dist_overloads.cpp ; -run test_ellint_1.cpp ; -run test_ellint_2.cpp ; -run test_ellint_3.cpp ; -run test_erf.cpp ; +run test_ellint_1.cpp pch ; +run test_ellint_2.cpp pch ; +run test_ellint_3.cpp pch ; +run test_erf.cpp pch ; run test_error_handling.cpp ; -run test_expint.cpp ; +run test_expint.cpp pch ; run test_exponential_dist.cpp ; run test_extreme_value.cpp ; -run test_factorials.cpp ; -run test_find_location.cpp ; -run test_find_scale.cpp ; +run test_factorials.cpp pch ; +run test_find_location.cpp pch ; +run test_find_scale.cpp pch ; run test_fisher_f.cpp ; -run test_gamma.cpp ; -run test_gamma_dist.cpp ; -run test_hermite.cpp ; -run test_ibeta.cpp +run test_gamma.cpp pch ; +run test_gamma_dist.cpp pch ; +run test_hermite.cpp pch ; +run test_ibeta.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_ibeta_float ; -run test_ibeta.cpp +run test_ibeta.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_ibeta_double ; -run test_ibeta.cpp +run test_ibeta.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_ibeta_long_double ; -run test_ibeta.cpp +run test_ibeta.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_ibeta_real_concept ; -run test_ibeta_inv.cpp +run test_ibeta_inv.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_ibeta_inv_float ; -run test_ibeta_inv.cpp +run test_ibeta_inv.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_ibeta_inv_double ; -run test_ibeta_inv.cpp +run test_ibeta_inv.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_ibeta_inv_long_double ; -run test_ibeta_inv.cpp +run test_ibeta_inv.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_ibeta_inv_real_concept ; -run test_ibeta_inv_ab.cpp +run test_ibeta_inv_ab.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_ibeta_inv_ab_float ; -run test_ibeta_inv_ab.cpp +run test_ibeta_inv_ab.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_ibeta_inv_ab_double ; -run test_ibeta_inv_ab.cpp +run test_ibeta_inv_ab.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_ibeta_inv_ab_long_double ; -run test_ibeta_inv_ab.cpp +run test_ibeta_inv_ab.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_ibeta_inv_ab_real_concept ; -run test_igamma.cpp ; -run test_igamma_inv.cpp +run test_igamma.cpp pch ; +run test_igamma_inv.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_igamma_inv_float ; -run test_igamma_inv.cpp +run test_igamma_inv.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_igamma_inv_double ; -run test_igamma_inv.cpp +run test_igamma_inv.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_igamma_inv_long_double ; -run test_igamma_inv.cpp +run test_igamma_inv.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_igamma_inv_real_concept ; -run test_igamma_inva.cpp +run test_igamma_inva.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_igamma_inva_float ; -run test_igamma_inva.cpp +run test_igamma_inva.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_igamma_inva_double ; -run test_igamma_inva.cpp +run test_igamma_inva.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_igamma_inva_long_double ; -run test_igamma_inva.cpp +run test_igamma_inva.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_igamma_inva_real_concept ; run test_instantiate1.cpp test_instantiate2.cpp ; -run test_inv_hyp.cpp ; -run test_laguerre.cpp ; -run test_legendre.cpp ; +run test_inv_hyp.cpp pch ; +run test_laguerre.cpp pch ; +run test_legendre.cpp pch ; run test_lognormal.cpp ; -run test_minima.cpp ; -run test_negative_binomial.cpp +run test_minima.cpp pch ; +run test_negative_binomial.cpp : # command line : # input files : # requirements TEST_FLOAT : test_negative_binomial_float ; -run test_negative_binomial.cpp +run test_negative_binomial.cpp : # command line : # input files : # requirements TEST_DOUBLE : test_negative_binomial_double ; -run test_negative_binomial.cpp +run test_negative_binomial.cpp : # command line : # input files : # requirements TEST_LDOUBLE : test_negative_binomial_long_double ; -run test_negative_binomial.cpp +run test_negative_binomial.cpp : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_negative_binomial_real_concept ; -run test_next.cpp ; -run test_nc_chi_squared.cpp +run test_next.cpp pch pch ; +run test_nc_chi_squared.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_nc_chi_squared_float ; -run test_nc_chi_squared.cpp +run test_nc_chi_squared.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_nc_chi_squared_double ; -run test_nc_chi_squared.cpp +run test_nc_chi_squared.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_nc_chi_squared_long_double ; -run test_nc_chi_squared.cpp +run test_nc_chi_squared.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_nc_chi_squared_real_concept ; -run test_nc_beta.cpp +run test_nc_beta.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_nc_beta_float ; -run test_nc_beta.cpp +run test_nc_beta.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_nc_beta_double ; -run test_nc_beta.cpp +run test_nc_beta.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_nc_beta_long_double ; -run test_nc_beta.cpp +run test_nc_beta.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_nc_beta_real_concept ; -run test_nc_f.cpp ; -run test_nc_t.cpp +run test_nc_f.cpp pch ; +run test_nc_t.cpp pch : # command line : # input files : # requirements TEST_FLOAT : test_nc_t_float ; -run test_nc_t.cpp +run test_nc_t.cpp pch : # command line : # input files : # requirements TEST_DOUBLE : test_nc_t_double ; -run test_nc_t.cpp +run test_nc_t.cpp pch : # command line : # input files : # requirements TEST_LDOUBLE : test_nc_t_long_double ; -run test_nc_t.cpp +run test_nc_t.cpp pch : # command line : # input files : # requirements TEST_REAL_CONCEPT : test_nc_t_real_concept ; -run test_normal.cpp ; +run test_normal.cpp pch ; run test_pareto.cpp ; run test_poisson.cpp : # command line @@ -371,17 +374,17 @@ test_rational_instances/test_rational_real_concept4.cpp test_rational_instances/test_rational_real_concept5.cpp ; -run test_remez.cpp ; -run test_roots.cpp ; -run test_round.cpp ; -run test_spherical_harmonic.cpp ; +run test_remez.cpp pch ; +run test_roots.cpp pch ; +run test_round.cpp pch ; +run test_spherical_harmonic.cpp pch ; run test_students_t.cpp ; -run test_tgamma_ratio.cpp ; -run test_toms748_solve.cpp ; -run test_triangular.cpp ; -run test_uniform.cpp ; +run test_tgamma_ratio.cpp pch ; +run test_toms748_solve.cpp pch ; +run test_triangular.cpp pch ; +run test_uniform.cpp pch ; run test_weibull.cpp ; -run test_zeta.cpp ; +run test_zeta.cpp pch ; run test_policy.cpp ; run test_policy_2.cpp ; @@ -399,7 +402,7 @@ run test_tr1.cpp ../build//boost_math_c99l : : : TEST_LD=1 - ../build//has_long_double_support + ../config//has_long_double_support : test_tr1_long_double ; @@ -492,6 +495,6 @@ compile compile_test/tools_test_data_inc_test.cpp ; compile compile_test/tools_test_inc_test.cpp ; compile compile_test/tools_toms748_inc_test.cpp ; -compile ntl_concept_check.cpp : ../build//has_ntl_rr ; -compile mpfr_concept_check.cpp : ../build//has_mpfr_class ; +compile ntl_concept_check.cpp : ../config//has_ntl_rr ; +compile mpfr_concept_check.cpp : ../config//has_mpfr_class ; diff --git a/test/hypot_test.cpp b/test/hypot_test.cpp index 40b2da5f1..9a90162ac 100644 --- a/test/hypot_test.cpp +++ b/test/hypot_test.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include diff --git a/test/log1p_expm1_test.cpp b/test/log1p_expm1_test.cpp index bbb823114..1b01bfdb1 100644 --- a/test/log1p_expm1_test.cpp +++ b/test/log1p_expm1_test.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/pch.hpp b/test/pch.hpp new file mode 100644 index 000000000..c7b9b7ad1 --- /dev/null +++ b/test/pch.hpp @@ -0,0 +1,21 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef BOOST_BUILD_PCH_ENABLED + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#include +#include +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" + +#endif diff --git a/test/pow_test.cpp b/test/pow_test.cpp index 7630b8be3..e51ceffab 100644 --- a/test/pow_test.cpp +++ b/test/pow_test.cpp @@ -6,7 +6,6 @@ // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) - #include #include #include diff --git a/test/powm1_sqrtp1m1_test.cpp b/test/powm1_sqrtp1m1_test.cpp index 14fe5bb35..7160f96b1 100644 --- a/test/powm1_sqrtp1m1_test.cpp +++ b/test/powm1_sqrtp1m1_test.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_bessel_i.cpp b/test/test_bessel_i.cpp index 461ba1881..bd586264e 100644 --- a/test/test_bessel_i.cpp +++ b/test/test_bessel_i.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include diff --git a/test/test_bessel_j.cpp b/test/test_bessel_j.cpp index 548e68511..3b283217c 100644 --- a/test/test_bessel_j.cpp +++ b/test/test_bessel_j.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_bessel_k.cpp b/test/test_bessel_k.cpp index 73714410c..4ddcc405f 100644 --- a/test/test_bessel_k.cpp +++ b/test/test_bessel_k.cpp @@ -5,6 +5,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4756) // overflow in constant arithmetic // Constants are too big for float case, but this doesn't matter for test. diff --git a/test/test_bessel_y.cpp b/test/test_bessel_y.cpp index 910bdb075..f373a343b 100644 --- a/test/test_bessel_y.cpp +++ b/test/test_bessel_y.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include diff --git a/test/test_beta.cpp b/test/test_beta.cpp index aa9ce1482..d6a5a3463 100644 --- a/test/test_beta.cpp +++ b/test/test_beta.cpp @@ -5,6 +5,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_binomial_coeff.cpp b/test/test_binomial_coeff.cpp index 41bc22013..bd7a4edb0 100644 --- a/test/test_binomial_coeff.cpp +++ b/test/test_binomial_coeff.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_carlson.cpp b/test/test_carlson.cpp index f29ca77d1..5e44ebbed 100644 --- a/test/test_carlson.cpp +++ b/test/test_carlson.cpp @@ -5,6 +5,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_cbrt.cpp b/test/test_cbrt.cpp index adc30da5c..75a5536ca 100644 --- a/test/test_cbrt.cpp +++ b/test/test_cbrt.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_classify.cpp b/test/test_classify.cpp index 5b661266b..a764436c3 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -4,6 +4,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_constants.cpp b/test/test_constants.cpp index 06c250d11..35c7e0c39 100644 --- a/test/test_constants.cpp +++ b/test/test_constants.cpp @@ -8,6 +8,8 @@ // test_constants.cpp +#include + #include // for real_concept #include // Boost.Test #include diff --git a/test/test_digamma.cpp b/test/test_digamma.cpp index 035b94496..7722ecf99 100644 --- a/test/test_digamma.cpp +++ b/test/test_digamma.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_ellint_1.cpp b/test/test_ellint_1.cpp index e99a18902..bd67ee90c 100644 --- a/test/test_ellint_1.cpp +++ b/test/test_ellint_1.cpp @@ -6,6 +6,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4756) // overflow in constant arithmetic // Constants are too big for float case, but this doesn't matter for test. diff --git a/test/test_ellint_2.cpp b/test/test_ellint_2.cpp index 55a93b8d8..25706fbbf 100644 --- a/test/test_ellint_2.cpp +++ b/test/test_ellint_2.cpp @@ -6,6 +6,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4756) // overflow in constant arithmetic // Constants are too big for float case, but this doesn't matter for test. diff --git a/test/test_ellint_3.cpp b/test/test_ellint_3.cpp index 745ee834e..038643154 100644 --- a/test/test_ellint_3.cpp +++ b/test/test_ellint_3.cpp @@ -6,6 +6,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4756) // overflow in constant arithmetic // Constants are too big for float case, but this doesn't matter for test. diff --git a/test/test_erf.cpp b/test/test_erf.cpp index 70880439c..d6eb5766c 100644 --- a/test/test_erf.cpp +++ b/test/test_erf.cpp @@ -4,6 +4,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_expint.cpp b/test/test_expint.cpp index 35855eead..dd69f7d66 100644 --- a/test/test_expint.cpp +++ b/test/test_expint.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_factorials.cpp b/test/test_factorials.cpp index 190abce44..4db15ba7b 100644 --- a/test/test_factorials.cpp +++ b/test/test_factorials.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable: 4127) // conditional expression is constant. # pragma warning(disable: 4245) // int/unsigned int conversion diff --git a/test/test_find_location.cpp b/test/test_find_location.cpp index 94ff4b2e8..3b4427cad 100644 --- a/test/test_find_location.cpp +++ b/test/test_find_location.cpp @@ -13,6 +13,8 @@ // Default domain error policy is // #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error +#include + #include // for real_concept #include // for normal_distribution using boost::math::normal; // Default type double. diff --git a/test/test_find_scale.cpp b/test/test_find_scale.cpp index e5b488708..05fdb8145 100644 --- a/test/test_find_scale.cpp +++ b/test/test_find_scale.cpp @@ -13,6 +13,8 @@ // Default distribution domain error policy is // #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error +#include + #include // for real_concept #include // for normal_distribution using boost::math::normal; // Default type double. diff --git a/test/test_gamma.cpp b/test/test_gamma.cpp index f5801084d..0818e2ed7 100644 --- a/test/test_gamma.cpp +++ b/test/test_gamma.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/test_gamma_dist.cpp b/test/test_gamma_dist.cpp index 430bce904..f32552c64 100644 --- a/test/test_gamma_dist.cpp +++ b/test/test_gamma_dist.cpp @@ -15,6 +15,8 @@ // From MathWorld--A Wolfram Web Resource. // http://mathworld.wolfram.com/GammaDistribution.html +#include + #include // for real_concept #include // Boost.Test #include diff --git a/test/test_hermite.cpp b/test/test_hermite.cpp index 6e207376b..135f03371 100644 --- a/test/test_hermite.cpp +++ b/test/test_hermite.cpp @@ -5,6 +5,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4127) // conditional expression is constant # pragma warning(disable : 4512) // assignment operator could not be generated diff --git a/test/test_ibeta.cpp b/test/test_ibeta.cpp index 40a4611f7..5be48c8ee 100644 --- a/test/test_ibeta.cpp +++ b/test/test_ibeta.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_ibeta_inv.cpp b/test/test_ibeta_inv.cpp index fb6a3705c..ef8f6b4fc 100644 --- a/test/test_ibeta_inv.cpp +++ b/test/test_ibeta_inv.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_ibeta_inv_ab.cpp b/test/test_ibeta_inv_ab.cpp index 3110e41bd..06c39eb1d 100644 --- a/test/test_ibeta_inv_ab.cpp +++ b/test/test_ibeta_inv_ab.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/test_igamma.cpp b/test/test_igamma.cpp index 2940ca09e..f7796cfef 100644 --- a/test/test_igamma.cpp +++ b/test/test_igamma.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/test_igamma_inv.cpp b/test/test_igamma_inv.cpp index b638f70b4..b1149081e 100644 --- a/test/test_igamma_inv.cpp +++ b/test/test_igamma_inv.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_igamma_inva.cpp b/test/test_igamma_inva.cpp index e16f9e24a..e77594ac6 100644 --- a/test/test_igamma_inva.cpp +++ b/test/test_igamma_inva.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/test_inv_hyp.cpp b/test/test_inv_hyp.cpp index fdf0e5a7b..e50aff505 100644 --- a/test/test_inv_hyp.cpp +++ b/test/test_inv_hyp.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_laguerre.cpp b/test/test_laguerre.cpp index 50e45271e..6589ffacc 100644 --- a/test/test_laguerre.cpp +++ b/test/test_laguerre.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_legendre.cpp b/test/test_legendre.cpp index c742bb20b..0934528d1 100644 --- a/test/test_legendre.cpp +++ b/test/test_legendre.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_minima.cpp b/test/test_minima.cpp index 8d2b4a50b..d9cf6829b 100644 --- a/test/test_minima.cpp +++ b/test/test_minima.cpp @@ -5,6 +5,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_nc_beta.cpp b/test/test_nc_beta.cpp index c1dc5af52..c078dff0b 100644 --- a/test/test_nc_beta.cpp +++ b/test/test_nc_beta.cpp @@ -7,6 +7,8 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER #pragma warning (disable:4127 4512) #endif diff --git a/test/test_nc_chi_squared.cpp b/test/test_nc_chi_squared.cpp index 3479710df..1a3f71e16 100644 --- a/test/test_nc_chi_squared.cpp +++ b/test/test_nc_chi_squared.cpp @@ -7,6 +7,8 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER #pragma warning (disable:4127 4512) #endif diff --git a/test/test_nc_f.cpp b/test/test_nc_f.cpp index 8ea5d7cd2..cd285ef98 100644 --- a/test/test_nc_f.cpp +++ b/test/test_nc_f.cpp @@ -7,6 +7,8 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER #pragma warning (disable:4127 4512) #endif diff --git a/test/test_nc_t.cpp b/test/test_nc_t.cpp index fd29e5006..741c3ba6c 100644 --- a/test/test_nc_t.cpp +++ b/test/test_nc_t.cpp @@ -7,6 +7,8 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER #pragma warning (disable:4127 4512) #endif diff --git a/test/test_next.cpp b/test/test_next.cpp index 1427b537a..6e486df23 100644 --- a/test/test_next.cpp +++ b/test/test_next.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_normal.cpp b/test/test_normal.cpp index a4012e071..acaf18c56 100644 --- a/test/test_normal.cpp +++ b/test/test_normal.cpp @@ -15,6 +15,8 @@ // From MathWorld--A Wolfram Web Resource. // http://mathworld.wolfram.com/NormalDistribution.html +#include + #ifdef _MSC_VER #pragma warning (disable: 4127) // conditional expression is constant // caused by using if(std::numeric_limits::has_infinity) diff --git a/test/test_remez.cpp b/test/test_remez.cpp index 661217ccd..7f8d6c1e9 100644 --- a/test/test_remez.cpp +++ b/test/test_remez.cpp @@ -4,6 +4,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #ifdef _MSC_VER # pragma warning(disable : 4267) // conversion from 'size_t' to 'const unsigned int', possible loss of data # pragma warning(disable : 4180) // qualifier applied to function type has no meaning; ignored diff --git a/test/test_roots.cpp b/test/test_roots.cpp index 2ac488e5a..d338d8863 100644 --- a/test/test_roots.cpp +++ b/test/test_roots.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_round.cpp b/test/test_round.cpp index e3c71fcc2..223481e0a 100644 --- a/test/test_round.cpp +++ b/test/test_round.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_spherical_harmonic.cpp b/test/test_spherical_harmonic.cpp index 3b68be35c..5cf2cf11d 100644 --- a/test/test_spherical_harmonic.cpp +++ b/test/test_spherical_harmonic.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include diff --git a/test/test_tgamma_ratio.cpp b/test/test_tgamma_ratio.cpp index 4652cdd18..0ef1373ae 100644 --- a/test/test_tgamma_ratio.cpp +++ b/test/test_tgamma_ratio.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include diff --git a/test/test_toms748_solve.cpp b/test/test_toms748_solve.cpp index d926a6085..e8f5e3c0d 100644 --- a/test/test_toms748_solve.cpp +++ b/test/test_toms748_solve.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include diff --git a/test/test_triangular.cpp b/test/test_triangular.cpp index 789e2f8a3..9e24eaa59 100644 --- a/test/test_triangular.cpp +++ b/test/test_triangular.cpp @@ -8,6 +8,8 @@ // test_triangular.cpp +#include + #ifdef _MSC_VER # pragma warning(disable: 4127) // conditional expression is constant. # pragma warning(disable: 4305) // truncation from 'long double' to 'float' diff --git a/test/test_uniform.cpp b/test/test_uniform.cpp index 274f55d3d..32b589cf3 100644 --- a/test/test_uniform.cpp +++ b/test/test_uniform.cpp @@ -8,6 +8,8 @@ // test_uniform.cpp +#include + #ifdef _MSC_VER # pragma warning(disable: 4127) // conditional expression is constant. # pragma warning(disable: 4100) // unreferenced formal parameter. diff --git a/test/test_zeta.cpp b/test/test_zeta.cpp index 313610659..7f0712043 100644 --- a/test/test_zeta.cpp +++ b/test/test_zeta.cpp @@ -3,6 +3,8 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include + #include #include #include From 96f250bed1681b858e5a533c771da3b9c2e353c8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 27 Oct 2008 18:03:45 +0000 Subject: [PATCH 053/192] Add newline at end of file. [SVN r49464] --- src/tr1/pch.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tr1/pch.hpp b/src/tr1/pch.hpp index 24248edc0..ad6a0df98 100644 --- a/src/tr1/pch.hpp +++ b/src/tr1/pch.hpp @@ -9,3 +9,4 @@ #include #endif + From 74559257f645cc41d395537e87c12296ff4c3b0a Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 29 Oct 2008 13:10:08 +0000 Subject: [PATCH 054/192] Added logistic distribution. [SVN r49485] --- doc/sf_and_dist/dist_reference.qbk | 1 + doc/sf_and_dist/distributions/logistic.qbk | 102 ++++++ doc/sf_and_dist/graphs/logistic_pdf.png | Bin 0 -> 50024 bytes doc/sf_and_dist/graphs/logistic_pdf.svg | 67 ++++ doc/sf_and_dist/roadmap.qbk | 1 + include/boost/math/distributions.hpp | 1 + include/boost/math/distributions/logistic.hpp | 287 +++++++++++++++ test/test_logistic_dist.cpp | 330 ++++++++++++++++++ 8 files changed, 789 insertions(+) create mode 100644 doc/sf_and_dist/distributions/logistic.qbk create mode 100644 doc/sf_and_dist/graphs/logistic_pdf.png create mode 100644 doc/sf_and_dist/graphs/logistic_pdf.svg create mode 100644 include/boost/math/distributions/logistic.hpp create mode 100644 test/test_logistic_dist.cpp diff --git a/doc/sf_and_dist/dist_reference.qbk b/doc/sf_and_dist/dist_reference.qbk index ecb4e1260..c5798a77c 100644 --- a/doc/sf_and_dist/dist_reference.qbk +++ b/doc/sf_and_dist/dist_reference.qbk @@ -13,6 +13,7 @@ [include distributions/extreme_value.qbk] [include distributions/fisher.qbk] [include distributions/gamma.qbk] +[include distributions/logistic.qbk] [include distributions/lognormal.qbk] [include distributions/negative_binomial.qbk] [include distributions/nc_beta.qbk] diff --git a/doc/sf_and_dist/distributions/logistic.qbk b/doc/sf_and_dist/distributions/logistic.qbk new file mode 100644 index 000000000..9002e73c0 --- /dev/null +++ b/doc/sf_and_dist/distributions/logistic.qbk @@ -0,0 +1,102 @@ +[section:logistic_dist Logistic Distribution] + +``#include `` + + namespace boost{ namespace math{ + + template + class logistic_distribution; + + template + class logistic_distribution + { + public: + typedef RealType value_type; + typedef Policy policy_type; + // Construct: + logistic_distribution(RealType location = 0, RealType scale = 1); + // Accessors: + RealType location()const; // location. + RealType scale()const; // scale. + + }; + + typedef logistic_distribution<> logistic; + + }} // namespaces + +The logistic distribution is a continous probability distribution. +It has two parameters - location and scale. The cumulative distribution +function of the logistic distribution appears in logistic regression +and feedforward neural networks. Among other applications, +United State Chess Federation and FIDE use it to calculate chess ratings. + +The following graph shows how the distribution changes as the +parameters change: + +[graph logistic_pdf] + +[h4 Member Functions] + + logistic_distribution(RealType u = 0, RealType s = 1); + +Constructs a logistic distribution with location /u/ and scale /s/. + +Requires `scale > 0`, otherwise a __domain_error is raised. + + RealType location()const; + +Returns the location of this distribution. + + RealType scale()const; + +Returns the scale of this distribution. + +[h4 Non-member Accessors] + +All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] +that are generic to all distributions are supported: __usual_accessors. + +The domain of the random variable is \[-\[max_value\], +\[min_value\]\]. +However, the pdf and cdf support inputs of +[infin] and -[infin] +as special cases if RealType permits. + +At `p=1` and `p=0`, the quantile function returns the result of ++__overflow_error and -__overflow_error, while the compliment +quantile function returns the result of -__overflow_error and ++__overflow_error respectively. + +[h4 Accuracy] + +The logistic distribution is implemented in terms of the `std::exp` +and the `std::log` functions, so it's accuracy is related to the +accurate implementations of those functions on a given platform. +While calculating the quantile and the inverse quantile, some +non-zero position values might cause catastrophic cancellation errors. +In such cases, only a low /absolute error/ can be guarenteed. + +[h4 Implementation] + +[table +[[Function][Implementation Notes]] +[[pdf][Using the relation: pdf = e[super -(x-u)/s] / (s*(1+e[super -(x-u)/s])[super 2])]] +[[cdf][Using the relation: p = 1/(1+e[super -(x-u)/s])]] +[[cdf complement][Using the relation: q = 1/(1+e[super (x-u)/s])]] +[[quantile][Using the relation: x = u - s*log(1/p-1)]] +[[quantile from the complement][Using the relation: x = u + s*log(p/1-p)]] +[[mean][u]] +[[mode][The same as the mean.]] +[[skewness][0]] +[[kurtosis excess][6/5]] +[[variance][ ([pi]*s)[super 2] / 3]] +] + +[endsect] + +[/ logistic.qbk + Copyright 2006, 2007 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] diff --git a/doc/sf_and_dist/graphs/logistic_pdf.png b/doc/sf_and_dist/graphs/logistic_pdf.png new file mode 100644 index 0000000000000000000000000000000000000000..7a1346bd5a38f0f7a0066278dabf55405f3c897a GIT binary patch literal 50024 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYU|h|?#=yW}G2?R-0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L90|Va?5N4dJ%_q&kz#v)T8c`CQpH@mmtT}V z`<;yx1A_vCr;B4q#hf>HD`P~z{g4Js~4g%UTR1qV#LFmX_YZ=kfmo zCN_9%F}c{u$sq^=TMa@}*&SR!K$cxt0IW94)W@L%1Xf%%U{nMNEebo#(gG6ch~gbW zik5!(^y$#Kxz>SkaqHd$babo`U8!x&pp-S=EayhU>hSfC7Wdm7%3i;B*_#5F^?N>X zB_$<&I4T~W@axOVUaMn!tG_EuK6zn(eZ7Q)M99thH#ZDxKAlv5aeck~x%u|@uS{6I zweoWs3kyrfeN`b&A79^#YopCeUSH#Ve5|*5@#5s(ul%xBEpKmcPrk6g@x$lO*&#fV zl9C-A9SxnGoNwN~l`iFBC@3p)b8}a@(h`@Y^$TeC#h#qZav3l9%(57Bb{{_gI_U$56Ee|d2+^wpUe zhRmFtoR7Zi#qM&@nz|@@d)|f(8xBm-3{FT(3rn8;{QUgm+j4Ke>dAd~XJ^Ity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Ul+}~&0&M$xL>{(uO^X-$YGBY#Z+}zy0 zV~2&5d7jVivbSEm{-E;b*|TR$llB)q<&>9SBUk+ix;=#-WGFqK74$i`pcIu zU0hugQ&U4 + + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +0 +-5 +-10 +0 +0.1 +0.2 +0.3 +0.4 +0.5 +0 + +Probability + +Random Variable + + + + + + + + + + + + + +location=0, scale=1 +location=0, scale=3 +location=0, scale=0.5 +location=5, scale=1 + +Logistic Distribution PDF + + + diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 30b8f787c..95298265c 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -4,6 +4,7 @@ * Added support for MPFR as a bignum type. * Added some full specializations of the policy classes to reduce compile times. +* Added logistic distribution, from Gautam Sewani's Google Summer of Code project. [h4 Boost-1.37.0] diff --git a/include/boost/math/distributions.hpp b/include/boost/math/distributions.hpp index dd6c02b75..ea25cbd82 100644 --- a/include/boost/math/distributions.hpp +++ b/include/boost/math/distributions.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/math/distributions/logistic.hpp b/include/boost/math/distributions/logistic.hpp new file mode 100644 index 000000000..f9328ecb7 --- /dev/null +++ b/include/boost/math/distributions/logistic.hpp @@ -0,0 +1,287 @@ +// Copyright 2008 Gautam Sewani +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace math { + + template > + class logistic_distribution + { + public: + typedef RealType value_type; + typedef Policy policy_type; + + logistic_distribution(RealType location=0, RealType scale=1) // Constructor. + : m_location(location), m_scale(scale) + { + static const char* function = "boost::math::logistic_distribution<%1%>::logistic_distribution"; + + RealType result; + detail::check_scale(function, scale, &result, Policy()); + detail::check_location(function, location, &result, Policy()); + } + // Accessor functions. + RealType scale()const + { + return m_scale; + } + + RealType location()const + { + return m_location; + } + private: + // Data members: + RealType m_location; // distribution location aka mu. + RealType m_scale; // distribution scale aka s. + }; // class logistic_distribution + + + typedef logistic_distribution logistic; + + template + inline const std::pair range(const logistic_distribution& /* dist */) + { // Range of permissible values for random variable x. + using boost::math::tools::max_value; + return std::pair(-max_value(), max_value()); // - to + infinity + } + + template + inline const std::pair support(const logistic_distribution& dist) + { // Range of supported values for random variable x. + // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. + using boost::math::tools::max_value; + return std::pair(-max_value(), max_value()); // - to + infinity + } + + + template + inline RealType pdf(const logistic_distribution& dist, const RealType& x) + { + RealType scale = dist.scale(); + RealType location = dist.location(); + + static const char* function = "boost::math::pdf(const logistic_distribution<%1%>&, %1%)"; + if((boost::math::isinf)(x)) + { + return 0; // pdf + and - infinity is zero. + } + + RealType result; + if(false == detail::check_scale(function, scale , &result, Policy())) + { + return result; + } + if(false == detail::check_location(function, location, &result, Policy())) + { + return result; + } + if(false == detail::check_x(function, x, &result, Policy())) + { + return result; + } + + BOOST_MATH_STD_USING + RealType exp_term = (location - x) / scale; + if(fabs(exp_term) > tools::log_max_value()) + return 0; + exp_term = exp(exp_term); + if((exp_term * scale > 1) && (exp_term > tools::max_value() / (scale * exp_term))) + return 1 / (scale * exp_term); + return (exp_term) / (scale * (1 + exp_term) * (1 + exp_term)); + } + + template + inline RealType cdf(const logistic_distribution& dist, const RealType& x) + { + RealType scale = dist.scale(); + RealType location = dist.location(); + RealType result; // of checks. + static const char* function = "boost::math::cdf(const logistic_distribution<%1%>&, %1%)"; + if(false == detail::check_scale(function, scale, &result, Policy())) + { + return result; + } + if(false == detail::check_location(function, location, &result, Policy())) + { + return result; + } + + if((boost::math::isinf)(x)) + { + if(x < 0) return 0; // -infinity + return 1; // + infinity + } + + if(false == detail::check_x(function, x, &result, Policy())) + { + return result; + } + BOOST_MATH_STD_USING + RealType power = (location - x) / scale; + if(power > tools::log_max_value()) + return 0; + if(power < -tools::log_max_value()) + return 1; + return 1 / (1 + exp(power)); + } + + template + inline RealType quantile(const logistic_distribution& dist, const RealType& p) + { + BOOST_MATH_STD_USING + RealType location = dist.location(); + RealType scale = dist.scale(); + + static const char* function = "boost::math::quantile(const logistic_distribution<%1%>&, %1%)"; + + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, location, &result, Policy())) + return result; + if(false == detail::check_probability(function, p, &result, Policy())) + return result; + + if(p == 0) + { + return -policies::raise_overflow_error(function,"probability argument is 0, must be >0 and <1",Policy()); + } + if(p == 1) + { + return policies::raise_overflow_error(function,"probability argument is 1, must be >0 and <1",Policy()); + } + //Expressions to try + //return location+scale*log(p/(1-p)); + //return location+scale*log1p((2*p-1)/(1-p)); + + //return location - scale*log( (1-p)/p); + //return location - scale*log1p((1-2*p)/p); + + //return -scale*log(1/p-1) + location; + return location - scale * log1p((1 / p) - 2); + } // RealType quantile(const logistic_distribution& dist, const RealType& p) + + template + inline RealType cdf(const complemented2_type, RealType>& c) + { + BOOST_MATH_STD_USING + RealType location = c.dist.location(); + RealType scale = c.dist.scale(); + RealType x = c.param; + static const char* function = "boost::math::cdf(const complement(logistic_distribution<%1%>&), %1%)"; + + if((boost::math::isinf)(x)) + { + if(x < 0) return 1; // cdf complement -infinity is unity. + return 0; // cdf complement +infinity is zero + } + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, location, &result, Policy())) + return result; + if(false == detail::check_x(function, x, &result, Policy())) + return result; + RealType power = (x - location) / scale; + if(power > tools::log_max_value()) + return 0; + if(power < -tools::log_max_value()) + return 1; + return 1 / (1 + exp(power)); + } + + template + inline RealType quantile(const complemented2_type, RealType>& c) + { + BOOST_MATH_STD_USING + RealType scale = c.dist.scale(); + RealType location = c.dist.location(); + static const char* function = "boost::math::quantile(const complement(logistic_distribution<%1%>&), %1%)"; + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, location, &result, Policy())) + return result; + RealType q = c.param; + if(false == detail::check_probability(function, q, &result, Policy())) + return result; + using boost::math::tools::max_value; + + if(q == 1) + { + return -policies::raise_overflow_error(function,"probability argument is 1, but must be >0 and <1",Policy()); + } + if(q == 0) + { + return policies::raise_overflow_error(function,"probability argument is 0, but must be >0 and <1",Policy()); + } + //Expressions to try + //return location+scale*log((1-q)/q); + return location + scale * log1p((1 - 2 * q) / q); + + //return location-scale*log(q/(1-q)); + //return location-scale*log1p((2*q-1)/(1-q)); + + //return location+scale*log(1/q-1); + //return location+scale*log1p(1/q-2); + } + + template + inline RealType mean(const logistic_distribution& dist) + { + return dist.location(); + } // RealType mean(const logistic_distribution& dist) + + template + inline RealType variance(const logistic_distribution& dist) + { + BOOST_MATH_STD_USING + RealType scale = dist.scale(); + return boost::math::constants::pi()*boost::math::constants::pi()*scale*scale/3; + } // RealType variance(const logistic_distribution& dist) + + template + inline RealType mode(const logistic_distribution& dist) + { + return dist.location(); + } + + template + inline RealType median(const logistic_distribution& dist) + { + return dist.location(); + } + template + inline RealType skewness(const logistic_distribution& /*dist*/) + { + return 0; + } // RealType skewness(const logistic_distribution& dist) + + template + inline RealType kurtosis_excess(const logistic_distribution& /*dist*/) + { + return static_cast(6)/5; + } // RealType kurtosis_excess(const logistic_distribution& dist) + + template + inline RealType kurtosis(const logistic_distribution& dist) + { + return kurtosis_excess(dist) + 3; + } // RealType kurtosis_excess(const logistic_distribution& dist) + }} + + +// Must come at the end: +#include + diff --git a/test/test_logistic_dist.cpp b/test/test_logistic_dist.cpp new file mode 100644 index 000000000..bc46cbe24 --- /dev/null +++ b/test/test_logistic_dist.cpp @@ -0,0 +1,330 @@ +// Copyright 2008 Gautam Sewani + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_UNDERFLOW_ERROR_POLICY throw_on_error +#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error +#include // for real_concept +#include + using boost::math::logistic_distribution; + +#include // Boost.Test +#include + + +#include + using std::cout; + using std::endl; + using std::setprecision; + + +template +void test_spot(RealType location, RealType scale, RealType x, RealType p, RealType q, RealType tolerance) +{ + BOOST_CHECK_CLOSE( + ::boost::math::cdf( + logistic_distribution(location,scale), + x), + p, + tolerance); // % + BOOST_CHECK_CLOSE( + ::boost::math::cdf( + complement(logistic_distribution(location,scale), + x)), + q, + tolerance); // % + if(p < 0.999) + { + BOOST_CHECK_CLOSE( + ::boost::math::quantile( + logistic_distribution(location,scale), + p), + x, + tolerance); // % + } + if(q < 0.999) + { + BOOST_CHECK_CLOSE( + ::boost::math::quantile( + complement(logistic_distribution(location,scale), + q)), + x, + tolerance); // % + } +} + + +template +void test_spots(RealType T) +{ + // Basic sanity checks. + // 50 eps as a percentage, up to a maximum of double precision + // Test data taken from Mathematica 6 + RealType tolerance = (std::max)( + static_cast(1e-33L), + boost::math::tools::epsilon()); + cout<<"Absolute tolerance:"<(1), // location + static_cast(0.5L), // scale + static_cast(0.1L), // x + static_cast(0.141851064900487789594278108470953L), // p + static_cast(0.858148935099512210405721891529047L), //q + tolerance); + + test_spot( + static_cast(5), // location + static_cast(2), // scale + static_cast(3.123123123L),//x + static_cast(0.281215878622547904873088053477813L), // p + static_cast(0.718784121377452095126911946522187L), //q + tolerance); + + test_spot( + static_cast(1.2345L), // location + static_cast(0.12345L), // scale + static_cast(3.123123123L),//x + static_cast(0.999999773084685079723328282229357L), // p + static_cast(2.26915314920276671717770643005212e-7L), //q + tolerance); + + + //High probability + test_spot( + static_cast(1), // location + static_cast(0.5L), // scale + static_cast(10), // x + static_cast(0.99999998477002048723965105559179L), // p + static_cast(1.5229979512760348944408208801237e-8L), //q + tolerance); + + //negative x + test_spot( + static_cast(5), // location + static_cast(2), // scale + static_cast(-0.1L), // scale + static_cast(0.0724264853615177178439235061476928L), // p + static_cast(0.927573514638482282156076493852307L), //q + tolerance); + + + test_spot( + static_cast(5), // location + static_cast(2), // scale + static_cast(-20), // x + static_cast(3.72663928418656138608800947863869e-6L), // p + static_cast(0.999996273360715813438613911990521L), //q + tolerance); + + + //test value to check cancellation error in straight/complimented quantile + //the subtraction in the formula location-scale*log term introduces catastrophics cancellator error if location and scale*log term are close + //For these values, the tests fail at tolerance, but work at 100*tolerance + test_spot( + static_cast(-1.2345L), // location + static_cast(1.4555L), // scale + static_cast(-0.00125796420642514024493852425918807L),//x + static_cast(0.7L), // p + static_cast(0.3L), //q + 80*tolerance); + + test_spot( + static_cast(1.2345L), // location + static_cast(0.12345L), // scale + static_cast(0.0012345L), // x + static_cast(0.0000458541039469413343331170952855318L), // p + static_cast(0.999954145896053058665666882904714L), //q + 80*tolerance); + + + + test_spot( + static_cast(5L), // location + static_cast(2L), // scale + static_cast(0.0012345L), // x + static_cast(0.0759014628704232983512906076564256L), // p + static_cast(0.924098537129576701648709392343574L), //q + 80*tolerance); + + //negative location + test_spot( + static_cast(-123.123123L), // location + static_cast(2.123L), // scale + static_cast(3), // x + static_cast(0.999999999999999999999999984171276L), // p + static_cast(1.58287236765203121622150720373972e-26L), //q + tolerance); + //PDF Testing + BOOST_CHECK_CLOSE( + ::boost::math::pdf( + logistic_distribution(5,2), + static_cast(0.125L) ),//x + static_cast(0.0369500730133475464584898192104821L), // probability + tolerance); // % + + BOOST_CHECK_CLOSE( + ::boost::math::pdf( + logistic_distribution(static_cast(1.2345L), static_cast(0.12345L)), + static_cast(0.0012345L) ),//x + static_cast(0.000371421639109700748742498671686243L), // probability + tolerance); // % + BOOST_CHECK_CLOSE( + ::boost::math::pdf( + logistic_distribution(2,1), + static_cast(2L) ),//x + static_cast(0.25L), // probability + tolerance); // % + + //Extreme value testing + + if(std::numeric_limits::has_infinity) + { + BOOST_CHECK_EQUAL(pdf(logistic_distribution(), +std::numeric_limits::infinity()), 0); // x = + infinity, pdf = 0 + BOOST_CHECK_EQUAL(pdf(logistic_distribution(), -std::numeric_limits::infinity()), 0); // x = - infinity, pdf = 0 + BOOST_CHECK_EQUAL(cdf(logistic_distribution(), +std::numeric_limits::infinity()), 1); // x = + infinity, cdf = 1 + BOOST_CHECK_EQUAL(cdf(logistic_distribution(), -std::numeric_limits::infinity()), 0); // x = - infinity, cdf = 0 + BOOST_CHECK_EQUAL(cdf(complement(logistic_distribution(), +std::numeric_limits::infinity())), 0); // x = + infinity, c cdf = 0 + BOOST_CHECK_EQUAL(cdf(complement(logistic_distribution(), -std::numeric_limits::infinity())), 1); // x = - infinity, c cdf = 1 + } + BOOST_CHECK_THROW(quantile(logistic_distribution(), static_cast(1)), std::overflow_error); // x = + infinity, cdf = 1 + BOOST_CHECK_THROW(quantile(logistic_distribution(), static_cast(0)), std::overflow_error); // x = - infinity, cdf = 0 + BOOST_CHECK_THROW(quantile(complement(logistic_distribution(), static_cast(1))), std::overflow_error); // x = - infinity, cdf = 0 + BOOST_CHECK_THROW(quantile(complement(logistic_distribution(), static_cast(0))), std::overflow_error); // x = + infinity, cdf = 1 + BOOST_CHECK_EQUAL(cdf(logistic_distribution(), +boost::math::tools::max_value()), 1); // x = + infinity, cdf = 1 + BOOST_CHECK_EQUAL(cdf(logistic_distribution(), -boost::math::tools::max_value()), 0); // x = - infinity, cdf = 0 + BOOST_CHECK_EQUAL(cdf(complement(logistic_distribution(), +boost::math::tools::max_value())), 0); // x = + infinity, c cdf = 0 + BOOST_CHECK_EQUAL(cdf(complement(logistic_distribution(), -boost::math::tools::max_value())), 1); // x = - infinity, c cdf = 1 + BOOST_CHECK_EQUAL(pdf(logistic_distribution(), +boost::math::tools::max_value()), 0); // x = + infinity, pdf = 0 + BOOST_CHECK_EQUAL(pdf(logistic_distribution(), -boost::math::tools::max_value()), 0); // x = - infinity, pdf = 0 + + // + // Things that are errors: + //1. domain errors for scale and location + //2. x being NAN + //3. Probabilies being outside (0,1) + + //location/scale can't be infinity + if(std::numeric_limits::has_infinity) { + BOOST_CHECK_THROW( + logistic_distribution dist(std::numeric_limits::infinity(),0.5), + std::domain_error); + BOOST_CHECK_THROW( + logistic_distribution dist(0.5,std::numeric_limits::infinity()), + std::domain_error); + } + //scale can't be negative or 0 + BOOST_CHECK_THROW( + logistic_distribution dist(0.5,-0.5), + std::domain_error); + BOOST_CHECK_THROW( + logistic_distribution dist(0.5,0), + std::domain_error); + + logistic_distribution dist(0.5,0.5); + //x can't be NaN,p can't be NaN + + if (std::numeric_limits::has_quiet_NaN) + { + // No longer allow x to be NaN, then these tests should throw. + BOOST_CHECK_THROW(pdf(dist, +std::numeric_limits::quiet_NaN()), std::domain_error); // x = NaN + BOOST_CHECK_THROW(cdf(dist, +std::numeric_limits::quiet_NaN()), std::domain_error); // x = NaN + BOOST_CHECK_THROW(cdf(complement(dist, +std::numeric_limits::quiet_NaN())), std::domain_error); // x = + infinity + BOOST_CHECK_THROW(quantile(dist, +std::numeric_limits::quiet_NaN()), std::domain_error); // p = + infinity + BOOST_CHECK_THROW(quantile(complement(dist, +std::numeric_limits::quiet_NaN())), std::domain_error); // p = + infinity + } + + //p can't be outside (0,1) + BOOST_CHECK_THROW(quantile(dist, static_cast(1.1)), std::domain_error); + BOOST_CHECK_THROW(quantile(dist, static_cast(-0.1)), std::domain_error); + BOOST_CHECK_THROW(quantile(dist, static_cast(1)), std::overflow_error); + BOOST_CHECK_THROW(quantile(dist, static_cast(0)), std::overflow_error); + + BOOST_CHECK_THROW(quantile(complement(dist, static_cast(1.1))), std::domain_error); + BOOST_CHECK_THROW(quantile(complement(dist, static_cast(-0.1))), std::domain_error); + BOOST_CHECK_THROW(quantile(complement(dist, static_cast(1))), std::overflow_error); + BOOST_CHECK_THROW(quantile(complement(dist, static_cast(0))), std::overflow_error); + + //Tests for mean,mode,median,variance,skewness,kurtosis + //mean + BOOST_CHECK_CLOSE( + ::boost::math::mean( + logistic_distribution(2,1) + ),//x + static_cast(2), // probability + tolerance); // % + //median + BOOST_CHECK_CLOSE( + ::boost::math::median( + logistic_distribution(2,1) + ),//x + static_cast(2), // probability + tolerance); + //mode + BOOST_CHECK_CLOSE( + ::boost::math::mode( + logistic_distribution(2,1) + ),//x + static_cast(2), // probability + tolerance); + //variance + BOOST_CHECK_CLOSE( + ::boost::math::variance( + logistic_distribution(2,1) + ),//x + static_cast(3.28986813369645287294483033329205L), // probability + tolerance); + //skewness + BOOST_CHECK_CLOSE( + ::boost::math::skewness( + logistic_distribution(2,1) + ),//x + static_cast(0), // probability + tolerance); + BOOST_CHECK_CLOSE( + ::boost::math::kurtosis_excess( + logistic_distribution(2,1) + ),//x + static_cast(1.2L), // probability + tolerance); + +} // template void test_spots(RealType) + + +int test_main(int, char* []) +{ + // Check that can generate logistic distribution using the two convenience methods: + boost::math::logistic mycexp1(1.); // Using typedef + logistic_distribution<> myexp2(1.); // Using default RealType double. + + // Basic sanity-check spot values. + // (Parameter value, arbitrarily zero, only communicates the floating point type). + test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 % + test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 % +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_spots(0.0L); // Test long double. +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + test_spots(boost::math::concepts::real_concept(0.)); // Test real concept. +#endif +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif + + return 0; +} // int test_main(int, char* []) + From c15b211f2fcef28051bd48f5601cedda947736b2 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 29 Oct 2008 13:42:53 +0000 Subject: [PATCH 055/192] Integrated lognormal distro into the concept check tests. [SVN r49486] --- include/boost/math/distributions/fwd.hpp | 4 ++++ include/boost/math/distributions/logistic.hpp | 2 +- test/compile_test/instantiate.hpp | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/math/distributions/fwd.hpp b/include/boost/math/distributions/fwd.hpp index 657ef61fa..537ea56d6 100644 --- a/include/boost/math/distributions/fwd.hpp +++ b/include/boost/math/distributions/fwd.hpp @@ -38,6 +38,9 @@ class fisher_f_distribution; template class gamma_distribution; +template +class logistic_distribution; + template class lognormal_distribution; @@ -92,6 +95,7 @@ class weibull_distribution; typedef boost::math::extreme_value_distribution extreme_value;\ typedef boost::math::fisher_f_distribution fisher_f;\ typedef boost::math::gamma_distribution gamma;\ + typedef boost::math::logistic_distribution logistic;\ typedef boost::math::lognormal_distribution lognormal;\ typedef boost::math::negative_binomial_distribution negative_binomial;\ typedef boost::math::normal_distribution normal;\ diff --git a/include/boost/math/distributions/logistic.hpp b/include/boost/math/distributions/logistic.hpp index f9328ecb7..8bda1a672 100644 --- a/include/boost/math/distributions/logistic.hpp +++ b/include/boost/math/distributions/logistic.hpp @@ -57,7 +57,7 @@ namespace boost { namespace math { } template - inline const std::pair support(const logistic_distribution& dist) + inline const std::pair support(const logistic_distribution& /* dist */) { // Range of supported values for random variable x. // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. using boost::math::tools::max_value; diff --git a/test/compile_test/instantiate.hpp b/test/compile_test/instantiate.hpp index 5ae153880..8c1efedc7 100644 --- a/test/compile_test/instantiate.hpp +++ b/test/compile_test/instantiate.hpp @@ -68,6 +68,7 @@ void instantiate(RealType) function_requires > >(); function_requires > >(); function_requires > >(); + function_requires > >(); function_requires > >(); function_requires > >(); function_requires > >(); @@ -92,6 +93,7 @@ void instantiate(RealType) function_requires > >(); function_requires > >(); function_requires > >(); + function_requires > >(); function_requires > >(); function_requires > >(); function_requires > >(); @@ -117,6 +119,7 @@ void instantiate(RealType) function_requires >(); function_requires >(); function_requires >(); + function_requires >(); function_requires >(); function_requires >(); function_requires >(); From e9a6165bd2d5ec95a90d0f55f8342a77b35f66df Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 30 Oct 2008 15:41:48 +0000 Subject: [PATCH 056/192] Added test_logistic_dist.cpp. [SVN r49490] --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 65814800d..104358e4e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -224,6 +224,7 @@ run test_instantiate1.cpp test_instantiate2.cpp ; run test_inv_hyp.cpp pch ; run test_laguerre.cpp pch ; run test_legendre.cpp pch ; +run test_logistic_dist.cpp ; run test_lognormal.cpp ; run test_minima.cpp pch ; run test_negative_binomial.cpp From 96f61ea2c63ed3a764b938c399083d4066afafda Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Fri, 31 Oct 2008 12:23:40 +0000 Subject: [PATCH 057/192] Two spellings. [SVN r49500] --- doc/sf_and_dist/distributions/logistic.qbk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/sf_and_dist/distributions/logistic.qbk b/doc/sf_and_dist/distributions/logistic.qbk index 9002e73c0..c6b8732cf 100644 --- a/doc/sf_and_dist/distributions/logistic.qbk +++ b/doc/sf_and_dist/distributions/logistic.qbk @@ -63,14 +63,14 @@ However, the pdf and cdf support inputs of +[infin] and -[infin] as special cases if RealType permits. At `p=1` and `p=0`, the quantile function returns the result of -+__overflow_error and -__overflow_error, while the compliment ++__overflow_error and -__overflow_error, while the complement quantile function returns the result of -__overflow_error and +__overflow_error respectively. [h4 Accuracy] The logistic distribution is implemented in terms of the `std::exp` -and the `std::log` functions, so it's accuracy is related to the +and the `std::log` functions, so its accuracy is related to the accurate implementations of those functions on a given platform. While calculating the quantile and the inverse quantile, some non-zero position values might cause catastrophic cancellation errors. From abc4d313b44d719aa964c73cf65c62697a68d7ec Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Sat, 1 Nov 2008 13:15:41 +0000 Subject: [PATCH 058/192] Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor [SVN r49510] --- CMakeLists.txt | 22 ++++++++++++++++++++++ test/CMakeLists.txt | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..9b7a78675 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +#---------------------------------------------------------------------------- +# This file was automatically generated from the original CMakeLists.txt file +# Add a variable to hold the headers for the library +set (lib_headers + math_fwd.hpp + math +) + +# Add a library target to the build system +boost_library_project( + math + # SRCDIRS + TESTDIRS test + HEADERS ${lib_headers} + # DOCDIRS + # DESCRIPTION + MODULARIZED + # AUTHORS + # MAINTAINERS +) + + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..0874a2f8d --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,18 @@ +boost_test_run(common_factor_test DEPENDS boost_unit_test_framework) +boost_test_run(octonion_test + ../octonion/octonion_test.cpp + DEPENDS boost_unit_test_framework) +boost_test_run(quaternion_test + ../quaternion/quaternion_test.cpp + DEPENDS boost_unit_test_framework) +boost_test_run(special_functions_test + ../special_functions/special_functions_test.cpp + DEPENDS boost_unit_test_framework) +boost_test_run(quaternion_multi_incl_test + ../quaternion/quaternion_mult_incl_test.cpp + ../quaternion/quaternion_mi1.cpp + ../quaternion/quaternion_mi2.cpp + DEPENDS boost_unit_test_framework) +boost_test_run(complex_test) +boost_test_run(hypot_test) +boost_test_run(log1p_expm1_test DEPENDS boost_regex) From 36d1b598b1143cf69a93d3edebf026a6f14c4acb Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sat, 1 Nov 2008 14:18:09 +0000 Subject: [PATCH 059/192] Removed wrongly pasted stuff and re-ran. May not yet be used in qbk docs [SVN r49515] --- example/find_root_example.cpp | 94 +++++------------------------------ 1 file changed, 12 insertions(+), 82 deletions(-) diff --git a/example/find_root_example.cpp b/example/find_root_example.cpp index abcb936cb..53bdc99b5 100644 --- a/example/find_root_example.cpp +++ b/example/find_root_example.cpp @@ -31,87 +31,6 @@ First we need some includes to access the normal distribution using std::numeric_limits; //] //[/root_find1] -namespace boost{ namespace math { namespace tools -{ - -template -inline std::pair bracket_and_solve_root(F f, // functor - const T& guess, - const T& factor, - bool rising, - Tol tol, // binary functor specifying termination when tol(min, max) becomes true. - // eps_tolerance most suitable for this continuous function - boost::uintmax_t& max_iter); // explicit (rather than default) max iterations. -// return interval as a pair containing result. - -namespace detail -{ - - // Functor for finding standard deviation: - template - struct standard_deviation_functor - { - standard_deviation_functor(RealType m, RealType s, RealType d) - : mean(m), standard_deviation(s) - { - } - RealType operator()(const RealType& sd) - { // Unary functor - the function whose root is to be found. - if(sd <= tools::min_value()) - { // - return 1; - } - normal_distribution t(mean, sd); - RealType qa = quantile(complement(t, alpha)); - RealType qb = quantile(complement(t, beta)); - qa += qb; - qa *= qa; - qa *= ratio; - qa -= (df + 1); - return qa; - } // operator() - RealType mean; - RealType standard_deviation; - }; // struct standard_deviation_functor -} // namespace detail - -template -RealType normal_distribution::find_standard_deviation( - RealType difference_from_mean, - RealType mean, - RealType sd, - RealType hint) // Best guess available - current sd if none better? -{ - static const char* function = "boost::math::normal_distribution<%1%>::find_standard_deviation"; - - // Check for domain errors: - RealType error_result; - if(false == detail::check_probability( - function, sd, &error_result, Policy()) - ) - return error_result; - - if(hint <= 0) - { // standard deviation can never be negative. - hint = 1; - } - - detail::standard_deviation_functor f(mean, sd, difference_from_mean); - tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = 100; - std::pair r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy()); - RealType result = r.first + (r.second - r.first) / 2; - if(max_iter == 100) - { - policies::raise_evaluation_error(function, "Unable to locate solution in a reasonable time:" - " either there is no answer to how many degrees of freedom are required" - " or the answer is infinite. Current best guess is %1%", result, Policy()); - } - return result; -} // find_standard_deviation -} // namespace tools -} // namespace math -} // namespace boost int main() @@ -231,9 +150,20 @@ But in this normal distribution case, we could be even smarter and make a direct } // int main() /* - Output is: +//[root_find_output +Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\find_root_example.exe" +Example: Normal distribution, root finding.Percentage of packs > 3.1 is 0.158655 +fraction of packs <= 2.9 with a mean of 3 is 0.841345 +fraction of packs >= 2.9 with a mean of 3.0664 is 0.951944 +Setting the packer to 3.06449 will mean that fraction of packs >= 2.9 is 0.95 +Quantile of 0.05 = 2.83551, mean = 3, sd = 0.1 +Quantile of 0.05 = 2.91776, mean = 3, sd = 0.05 +Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.05 is 0.97725 +Quantile of 0.05 = 2.90131, mean = 3, sd = 0.06 +Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.06 is 0.95221 +//] [/root_find_output] */ From d4b3d127c85cda9bab85fda336dfb9d58d2076bc Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sat, 1 Nov 2008 14:31:59 +0000 Subject: [PATCH 060/192] Checked and added output to Quickbook (but not used by docs yet) [SVN r49516] --- example/find_mean_and_sd_normal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example/find_mean_and_sd_normal.cpp b/example/find_mean_and_sd_normal.cpp index bca5989a5..234123e8f 100644 --- a/example/find_mean_and_sd_normal.cpp +++ b/example/find_mean_and_sd_normal.cpp @@ -380,7 +380,9 @@ The scale can be variation in dispensing or uncertainty in measurement. Output is: -Find_location and find_scale examples. +//[normal_find_location_and_scale_output + +Find_location (mean) and find_scale (standard deviation) examples. Percentage of packs > 3.1 is 15.8655 Fraction of packs <= 2.9 with a mean of 3 is 0.841345 Fraction of packs >= 2.9 with a mean of 3.06449 is 0.950005 @@ -402,6 +404,8 @@ find_scale(minimum_weight, under_fraction, packs.mean()); 0.0607957 find_scale(complement(minimum_weight, over_fraction, packs.mean())); 0.0607957 Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.0607957 is 0.95 +//] [/normal_find_location_and_scale_eg_output] + */ From f2c9831420f9f5c474f20c6823f4ae6b26b76ec5 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sat, 1 Nov 2008 14:34:11 +0000 Subject: [PATCH 061/192] Added warning in fusion suppression and comments. [SVN r49517] --- example/find_location_example.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/example/find_location_example.cpp b/example/find_location_example.cpp index ab47dc6ea..85a369493 100644 --- a/example/find_location_example.cpp +++ b/example/find_location_example.cpp @@ -1,6 +1,6 @@ // find_location.cpp -// Copyright Paul A. Bristow 2007. +// Copyright Paul A. Bristow 2008. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. @@ -13,6 +13,10 @@ // Note that this file contains Quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! +#ifdef _MSC_VER +# pragma warning(disable: 4180) // qualifier has no effect (in fusion). +#endif + //[find_location1 /*` First we need some includes to access the normal distribution, @@ -24,7 +28,9 @@ the algorithms to find location (and some std output of course). #include // for cauchy_distribution using boost::math::cauchy; // typedef provides default type is double. #include - using boost::math::find_location; + using boost::math::find_location; // for mean +#include + using boost::math::find_scale; // for standard devation using boost::math::complement; // Needed if you want to use the complement version. using boost::math::policies::policy; @@ -152,8 +158,6 @@ but, [link why_complements to avoid loss of accuracy], use the complement versio return 0; } // int main() - - //[find_location_example_output /*` [pre From cfd03e9a2efa776df0fc0f18680b1f5460ab1452 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sat, 1 Nov 2008 14:35:52 +0000 Subject: [PATCH 062/192] Added warning suppression in fusion. [SVN r49518] --- example/f_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/f_test.cpp b/example/f_test.cpp index 186741c3e..4a260b3a5 100644 --- a/example/f_test.cpp +++ b/example/f_test.cpp @@ -1,5 +1,5 @@ // Copyright John Maddock 2006 -// Copyright Paul A. Bristow 2007 +// Copyright Paul A. Bristow 2007, 2008 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. @@ -10,6 +10,7 @@ # pragma warning(disable: 4512) // assignment operator could not be generated. # pragma warning(disable: 4510) // default constructor could not be generated. # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. +# pragma warning(disable: 4180) // qualifier has no effect (in fusion). #endif #include From 63aea405e4e0c80d9f5ee0ea27585c7fb72a25b1 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 1 Nov 2008 18:03:39 +0000 Subject: [PATCH 063/192] Change configuration Jamfile so it's no longer dependent on the testing module. Fixed students T example, and updated docs to match. Removed two dead files. [SVN r49523] --- config/Jamfile.v2 | 10 +- .../distributions/students_t_examples.qbk | 15 +- example/Jamfile.v2 | 16 +- example/students_t_example2.cpp | 3 +- example/students_t_single_sample.cpp | 3 +- tools/ntl_rr_digamma.hpp | 292 ------ tools/ntl_rr_lanczos.hpp | 902 ------------------ 7 files changed, 25 insertions(+), 1216 deletions(-) delete mode 100644 tools/ntl_rr_digamma.hpp delete mode 100644 tools/ntl_rr_lanczos.hpp diff --git a/config/Jamfile.v2 b/config/Jamfile.v2 index 976e8433b..8b31a1e46 100644 --- a/config/Jamfile.v2 +++ b/config/Jamfile.v2 @@ -3,10 +3,10 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. -import testing ; - -compile has_long_double_support.cpp ; -compile has_mpfr_class.cpp ; -compile has_ntl_rr.cpp ; +obj has_long_double_support : has_long_double_support.cpp ; +obj has_mpfr_class : has_mpfr_class.cpp ; +obj has_ntl_rr : has_ntl_rr.cpp ; + + diff --git a/doc/sf_and_dist/distributions/students_t_examples.qbk b/doc/sf_and_dist/distributions/students_t_examples.qbk index bc4c35dea..354b6a5e9 100644 --- a/doc/sf_and_dist/distributions/students_t_examples.qbk +++ b/doc/sf_and_dist/distributions/students_t_examples.qbk @@ -509,14 +509,13 @@ Confidence Estimated Estimated Value (%) Sample Size Sample Size (one sided test) (two sided test) _______________________________________________________________ - 50.000 2 3 - 75.000 4 5 - 90.000 8 10 - 95.000 12 14 - 99.000 21 23 - 99.900 36 38 - 99.990 51 54 - 99.999 67 69 + 75.000 3 4 + 90.000 7 9 + 95.000 11 13 + 99.000 20 22 + 99.900 35 37 + 99.990 50 53 + 99.999 66 68 '''] So in this case, many more measurements would have had to be made, diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 2d4917225..e63323402 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -26,10 +26,12 @@ project ../../.. ; +run binomial_coinflip_example.cpp ; run binomial_confidence_limits.cpp ; run binomial_example3.cpp ; -run binomial_sample_sizes.cpp ; run binomial_example_nag.cpp ; +run binomial_quiz_example.cpp ; +run binomial_sample_sizes.cpp ; run c_error_policy_example.cpp ; run chi_square_std_dev_test.cpp ; run distribution_construction.cpp ; @@ -37,13 +39,18 @@ run error_handling_example.cpp ; run error_policies_example.cpp ; run error_policy_example.cpp ; run f_test.cpp ; +run find_location_example.cpp ; +run find_mean_and_sd_normal.cpp ; +run find_root_example.cpp ; +run find_scale_example.cpp ; +run nc_chi_sq_example.cpp ; run neg_binom_confidence_limits.cpp ; run neg_binomial_sample_sizes.cpp ; -# run negative_binomial_construction_examples.cpp ; delete for now run negative_binomial_example1.cpp ; run negative_binomial_example2.cpp ; -# run negative_binomial_example3.cpp ; +run normal_misc_examples.cpp ; run policy_eg_1.cpp ; +run policy_eg_10.cpp ; run policy_eg_2.cpp ; run policy_eg_3.cpp ; run policy_eg_4.cpp ; @@ -52,7 +59,6 @@ run policy_eg_6.cpp ; run policy_eg_7.cpp ; run policy_eg_8.cpp ; run policy_eg_9.cpp ; -run policy_eg_10.cpp ; run policy_ref_snip1.cpp ; run policy_ref_snip10.cpp ; run policy_ref_snip11.cpp ; @@ -66,7 +72,6 @@ run policy_ref_snip6.cpp ; run policy_ref_snip7.cpp ; run policy_ref_snip8.cpp ; run policy_ref_snip9.cpp ; -#run statistics_functions_example1.cpp ; run students_t_example1.cpp ; run students_t_example2.cpp ; run students_t_example3.cpp ; @@ -76,4 +81,3 @@ run students_t_two_samples.cpp ; - diff --git a/example/students_t_example2.cpp b/example/students_t_example2.cpp index 4ae727a4e..bbd423162 100644 --- a/example/students_t_example2.cpp +++ b/example/students_t_example2.cpp @@ -59,7 +59,7 @@ double data [values] = {25.06, 25.18, 24.87, 25.51, 25.34, 25.41}; int main() { cout << "Example2 using Student's t function. "; -#if defined(__FILE__) && defined(__TIMESTAMP__) +#if defined(__FILE__) && defined(__TIMESTAMP__) && defined(_MSC_FULL_VER) cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER; #endif cout << endl; @@ -123,3 +123,4 @@ students_t_example2 - 0 error(s), 0 warning(s) + diff --git a/example/students_t_single_sample.cpp b/example/students_t_single_sample.cpp index 101835ae4..3daa6b79a 100644 --- a/example/students_t_single_sample.cpp +++ b/example/students_t_single_sample.cpp @@ -196,7 +196,7 @@ void single_sample_find_df(double M, double Sm, double Sd) // // Now print out the data for the table rows. // - for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) + for(unsigned i = 1; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); @@ -408,7 +408,6 @@ Confidence Estimated Estimated Value (%) Sample Size Sample Size (one sided test) (two sided test) _______________________________________________________________ - 50.000 2 2 75.000 3 4 90.000 7 9 95.000 11 13 diff --git a/tools/ntl_rr_digamma.hpp b/tools/ntl_rr_digamma.hpp deleted file mode 100644 index faf859210..000000000 --- a/tools/ntl_rr_digamma.hpp +++ /dev/null @@ -1,292 +0,0 @@ -// (C) Copyright John Maddock 2006. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MATH_NTL_DIGAMMA -#define BOOST_MATH_NTL_DIGAMMA - -#include -#include -#include -#include - -namespace boost{ namespace math{ - -boost::math::ntl::RR digamma_imp(boost::math::ntl::RR x) -{ - static const boost::math::ntl::RR P[61] = { - boost::lexical_cast("0.6660133691143982067148122682345055274952e81"), - boost::lexical_cast("0.6365271516829242456324234577164675383137e81"), - boost::lexical_cast("0.2991038873096202943405966144203628966976e81"), - boost::lexical_cast("0.9211116495503170498076013367421231351115e80"), - boost::lexical_cast("0.2090792764676090716286400360584443891749e80"), - boost::lexical_cast("0.3730037777359591428226035156377978092809e79"), - boost::lexical_cast("0.5446396536956682043376492370432031543834e78"), - boost::lexical_cast("0.6692523966335177847425047827449069256345e77"), - boost::lexical_cast("0.7062543624100864681625612653756619116848e76"), - boost::lexical_cast("0.6499914905966283735005256964443226879158e75"), - boost::lexical_cast("0.5280364564853225211197557708655426736091e74"), - boost::lexical_cast("0.3823205608981176913075543599005095206953e73"), - boost::lexical_cast("0.2486733714214237704739129972671154532415e72"), - boost::lexical_cast("0.1462562139602039577983434547171318011675e71"), - boost::lexical_cast("0.7821169065036815012381267259559910324285e69"), - boost::lexical_cast("0.3820552182348155468636157988764435365078e68"), - boost::lexical_cast("0.1711618296983598244658239925535632505062e67"), - boost::lexical_cast("0.7056661618357643731419080738521475204245e65"), - boost::lexical_cast("0.2685246896473614017356264531791459936036e64"), - boost::lexical_cast("0.9455168125599643085283071944864977592391e62"), - boost::lexical_cast("0.3087541626972538362237309145177486236219e61"), - boost::lexical_cast("0.9367928873352980208052601301625005737407e59"), - boost::lexical_cast("0.2645306130689794942883818547314327466007e58"), - boost::lexical_cast("0.6961815141171454309161007351079576190079e56"), - boost::lexical_cast("0.1709637824471794552313802669803885946843e55"), - boost::lexical_cast("0.3921553258481531526663112728778759311158e53"), - boost::lexical_cast("0.8409006354449988687714450897575728228696e51"), - boost::lexical_cast("0.1686755204461325935742097669030363344927e50"), - boost::lexical_cast("0.3166653542877070999007425197729038754254e48"), - boost::lexical_cast("0.5566029092358215049069560272835654229637e46"), - boost::lexical_cast("0.9161766287916328133080586672953875116242e44"), - boost::lexical_cast("1412317772330871298317974693514430627922000"), - boost::lexical_cast("20387991986727877473732570146112459874790"), - boost::lexical_cast("275557928713904105182512535678580359839.3"), - boost::lexical_cast("3485719851040516559072031256589598330.723"), - boost::lexical_cast("41247046743564028399938106707656877.40859"), - boost::lexical_cast("456274078125709314602601667471879.0147312"), - boost::lexical_cast("4714450683242899367025707077155.310613012"), - boost::lexical_cast("45453933537925041680009544258.75073849996"), - boost::lexical_cast("408437900487067278846361972.302331241052"), - boost::lexical_cast("3415719344386166273085838.705771571751035"), - boost::lexical_cast("26541502879185876562320.93134691487351145"), - boost::lexical_cast("191261415065918713661.1571433274648417668"), - boost::lexical_cast("1275349770108718421.645275944284937551702"), - boost::lexical_cast("7849171120971773.318910987434906905704272"), - boost::lexical_cast("44455946386549.80866460312682983576538056"), - boost::lexical_cast("230920362395.3198137186361608905136598046"), - boost::lexical_cast("1095700096.240863858624279930600654130254"), - boost::lexical_cast("4727085.467506050153744334085516289728134"), - boost::lexical_cast("18440.75118859447173303252421991479005424"), - boost::lexical_cast("64.62515887799460295677071749181651317052"), - boost::lexical_cast("0.201851568864688406206528472883512147547"), - boost::lexical_cast("0.0005565091674187978029138500039504078098143"), - boost::lexical_cast("0.1338097668312907986354698683493366559613e-5"), - boost::lexical_cast("0.276308225077464312820179030238305271638e-8"), - boost::lexical_cast("0.4801582970473168520375942100071070575043e-11"), - boost::lexical_cast("0.6829184144212920949740376186058541800175e-14"), - boost::lexical_cast("0.7634080076358511276617829524639455399182e-17"), - boost::lexical_cast("0.6290035083727140966418512608156646142409e-20"), - boost::lexical_cast("0.339652245667538733044036638506893821352e-23"), - boost::lexical_cast("0.9017518064256388530773585529891677854909e-27") - }; - static const boost::math::ntl::RR Q[61] = { - boost::lexical_cast("0"), - boost::lexical_cast("0.1386831185456898357379390197203894063459e81"), - boost::lexical_cast("0.6467076379487574703291056110838151259438e81"), - boost::lexical_cast("0.1394967823848615838336194279565285465161e82"), - boost::lexical_cast("0.1872927317344192945218570366455046340458e82"), - boost::lexical_cast("0.1772461045338946243584650759986310355937e82"), - boost::lexical_cast("0.1267294892200258648315971144069595555118e82"), - boost::lexical_cast("0.7157764838362416821508872117623058626589e81"), - boost::lexical_cast("0.329447266909948668265277828268378274513e81"), - boost::lexical_cast("0.1264376077317689779509250183194342571207e81"), - boost::lexical_cast("0.4118230304191980787640446056583623228873e80"), - boost::lexical_cast("0.1154393529762694616405952270558316515261e80"), - boost::lexical_cast("0.281655612889423906125295485693696744275e79"), - boost::lexical_cast("0.6037483524928743102724159846414025482077e78"), - boost::lexical_cast("0.1145927995397835468123576831800276999614e78"), - boost::lexical_cast("0.1938624296151985600348534009382865995154e77"), - boost::lexical_cast("0.293980925856227626211879961219188406675e76"), - boost::lexical_cast("0.4015574518216966910319562902099567437832e75"), - boost::lexical_cast("0.4961475457509727343545565970423431880907e74"), - boost::lexical_cast("0.5565482348278933960215521991000378896338e73"), - boost::lexical_cast("0.5686112924615820754631098622770303094938e72"), - boost::lexical_cast("0.5305988545844796293285410303747469932856e71"), - boost::lexical_cast("0.4533363413802585060568537458067343491358e70"), - boost::lexical_cast("0.3553932059473516064068322757331575565718e69"), - boost::lexical_cast("0.2561198565218704414618802902533972354203e68"), - boost::lexical_cast("0.1699519313292900324098102065697454295572e67"), - boost::lexical_cast("0.1039830160862334505389615281373574959236e66"), - boost::lexical_cast("0.5873082967977428281000961954715372504986e64"), - boost::lexical_cast("0.3065255179030575882202133042549783442446e63"), - boost::lexical_cast("0.1479494813481364701208655943688307245459e62"), - boost::lexical_cast("0.6608150467921598615495180659808895663164e60"), - boost::lexical_cast("0.2732535313770902021791888953487787496976e59"), - boost::lexical_cast("0.1046402297662493314531194338414508049069e58"), - boost::lexical_cast("0.3711375077192882936085049147920021549622e56"), - boost::lexical_cast("0.1219154482883895482637944309702972234576e55"), - boost::lexical_cast("0.3708359374149458741391374452286837880162e53"), - boost::lexical_cast("0.1044095509971707189716913168889769471468e52"), - boost::lexical_cast("0.271951506225063286130946773813524945052e50"), - boost::lexical_cast("0.6548016291215163843464133978454065823866e48"), - boost::lexical_cast("0.1456062447610542135403751730809295219344e47"), - boost::lexical_cast("0.2986690175077969760978388356833006028929e45"), - boost::lexical_cast("5643149706574013350061247429006443326844000"), - boost::lexical_cast("98047545414467090421964387960743688053480"), - boost::lexical_cast("1563378767746846395507385099301468978550"), - boost::lexical_cast("22823360528584500077862274918382796495"), - boost::lexical_cast("304215527004115213046601295970388750"), - boost::lexical_cast("3690289075895685793844344966820325"), - boost::lexical_cast("40584512015702371433911456606050"), - boost::lexical_cast("402834190897282802772754873905"), - boost::lexical_cast("3589522158493606918146495750"), - boost::lexical_cast("28530557707503483723634725"), - boost::lexical_cast("200714561335055753000730"), - boost::lexical_cast("1237953783437761888641"), - boost::lexical_cast("6614698701445762950"), - boost::lexical_cast("30155495647727505"), - boost::lexical_cast("114953256021450"), - boost::lexical_cast("356398020013"), - boost::lexical_cast("863113950"), - boost::lexical_cast("1531345"), - boost::lexical_cast("1770"), - boost::lexical_cast("1") - }; - static const boost::math::ntl::RR PD[60] = { - boost::lexical_cast("0.6365271516829242456324234577164675383137e81"), - 2*boost::lexical_cast("0.2991038873096202943405966144203628966976e81"), - 3*boost::lexical_cast("0.9211116495503170498076013367421231351115e80"), - 4*boost::lexical_cast("0.2090792764676090716286400360584443891749e80"), - 5*boost::lexical_cast("0.3730037777359591428226035156377978092809e79"), - 6*boost::lexical_cast("0.5446396536956682043376492370432031543834e78"), - 7*boost::lexical_cast("0.6692523966335177847425047827449069256345e77"), - 8*boost::lexical_cast("0.7062543624100864681625612653756619116848e76"), - 9*boost::lexical_cast("0.6499914905966283735005256964443226879158e75"), - 10*boost::lexical_cast("0.5280364564853225211197557708655426736091e74"), - 11*boost::lexical_cast("0.3823205608981176913075543599005095206953e73"), - 12*boost::lexical_cast("0.2486733714214237704739129972671154532415e72"), - 13*boost::lexical_cast("0.1462562139602039577983434547171318011675e71"), - 14*boost::lexical_cast("0.7821169065036815012381267259559910324285e69"), - 15*boost::lexical_cast("0.3820552182348155468636157988764435365078e68"), - 16*boost::lexical_cast("0.1711618296983598244658239925535632505062e67"), - 17*boost::lexical_cast("0.7056661618357643731419080738521475204245e65"), - 18*boost::lexical_cast("0.2685246896473614017356264531791459936036e64"), - 19*boost::lexical_cast("0.9455168125599643085283071944864977592391e62"), - 20*boost::lexical_cast("0.3087541626972538362237309145177486236219e61"), - 21*boost::lexical_cast("0.9367928873352980208052601301625005737407e59"), - 22*boost::lexical_cast("0.2645306130689794942883818547314327466007e58"), - 23*boost::lexical_cast("0.6961815141171454309161007351079576190079e56"), - 24*boost::lexical_cast("0.1709637824471794552313802669803885946843e55"), - 25*boost::lexical_cast("0.3921553258481531526663112728778759311158e53"), - 26*boost::lexical_cast("0.8409006354449988687714450897575728228696e51"), - 27*boost::lexical_cast("0.1686755204461325935742097669030363344927e50"), - 28*boost::lexical_cast("0.3166653542877070999007425197729038754254e48"), - 29*boost::lexical_cast("0.5566029092358215049069560272835654229637e46"), - 30*boost::lexical_cast("0.9161766287916328133080586672953875116242e44"), - 31*boost::lexical_cast("1412317772330871298317974693514430627922000"), - 32*boost::lexical_cast("20387991986727877473732570146112459874790"), - 33*boost::lexical_cast("275557928713904105182512535678580359839.3"), - 34*boost::lexical_cast("3485719851040516559072031256589598330.723"), - 35*boost::lexical_cast("41247046743564028399938106707656877.40859"), - 36*boost::lexical_cast("456274078125709314602601667471879.0147312"), - 37*boost::lexical_cast("4714450683242899367025707077155.310613012"), - 38*boost::lexical_cast("45453933537925041680009544258.75073849996"), - 39*boost::lexical_cast("408437900487067278846361972.302331241052"), - 40*boost::lexical_cast("3415719344386166273085838.705771571751035"), - 41*boost::lexical_cast("26541502879185876562320.93134691487351145"), - 42*boost::lexical_cast("191261415065918713661.1571433274648417668"), - 43*boost::lexical_cast("1275349770108718421.645275944284937551702"), - 44*boost::lexical_cast("7849171120971773.318910987434906905704272"), - 45*boost::lexical_cast("44455946386549.80866460312682983576538056"), - 46*boost::lexical_cast("230920362395.3198137186361608905136598046"), - 47*boost::lexical_cast("1095700096.240863858624279930600654130254"), - 48*boost::lexical_cast("4727085.467506050153744334085516289728134"), - 49*boost::lexical_cast("18440.75118859447173303252421991479005424"), - 50*boost::lexical_cast("64.62515887799460295677071749181651317052"), - 51*boost::lexical_cast("0.201851568864688406206528472883512147547"), - 52*boost::lexical_cast("0.0005565091674187978029138500039504078098143"), - 53*boost::lexical_cast("0.1338097668312907986354698683493366559613e-5"), - 54*boost::lexical_cast("0.276308225077464312820179030238305271638e-8"), - 55*boost::lexical_cast("0.4801582970473168520375942100071070575043e-11"), - 56*boost::lexical_cast("0.6829184144212920949740376186058541800175e-14"), - 57*boost::lexical_cast("0.7634080076358511276617829524639455399182e-17"), - 58*boost::lexical_cast("0.6290035083727140966418512608156646142409e-20"), - 59*boost::lexical_cast("0.339652245667538733044036638506893821352e-23"), - 60*boost::lexical_cast("0.9017518064256388530773585529891677854909e-27") - }; - static const boost::math::ntl::RR QD[60] = { - boost::lexical_cast("0.1386831185456898357379390197203894063459e81"), - 2*boost::lexical_cast("0.6467076379487574703291056110838151259438e81"), - 3*boost::lexical_cast("0.1394967823848615838336194279565285465161e82"), - 4*boost::lexical_cast("0.1872927317344192945218570366455046340458e82"), - 5*boost::lexical_cast("0.1772461045338946243584650759986310355937e82"), - 6*boost::lexical_cast("0.1267294892200258648315971144069595555118e82"), - 7*boost::lexical_cast("0.7157764838362416821508872117623058626589e81"), - 8*boost::lexical_cast("0.329447266909948668265277828268378274513e81"), - 9*boost::lexical_cast("0.1264376077317689779509250183194342571207e81"), - 10*boost::lexical_cast("0.4118230304191980787640446056583623228873e80"), - 11*boost::lexical_cast("0.1154393529762694616405952270558316515261e80"), - 12*boost::lexical_cast("0.281655612889423906125295485693696744275e79"), - 13*boost::lexical_cast("0.6037483524928743102724159846414025482077e78"), - 14*boost::lexical_cast("0.1145927995397835468123576831800276999614e78"), - 15*boost::lexical_cast("0.1938624296151985600348534009382865995154e77"), - 16*boost::lexical_cast("0.293980925856227626211879961219188406675e76"), - 17*boost::lexical_cast("0.4015574518216966910319562902099567437832e75"), - 18*boost::lexical_cast("0.4961475457509727343545565970423431880907e74"), - 19*boost::lexical_cast("0.5565482348278933960215521991000378896338e73"), - 20*boost::lexical_cast("0.5686112924615820754631098622770303094938e72"), - 21*boost::lexical_cast("0.5305988545844796293285410303747469932856e71"), - 22*boost::lexical_cast("0.4533363413802585060568537458067343491358e70"), - 23*boost::lexical_cast("0.3553932059473516064068322757331575565718e69"), - 24*boost::lexical_cast("0.2561198565218704414618802902533972354203e68"), - 25*boost::lexical_cast("0.1699519313292900324098102065697454295572e67"), - 26*boost::lexical_cast("0.1039830160862334505389615281373574959236e66"), - 27*boost::lexical_cast("0.5873082967977428281000961954715372504986e64"), - 28*boost::lexical_cast("0.3065255179030575882202133042549783442446e63"), - 29*boost::lexical_cast("0.1479494813481364701208655943688307245459e62"), - 30*boost::lexical_cast("0.6608150467921598615495180659808895663164e60"), - 31*boost::lexical_cast("0.2732535313770902021791888953487787496976e59"), - 32*boost::lexical_cast("0.1046402297662493314531194338414508049069e58"), - 33*boost::lexical_cast("0.3711375077192882936085049147920021549622e56"), - 34*boost::lexical_cast("0.1219154482883895482637944309702972234576e55"), - 35*boost::lexical_cast("0.3708359374149458741391374452286837880162e53"), - 36*boost::lexical_cast("0.1044095509971707189716913168889769471468e52"), - 37*boost::lexical_cast("0.271951506225063286130946773813524945052e50"), - 38*boost::lexical_cast("0.6548016291215163843464133978454065823866e48"), - 39*boost::lexical_cast("0.1456062447610542135403751730809295219344e47"), - 40*boost::lexical_cast("0.2986690175077969760978388356833006028929e45"), - 41*boost::lexical_cast("5643149706574013350061247429006443326844000"), - 42*boost::lexical_cast("98047545414467090421964387960743688053480"), - 43*boost::lexical_cast("1563378767746846395507385099301468978550"), - 44*boost::lexical_cast("22823360528584500077862274918382796495"), - 45*boost::lexical_cast("304215527004115213046601295970388750"), - 46*boost::lexical_cast("3690289075895685793844344966820325"), - 47*boost::lexical_cast("40584512015702371433911456606050"), - 48*boost::lexical_cast("402834190897282802772754873905"), - 49*boost::lexical_cast("3589522158493606918146495750"), - 50*boost::lexical_cast("28530557707503483723634725"), - 51*boost::lexical_cast("200714561335055753000730"), - 52*boost::lexical_cast("1237953783437761888641"), - 53*boost::lexical_cast("6614698701445762950"), - 54*boost::lexical_cast("30155495647727505"), - 55*boost::lexical_cast("114953256021450"), - 56*boost::lexical_cast("356398020013"), - 57*boost::lexical_cast("863113950"), - 58*boost::lexical_cast("1531345"), - 59*boost::lexical_cast("1770"), - 60*boost::lexical_cast("1") - }; - static const double g = 63.192152; - - boost::math::ntl::RR zgh = x + g - 0.5; - - boost::math::ntl::RR result = (x - 0.5) / zgh; - result += log(zgh); - result += tools::evaluate_polynomial(PD, x) / tools::evaluate_polynomial(P, x); - result -= tools::evaluate_polynomial(QD, x) / tools::evaluate_polynomial(Q, x); - result -= 1; - - return result; -} - -boost::math::ntl::RR digamma(boost::math::ntl::RR x) -{ - if(x < 0) - { - return digamma_imp(1-x) + constants::pi() / tan(constants::pi() * (1-x)); - } - return digamma_imp(x); -} - -}} - -#endif // include guard diff --git a/tools/ntl_rr_lanczos.hpp b/tools/ntl_rr_lanczos.hpp deleted file mode 100644 index 750d87c22..000000000 --- a/tools/ntl_rr_lanczos.hpp +++ /dev/null @@ -1,902 +0,0 @@ -// (C) Copyright John Maddock 2006. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_LARGE_LANCZOS_HPP -#define BOOST_LARGE_LANCZOS_HPP - -#include -#include -#include - -struct lanczos13UDT -{ - template - static T lanczos_sum(const T& z) - { - static const T num[13] = { - boost::lexical_cast("44012138428004.60895436261759919070125699"), - boost::lexical_cast("41590453358593.20051581730723108131357995"), - boost::lexical_cast("18013842787117.99677796276038389462742949"), - boost::lexical_cast("4728736263475.388896889723995205703970787"), - boost::lexical_cast("837910083628.4046470415724300225777912264"), - boost::lexical_cast("105583707273.4299344907359855510105321192"), - boost::lexical_cast("9701363618.494999493386608345339104922694"), - boost::lexical_cast("654914397.5482052641016767125048538245644"), - boost::lexical_cast("32238322.94213356530668889463945849409184"), - boost::lexical_cast("1128514.219497091438040721811544858643121"), - boost::lexical_cast("26665.79378459858944762533958798805525125"), - boost::lexical_cast("381.8801248632926870394389468349331394196"), - boost::lexical_cast("2.506628274631000502415763426076722427007"), - }; - static const boost::uint32_t denom[13] = { - static_cast(0u), - static_cast(39916800u), - static_cast(120543840u), - static_cast(150917976u), - static_cast(105258076u), - static_cast(45995730u), - static_cast(13339535u), - static_cast(2637558u), - static_cast(357423u), - static_cast(32670u), - static_cast(1925u), - static_cast(66u), - static_cast(1u), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 13); - } - - template - static T lanczos_sum_expG_scaled(const T& z) - { - static const T num[13] = { - boost::lexical_cast("86091529.53418537217994842267760536134841"), - boost::lexical_cast("81354505.17858011242874285785316135398567"), - boost::lexical_cast("35236626.38815461910817650960734605416521"), - boost::lexical_cast("9249814.988024471294683815872977672237195"), - boost::lexical_cast("1639024.216687146960253839656643518985826"), - boost::lexical_cast("206530.8157641225032631778026076868855623"), - boost::lexical_cast("18976.70193530288915698282139308582105936"), - boost::lexical_cast("1281.068909912559479885759622791374106059"), - boost::lexical_cast("63.06093343420234536146194868906771599354"), - boost::lexical_cast("2.207470909792527638222674678171050209691"), - boost::lexical_cast("0.05216058694613505427476207805814960742102"), - boost::lexical_cast("0.0007469903808915448316510079585999893674101"), - boost::lexical_cast("0.4903180573459871862552197089738373164184e-5"), - }; - static const boost::uint32_t denom[13] = { - static_cast(0u), - static_cast(39916800u), - static_cast(120543840u), - static_cast(150917976u), - static_cast(105258076u), - static_cast(45995730u), - static_cast(13339535u), - static_cast(2637558u), - static_cast(357423u), - static_cast(32670u), - static_cast(1925u), - static_cast(66u), - static_cast(1u), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 13); - } - - - template - static T lanczos_sum_near_1(const T& dz) - { - static const T d[12] = { - boost::lexical_cast("4.832115561461656947793029596285626840312"), - boost::lexical_cast("-19.86441536140337740383120735104359034688"), - boost::lexical_cast("33.9927422807443239927197864963170585331"), - boost::lexical_cast("-31.41520692249765980987427413991250886138"), - boost::lexical_cast("17.0270866009599345679868972409543597821"), - boost::lexical_cast("-5.5077216950865501362506920516723682167"), - boost::lexical_cast("1.037811741948214855286817963800439373362"), - boost::lexical_cast("-0.106640468537356182313660880481398642811"), - boost::lexical_cast("0.005276450526660653288757565778182586742831"), - boost::lexical_cast("-0.0001000935625597121545867453746252064770029"), - boost::lexical_cast("0.462590910138598083940803704521211569234e-6"), - boost::lexical_cast("-0.1735307814426389420248044907765671743012e-9"), - }; - T result = 0; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(k*dz + k*k); - } - return result; - } - - template - static T lanczos_sum_near_2(const T& dz) - { - static const T d[12] = { - boost::lexical_cast("26.96979819614830698367887026728396466395"), - boost::lexical_cast("-110.8705424709385114023884328797900204863"), - boost::lexical_cast("189.7258846119231466417015694690434770085"), - boost::lexical_cast("-175.3397202971107486383321670769397356553"), - boost::lexical_cast("95.03437648691551457087250340903980824948"), - boost::lexical_cast("-30.7406022781665264273675797983497141978"), - boost::lexical_cast("5.792405601630517993355102578874590410552"), - boost::lexical_cast("-0.5951993240669148697377539518639997795831"), - boost::lexical_cast("0.02944979359164017509944724739946255067671"), - boost::lexical_cast("-0.0005586586555377030921194246330399163602684"), - boost::lexical_cast("0.2581888478270733025288922038673392636029e-5"), - boost::lexical_cast("-0.9685385411006641478305219367315965391289e-9"), - }; - T result = 0; - T z = dz + 2; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(z + k*z + k*k - 1); - } - return result; - } - - static double g(){ return 13.1445650000000000545696821063756942749; } -}; - - -// -// Lanczos Coefficients for N=22 G=22.61891 -// Max experimental error (with arbitary precision arithmetic) 2.9524e-38 -// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006 -// -struct lanczos22UDT -{ - template - static T lanczos_sum(const T& z) - { - static const T num[22] = { - boost::lexical_cast("46198410803245094237463011094.12173081986"), - boost::lexical_cast("43735859291852324413622037436.321513777"), - boost::lexical_cast("19716607234435171720534556386.97481377748"), - boost::lexical_cast("5629401471315018442177955161.245623932129"), - boost::lexical_cast("1142024910634417138386281569.245580222392"), - boost::lexical_cast("175048529315951173131586747.695329230778"), - boost::lexical_cast("21044290245653709191654675.41581372963167"), - boost::lexical_cast("2033001410561031998451380.335553678782601"), - boost::lexical_cast("160394318862140953773928.8736211601848891"), - boost::lexical_cast("10444944438396359705707.48957290388740896"), - boost::lexical_cast("565075825801617290121.1466393747967538948"), - boost::lexical_cast("25475874292116227538.99448534450411942597"), - boost::lexical_cast("957135055846602154.6720835535232270205725"), - boost::lexical_cast("29874506304047462.23662392445173880821515"), - boost::lexical_cast("769651310384737.2749087590725764959689181"), - boost::lexical_cast("16193289100889.15989633624378404096011797"), - boost::lexical_cast("273781151680.6807433264462376754578933261"), - boost::lexical_cast("3630485900.32917021712188739762161583295"), - boost::lexical_cast("36374352.05577334277856865691538582936484"), - boost::lexical_cast("258945.7742115532455441786924971194951043"), - boost::lexical_cast("1167.501919472435718934219997431551246996"), - boost::lexical_cast("2.50662827463100050241576528481104525333"), - }; - static const boost::uint64_t denom[22] = { - (0uLL), - (2432902008176640000uLL), - (8752948036761600000uLL), - (13803759753640704000uLL), - (12870931245150988800uLL), - (8037811822645051776uLL), - (3599979517947607200uLL), - (1206647803780373360uLL), - (311333643161390640uLL), - (63030812099294896uLL), - (10142299865511450uLL), - (1307535010540395uLL), - (135585182899530uLL), - (11310276995381uLL), - (756111184500uLL), - (40171771630uLL), - (1672280820uLL), - (53327946uLL), - (1256850uLL), - (20615uLL), - (210uLL), - (1uLL), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 22); - } - - template - static T lanczos_sum_expG_scaled(const T& z) - { - static const T num[22] = { - boost::lexical_cast("6939996264376682180.277485395074954356211"), - boost::lexical_cast("6570067992110214451.87201438870245659384"), - boost::lexical_cast("2961859037444440551.986724631496417064121"), - boost::lexical_cast("845657339772791245.3541226499766163431651"), - boost::lexical_cast("171556737035449095.2475716923888737881837"), - boost::lexical_cast("26296059072490867.7822441885603400926007"), - boost::lexical_cast("3161305619652108.433798300149816829198706"), - boost::lexical_cast("305400596026022.4774396904484542582526472"), - boost::lexical_cast("24094681058862.55120507202622377623528108"), - boost::lexical_cast("1569055604375.919477574824168939428328839"), - boost::lexical_cast("84886558909.02047889339710230696942513159"), - boost::lexical_cast("3827024985.166751989686050643579753162298"), - boost::lexical_cast("143782298.9273215199098728674282885500522"), - boost::lexical_cast("4487794.24541641841336786238909171265944"), - boost::lexical_cast("115618.2025760830513505888216285273541959"), - boost::lexical_cast("2432.580773108508276957461757328744780439"), - boost::lexical_cast("41.12782532742893597168530008461874360191"), - boost::lexical_cast("0.5453771709477689805460179187388702295792"), - boost::lexical_cast("0.005464211062612080347167337964166505282809"), - boost::lexical_cast("0.388992321263586767037090706042788910953e-4"), - boost::lexical_cast("0.1753839324538447655939518484052327068859e-6"), - boost::lexical_cast("0.3765495513732730583386223384116545391759e-9"), - }; - static const boost::uint64_t denom[22] = { - (0uLL), - (2432902008176640000uLL), - (8752948036761600000uLL), - (13803759753640704000uLL), - (12870931245150988800uLL), - (8037811822645051776uLL), - (3599979517947607200uLL), - (1206647803780373360uLL), - (311333643161390640uLL), - (63030812099294896uLL), - (10142299865511450uLL), - (1307535010540395uLL), - (135585182899530uLL), - (11310276995381uLL), - (756111184500uLL), - (40171771630uLL), - (1672280820uLL), - (53327946uLL), - (1256850uLL), - (20615uLL), - (210uLL), - (1uLL), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 22); - } - - - template - static T lanczos_sum_near_1(const T& dz) - { - static const T d[21] = { - boost::lexical_cast("8.318998691953337183034781139546384476554"), - boost::lexical_cast("-63.15415991415959158214140353299240638675"), - boost::lexical_cast("217.3108224383632868591462242669081540163"), - boost::lexical_cast("-448.5134281386108366899784093610397354889"), - boost::lexical_cast("619.2903759363285456927248474593012711346"), - boost::lexical_cast("-604.1630177420625418522025080080444177046"), - boost::lexical_cast("428.8166750424646119935047118287362193314"), - boost::lexical_cast("-224.6988753721310913866347429589434550302"), - boost::lexical_cast("87.32181627555510833499451817622786940961"), - boost::lexical_cast("-25.07866854821128965662498003029199058098"), - boost::lexical_cast("5.264398125689025351448861011657789005392"), - boost::lexical_cast("-0.792518936256495243383586076579921559914"), - boost::lexical_cast("0.08317448364744713773350272460937904691566"), - boost::lexical_cast("-0.005845345166274053157781068150827567998882"), - boost::lexical_cast("0.0002599412126352082483326238522490030412391"), - boost::lexical_cast("-0.6748102079670763884917431338234783496303e-5"), - boost::lexical_cast("0.908824383434109002762325095643458603605e-7"), - boost::lexical_cast("-0.5299325929309389890892469299969669579725e-9"), - boost::lexical_cast("0.994306085859549890267983602248532869362e-12"), - boost::lexical_cast("-0.3499893692975262747371544905820891835298e-15"), - boost::lexical_cast("0.7260746353663365145454867069182884694961e-20"), - }; - T result = 0; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(k*dz + k*k); - } - return result; - } - - template - static T lanczos_sum_near_2(const T& dz) - { - static const T d[21] = { - boost::lexical_cast("75.39272007105208086018421070699575462226"), - boost::lexical_cast("-572.3481967049935412452681346759966390319"), - boost::lexical_cast("1969.426202741555335078065370698955484358"), - boost::lexical_cast("-4064.74968778032030891520063865996757519"), - boost::lexical_cast("5612.452614138013929794736248384309574814"), - boost::lexical_cast("-5475.357667500026172903620177988213902339"), - boost::lexical_cast("3886.243614216111328329547926490398103492"), - boost::lexical_cast("-2036.382026072125407192448069428134470564"), - boost::lexical_cast("791.3727954936062108045551843636692287652"), - boost::lexical_cast("-227.2808432388436552794021219198885223122"), - boost::lexical_cast("47.70974355562144229897637024320739257284"), - boost::lexical_cast("-7.182373807798293545187073539819697141572"), - boost::lexical_cast("0.7537866989631514559601547530490976100468"), - boost::lexical_cast("-0.05297470142240154822658739758236594717787"), - boost::lexical_cast("0.00235577330936380542539812701472320434133"), - boost::lexical_cast("-0.6115613067659273118098229498679502138802e-4"), - boost::lexical_cast("0.8236417010170941915758315020695551724181e-6"), - boost::lexical_cast("-0.4802628430993048190311242611330072198089e-8"), - boost::lexical_cast("0.9011113376981524418952720279739624707342e-11"), - boost::lexical_cast("-0.3171854152689711198382455703658589996796e-14"), - boost::lexical_cast("0.6580207998808093935798753964580596673177e-19"), - }; - T result = 0; - T z = dz + 2; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(z + k*z + k*k - 1); - } - return result; - } - - static double g(){ return 22.61890999999999962710717227309942245483; } -}; - -// -// Lanczos Coefficients for N=31 G=32.08067 -// Max experimental error (with arbitary precision arithmetic) 0.162e-52 -// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at May 9 2006 -// -struct lanczos31UDT -{ - template - static T lanczos_sum(const T& z) - { - static const T num[31] = { - boost::lexical_cast("0.2579646553333513328235723061836959833277e46"), - boost::lexical_cast("0.2444796504337453845497419271639377138264e46"), - boost::lexical_cast("0.1119885499016017172212179730662673475329e46"), - boost::lexical_cast("0.3301983829072723658949204487793889113715e45"), - boost::lexical_cast("0.7041171040503851585152895336505379417066e44"), - boost::lexical_cast("0.1156687509001223855125097826246939403504e44"), - boost::lexical_cast("1522559363393940883866575697565974893306000"), - boost::lexical_cast("164914363507650839510801418717701057005700"), - boost::lexical_cast("14978522943127593263654178827041568394060"), - boost::lexical_cast("1156707153701375383907746879648168666774"), - boost::lexical_cast("76739431129980851159755403434593664173.2"), - boost::lexical_cast("4407916278928188620282281495575981079.306"), - boost::lexical_cast("220487883931812802092792125175269667.3004"), - boost::lexical_cast("9644828280794966468052381443992828.433924"), - boost::lexical_cast("369996467042247229310044531282837.6549068"), - boost::lexical_cast("12468380890717344610932904378961.13494291"), - boost::lexical_cast("369289245210898235894444657859.0529720075"), - boost::lexical_cast("9607992460262594951559461829.34885209022"), - boost::lexical_cast("219225935074853412540086410.981421315799"), - boost::lexical_cast("4374309943598658046326340.720767382079549"), - boost::lexical_cast("76008779092264509404014.10530947173485581"), - boost::lexical_cast("1143503533822162444712.335663112617754987"), - boost::lexical_cast("14779233719977576920.37884890049671578409"), - boost::lexical_cast("162409028440678302.9992838032166348069916"), - boost::lexical_cast("1496561553388385.733407609544964535634135"), - boost::lexical_cast("11347624460661.81008311053190661436107043"), - boost::lexical_cast("68944915931.32004991941950530448472223832"), - boost::lexical_cast("322701221.6391432296123937035480931903651"), - boost::lexical_cast("1092364.213992634267819050120261755371294"), - boost::lexical_cast("2380.151399852411512711176940867823024864"), - boost::lexical_cast("2.506628274631000502415765284811045253007"), - }; - static const T denom[31] = { - boost::lexical_cast("0"), - boost::lexical_cast("0.8841761993739701954543616e31"), - boost::lexical_cast("0.3502799997985980526649278464e32"), - boost::lexical_cast("0.622621928420356134910574592e32"), - boost::lexical_cast("66951000306085302338993639424000"), - boost::lexical_cast("49361465831621147825759587123200"), - boost::lexical_cast("26751280755793398822580822142976"), - boost::lexical_cast("11139316913434780466101123891200"), - boost::lexical_cast("3674201658710345201899117607040"), - boost::lexical_cast("981347603630155088295475765440"), - boost::lexical_cast("215760462268683520394805979744"), - boost::lexical_cast("39539238727270799376544542000"), - boost::lexical_cast("6097272817323042122728617800"), - boost::lexical_cast("796974693974455191377937300"), - boost::lexical_cast("88776380550648116217781890"), - boost::lexical_cast("8459574446076318147830625"), - boost::lexical_cast("691254538651580660999025"), - boost::lexical_cast("48487623689430693038025"), - boost::lexical_cast("2918939500751087661105"), - boost::lexical_cast("150566737512021319125"), - boost::lexical_cast("6634460278534540725"), - boost::lexical_cast("248526574856284725"), - boost::lexical_cast("7860403394108265"), - boost::lexical_cast("207912996295875"), - boost::lexical_cast("4539323721075"), - boost::lexical_cast("80328850875"), - boost::lexical_cast("1122686019"), - boost::lexical_cast("11921175"), - boost::lexical_cast("90335"), - boost::lexical_cast("435"), - boost::lexical_cast("1"), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 31); - } - - template - static T lanczos_sum_expG_scaled(const T& z) - { - static const T num[31] = { - boost::lexical_cast("30137154810677525966583148469478.52374216"), - boost::lexical_cast("28561746428637727032849890123131.36314653"), - boost::lexical_cast("13083250730789213354063781611435.74046294"), - boost::lexical_cast("3857598154697777600846539129354.783647"), - boost::lexical_cast("822596651552555685068015316144.0952185852"), - boost::lexical_cast("135131964033213842052904200372.039133532"), - boost::lexical_cast("17787555889683709693655685146.19771358863"), - boost::lexical_cast("1926639793777927562221423874.149673297196"), - boost::lexical_cast("174989113988888477076973808.6991839697774"), - boost::lexical_cast("13513425905835560387095425.01158383184045"), - boost::lexical_cast("896521313378762433091075.1446749283094845"), - boost::lexical_cast("51496223433749515758124.71524415105430686"), - boost::lexical_cast("2575886794780078381228.37205955912263407"), - boost::lexical_cast("112677328855422964200.4155776009524490958"), - boost::lexical_cast("4322545967487943330.625233358130724324796"), - boost::lexical_cast("145663957202380774.0362027607207590519723"), - boost::lexical_cast("4314283729473470.686566233465428332496534"), - boost::lexical_cast("112246988185485.8877916434026906290603878"), - boost::lexical_cast("2561143864972.040563435178307062626388193"), - boost::lexical_cast("51103611767.9626550674442537989885239605"), - boost::lexical_cast("887985348.0369447209508500133077232094491"), - boost::lexical_cast("13359172.3954672607019822025834072685839"), - boost::lexical_cast("172660.8841147568768783928167105965064459"), - boost::lexical_cast("1897.370795407433013556725714874693719617"), - boost::lexical_cast("17.48383210090980598861217644749573257178"), - boost::lexical_cast("0.1325705316732132940835251054350153028901"), - boost::lexical_cast("0.0008054605783673449641889260501816356090452"), - boost::lexical_cast("0.377001130700104515644336869896819162464e-5"), - boost::lexical_cast("0.1276172868883867038813825443204454996531e-7"), - boost::lexical_cast("0.2780651912081116274907381023821492811093e-10"), - boost::lexical_cast("0.2928410648650955854121639682890739211234e-13"), - }; - static const T denom[31] = { - boost::lexical_cast("0"), - boost::lexical_cast("0.8841761993739701954543616e31"), - boost::lexical_cast("0.3502799997985980526649278464e32"), - boost::lexical_cast("0.622621928420356134910574592e32"), - boost::lexical_cast("66951000306085302338993639424000"), - boost::lexical_cast("49361465831621147825759587123200"), - boost::lexical_cast("26751280755793398822580822142976"), - boost::lexical_cast("11139316913434780466101123891200"), - boost::lexical_cast("3674201658710345201899117607040"), - boost::lexical_cast("981347603630155088295475765440"), - boost::lexical_cast("215760462268683520394805979744"), - boost::lexical_cast("39539238727270799376544542000"), - boost::lexical_cast("6097272817323042122728617800"), - boost::lexical_cast("796974693974455191377937300"), - boost::lexical_cast("88776380550648116217781890"), - boost::lexical_cast("8459574446076318147830625"), - boost::lexical_cast("691254538651580660999025"), - boost::lexical_cast("48487623689430693038025"), - boost::lexical_cast("2918939500751087661105"), - boost::lexical_cast("150566737512021319125"), - boost::lexical_cast("6634460278534540725"), - boost::lexical_cast("248526574856284725"), - boost::lexical_cast("7860403394108265"), - boost::lexical_cast("207912996295875"), - boost::lexical_cast("4539323721075"), - boost::lexical_cast("80328850875"), - boost::lexical_cast("1122686019"), - boost::lexical_cast("11921175"), - boost::lexical_cast("90335"), - boost::lexical_cast("435"), - boost::lexical_cast("1"), - }; - return boost::math::tools::evaluate_rational(num, denom, z, 31); - } - - - template - static T lanczos_sum_near_1(const T& dz) - { - static const T d[30] = { - boost::lexical_cast("11.80038544942943603508206880307972596807"), - boost::lexical_cast("-130.6355975335626214564236363322099481079"), - boost::lexical_cast("676.2177719145993049893392276809256538927"), - boost::lexical_cast("-2174.724497783850503069990936574060452057"), - boost::lexical_cast("4869.877180638131076410069103742986502022"), - boost::lexical_cast("-8065.744271864238179992762265472478229172"), - boost::lexical_cast("10245.03825618572106228191509520638651539"), - boost::lexical_cast("-10212.83902362683215459850403668669647192"), - boost::lexical_cast("8110.289185383288952562767679576754140336"), - boost::lexical_cast("-5179.310892558291062401828964000776095156"), - boost::lexical_cast("2673.987492589052370230989109591011091273"), - boost::lexical_cast("-1118.342574651205183051884250033505609141"), - boost::lexical_cast("378.5812742511620662650096436471920295596"), - boost::lexical_cast("-103.3725999812126067084828735543906768961"), - boost::lexical_cast("22.62913974335996321848099677797888917792"), - boost::lexical_cast("-3.936414819950859548507275533569588041446"), - boost::lexical_cast("0.5376818198843817355682124535902641644854"), - boost::lexical_cast("-0.0567827903603478957483409124122554243201"), - boost::lexical_cast("0.004545544993648879420352693271088478106482"), - boost::lexical_cast("-0.0002689795568951033950042375135970897959935"), - boost::lexical_cast("0.1139493459006846530734617710847103572122e-4"), - boost::lexical_cast("-0.3316581197839213921885210451302820192794e-6"), - boost::lexical_cast("0.6285613334898374028443777562554713906213e-8"), - boost::lexical_cast("-0.7222145115734409070310317999856424167091e-10"), - boost::lexical_cast("0.4562976983547274766890241815002584238219e-12"), - boost::lexical_cast("-0.1380593023819058919640038942493212141072e-14"), - boost::lexical_cast("0.1629663871586410129307496385264268190679e-17"), - boost::lexical_cast("-0.5429994291916548849493889660077076739993e-21"), - boost::lexical_cast("0.2922682842441892106795386303084661338957e-25"), - boost::lexical_cast("-0.8456967065309046044689041041336866118459e-31"), - }; - T result = 0; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(k*dz + k*k); - } - return result; - } - - template - static T lanczos_sum_near_2(const T& dz) - { - static const T d[30] = { - boost::lexical_cast("147.9979641587472136175636384176549713358"), - boost::lexical_cast("-1638.404318611773924210055619836375434296"), - boost::lexical_cast("8480.981744216135641122944743711911653273"), - boost::lexical_cast("-27274.93942104458448200467097634494071176"), - boost::lexical_cast("61076.98019918759324489193232276937262854"), - boost::lexical_cast("-101158.8762737154296509560513952101409264"), - boost::lexical_cast("128491.1252383947174824913796141607174379"), - boost::lexical_cast("-128087.2892038336581928787480535905496026"), - boost::lexical_cast("101717.5492545853663296795562084430123258"), - boost::lexical_cast("-64957.8330410311808907869707511362206858"), - boost::lexical_cast("33536.59139229792478811870738772305570317"), - boost::lexical_cast("-14026.01847115365926835980820243003785821"), - boost::lexical_cast("4748.087094096186515212209389240715050212"), - boost::lexical_cast("-1296.477510211815971152205100242259733245"), - boost::lexical_cast("283.8099337545793198947620951499958085157"), - boost::lexical_cast("-49.36969067101255103452092297769364837753"), - boost::lexical_cast("6.743492833270653628580811118017061581404"), - boost::lexical_cast("-0.7121578704864048548351804794951487823626"), - boost::lexical_cast("0.0570092738016915476694118877057948681298"), - boost::lexical_cast("-0.003373485297696102660302960722607722438643"), - boost::lexical_cast("0.0001429128843527532859999752593761934089751"), - boost::lexical_cast("-0.41595867130858508233493767243236888636e-5"), - boost::lexical_cast("0.7883284669307241040059778207492255409785e-7"), - boost::lexical_cast("-0.905786322462384670803148223703187214379e-9"), - boost::lexical_cast("0.5722790216999820323272452464661250331451e-11"), - boost::lexical_cast("-0.1731510870832349779315841757234562309727e-13"), - boost::lexical_cast("0.2043890314358438601429048378015983874378e-16"), - boost::lexical_cast("-0.6810185176079344204740000170500311171065e-20"), - boost::lexical_cast("0.3665567641131713928114853776588342403919e-24"), - boost::lexical_cast("-0.1060655106553177007425710511436497259484e-29"), - }; - T result = 0; - T z = dz + 2; - for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(z + k*z + k*k - 1); - } - return result; - } - - static double g(){ return 32.08066999999999779902282170951366424561; } -}; - -// -// Lanczos Coefficients for N=61 G=63.192152 -// Max experimental error (with 1000-bit precision arithmetic) 3.740e-113 -// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 12 2006 -// -struct lanczos61UDT -{ - template - static T lanczos_sum(const T& z) - { - using namespace boost; - static const T d[61] = { - boost::lexical_cast("2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659584"), - boost::lexical_cast("13349415823254323512107320481.3495396037261649201426994438803767191136434970492309775123879"), - boost::lexical_cast("-300542621510568204264185787475.230003734889859348050696493467253861933279360152095861484548"), - boost::lexical_cast("3273919938390136737194044982676.40271056035622723775417608127544182097346526115858803376474"), - boost::lexical_cast("-22989594065095806099337396006399.5874206181563663855129141706748733174902067950115092492439"), - boost::lexical_cast("116970582893952893160414263796102.542775878583510989850142808618916073286745084692189044738"), - boost::lexical_cast("-459561969036479455224850813196807.283291532483532558959779434457349912822256480548436066098"), - boost::lexical_cast("1450959909778264914956547227964788.89797179379520834974601372820249784303794436366366810477"), - boost::lexical_cast("-3782846865486775046285288437885921.41537699732805465141128848354901016102326190612528503251"), - boost::lexical_cast("8305043213936355459145388670886540.09976337905520168067329932809302445437208115570138102767"), - boost::lexical_cast("-15580988484396722546934484726970745.4927787160273626078250810989811865283255762028143642311"), - boost::lexical_cast("25262722284076250779006793435537600.0822901485517345545978818780090308947301031347345640449"), - boost::lexical_cast("-35714428027687018805443603728757116.5304655170478705341887572982734901197345415291580897698"), - boost::lexical_cast("44334726194692443174715432419157343.2294160783772787096321009453791271387235388689346602833"), - boost::lexical_cast("-48599573547617297831555162417695106.187829304963846482633791012658974681648157963911491985"), - boost::lexical_cast("47258466493366798944386359199482189.0753349196625125615316002614813737880755896979754845101"), - boost::lexical_cast("-40913448215392412059728312039233342.142914753896559359297977982314043378636755884088383226"), - boost::lexical_cast("31626312914486892948769164616982902.7262756989418188077611392594232674722318027323102462687"), - boost::lexical_cast("-21878079174441332123064991795834438.4699982361692990285700077902601657354101259411789722708"), - boost::lexical_cast("13567268503974326527361474986354265.3136632133935430378937191911532112778452274286122946396"), - boost::lexical_cast("-7551494211746723529747611556474669.62996644923557605747803028485900789337467673523741066527"), - boost::lexical_cast("3775516572689476384052312341432597.70584966904950490541958869730702790312581801585742038997"), - boost::lexical_cast("-1696271471453637244930364711513292.79902955514107737992185368006225264329876265486853482449"), - boost::lexical_cast("684857608019352767999083000986166.20765273693720041519286231015176745354062413008561259139"), - boost::lexical_cast("-248397566275708464679881624417990.410438107634139924805871051723444048539177890346227250473"), - boost::lexical_cast("80880368999557992138783568858556.1512378233079327986518410244522800950609595592170022878937"), - boost::lexical_cast("-23618197945394013802495450485616.9025005749893350650829964098117490779655546610665927669729"), - boost::lexical_cast("6176884636893816103087134481332.06708966653493024119556843727320635285468825056891248447124"), - boost::lexical_cast("-1444348683723439589948246285262.64080678953468490544615312565485170860503207005915261691108"), - boost::lexical_cast("301342031656979076702313946827.961658905182634508217626783081241074250132289461989777865387"), - boost::lexical_cast("-55959656587719766738301589651.3940625826610668990368881615587469329021742236397809951765678"), - boost::lexical_cast("9223339169004064297247180402.36227016155682738556103138196079389248843082157924368301293963"), - boost::lexical_cast("-1344882881571942601385730283.42710150182526891377514071881534880944872423492272147871101373"), - boost::lexical_cast("172841913316760599352601139.54409257740173055624405575900164401527761357324625574736896079"), - boost::lexical_cast("-19496120443876233531343952.3802212016691702737346568192063937387825469602063310488794471653"), - boost::lexical_cast("1920907372583710284097959.44121420322495784420169085871802458519363819782779653621724219067"), - boost::lexical_cast("-164429314798240461613359.399597503536657962383155875723527581699785846599051112719962464604"), - boost::lexical_cast("12154026644351189572525.1452249886865981747374191977801688548318519692423556934568426042152"), - boost::lexical_cast("-770443988366210815096.519382051977221101156336663806705367929328924137169970381042234329058"), - boost::lexical_cast("41558909851418707920.4696085656889424895313728719601503526476333404973280596225722152966128"), - boost::lexical_cast("-1890879946549708819.24562220042687554209318172044783707920086716716717574156283898330017796"), - boost::lexical_cast("71844996557297623.9583461685535340440524052492427928388171299145330229958643439878608673403"), - boost::lexical_cast("-2253785109518255.55600197759875781765803818232939130127735487613049577235879610065545755637"), - boost::lexical_cast("57616883849355.997562563968344493719962252675875692642406455612671495250543228005045106721"), - boost::lexical_cast("-1182495730353.08218118278997948852215670614084013289033222774171548915344541249351599628436"), - boost::lexical_cast("19148649358.6196967288062261380599423925174178776792840639099120170800869284300966978300613"), - boost::lexical_cast("-239779605.891370259668403359614360511661030470269478602533200704639655585967442891496784613"), - boost::lexical_cast("2267583.00284368310957842936892685032434505866445291643236133553754152047677944820353796872"), - boost::lexical_cast("-15749.490806784673108773558070497383604733010677027764233749920147549999361110299643477893"), - boost::lexical_cast("77.7059495149052727171505425584459982871343274332635726864135949842508025564999785370162956"), - boost::lexical_cast("-0.261619987273930331397625130282851629108569607193781378836014468617185550622160348688297247"), - boost::lexical_cast("0.000572252321659691600529444769356185993188551770817110673186068921175991328434642504616377475"), - boost::lexical_cast("-0.765167220661540041663007112207436426423746402583423562585653954743978584117929356523307954e-6"), - boost::lexical_cast("0.579179571056209077507916813937971472839851499147582627425979879366849876944438724610663401e-9"), - boost::lexical_cast("-0.224804733043915149719206760378355636826808754704148660354494460792713189958510735070096991e-12"), - boost::lexical_cast("0.392711975389579343321746945135488409914483448652884894759297584020979857734289645857714768e-16"), - boost::lexical_cast("-0.258603588346412049542768766878162221817684639789901440429511261589010049357907537684380983e-20"), - boost::lexical_cast("0.499992460848751668441190360024540741752242879565548017176883304716370989218399797418478685e-25"), - boost::lexical_cast("-0.196211614533318174187346267877390498735734213905206562766348625767919122511096089367364025e-30"), - boost::lexical_cast("0.874722648949676363732094858062907290148733370978226751462386623191111439121706262759209573e-37"), - boost::lexical_cast("-0.163907874717737848669759890242660846846105433791283903651924563157080252845636658802930428e-44"), - }; - T result = d[0]; - for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) - { - result += d[k]/(z+(k-1)); - } - return result; - } - - template - static T lanczos_sum_expG_scaled(const T& z) - { - using namespace boost; - static const T d[61] = { - boost::lexical_cast("0.901751806425638853077358552989167785490911341809902155556127108480303870921448984935411583e-27"), - boost::lexical_cast("4.80241125306810017699523302110401965428995345115391817406006361151407344955277298373661032"), - boost::lexical_cast("-108.119283021710869401330097315436214587270846871451487282117128515476478251641970487922552"), - boost::lexical_cast("1177.78262074811362219818923738088833932279000985161077740440010901595132448469513438139561"), - boost::lexical_cast("-8270.43570321334374279057432173814835581983913167617217749736484999327758232081395983082867"), - boost::lexical_cast("42079.807161997077661752306902088979258826568702655699995911391774839958572703348502730394"), - boost::lexical_cast("-165326.003834443330215001219988296482004968548294447320869281647211603153902436231468280089"), - boost::lexical_cast("521978.361504895300685499370463597042533432134369277742485307843747923127933979566742421213"), - boost::lexical_cast("-1360867.51629992863544553419296636395576666570468519805449755596254912681418267100657262281"), - boost::lexical_cast("2987713.73338656161102517003716335104823650191612448011720936412226357385029800040631754755"), - boost::lexical_cast("-5605212.64915921452169919008770165304171481697939254152852673009005154549681704553438450709"), - boost::lexical_cast("9088186.58332916818449459635132673652700922052988327069535513580836143146727832380184335474"), - boost::lexical_cast("-12848155.5543636394746355365819800465364996596310467415907815393346205151090486190421959769"), - boost::lexical_cast("15949281.2867656960575878805158849857756293807220033618942867694361569866468996967761600898"), - boost::lexical_cast("-17483546.9948295433308250581770557182576171673272450149400973735206019559576269174369907171"), - boost::lexical_cast("17001087.8599749419660906448951424280111036786456594738278573653160553115681287326064596964"), - boost::lexical_cast("-14718487.0643665950346574802384331125115747311674609017568623694516187494204567579595827859"), - boost::lexical_cast("11377468.7255609717716845971105161298889777425898291183866813269222281486121330837791392732"), - boost::lexical_cast("-7870571.64253038587947746661946939286858490057774448573157856145556080330153403858747655263"), - boost::lexical_cast("4880783.08440908743641723492059912671377140680710345996273343885045364205895751515063844239"), - boost::lexical_cast("-2716626.7992639625103140035635916455652302249897918893040695025407382316653674141983775542"), - boost::lexical_cast("1358230.46602865696544327299659410214201327791319846880787515156343361311278133805428800255"), - boost::lexical_cast("-610228.440751458395860905749312275043435828322076830117123636938979942213530882048883969802"), - boost::lexical_cast("246375.416501158654327780901087115642493055617468601787093268312234390446439555559050129729"), - boost::lexical_cast("-89360.2599028475206119333931211015869139511677735549267100272095432140508089207221096740632"), - boost::lexical_cast("29096.4637987498328341260960356772198979319790332957125131055960448759586930781530063775634"), - boost::lexical_cast("-8496.57401431514433694413130585404918350686834939156759654375188338156288564260152505382438"), - boost::lexical_cast("2222.11523574301594407443285016240908726891841242444092960094015874546135316534057865883047"), - boost::lexical_cast("-519.599993280949289705514822058693289933461756514489674453254304308040888101533569480646682"), - boost::lexical_cast("108.406868361306987817730701109400305482972790224573776407166683184990131682003417239181112"), - boost::lexical_cast("-20.1313142142558596796857948064047373605439974799116521459977609253211918146595346493447238"), - boost::lexical_cast("3.31806787671783168020012913552384112429614503798293169239082032849759155847394955909684383"), - boost::lexical_cast("-0.483817477111537877685595212919784447924875428848331771524426361483392903320495411973587861"), - boost::lexical_cast("0.0621793463102927384924303843912913542297042029136293808338022462765755471002366206711862637"), - boost::lexical_cast("-0.00701366932085103924241526535768453911099671087892444015581511551813219720807206445462785293"), - boost::lexical_cast("0.000691040514756294308758606917671220770856269030526647010461217455799229645004351524024364997"), - boost::lexical_cast("-0.591529398871361458428147660822525365922497109038495896497692806150033516658042357799869656e-4"), - boost::lexical_cast("0.437237367535177689875119370170434437030440227275583289093139147244747901678407875809020739e-5"), - boost::lexical_cast("-0.277164853397051135996651958345647824709602266382721185838782221179129726200661453504250697e-6"), - boost::lexical_cast("0.149506899012035980148891401548317536032574502641368034781671941165064546410613201579653674e-7"), - boost::lexical_cast("-0.68023824066463262779882895193964639544061678698791279217407325790147925675797085217462974e-9"), - boost::lexical_cast("0.258460163734186329938721529982859244969655253624066115559707985878606277800329299821882688e-10"), - boost::lexical_cast("-0.810792256024669306744649981276512583535251727474303382740940985102669076169168931092026491e-12"), - boost::lexical_cast("0.207274966207031327521921078048021807442500113231320959236850963529304158700096495799022922e-13"), - boost::lexical_cast("-0.425399199286327802950259994834798737777721414442095221716122926637623478450472871269742436e-15"), - boost::lexical_cast("0.688866766744198529064607574117697940084548375790020728788313274612845280173338912495478431e-17"), - boost::lexical_cast("-0.862599751805643281578607291655858333628582704771553874199104377131082877406179933909898885e-19"), - boost::lexical_cast("0.815756005678735657200275584442908437977926312650210429668619446123450972547018343768177988e-21"), - boost::lexical_cast("-0.566583084099007858124915716926967268295318152203932871370429534546567151650626184750291695e-23"), - boost::lexical_cast("0.279544761599725082805446124351997692260093135930731230328454667675190245860598623539891708e-25"), - boost::lexical_cast("-0.941169851584987983984201821679114408126982142904386301937192011680047611188837432096199601e-28"), - boost::lexical_cast("0.205866011331040736302780507155525142187875191518455173304638008169488993406425201915370746e-30"), - boost::lexical_cast("-0.27526655245712584371295491216289353976964567057707464008951584303679019796521332324352501e-33"), - boost::lexical_cast("0.208358067979444305082929004102609366169534624348056112144990933897581971394396210379638792e-36"), - boost::lexical_cast("-0.808728107661779323263133007119729988596844663194254976820030366188579170595441991680169012e-40"), - boost::lexical_cast("0.141276924383478964519776436955079978012672985961918248012931336621229652792338950573694356e-43"), - boost::lexical_cast("-0.930318449287651389310440021745842417218125582685428432576258687100661462527604238849332053e-48"), - boost::lexical_cast("0.179870748819321661641184169834635133045197146966203370650788171790610563029431722308057539e-52"), - boost::lexical_cast("-0.705865243912790337263229413370018392321238639017433365017168104310561824133229343750737083e-58"), - boost::lexical_cast("0.3146787805734405996448268100558028857930560442377698646099945108125281507396722995748398e-64"), - boost::lexical_cast("-0.589653534231618730406843260601322236697428143603814281282790370329151249078338470962782338e-72"), - }; - T result = d[0]; - for(int k = 1; k < sizeof(d)/sizeof(d[0]); ++k) - { - result += d[k]/(z+(k-1)); - } - return result; - } - - template - static T lanczos_sum_near_1(const T& dz) - { - using namespace boost; - static const T d[60] = { - boost::lexical_cast("23.2463658527729692390378860713647146932236940604550445351214987229819352880524561852919518"), - boost::lexical_cast("-523.358012551815715084547614110229469295755088686612838322817729744722233637819564673967396"), - boost::lexical_cast("5701.12892340421080714956066268650092612647620400476183901625272640935853188559347587495571"), - boost::lexical_cast("-40033.5506451901904954336453419007623117537868026994808919201793803506999271787018654246699"), - boost::lexical_cast("203689.884259074923009439144410340256983393397995558814367995938668111650624499963153485034"), - boost::lexical_cast("-800270.648969745331278757692597096167418585957703057412758177038340791380011708874081291202"), - boost::lexical_cast("2526668.23380061659863999395867315313385499515711742092815402701950519696944982260718031476"), - boost::lexical_cast("-6587362.57559198722630391278043503867973853468105110382293763174847657538179665571836023631"), - boost::lexical_cast("14462211.3454541602975917764900442754186801975533106565506542322063393991552960595701762805"), - boost::lexical_cast("-27132375.1879227404375395522940895789625516798992585980380939378508607160857820002128106898"), - boost::lexical_cast("43991923.8735251977856804364757478459275087361742168436524951824945035673768875988985478116"), - boost::lexical_cast("-62192284.0030124679010201921841372967696262036115679150017649233887633598058364494608060812"), - boost::lexical_cast("77203473.0770033513405070667417251568915937590689150831268228886281254637715669678358204991"), - boost::lexical_cast("-84630180.2217173903516348977915150565994784278120192219937728967986198118628659866582594874"), - boost::lexical_cast("82294807.2253549409847505891112074804416229757832871133388349982640444405470371147991706317"), - boost::lexical_cast("-71245738.2484649177928765605893043553453557808557887270209768163561363857395639001251515788"), - boost::lexical_cast("55073334.3180266913441333534260714059077572215147571872597651029894142803987981342430068594"), - boost::lexical_cast("-38097984.1648990787690036742690550656061009857688125101191167768314179751258568264424911474"), - boost::lexical_cast("23625729.5032184580395130592017474282828236643586203914515183078852982915252442161768527976"), - boost::lexical_cast("-13149998.4348054726172055622442157883429575511528431835657668083088902165366619827169829685"), - boost::lexical_cast("6574597.77221556423683199818131482663205682902023554728024972161230111356285973623550338976"), - boost::lexical_cast("-2953848.1483469149918109110050192571921018042012905892107136410603990336401921230407043408"), - boost::lexical_cast("1192595.29584357246380113611351829515963605337523874715861849584306265512819543347806085356"), - boost::lexical_cast("-432553.812019608638388918135375154289816441900572658692369491476137741687213006403648722272"), - boost::lexical_cast("140843.215385933866391177743292449477205328233960902455943995092958295858485718885800427129"), - boost::lexical_cast("-41128.186992679630058614841985110676526199977321524879849001760603476646382839182691529968"), - boost::lexical_cast("10756.2849191854701631989789887757784944313743544315113894758328432005767448056040879337769"), - boost::lexical_cast("-2515.15559672041299884426826962296210458052543246529646213159169885444118227871246315458787"), - boost::lexical_cast("524.750087004805200600237632074908875763734578390662349666321453103782638818305404274166951"), - boost::lexical_cast("-97.4468596421732493988298219295878130651986131393383646674144877163795143930682205035917965"), - boost::lexical_cast("16.0613108128210806736384551896802799172445298357754547684100294231532127326987175444453058"), - boost::lexical_cast("-2.34194813526540240672426202485306862230641838409943369059203455578340880900483887447559874"), - boost::lexical_cast("0.300982934748016059399829007219431333744032924923669397318820178988611410275964499475465815"), - boost::lexical_cast("-0.033950095985367909789000959795708551814461844488183964432565731809399824963680858993718525"), - boost::lexical_cast("0.00334502394288921146242772614150438404658527112198421937945605441697314216921393987758378122"), - boost::lexical_cast("-0.000286333429067523984607730553301991502191011265745476190940771685897687956262049750683013485"), - boost::lexical_cast("0.211647426149364947402896718485536530479491688838087899435991994237067890628274492042231115e-4"), - boost::lexical_cast("-0.134163345121302758109675190598169832775248626443483098532368562186356128620805552609175683e-5"), - boost::lexical_cast("0.723697303042715085329782938306424498336642078597508935450663080894255773653328980495047891e-7"), - boost::lexical_cast("-0.329273487343139063533251321553223583999676337945788660475231347828772272134656322947906888e-8"), - boost::lexical_cast("0.12510922551028971731767784013117088894558604838820475961392154031378891971216135267744134e-9"), - boost::lexical_cast("-0.392468958215589939603666430583400537413757786057185505426804034745840192914621891690369903e-11"), - boost::lexical_cast("0.100332717101049934370760667782927946803279422001380028508200697081188326364078428184546051e-12"), - boost::lexical_cast("-0.205917088291197705194762747639836655808855850989058813560983717575008725393428497910009756e-14"), - boost::lexical_cast("0.333450178247893143608439314203175490705783992567107481617660357577257627854979230819461489e-16"), - boost::lexical_cast("-0.417546693906616047110563550428133589051498362676394888715581845170969319500638944065594319e-18"), - boost::lexical_cast("0.394871691642184410859178529844325390739857256666676534513661579365702353214518478078730801e-20"), - boost::lexical_cast("-0.274258012587811199757875927548699264063511843669070634471054184977334027224611843434000922e-22"), - boost::lexical_cast("0.135315354265459854889496635967343027244391821142592599244505313738163473730636430399785048e-24"), - boost::lexical_cast("-0.455579032003288910408487905303223613382276173706542364543918076752861628464036586507967767e-27"), - boost::lexical_cast("0.99650703862462739161520123768147312466695159780582506041370833824093136783202694548427718e-30"), - boost::lexical_cast("-0.1332444609228706921659395801935919548447859029572115502899861345555006827214220195650058e-32"), - boost::lexical_cast("0.100856999148765307000182397631280249632761913433008379786888200467467364474581430670889392e-35"), - boost::lexical_cast("-0.39146979455613683472384690509165395074425354524713697428673406058157887065953366609738731e-39"), - boost::lexical_cast("0.683859606707931248105140296850112494069265272540298100341919970496564103098283709868586478e-43"), - boost::lexical_cast("-0.450326344248604222735147147805963966503893913752040066400766411031387063854141246972061792e-47"), - boost::lexical_cast("0.870675378039492904184581895322153006461319724931909799151743284769901586333730037761678891e-52"), - boost::lexical_cast("-0.341678395249272265744518787745356400350877656459401143889000625280131819505857966769964401e-57"), - boost::lexical_cast("0.152322191370871666358069530949353871960316638394428595988162174042653299702098929238880862e-63"), - boost::lexical_cast("-0.285425405297633795767452984791738825078111150078605004958179057245980222485147999495352632e-71"), - }; - T result = 0; - for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(k*dz + k*k); - } - return result; - } - - template - static T lanczos_sum_near_2(const T& dz) - { - using namespace boost; - static const T d[60] = { - boost::lexical_cast("557.56438192770795764344217888434355281097193198928944200046501607026919782564033547346298"), - boost::lexical_cast("-12552.748616427645475141433405567201788681683808077269330800392600825597799119572762385222"), - boost::lexical_cast("136741.650054039199076788077149441364242294724343897779563222338447737802381279007988884806"), - boost::lexical_cast("-960205.223613240309942047656967301131022760634321049075674684679438471862998829007639437133"), - boost::lexical_cast("4885504.47588736223774859617054275229642041717942140469884121916073195308537421162982679289"), - boost::lexical_cast("-19194501.738192166918904824982935279260356575935661514109550613809352009246483412530545583"), - boost::lexical_cast("60602169.8633537742937457094837494059849674261357199218329545854990149896822944801504450843"), - boost::lexical_cast("-157997975.522506767297528502540724511908584668874487506510120462561270100749019845014382885"), - boost::lexical_cast("346876323.86092543685419723290495817330608574729543216092477261152247521712190505658568876"), - boost::lexical_cast("-650770365.471136883718747607976242475416651908858429752332176373467422603953536408709972919"), - boost::lexical_cast("1055146856.05909309330903130910708372830487315684258450293308627289334336871273080305128138"), - boost::lexical_cast("-1491682726.25614447429071368736790697283307005456720192465860871846879804207692411263924608"), - boost::lexical_cast("1851726287.94866167094858600116562210167031458934987154557042242638980748286188183300900268"), - boost::lexical_cast("-2029855953.68334371445800569238095379629407314338521720558391277508374519526853827142679839"), - boost::lexical_cast("1973842002.53354868177824629525448788555435194808657489238517523691040148611221295436287925"), - boost::lexical_cast("-1708829941.98209573247426625323314413060108441455314880934710595647408841619484540679859098"), - boost::lexical_cast("1320934627.12433688699625456833930317624783222321555050330381730035733198249283009357314954"), - boost::lexical_cast("-913780636.858542526294419197161614811332299249415125108737474024007693329922089123296358727"), - boost::lexical_cast("566663423.929632170286007468016419798879660054391183200464733820209439185545886930103546787"), - boost::lexical_cast("-315402880.436816230388857961460509181823167373029384218959199936902955049832392362044305869"), - boost::lexical_cast("157691811.550465734461741500275930418786875005567018699867961482249002625886064187146134966"), - boost::lexical_cast("-70848085.5705405970640618473551954585013808128304384354476488268600720054598122945113512731"), - boost::lexical_cast("28604413.4050137708444142264980840059788755325900041515286382001704951527733220637586013815"), - boost::lexical_cast("-10374808.7067303054787164054055989420809074792801592763124972441820101840292558840131568633"), - boost::lexical_cast("3378126.32016207486657791623723515804931231041318964254116390764473281291389374196880720069"), - boost::lexical_cast("-986460.090390653140964189383080344920103075349535669020623874668558777188889544398718979744"), - boost::lexical_cast("257989.631187387317948158483575125380011593209850756066176921901006833159795100137743395985"), - boost::lexical_cast("-60326.0391159227288325790327830741260824763549807922845004854215660451399733578621565837087"), - boost::lexical_cast("12586.1375399649496159880821645216260841794563919652590583420570326276086323953958907053394"), - boost::lexical_cast("-2337.26417330316922535871922886167444795452055677161063205953141105726549966801856628447293"), - boost::lexical_cast("385.230745012608736644117458716226876976056390433401632749144285378123105481506733917763829"), - boost::lexical_cast("-56.1716559403731491675970177460841997333796694857076749852739159067307309470690838101179615"), - boost::lexical_cast("7.21907953468550196348585224042498727840087634483369357697580053424523903859773769748599575"), - boost::lexical_cast("-0.814293485887386870805786409956942772883474224091975496298369877683530509729332902182019049"), - boost::lexical_cast("0.0802304419995150047616460464220884371214157889148846405799324851793571580868840034085001373"), - boost::lexical_cast("-0.00686771095380619535195996193943858680694970000948742557733102777115482017857981277171196115"), - boost::lexical_cast("0.000507636621977556438232617777542864427109623356049335590894564220687567763620803789858345916"), - boost::lexical_cast("-0.32179095465362720747836116655088181481893063531138957363431280817392443948706754917605911e-4"), - boost::lexical_cast("0.173578890579848508947329833426585354230744194615295570820295052665075101971588563893718407e-5"), - boost::lexical_cast("-0.789762880006288893888161070734302768702358633525134582027140158619195373770299678322596835e-7"), - boost::lexical_cast("0.300074637200885066788470310738617992259402710843493097610337134266720909870967550606601658e-8"), - boost::lexical_cast("-0.941337297619721713151110244242536308266701344868601679868536153775533330272973088246835359e-10"), - boost::lexical_cast("0.24064815013182536657310186836079333949814111498828401548170442715552017773994482539471456e-11"), - boost::lexical_cast("-0.493892399304811910466345686492277504628763169549384435563232052965821874553923373100791477e-13"), - boost::lexical_cast("0.799780678476644196901221989475355609743387528732994566453160178199295104357319723742820593e-15"), - boost::lexical_cast("-0.100148627870893347527249092785257443532967736956154251497569191947184705954310833302770086e-16"), - boost::lexical_cast("0.947100256812658897084619699699028861352615460106539259289295071616221848196411749449858071e-19"), - boost::lexical_cast("-0.657808193528898116367845405906343884364280888644748907819280236995018351085371701094007759e-21"), - boost::lexical_cast("0.324554050057463845012469010247790763753999056976705084126950591088538742509983426730851614e-23"), - boost::lexical_cast("-0.10927068902162908990029309141242256163212535730975970310918370355165185052827948996110107e-25"), - boost::lexical_cast("0.239012340507870646690121104637467232366271566488184795459093215303237974655782634371712486e-28"), - boost::lexical_cast("-0.31958700972990573259359660326375143524864710953063781494908314884519046349402409667329667e-31"), - boost::lexical_cast("0.241905641292988284384362036555782113275737930713192053073501265726048089991747342247551645e-34"), - boost::lexical_cast("-0.93894080230619233745797029179332447129464915420290457418429337322820997038069119047864035e-38"), - boost::lexical_cast("0.164023814025085488413251990798690797467351995518990067783355251949198292596815470576539877e-41"), - boost::lexical_cast("-0.108010831192689925518484618970761942019888832176355541674171850211917230280206410356465451e-45"), - boost::lexical_cast("0.208831600642796805563854019033577205240227465154130766898180386564934443551840379116390645e-50"), - boost::lexical_cast("-0.819516067465171848863933747691434138146789031214932473898084756489529673230665363014007306e-56"), - boost::lexical_cast("0.365344970579318347488211604761724311582675708113250505307342682118101409913523622073678179e-62"), - boost::lexical_cast("-0.684593199208628857931267904308244537968349564351534581234005234847904343404822808648361291e-70"), - }; - T result = 0; - T z = dz + 2; - for(int k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) - { - result += (-d[k-1]*dz)/(z + k*z + k*k - 1); - } - return result; - } - - static double g(){ return 63.19215200000000010049916454590857028961181640625; } -}; - -namespace boost{ namespace math{ namespace lanczos{ - -template -struct lanczos -{ -#ifdef L13 - typedef lanczos13UDT type; -#elif defined(L22) - typedef lanczos22UDT type; -#elif defined(L31) - typedef lanczos31UDT type; -#else - typedef lanczos61UDT type; -#endif -}; - -}}} - -#endif - - From 095e1ebd48ed5556eefa378b715855a766b97f0d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 2 Nov 2008 13:45:37 +0000 Subject: [PATCH 064/192] Added a new section on building to the docs. Added explanatory note to example. Added examples to test Jamfile.v2. [SVN r49534] --- doc/sf_and_dist/building.qbk | 95 ++++++++++++++++++++++++++++ doc/sf_and_dist/math.qbk | 1 + example/students_t_single_sample.cpp | 2 +- test/Jamfile.v2 | 1 + 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 doc/sf_and_dist/building.qbk diff --git a/doc/sf_and_dist/building.qbk b/doc/sf_and_dist/building.qbk new file mode 100644 index 000000000..f24933a56 --- /dev/null +++ b/doc/sf_and_dist/building.qbk @@ -0,0 +1,95 @@ +[section:building How to Build the Library and it's Examples and Tests] + +[h4 Building the Library] + +The first thing you need to ask yourself is "do I need to build anything at all" +as the bulk of this library is header only: meaning you can use it just by +#including the necessary headers. + +The ['only] time you need to build the library is if you want to use the +`extern "C"` functions declared in ``. To build this +using Boost.Build then from Boost's root directory a command like: + + bjam toolset=gcc --with-math install + +will do the job on Linux, while: + + bjam toolset=msvc --with-math --build-type=complete stage + +will work better on Windows. Either way you should consult the +[@http://www.boost.org/doc/libs/release/more/getting_started/index.html +getting started guide] for more information. + +You can also build the libraries from your favourite IDE or command line tool: +each `extern "C"` function declared in `` has it's own +source file with the same name in `libs/math/src/tr1`. Just select the +sources corresponding to the functions you are using and build them into +a library, or else add them directly to your project. Note that the +directory `libs/math/src/tr1` will need to be in your compiler's +#include path as well as the boost-root directory. + +[note If you are using +a Windows compiler that supports auto-linking and you have built the sources +yourself (or added them directly to your project) then you will need to +prevent `` from trying to auto-link to the binaries +that Boost.Build generates. You can do this by defining either +BOOST_MATH_NO_LIB or BOOST_ALL_NO_LIB at project level +(so the defines get passed to each compiler invocation). +] + +Optionally the sources in `libs/math/src/tr1` have support for using +`libs/math/src/tr1/pch.hpp` as a precompiled header +['if your compiler supports precompiled headers.] Note that normally +this header is a do-nothing include: to activate the header so that +it #includes everything required by all the sources you will need to +define BOOST_BUILD_PCH_ENABLED on the command line, both when building +the pre-compiled header and when building the sources. Boost.Build +will do this automatically when appropriate. + +[h4 Building the Examples] + +The examples are all located in `libs/math/example`, they can all +be built without reference to any external libraries, either with +Boost.Build using the supplied Jamfile, or from your compiler's +command line. The only requirement is that the Boost headers are +in your compilers #include search path. + +[h4 Building the Tests] + +The tests are located in `libs/math/test` and are best built +using Boost.Build and the supplied Jamfile. If you plan to +build them separately from your favourite IDE then you will +need to add `libs/math/test` to the list of your compiler's +search paths. + +You will also need to build and link to +the Boost.Regex library for many of the tests: this can built +from the command line by following the +[@http://www.boost.org/doc/libs/release/more/getting_started/index.html +getting started guide], using a command such as: + + bjam toolset=gcc --with-regex install + +or + + bjam toolset=msvc --with-regex --build-type=complete stage + +depending on whether you are on Linux or Windows. + +Many of the tests have optional precompiled header support +using the header `libs/math/test/pch.hpp`. +Note that normally +this header is a do-nothing include: to activate the header so that +it #includes everything required by all the sources you will need to +define BOOST_BUILD_PCH_ENABLED on the command line, both when building +the pre-compiled header and when building the sources. Boost.Build +will do this automatically when appropriate. + +[endsect] + +[/ logistic.qbk + Copyright 2006, 2007, 2008 John Maddock and Paul A. Bristow. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index d7efb9f64..629490071 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -331,6 +331,7 @@ printer friendly PDF format]. [section:perf_over Performance] [performance_overview] [endsect] +[include building.qbk] [section:history1 History and What's New] [history] [endsect] diff --git a/example/students_t_single_sample.cpp b/example/students_t_single_sample.cpp index 3daa6b79a..87ec6b515 100644 --- a/example/students_t_single_sample.cpp +++ b/example/students_t_single_sample.cpp @@ -203,7 +203,7 @@ void single_sample_find_df(double M, double Sm, double Sd) // calculate df for single sided test: double df = students_t::find_degrees_of_freedom( fabs(M - Sm), alpha[i], alpha[i], Sd); - // convert to sample size: + // convert to sample size, always one more than the degrees of freedom: double size = ceil(df) + 1; // Print size: cout << fixed << setprecision(0) << setw(16) << right << size; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 104358e4e..4cd046a5f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -499,3 +499,4 @@ compile compile_test/tools_toms748_inc_test.cpp ; compile ntl_concept_check.cpp : ../config//has_ntl_rr ; compile mpfr_concept_check.cpp : ../config//has_mpfr_class ; +build-project ../example ; \ No newline at end of file From 7af1cc6f24c6de6a9fa03378f598328d1c94be68 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Mon, 3 Nov 2008 16:44:00 +0000 Subject: [PATCH 065/192] Corrected mis-spelling of FORTRAN [SVN r49569] --- doc/sf_and_dist/common_overviews.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sf_and_dist/common_overviews.qbk b/doc/sf_and_dist/common_overviews.qbk index 4ba048323..236331ca9 100644 --- a/doc/sf_and_dist/common_overviews.qbk +++ b/doc/sf_and_dist/common_overviews.qbk @@ -61,7 +61,7 @@ of breed" algorithms as many other libraries: the principle difference is that this library is implemented in C++ - taking advantage of all the abstraction mechanisms that C++ offers - where as most traditional numeric libraries are implemented in C or FORTRAN. Traditionally -languages such as C or FORTAN are perceived as easier to optimise +languages such as C or FORTRAN are perceived as easier to optimise than more complex languages like C++, so in a sense this library provides a good test of current compiler technology, and the "abstraction penalty" - if any - of C++ compared to other languages. From 55572e4c0ac5bb7fce7e983e5f6f4879cd63bdde Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 4 Nov 2008 17:11:53 +0000 Subject: [PATCH 066/192] Typos to building.qbk etc and added Gautami as author and credits. [SVN r49587] --- doc/sf_and_dist/building.qbk | 19 ++++++++++++------- doc/sf_and_dist/credits.qbk | 4 +++- doc/sf_and_dist/issues.qbk | 1 - doc/sf_and_dist/math.qbk | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/sf_and_dist/building.qbk b/doc/sf_and_dist/building.qbk index f24933a56..2bcc832ac 100644 --- a/doc/sf_and_dist/building.qbk +++ b/doc/sf_and_dist/building.qbk @@ -1,14 +1,16 @@ -[section:building How to Build the Library and it's Examples and Tests] +[section:building If and How to Build the Library and its Examples and Tests] [h4 Building the Library] -The first thing you need to ask yourself is "do I need to build anything at all" +The first thing you need to ask yourself is "Do I need to build anything at all?" as the bulk of this library is header only: meaning you can use it just by -#including the necessary headers. +#including the necessary header(s). (The library includes everything, +so if you only use a few components, +your total executables size will be *much* greater). The ['only] time you need to build the library is if you want to use the `extern "C"` functions declared in ``. To build this -using Boost.Build then from Boost's root directory a command like: +using Boost.Build, from a commandline boost-root directory issue a command like: bjam toolset=gcc --with-math install @@ -16,17 +18,20 @@ will do the job on Linux, while: bjam toolset=msvc --with-math --build-type=complete stage -will work better on Windows. Either way you should consult the +will work better on Windows (leaving libraries built +in sub-folder `/stage` below your Boost root directory). +Either way you should consult the [@http://www.boost.org/doc/libs/release/more/getting_started/index.html getting started guide] for more information. You can also build the libraries from your favourite IDE or command line tool: -each `extern "C"` function declared in `` has it's own +each `extern "C"` function declared in `` has its own source file with the same name in `libs/math/src/tr1`. Just select the sources corresponding to the functions you are using and build them into a library, or else add them directly to your project. Note that the directory `libs/math/src/tr1` will need to be in your compiler's -#include path as well as the boost-root directory. +#include path as well as the boost-root directory +(MSVC Tools, Options, Projects and Solutions, VC++ Directories, Include files). [note If you are using a Windows compiler that supports auto-linking and you have built the sources diff --git a/doc/sf_and_dist/credits.qbk b/doc/sf_and_dist/credits.qbk index bd67c4ee8..5476d51f1 100644 --- a/doc/sf_and_dist/credits.qbk +++ b/doc/sf_and_dist/credits.qbk @@ -22,10 +22,12 @@ Google Summer of Code project 2006. Bruno Lalande submitted the "compile time power of a runtime base" code. +Gautam Sewani coded the logistic distribution as part of a Google Summer of Code project 2008. + Professor Nico Temme for advice on the inverse incomplete beta function. [@http://www.shoup.net Victor Shoup for NTL], -without which it would have much difficult to +without which it would have much more difficult to produce high accuracy constants, and especially the tables of accurate values for testing. diff --git a/doc/sf_and_dist/issues.qbk b/doc/sf_and_dist/issues.qbk index 9a59a3174..43fbafa22 100644 --- a/doc/sf_and_dist/issues.qbk +++ b/doc/sf_and_dist/issues.qbk @@ -89,7 +89,6 @@ is found, the higher the priority for implementing it: [table [[Distribution][R][Mathematica 6][NIST][Regress+][Matlab]] [/4 votes:] -[[Logistic][X][X][-][X][X]] [[Hypergeometric][X][X][-][X][X]] [/3 votes:] diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index 629490071..b1b2a6dec 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -1,13 +1,13 @@ [article Math Toolkit [quickbook 1.4] - [copyright 2006, 2007, 2008 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang and Bruno Lalande] + [copyright 2006, 2007, 2008 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang, Bruno Lalande and Gautam Sewani] [purpose ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22] [license Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at [@http://www.boost.org/LICENSE_1_0.txt]) ] - [authors [Maddock, John], [Bristow, Paul A.], [Holin, Hubert], [Zhang, Xiaogang], [Lalande, Bruno]] + [authors [Maddock, John], [Bristow, Paul A.], [Holin, Hubert], [Zhang, Xiaogang], [Lalande, Bruno], [Sewani, Gautam] ] [category math] [purpose mathematics] [/last-revision $Date$] From afb4451d0afa664ae8ea5493d3df180bfc78fd52 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 4 Nov 2008 17:15:37 +0000 Subject: [PATCH 067/192] Added #include // Need to compile in MSVC IDE PAB 31 Oct 2008 [SVN r49588] --- test/test_gamma.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_gamma.cpp b/test/test_gamma.cpp index 0818e2ed7..f5c8a445b 100644 --- a/test/test_gamma.cpp +++ b/test/test_gamma.cpp @@ -4,6 +4,7 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include +// Need to compile in IDE PAB 31 Oct 2008 #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error From 4829421fad85951cc5cc5d8b39d8bcb11553c612 Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Fri, 7 Nov 2008 17:02:56 +0000 Subject: [PATCH 068/192] Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use. [SVN r49627] --- test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0874a2f8d..0f4e01211 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,5 @@ +boost_additional_test_dependencies(math BOOST_DEPENDS test regex) + boost_test_run(common_factor_test DEPENDS boost_unit_test_framework) boost_test_run(octonion_test ../octonion/octonion_test.cpp From 3091462e9b9e2e9329d209895c7f60f3587cb68f Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Fri, 7 Nov 2008 17:05:27 +0000 Subject: [PATCH 069/192] Updating dependency information for modularized libraries. [SVN r49628] --- module.cmake | 1 + 1 file changed, 1 insertion(+) create mode 100644 module.cmake diff --git a/module.cmake b/module.cmake new file mode 100644 index 000000000..e2220989d --- /dev/null +++ b/module.cmake @@ -0,0 +1 @@ +boost_module(math DEPENDS format array) \ No newline at end of file From 8f18f801e44d9f67d5d4023697eaed5bbda29c56 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 13 Nov 2008 17:04:44 +0000 Subject: [PATCH 070/192] Fix typo. [SVN r49719] --- doc/sf_and_dist/distributions/gamma.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sf_and_dist/distributions/gamma.qbk b/doc/sf_and_dist/distributions/gamma.qbk index 9a84c7cb6..24b5d8adf 100644 --- a/doc/sf_and_dist/distributions/gamma.qbk +++ b/doc/sf_and_dist/distributions/gamma.qbk @@ -39,7 +39,7 @@ distribution does not provide the typedef: Instead if you want a double precision gamma distribution you can use -``boost::gamma_distribution<>``] +``boost::math::gamma_distribution<>``] For shape parameter /k/ and scale parameter [theta][space] it is defined by the probability density function: From c6462254b6feaa2217b0f86c2ab83703b2976d33 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 17 Nov 2008 17:10:46 +0000 Subject: [PATCH 071/192] Fix bug in expected error rates. [SVN r49817] --- test/test_constants.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_constants.cpp b/test/test_constants.cpp index 06c250d11..1361bb3a5 100644 --- a/test/test_constants.cpp +++ b/test/test_constants.cpp @@ -20,8 +20,8 @@ void test_spots(RealType) { // Basic sanity checks for constants. - RealType tolerance = static_cast(2e-15); // double - //cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl; + RealType tolerance = boost::math::tools::epsilon() * 2; // double + std::cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << std::endl; using namespace boost::math::constants; using namespace std; // Help ADL of std exp, log... @@ -86,3 +86,6 @@ Running 1 test case... + + + From d13615acf33df583aca478d9c6e0f63bce4101e4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 18 Nov 2008 19:47:50 +0000 Subject: [PATCH 072/192] Fixed bug in elliptic integral periodic-reduction code. Added some more debugging/tracing aids. [SVN r49828] --- .../boost/math/special_functions/bessel.hpp | 23 +++++- include/boost/math/special_functions/beta.hpp | 74 +++++++++++++++++++ .../detail/igamma_inverse.hpp | 31 ++++++++ .../boost/math/special_functions/ellint_1.hpp | 2 +- .../boost/math/special_functions/ellint_2.hpp | 2 +- .../boost/math/special_functions/ellint_3.hpp | 2 +- 6 files changed, 129 insertions(+), 5 deletions(-) diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp index 043b7a38a..99ab2d479 100644 --- a/include/boost/math/special_functions/bessel.hpp +++ b/include/boost/math/special_functions/bessel.hpp @@ -307,6 +307,10 @@ template inline T cyl_neumann_imp(T v, T x, const bessel_no_int_tag&, const Policy& pol) { static const char* function = "boost::math::cyl_neumann<%1%>(%1%,%1%)"; + + BOOST_MATH_INSTRUMENT_VARIABLE(v); + BOOST_MATH_INSTRUMENT_VARIABLE(x); + if(x <= 0) { return (v == 0) && (x == 0) ? @@ -332,6 +336,10 @@ inline T cyl_neumann_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& po { BOOST_MATH_STD_USING typedef typename bessel_asymptotic_tag::type tag_type; + + BOOST_MATH_INSTRUMENT_VARIABLE(v); + BOOST_MATH_INSTRUMENT_VARIABLE(x); + if(floor(v) == v) { if((fabs(x) > asymptotic_bessel_y_limit(tag_type())) && (fabs(x) > 5 * abs(v))) @@ -339,12 +347,19 @@ inline T cyl_neumann_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& po T r = asymptotic_bessel_y_large_x_2(static_cast(abs(v)), x); if((v < 0) && (itrunc(v, pol) & 1)) r = -r; + BOOST_MATH_INSTRUMENT_VARIABLE(r); return r; } else - return bessel_yn(itrunc(v, pol), x, pol); + { + T r = bessel_yn(itrunc(v, pol), x, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(r); + return r; + } } - return cyl_neumann_imp(v, x, bessel_no_int_tag(), pol); + T r = cyl_neumann_imp(v, x, bessel_no_int_tag(), pol); + BOOST_MATH_INSTRUMENT_VARIABLE(r); + return r; } template @@ -352,6 +367,10 @@ inline T cyl_neumann_imp(int v, T x, const bessel_int_tag&, const Policy& pol) { BOOST_MATH_STD_USING typedef typename bessel_asymptotic_tag::type tag_type; + + BOOST_MATH_INSTRUMENT_VARIABLE(v); + BOOST_MATH_INSTRUMENT_VARIABLE(x); + if((fabs(x) > asymptotic_bessel_y_limit(tag_type())) && (fabs(x) > 5 * abs(v))) { T r = asymptotic_bessel_y_large_x_2(static_cast(abs(v)), x); diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 63552a0b1..ffd88ed45 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -242,13 +242,25 @@ T ibeta_power_terms(T a, // since one of the power terms will evaluate to a number close to 1. // if(fabs(l1) < 0.1) + { result *= exp(a * boost::math::log1p(l1, pol)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); + } else + { result *= pow((x * cgh) / agh, a); + BOOST_MATH_INSTRUMENT_VARIABLE(result); + } if(fabs(l2) < 0.1) + { result *= exp(b * boost::math::log1p(l2, pol)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); + } else + { result *= pow((y * cgh) / bgh, b); + BOOST_MATH_INSTRUMENT_VARIABLE(result); + } } else if((std::max)(fabs(l1), fabs(l2)) < 0.5) { @@ -279,6 +291,7 @@ T ibeta_power_terms(T a, l3 = l1 + l3 + l3 * l1; l3 = a * boost::math::log1p(l3, pol); result *= exp(l3); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { @@ -286,6 +299,7 @@ T ibeta_power_terms(T a, l3 = l2 + l3 + l3 * l2; l3 = b * boost::math::log1p(l3, pol); result *= exp(l3); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } else if(fabs(l1) < fabs(l2)) @@ -294,6 +308,7 @@ T ibeta_power_terms(T a, T l = a * boost::math::log1p(l1, pol) + b * log((y * cgh) / bgh); result *= exp(l); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { @@ -301,6 +316,7 @@ T ibeta_power_terms(T a, T l = b * boost::math::log1p(l2, pol) + a * log((x * cgh) / agh); result *= exp(l); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } else @@ -321,11 +337,13 @@ T ibeta_power_terms(T a, result *= pow(pow(b2, b/a) * b1, a); else result *= pow(pow(b1, a/b) * b2, b); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { // finally the normal case: result *= pow(b1, a) * pow(b2, b); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } // combine with the leftover terms from the Lanczos approximation: @@ -333,6 +351,8 @@ T ibeta_power_terms(T a, result *= sqrt(agh / cgh); result *= prefix; + BOOST_MATH_INSTRUMENT_VARIABLE(result); + return result; } // @@ -624,6 +644,9 @@ template T ibeta_a_step(T a, T b, T x, T y, int k, const Policy& pol, bool normalised, T* p_derivative) { typedef typename lanczos::lanczos::type lanczos_type; + + BOOST_MATH_INSTRUMENT_VARIABLE(k); + T prefix = ibeta_power_terms(a, b, x, y, lanczos_type(), normalised, pol); if(p_derivative) { @@ -662,6 +685,7 @@ inline T rising_factorial_ratio(T a, T b, int k) // This is only called with small k, for large k // it is grossly inefficient, do not use outside it's // intended purpose!!! + BOOST_MATH_INSTRUMENT_VARIABLE(k); if(k == 0) return 1; T result = 1; @@ -845,6 +869,12 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de typedef typename lanczos::lanczos::type lanczos_type; BOOST_MATH_STD_USING // for ADL of std math functions. + BOOST_MATH_INSTRUMENT_VARIABLE(a); + BOOST_MATH_INSTRUMENT_VARIABLE(b); + BOOST_MATH_INSTRUMENT_VARIABLE(x); + BOOST_MATH_INSTRUMENT_VARIABLE(inv); + BOOST_MATH_INSTRUMENT_VARIABLE(normalised); + bool invert = inv; T fract; T y = 1 - x; @@ -894,6 +924,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de std::swap(a, b); std::swap(x, y); invert = !invert; + BOOST_MATH_INSTRUMENT_VARIABLE(invert); } if((std::max)(a, b) <= 1) { @@ -901,12 +932,16 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de if((a >= (std::min)(T(0.2), b)) || (pow(x, a) <= 0.9)) { if(!invert) + { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else @@ -917,12 +952,16 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de if(y >= 0.3) { if(!invert) + { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else @@ -939,12 +978,16 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); if(!invert) + { fract = beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } } @@ -955,12 +998,16 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de if((b <= 1) || ((x < 0.1) && (pow(b * x, a) <= 0.7))) { if(!invert) + { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else @@ -972,23 +1019,31 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de if(y >= 0.3) { if(!invert) + { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else if(a >= 15) { if(!invert) + { fract = beta_small_b_large_a_series(a, b, x, y, T(0), T(1), pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(a, b, x, y, fract, T(1), pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else @@ -1004,13 +1059,18 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de prefix = 1; } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); if(!invert) + { fract = beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(a + 20, b, x, y, fract, prefix, pol, normalised); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } } @@ -1033,6 +1093,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de std::swap(a, b); std::swap(x, y); invert = !invert; + BOOST_MATH_INSTRUMENT_VARIABLE(invert); } if(b < 40) @@ -1045,16 +1106,21 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de fract = binomial_ccdf(n, k, x, y); if(!normalised) fract *= boost::math::beta(a, b, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } else if(b * x <= 0.7) { if(!invert) + { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } } else if(a > 15) @@ -1076,6 +1142,7 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de fract = ibeta_a_step(bbar, a, y, x, n, pol, normalised, static_cast(0)); fract = beta_small_b_large_a_series(a, bbar, x, y, fract, T(1), pol, normalised); fract /= prefix; + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } else if(normalised) { @@ -1100,12 +1167,19 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de fract = -fract; invert = false; } + BOOST_MATH_INSTRUMENT_VARIABLE(fract); } else + { fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } } else + { fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative); + BOOST_MATH_INSTRUMENT_VARIABLE(fract); + } } if(p_derivative) { diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index ff182bb2d..7d3220066 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -109,11 +109,16 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T result; if(a == 1) + { result = -log(q); + BOOST_MATH_INSTRUMENT_VARIABLE(result); + } else if(a < 1) { T g = boost::math::tgamma(a, pol); T b = q * g; + BOOST_MATH_INSTRUMENT_VARIABLE(g); + BOOST_MATH_INSTRUMENT_VARIABLE(b); if((b > 0.6) || ((b >= 0.45) && (a >= 0.3))) { // DiDonato & Morris Eq 21: @@ -127,12 +132,15 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) if((b * q > 1e-8) && (q > 1e-5)) { u = pow(p * g * a, 1 / a); + BOOST_MATH_INSTRUMENT_VARIABLE(u); } else { u = exp((-q / a) - constants::euler()); + BOOST_MATH_INSTRUMENT_VARIABLE(u); } result = u / (1 - (u / (a + 1))); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else if((a < 0.3) && (b >= 0.35)) { @@ -140,6 +148,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T t = exp(-constants::euler() - b); T u = t * exp(t); result = t * exp(u); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else if((b > 0.15) || (a >= 0.3)) { @@ -147,6 +156,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T y = -log(b); T u = y - (1 - a) * log(y); result = y - (1 - a) * log(u) - log(1 + (1 - a) / (1 + u)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else if (b > 0.1) { @@ -154,6 +164,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T y = -log(b); T u = y - (1 - a) * log(y); result = y - (1 - a) * log(u) - log((u * u + 2 * (3 - a) * u + (2 - a) * (3 - a)) / (u * u + (5 - a) * u + 2)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { @@ -179,6 +190,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T y_3 = y_2 * y; T y_4 = y_2 * y_2; result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } else @@ -186,26 +198,34 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) // DiDonato and Morris Eq 31: T s = find_inverse_s(p, q); + BOOST_MATH_INSTRUMENT_VARIABLE(s); + T s_2 = s * s; T s_3 = s_2 * s; T s_4 = s_2 * s_2; T s_5 = s_4 * s; T ra = sqrt(a); + BOOST_MATH_INSTRUMENT_VARIABLE(ra); + T w = a + s * ra + (s * s -1) / 3; w += (s_3 - 7 * s) / (36 * ra); w -= (3 * s_4 + 7 * s_2 - 16) / (810 * a); w += (9 * s_5 + 256 * s_3 - 433 * s) / (38880 * a * ra); + BOOST_MATH_INSTRUMENT_VARIABLE(w); + if((a >= 500) && (fabs(1 - w / a) < 1e-6)) { result = w; + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else if (p > 0.5) { if(w < 3 * a) { result = w; + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { @@ -236,12 +256,14 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T y_3 = y_2 * y; T y_4 = y_2 * y_2; result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { // DiDonato and Morris Eq 33: T u = -lb + (a - 1) * log(w) - log(1 + (1 - a) / (1 + w)); result = -lb + (a - 1) * log(u) - log(1 + (1 - a) / (1 + u)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } } @@ -253,9 +275,12 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) z = didonato_FN(p, a, z, 2, T(0), pol); z = didonato_FN(p, a, z, 3, T(0), pol); + BOOST_MATH_INSTRUMENT_VARIABLE(z); + if((z <= 0.01 * (a + 1)) || (z > 0.7 * (a + 1))) { result = z; + BOOST_MATH_INSTRUMENT_VARIABLE(result); } else { @@ -263,6 +288,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol) T zb = didonato_FN(p, a, z, 100, T(1e-4), pol); T u = log(p) + boost::math::lgamma(a + 1, pol); result = zb * (1 - (a * log(zb) - zb - u + log(didonato_SN(a, z, 100, T(1e-4)))) / (a - zb)); + BOOST_MATH_INSTRUMENT_VARIABLE(result); } } } @@ -349,6 +375,9 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; + BOOST_MATH_INSTRUMENT_VARIABLE(a); + BOOST_MATH_INSTRUMENT_VARIABLE(p); + if(a <= 0) policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); if((p < 0) || (p > 1)) @@ -361,6 +390,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) T lower = tools::min_value(); if(guess <= lower) guess = tools::min_value(); + BOOST_MATH_INSTRUMENT_VARIABLE(guess); // // Work out how many digits to converge to, normally this is // 2/3 of the digits in T, but if the first derivative is very @@ -379,6 +409,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) lower, tools::max_value(), digits); + BOOST_MATH_INSTRUMENT_VARIABLE(guess); if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); return guess; diff --git a/include/boost/math/special_functions/ellint_1.hpp b/include/boost/math/special_functions/ellint_1.hpp index 9de2f66f6..bac987cd4 100644 --- a/include/boost/math/special_functions/ellint_1.hpp +++ b/include/boost/math/special_functions/ellint_1.hpp @@ -90,7 +90,7 @@ T ellint_f_imp(T phi, T k, const Policy& pol) BOOST_MATH_INSTRUMENT_CODE("pi/2 = " << constants::pi() / 2); T rphi = boost::math::tools::fmod_workaround(phi, constants::pi() / 2); BOOST_MATH_INSTRUMENT_VARIABLE(rphi); - T m = 2 * (phi - rphi) / constants::pi(); + T m = floor((2 * phi) / constants::pi()); BOOST_MATH_INSTRUMENT_VARIABLE(m); int s = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) diff --git a/include/boost/math/special_functions/ellint_2.hpp b/include/boost/math/special_functions/ellint_2.hpp index 182157833..0c6f574c2 100644 --- a/include/boost/math/special_functions/ellint_2.hpp +++ b/include/boost/math/special_functions/ellint_2.hpp @@ -75,7 +75,7 @@ T ellint_e_imp(T phi, T k, const Policy& pol) // so rewritten to use fmod instead: // T rphi = boost::math::tools::fmod_workaround(phi, constants::pi() / 2); - T m = 2 * (phi - rphi) / constants::pi(); + T m = floor((2 * phi) / constants::pi()); int s = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) { diff --git a/include/boost/math/special_functions/ellint_3.hpp b/include/boost/math/special_functions/ellint_3.hpp index b3b8e7df0..f6189e353 100644 --- a/include/boost/math/special_functions/ellint_3.hpp +++ b/include/boost/math/special_functions/ellint_3.hpp @@ -183,7 +183,7 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) else { T rphi = boost::math::tools::fmod_workaround(fabs(phi), constants::pi() / 2); - T m = 2 * (fabs(phi) - rphi) / constants::pi(); + T m = floor((2 * fabs(phi)) / constants::pi()); int sign = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) { From 35bd08d64d6e6b2e077e253c5a0657230617c006 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Fri, 28 Nov 2008 12:04:46 +0000 Subject: [PATCH 073/192] Warning 4800 suppressed by push'n'pop [SVN r49982] --- src/tr1/fpclassify.cpp | 13 ++++++++++--- src/tr1/fpclassifyf.cpp | 13 +++++++++++-- src/tr1/fpclassifyl.cpp | 12 ++++++++++-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/tr1/fpclassify.cpp b/src/tr1/fpclassify.cpp index 4e763d9bc..454b6aa91 100644 --- a/src/tr1/fpclassify.cpp +++ b/src/tr1/fpclassify.cpp @@ -12,11 +12,16 @@ #include #include "c_policy.hpp" +#if defined (_MSC_VER) +# pragma warning(push) +# pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +#endif + namespace boost{ namespace math{ namespace tr1{ template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(double x) { - return static_cast((boost::math::signbit)(x)); + return static_cast((boost::math::signbit)(x)); } template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(double x) @@ -44,6 +49,8 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTIT return (boost::math::isnormal)(x); } -}}} - +}}} // namespace boost{ namespace math{ namespace tr1{ +#if defined (_MSC_VER) +# pragma warning(pop) +#endif diff --git a/src/tr1/fpclassifyf.cpp b/src/tr1/fpclassifyf.cpp index efc8d42ec..cdf1c07e7 100644 --- a/src/tr1/fpclassifyf.cpp +++ b/src/tr1/fpclassifyf.cpp @@ -12,11 +12,16 @@ #include #include "c_policy.hpp" +#if defined (_MSC_VER) +# pragma warning(push) +# pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +#endif + namespace boost{ namespace math{ namespace tr1{ template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(float x) { - return static_cast((boost::math::signbit)(x)); + return static_cast((boost::math::signbit)(x)); } template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(float x) @@ -44,6 +49,10 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SUBSTITU return (boost::math::isnormal)(x); } -}}} +}}} // namespace boost{ namespace math{ namespace tr1{ + +#if defined (_MSC_VER) +# pragma warning(pop) +#endif diff --git a/src/tr1/fpclassifyl.cpp b/src/tr1/fpclassifyl.cpp index f5cabaf2e..177201783 100644 --- a/src/tr1/fpclassifyl.cpp +++ b/src/tr1/fpclassifyl.cpp @@ -12,11 +12,16 @@ #include #include "c_policy.hpp" +#if defined (_MSC_VER) +# pragma warning(push) +# pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +#endif + namespace boost{ namespace math{ namespace tr1{ template<> bool BOOST_MATH_TR1_DECL signbit BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) { - return static_cast((boost::math::signbit)(x)); + return static_cast((boost::math::signbit)(x)); } template<> int BOOST_MATH_TR1_DECL fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) @@ -44,6 +49,9 @@ template<> bool BOOST_MATH_TR1_DECL isnormal BOOST_PREVENT_MACRO_SU return (boost::math::isnormal)(x); } -}}} +}}} // namespace boost{ namespace math{ namespace tr1{ +#if defined (_MSC_VER) +# pragma warning(pop) +#endif From 7718ec6ba5477e868f14dacc60fecf535afc521e Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Fri, 28 Nov 2008 13:36:24 +0000 Subject: [PATCH 074/192] First version of the Laplace distribution [SVN r49985] --- include/boost/math/distributions/laplace.hpp | 300 +++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 include/boost/math/distributions/laplace.hpp diff --git a/include/boost/math/distributions/laplace.hpp b/include/boost/math/distributions/laplace.hpp new file mode 100644 index 000000000..1ecf50525 --- /dev/null +++ b/include/boost/math/distributions/laplace.hpp @@ -0,0 +1,300 @@ +// Copyright Thijs van den Berg, 2008. +// Copyright John Maddock 2008. +// Copyright Paul A. Bristow 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// This module implements the Laplace distribution. +// http://en.wikipedia.org/wiki/Laplace_distribution +// +// Abramowitz and Stegun 1972, p 930 +// http://www.math.sfu.ca/~cbm/aands/page_930.htm + +#ifndef BOOST_STATS_LAPLACE_HPP +#define BOOST_STATS_LAPLACE_HPP + +#include +#include +#include +#include + +namespace boost{ namespace math{ + +template > +class laplace_distribution +{ +public: + // ---------------------------------- + // public Types + // ---------------------------------- + typedef RealType value_type; + typedef Policy policy_type; + + // ---------------------------------- + // Constructor(s) + // ---------------------------------- + laplace_distribution(RealType location = 0, RealType scale = 1) + : m_location(location), m_scale(scale) + { + RealType result; + check_parameters("boost::math::laplace_distribution<%1%>::laplace_distribution()", &result); + } + + + // ---------------------------------- + // Public functions + // ---------------------------------- + + RealType location() const + { + return m_location; + } + + RealType scale() const + { + return m_scale; + } + + bool check_parameters(const char* function, RealType* result) const + { + if(false == detail::check_scale(function, m_scale, result, Policy())) return false; + if(false == detail::check_location(function, m_location, result, Policy())) return false; + return true; + } + + +private: + RealType m_location; + RealType m_scale; + +}; // class laplace_distribution + + + +// +// Convenient type synonym +// +typedef laplace_distribution laplace; + +// +// Non member functions +// +template +inline const std::pair range(const laplace_distribution&) +{ + using boost::math::tools::max_value; + return std::pair(-max_value(), max_value()); +} + +template +inline const std::pair support(const laplace_distribution&) +{ + using boost::math::tools::max_value; + return std::pair(-max_value(), max_value()); +} + +template +inline RealType pdf(const laplace_distribution& dist, const RealType& x) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + // Checking function argument + RealType result; + const char* function = "boost::math::pdf(const laplace_distribution<%1%>&, %1%))"; + if (false == dist.check_parameters(function, &result)) return result; + if (false == detail::check_x(function, x, &result, Policy())) return result; + + // Special pdf values + if((boost::math::isinf)(x)) + return 0; // pdf + and - infinity is zero. + + // General case + RealType scale( dist.scale() ); + RealType location( dist.location() ); + + RealType exponent = x - location; + if (exponent>0) exponent = -exponent; + exponent /= scale; + + result = exp(exponent); + result /= 2 * scale; + + return result; +} // pdf + +template +inline RealType cdf(const laplace_distribution& dist, const RealType& x) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + // Checking function argument + RealType result; + const char* function = "boost::math::cdf(const laplace_distribution<%1%>&, %1%)"; + if (false == dist.check_parameters(function, &result)) return result; + if (false == detail::check_x(function, x, &result, Policy())) return result; + + // Special cdf values + if((boost::math::isinf)(x)) + { + if(x < 0) return 0; // -infinity + return 1; // + infinity + } + + // General cdf values + RealType scale( dist.scale() ); + RealType location( dist.location() ); + + if (x < location) + result = exp( (x-location)/scale )/2; + else + result = 1 - exp( (location-x)/scale )/2; + + return result; +} // cdf + + +template +inline RealType quantile(const laplace_distribution& dist, const RealType& p) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + // Checking function argument + RealType result; + const char* function = "boost::math::quantile(const laplace_distribution<%1%>&, %1%)"; + if (false == dist.check_parameters(function, &result)) return result; + if(false == detail::check_probability(function, p, &result, Policy())) return result; + + // extreme values + if(p == 0) return -std::numeric_limits::infinity(); + if(p == 1) return std::numeric_limits::infinity(); + + // Calculate Quantile + RealType scale( dist.scale() ); + RealType location( dist.location() ); + + if (p - 0.5 < 0.0) + result = location + scale*log( static_cast(p*2) ); + else + result = location - scale*log( static_cast(-p*2 + 2) ); + + return result; +} // quantile + + +template +inline RealType cdf(const complemented2_type, RealType>& c) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + RealType scale = c.dist.scale(); + RealType location = c.dist.location(); + RealType x = c.param; + + // Checking function argument + RealType result; + const char* function = "boost::math::cdf(const complemented2_type, %1%>&)"; + if(false == detail::check_x(function, x, &result, Policy()))return result; + + // Calculate cdf + + // Special cdf value + if((boost::math::isinf)(x)) + { + if(x < 0) return 1; // cdf complement -infinity is unity. + return 0; // cdf complement +infinity is zero + } + + // Cdf interval value + if (-x < location) + result = exp( (-x-location)/scale )/2; + else + result = 1 - exp( (location+x)/scale )/2; + + return result; +} // cdf complement + + +template +inline RealType quantile(const complemented2_type, RealType>& c) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + // Calculate quantile + RealType scale = c.dist.scale(); + RealType location = c.dist.location(); + RealType q = c.param; + + // Checking function argument + RealType result; + const char* function = "quantile(const complemented2_type, %1%>&)"; + if(false == detail::check_probability(function, q, &result, Policy())) return result; + + + // extreme values + if(q == 0) return std::numeric_limits::infinity(); + if(q == 1) return -std::numeric_limits::infinity(); + + if (0.5 - q < 0.0) + result = location + scale*log( static_cast(-q*2 + 2) ); + else + result = location - scale*log( static_cast(q*2) ); + + + return result; +} // quantile + +template +inline RealType mean(const laplace_distribution& dist) +{ + return dist.location(); +} + +template +inline RealType standard_deviation(const laplace_distribution& dist) +{ + return constants::root_two() * dist.scale(); +} + +template +inline RealType mode(const laplace_distribution& dist) +{ + return dist.location(); +} + +template +inline RealType median(const laplace_distribution& dist) +{ + return dist.location(); +} + +template +inline RealType skewness(const laplace_distribution& /*dist*/) +{ + return 0; +} + +template +inline RealType kurtosis(const laplace_distribution& /*dist*/) +{ + return 6; +} + +template +inline RealType kurtosis_excess(const laplace_distribution& /*dist*/) +{ + return 3; +} + +} // namespace math +} // namespace boost + +// This include must be at the end, *after* the accessors +// for this distribution have been defined, in order to +// keep compilers that support two-phase lookup happy. +#include + +#endif // BOOST_STATS_LAPLACE_HPP + + From 81ae79f9b8401932fb20ea9cf38096fb2cd43a76 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Fri, 28 Nov 2008 13:43:18 +0000 Subject: [PATCH 075/192] First version of the Laplace distribution unit test [SVN r49987] --- test/test_laplace.cpp | 418 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) create mode 100644 test/test_laplace.cpp diff --git a/test/test_laplace.cpp b/test/test_laplace.cpp new file mode 100644 index 000000000..7dba3d4f1 --- /dev/null +++ b/test/test_laplace.cpp @@ -0,0 +1,418 @@ +// Copyright Thijs van den Berg 2007. +/* + +This module tests the Laplace distribution. + +Test 1: test_pdf_cdf_ocatave() + Compare pdf, cdf agains results obtained from GNU Octave. + +Test 2: test_cdf_quantile_symmetry() + Checks if quantile is the inverse of cdf by testing + quantile(cdf(x)) == x + +Test 3: test_hazard_pdf_cdf_symmetry() + Checks the relation between hazard, pdf and cdf. + hazard = pdf/(1-cdf) + + +Test 4: test_location_scale_symmetry() + Checks the pdf, cdf invariant for translation and scaling invariant + cdf(x,location,scale) = cdf( (x-location)/scale, 0, 1) + scale * pdf(x,location,scale) = pdf( (x-location)/scale, 0, 1) + +Test 5: test_mmm_moments() + Tests... + mean == location + mode == location + median == location + + standard_deviation = sqrt(2)*scale + skewness == 0 + kurtoris == 6 + excess kurtoris == 3 + +Test 6: test_complemented() + Test the cdf an quantile complemented function + cdf(L,x) == cdf(complement(l,-x)) + quantile(L,p) == quantile(complement(l,1-p)) + +Test 7: test_bad_dist_parameters() + Test invalid dustribution construction. + +Test 8: test_extreme_function_arguments() + Test x = +/- inf. for cdf(), pdf() + Test p ={0,1} for quantile() +*/ + + +#define BOOST_TEST_MAIN +#include +#include +#include +using boost::math::laplace_distribution; + + +/* +#include + using std::cout; + using std::endl; + using std::setprecision; + +#include + using std::numeric_limits; +*/ + +/* + This function test various values of the standard Laplace distribution pdf,cdf + against values generated by GNU Octave + The test code is generated woth the following Octave script: + +f = fopen('octave_boost_laplace.cpp', 'w'); + +for x = [real(-2.0), real(-1.0), real(-0.5), real(0.0), real(0.5), real(1.0), real(2.0)] + + # pdf tests + # ----------------------- + fdisp(f, " BOOST_CHECK_CLOSE(" ),; + fdisp(f, (sprintf (" pdf(laplace_distribution(), static_cast(%16.14fL)),", x))); + fdisp(f, (sprintf (" static_cast(%16.14fL),", laplace_pdf(x) )) ); + fdisp(f, " tolerance);" ); + fdisp(f, "" ); + + # cdf tests + # ----------------------- + fdisp(f, " BOOST_CHECK_CLOSE(" ); + fdisp(f, (sprintf (" cdf(laplace_distribution(), static_cast(%16.14fL)),", x))); + fdisp(f, (sprintf (" static_cast(%16.14fL),", laplace_cdf(x) )) ); + fdisp(f, " tolerance);" ); + fdisp(f, "" ); + +endfor + +fclose(f); +*/ +template +void test_pdf_cdf_ocatave() +{ + RealType tolerance(1e-10f); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(-2.00000000000000L)), + static_cast(0.06766764161831L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(-2.00000000000000L)), + static_cast(0.06766764161831L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(-1.00000000000000L)), + static_cast(0.18393972058572L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(-1.00000000000000L)), + static_cast(0.18393972058572L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(-0.50000000000000L)), + static_cast(0.30326532985632L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(-0.50000000000000L)), + static_cast(0.30326532985632L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(0.00000000000000L)), + static_cast(0.50000000000000L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(0.00000000000000L)), + static_cast(0.50000000000000L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(0.50000000000000L)), + static_cast(0.30326532985632L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(0.50000000000000L)), + static_cast(0.69673467014368L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(1.00000000000000L)), + static_cast(0.18393972058572L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(1.00000000000000L)), + static_cast(0.81606027941428L), + tolerance); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(), static_cast(2.00000000000000L)), + static_cast(0.06766764161831L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(2.00000000000000L)), + static_cast(0.93233235838169L), + tolerance); +} + +template +void test_cdf_quantile_symmetry() +{ + RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage + + const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + + for (int i=0; i<7; ++i) + { + RealType x( static_cast(xtest[i]) ); + RealType x2( quantile(laplace_distribution(), cdf(laplace_distribution(), x)) ); + BOOST_CHECK_CLOSE( x, x2, tolerance); + } +} + + +template +void test_hazard_pdf_cdf_symmetry() +{ + RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage + + const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + + for (int xi=0; xi<7; ++xi) + { + RealType x( static_cast(xtest[xi]) ); + RealType p( pdf(laplace_distribution(), x) ); + RealType c( cdf(laplace_distribution(), x) ); + RealType h1( p/(static_cast(1.0) - c) ); + RealType h2( hazard(laplace_distribution(), x) ); + BOOST_CHECK_CLOSE( h1, h2, tolerance); + } +} + +template +void test_location_scale_symmetry() +{ + RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage + + const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float ltest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float stest[3] = { 0.5, 1.0, 2.0 }; + + for (int xi=0; xi<7; ++xi) + for (int li=0; li<7; ++li) + for (int si=0; si<3; ++si) + { + RealType x( static_cast(xtest[xi]) ); + RealType l( static_cast(ltest[li]) ); + RealType s( static_cast(stest[si]) ); + RealType x0( (x-l)/s ); + + BOOST_CHECK_CLOSE( + pdf(laplace_distribution(l,s), x) * s, + pdf(laplace_distribution(), x0), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(l,s), x), + cdf(laplace_distribution(), x0), + tolerance); + + } +} + +template +void test_mmm_moments() +{ + RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage + + const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float ltest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float stest[3] = { 0.5, 1.0, 2.0 }; + + for (int xi=0; xi<7; ++xi) + for (int li=0; li<7; ++li) + for (int si=0; si<3; ++si) + { + RealType x( static_cast(xtest[xi]) ); + RealType l( static_cast(ltest[li]) ); + RealType s( static_cast(stest[si]) ); + + BOOST_CHECK_CLOSE( + mean( laplace_distribution(l,s) ), + l, + tolerance); + + BOOST_CHECK_CLOSE( + median( laplace_distribution(l,s) ), + l, + tolerance); + + BOOST_CHECK_CLOSE( + mode( laplace_distribution(l,s) ), + l, + tolerance); + + + BOOST_CHECK_CLOSE( + standard_deviation( laplace_distribution(l,s) ), + static_cast( s * boost::math::constants::root_two() ), + tolerance); + + BOOST_CHECK_CLOSE( + skewness( laplace_distribution(l,s) ), + static_cast(0), + tolerance); + + BOOST_CHECK_CLOSE( + kurtosis( laplace_distribution(l,s) ), + static_cast(6), + tolerance); + + BOOST_CHECK_CLOSE( + kurtosis_excess( laplace_distribution(l,s) ), + static_cast(3), + tolerance); + } +} + + +template +void test_complemented() +{ + RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage + + const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float ptest[7] = { 0.125, 0.25, 0.5, 0.75, 0.875 }; + const float ltest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + const float stest[3] = { 0.5, 1.0, 2.0 }; + + for (int li=0; li<7; ++li) + for (int si=0; si<3; ++si) + { + RealType l( static_cast(ltest[li]) ); + RealType s( static_cast(stest[si]) ); + + for (int xi=0; xi<7; ++xi) + { + RealType x( static_cast(xtest[xi]) ); + + BOOST_CHECK_CLOSE( + cdf(complement(laplace_distribution(l,s), -x)), + cdf(laplace_distribution(l,s), x), + tolerance); + } + + for (int pi=0; pi<5; ++pi) + { + RealType p( static_cast(ptest[pi]) ); + + BOOST_CHECK_CLOSE( + quantile(complement(laplace_distribution(l,s), 1-p )), + quantile(laplace_distribution(l,s), p), + tolerance); + } + } +} + + +template +void test_bad_dist_parameters() +{ + BOOST_CHECK_THROW(boost::math::laplace_distribution lbad1(0, 0), std::domain_error); + BOOST_CHECK_THROW(boost::math::laplace_distribution lbad2(0, -1), std::domain_error); +} + + + +template +void test_extreme_function_arguments() +{ + boost::math::laplace_distribution L1(0, 1); + boost::math::laplace_distribution L2(1, 2); + + // check pdf at x = +/- infinity + BOOST_CHECK_THROW(pdf(L1, +std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(pdf(L1, -std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(pdf(L2, +std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(pdf(L2, -std::numeric_limits::infinity()), std::domain_error); + + // check cdf at x = +/- infinity + BOOST_CHECK_THROW(cdf(L1, +std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(cdf(L1, -std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(cdf(L2, +std::numeric_limits::infinity()), std::domain_error); + BOOST_CHECK_THROW(cdf(L2, -std::numeric_limits::infinity()), std::domain_error); + + // check quantile at p = 0,1 + BOOST_CHECK_EQUAL( quantile(L1, 0), -std::numeric_limits::infinity() ); + BOOST_CHECK_EQUAL( quantile(L1, 1), +std::numeric_limits::infinity() ); + BOOST_CHECK_EQUAL( quantile(L2, 0), -std::numeric_limits::infinity() ); + BOOST_CHECK_EQUAL( quantile(L2, 1), +std::numeric_limits::infinity() ); +} + + + + + +BOOST_AUTO_TEST_CASE( vs_GNU_Octave ) +{ + test_pdf_cdf_ocatave(); + test_pdf_cdf_ocatave(); +} + + +BOOST_AUTO_TEST_CASE( cdf_quantile_symmetry ) +{ + test_cdf_quantile_symmetry(); + test_cdf_quantile_symmetry(); +} + + +BOOST_AUTO_TEST_CASE( hazard_pdf_cdf_symmetry ) +{ + test_hazard_pdf_cdf_symmetry(); + test_hazard_pdf_cdf_symmetry(); +} + + +BOOST_AUTO_TEST_CASE( location_scale_symmetry ) +{ + test_location_scale_symmetry(); + test_location_scale_symmetry(); +} + + +BOOST_AUTO_TEST_CASE( mmm_moments ) +{ + test_mmm_moments(); + test_mmm_moments(); +} + +BOOST_AUTO_TEST_CASE( t_complemented ) +{ + test_complemented(); + test_complemented(); +} + +BOOST_AUTO_TEST_CASE( bad_dist_parameters ) +{ + test_bad_dist_parameters(); + test_bad_dist_parameters(); +} + +BOOST_AUTO_TEST_CASE( extreme_function_arguments ) +{ + test_extreme_function_arguments(); + test_extreme_function_arguments(); +} \ No newline at end of file From f293956c9656bc4775be310ebea420276fe04af6 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Fri, 28 Nov 2008 17:55:02 +0000 Subject: [PATCH 076/192] Added C99 reference. [SVN r49994] --- doc/sf_and_dist/c99_ref.qbk | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/doc/sf_and_dist/c99_ref.qbk b/doc/sf_and_dist/c99_ref.qbk index dd90e37a6..859c48262 100644 --- a/doc/sf_and_dist/c99_ref.qbk +++ b/doc/sf_and_dist/c99_ref.qbk @@ -88,7 +88,7 @@ long double truncl(long double x); }}}} // namespaces - + In addition sufficient additional overloads of the `double` versions of the above functions are provided, so that calling the function with any mixture of `float`, `double`, `long double`, or /integer/ arguments is supported, with the @@ -110,7 +110,7 @@ C99 standard. typedef unspecified float_t; typedef unspecified double_t; - + In this implementation `float_t` is the same as type `float`, and `double_t` the same as type `double` unless the preprocessor symbol FLT_EVAL_METHOD is defined, in which case these are set as follows: @@ -149,7 +149,7 @@ See also __atanh for the full template (header only) version of this function. double cbrt(double x); float cbrtf(float x); long double cbrtl(long double x); - + Returns the cubed root of /x/. See also __cbrt for the full template (header only) version of this function. @@ -212,7 +212,7 @@ See also __hypot for the full template (header only) version of this function. double lgamma(double x); float lgammaf(float x); long double lgammal(long double x); - + Returns the log of the gamma function of /x/. [equation lgamm1] @@ -222,8 +222,8 @@ See also __lgamma for the full template (header only) version of this function. long long llround(double x); long long llroundf(float x); long long llroundl(long double x); - -Returns the value /x/ rounded to the nearest integer as a `long long`: + +Returns the value /x/ rounded to the nearest integer as a `long long`: equivalent to `floor(x + 0.5)` See also __llround for the full template (header only) version of this function. @@ -231,8 +231,8 @@ See also __llround for the full template (header only) version of this function. double log1p(double x); float log1pf(float x); long double log1pl(long double x); - -Returns the `log(x+1)` without the loss of precision + +Returns the `log(x+1)` without the loss of precision implied by that formulation. See also __log1p for the full template (header only) version of this function. @@ -241,7 +241,7 @@ See also __log1p for the full template (header only) version of this function. long lroundf(float x); long lroundl(long double x); -Returns the value /x/ rounded to the nearest integer as a `long`: +Returns the value /x/ rounded to the nearest integer as a `long`: equivalent to `floor(x + 0.5)` See also __lround for the full template (header only) version of this function. @@ -249,21 +249,21 @@ See also __lround for the full template (header only) version of this function. double nextafter(double x, double y); float nextafterf(float x, float y); long double nextafterl(long double x, long double y); - + Returns the next representable floating point number after /x/ in the direction of /y/, or /x/ if `x == y`. double nexttoward(double x, long double y); float nexttowardf(float x, long double y); long double nexttowardl(long double x, long double y); - + As `nextafter`, but with /y/ always expressed as a `long double`. double round(double x); float roundf(float x); long double roundl(long double x); -Returns the value /x/ rounded to the nearest integer: +Returns the value /x/ rounded to the nearest integer: equivalent to `floor(x + 0.5)` See also __round for the full template (header only) version of this function. @@ -271,7 +271,7 @@ See also __round for the full template (header only) version of this function. double tgamma(double x); float tgammaf(float x); long double tgammal(long double x); - + Returns the gamma function of /x/: [equation gamm1] @@ -281,14 +281,16 @@ See also __tgamma for the full template (header only) version of this function. double trunc(double x); float truncf(float x); long double truncl(long double x); - + Returns /x/ truncated to the nearest integer. See also __trunc for the full template (header only) version of this function. +See also [@http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf C99 ISO Standard] + [endsect] -[/ +[/ Copyright 2008 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From 109967b83fae3cd47a746f1127f021bb1d6c3120 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Fri, 28 Nov 2008 18:05:16 +0000 Subject: [PATCH 077/192] Changed section title to "C99 and C++ TR1 C-style Functions" [SVN r49995] --- doc/sf_and_dist/math.qbk | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index b1b2a6dec..e14c34fb5 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -62,11 +62,11 @@ [def __godfrey [link godfrey Godfrey]] [def __pugh [link pugh Pugh]] -[def __caution This is now an official Boost library, but remains a library under - construction, the code is fully functional and robust, but +[def __caution This is now an official Boost library, but remains a library under + construction, the code is fully functional and robust, but interfaces, library structure, and function and distribution names may still be changed without notice.] - + [template tr1[] [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Technical Report on C++ Library Extensions]] [template jm_rationals[] [link math_toolkit.backgrounders.implementation.rational_approximations_used devised by JM]] [def __domain_error [link domain_error domain_error]] @@ -250,8 +250,8 @@ and use the function's name as the link text] [def __changing_policy_defaults [link math_toolkit.policy.pol_ref.policy_defaults changing policies defaults]] [def __user_error_handling [link math_toolkit.policy.pol_tutorial.user_def_err_pol user error handling]] -[def __usual_accessors __cdf, __pdf, __quantile, __hazard, - __chf, __mean, __median, __mode, __variance, __sd, __skewness, +[def __usual_accessors __cdf, __pdf, __quantile, __hazard, + __chf, __mean, __median, __mode, __variance, __sd, __skewness, __kurtosis, __kurtosis_excess, __range and __support] [def __gsl [@http://www.gnu.org/software/gsl/ GSL-1.9]] @@ -272,18 +272,18 @@ and use the function's name as the link text] [template header_file[file] [@../../../../../[file] [file]]] -[template optional_policy[] +[template optional_policy[] The final __Policy argument is optional and can be used to -control the behaviour of the function: how it handles errors, -what level of precision to use etc. Refer to the +control the behaviour of the function: how it handles errors, +what level of precision to use etc. Refer to the [link math_toolkit.policy policy documentation for more details].] [template discrete_quantile_warning[NAME] [caution The [NAME] distribution is a discrete distribution: internally -functions like the `cdf` and `pdf` are treated "as if" they are continuous +functions like the `cdf` and `pdf` are treated "as if" they are continuous functions, but in reality the results returned from these functions -only have meaning if an integer value is provided for the random variate +only have meaning if an integer value is provided for the random variate argument. The quantile function will by default return an integer result that has been @@ -295,20 +295,20 @@ coverage will be present in the central region, and /no more than/ the requested coverage will be present in the tails. This behaviour can be changed so that the quantile functions are rounded -differently, or even return a real-valued result using +differently, or even return a real-valued result using [link math_toolkit.policy.pol_overview Policies]. It is strongly -recommended that you read the tutorial +recommended that you read the tutorial [link math_toolkit.policy.pol_tutorial.understand_dis_quant Understanding Quantiles of Discrete Distributions] before using the quantile function on the [NAME] distribution. The -[link math_toolkit.policy.pol_ref.discrete_quant_ref reference docs] +[link math_toolkit.policy.pol_ref.discrete_quant_ref reference docs] describe how to change the rounding policy for these distributions. ] [/ caution] ] [/ template discrete_quantile_warning] -This manual is also available in -[@http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf +This manual is also available in +[@http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf printer friendly PDF format]. [section:main_overview Overview] @@ -335,7 +335,7 @@ printer friendly PDF format]. [section:history1 History and What's New] [history] [endsect] -[section:tr1 C99 and TR1 C Functions] +[section:tr1 C99 and C++ TR1 C-style Functions] [tr1_overview] [endsect] [include contact_info.qbk] @@ -467,7 +467,7 @@ printer friendly PDF format]. [/include test_HTML4_symbols.qbk] [/include test_Latin1_symbols.qbk] -[endsect] [/section:status Status and Roadmap] +[endsect] [/section:status Status and Roadmap] [/ math.qbk Copyright 2008 John Maddock and Paul A. Bristow. From 22c59e55ebd4c1d82afff59ecdd76af2d503e2f8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 1 Dec 2008 10:34:56 +0000 Subject: [PATCH 078/192] Added extra instrumentation. [SVN r50050] --- include/boost/math/tools/roots.hpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index 0a356b44c..43c8091cc 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -297,6 +297,11 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i delta2 = delta1; delta1 = delta; std::tr1::tie(f0, f1, f2) = f(result); + + BOOST_MATH_INSTRUMENT_VARIABLE(f0); + BOOST_MATH_INSTRUMENT_VARIABLE(f1); + BOOST_MATH_INSTRUMENT_VARIABLE(f2); + if(0 == f0) break; if((f1 == 0) && (f2 == 0)) @@ -313,6 +318,10 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i { T denom = 2 * f0; T num = 2 * f1 - f0 * (f2 / f1); + + BOOST_MATH_INSTRUMENT_VARIABLE(denom); + BOOST_MATH_INSTRUMENT_VARIABLE(num); + if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value())) { // possible overflow, use Newton step: @@ -340,9 +349,11 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i // reset delta2 so that this branch will *not* be taken on the // next iteration: delta2 = delta * 3; + BOOST_MATH_INSTRUMENT_VARIABLE(delta); } guess = result; result -= delta; + BOOST_MATH_INSTRUMENT_VARIABLE(result); // check for out of bounds step: if(result < min) @@ -398,13 +409,6 @@ T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_i #ifdef BOOST_MATH_INSTRUMENT std::cout << "Halley iteration, final count = " << max_iter << std::endl; - - static boost::uintmax_t max_count = 0; - if(max_iter > max_count) - { - max_count = max_iter; - std::cout << "Maximum iterations: " << max_iter << std::endl; - } #endif return result; From 66e1cfa214bc6b227c6a17d4076d084880f066b0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 1 Dec 2008 13:31:39 +0000 Subject: [PATCH 079/192] Adjust usage logic of log1pl and expm1l. [SVN r50055] --- include/boost/math/special_functions/expm1.hpp | 2 +- .../boost/math/special_functions/fpclassify.hpp | 4 +++- include/boost/math/special_functions/log1p.hpp | 4 +--- include/boost/math/tools/config.hpp | 14 +++++++++++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index e6068e6d2..2c9bb9ea4 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -233,7 +233,7 @@ inline typename tools::promote_args::type expm1(T x, const Policy& /* pol */) #endif #if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER)) -# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# ifdef BOOST_MATH_USE_C99 inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); } inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); } #else diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index f2f0f75a4..5b22e39bd 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -165,7 +165,9 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) { return BOOST_FPCLASSIFY_PREFIX fpclassify(t); } -#if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +#if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) \ + && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) + && !(defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) // The native fpclassify broken for long doubles with aCC // use portable one instead.... inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 28fd48740..2487e4eb0 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -316,9 +316,7 @@ inline long double log1p(long double z) #endif #if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER)) -# if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \ - || ((defined(linux) || defined(__linux) || defined(__linux__)) && !defined(__SUNPRO_CC)) \ - || (defined(__hpux) && !defined(__hppa)) +# ifdef BOOST_MATH_USE_C99 template inline float log1p(float x, const Policy& pol) { diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index d53ae99a2..fe2de8923 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -70,6 +70,18 @@ # define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS #endif +#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) +# define BOOST_MATH_USE_C99 +#endif + +#if (defined(__hpux) && !defined(__hppa)) +# define BOOST_MATH_USE_C99 +#endif + +#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99) +# define BOOST_MATH_USE_C99 +#endif + #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) # include "boost/type.hpp" @@ -219,7 +231,7 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) } // namespace tools }} // namespace boost namespace math -#ifdef __linux__ +#if defined(__linux__) || defined(__QNX__) || defined(__IBMCPP__) #include From b0c6714dfaa20a910f02e4702f7ae04bbe233fe7 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 12:45:36 +0000 Subject: [PATCH 080/192] warning suppressed in tolerance [SVN r50066] --- test/test_students_t.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_students_t.cpp b/test/test_students_t.cpp index 1f9db1dde..4b52ed97a 100644 --- a/test/test_students_t.cpp +++ b/test/test_students_t.cpp @@ -54,7 +54,8 @@ template void test_spots(RealType) { // Basic sanity checks - RealType tolerance = 1e-4; // 1e-6 (as %) + + RealType tolerance = static_cast(1e-4); // 1e-6 (as %) // Some tests only pass at 1e-5 because probability value is less accurate, // a digit in 6th decimal place, although calculated using // a t-distribution generator (claimed 6 decimal digits) at From bce2d4e4a7f532a3048f2128e63e3c0dbb91f181 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 12:46:59 +0000 Subject: [PATCH 081/192] Added 50 decimal digit NTL test values - and some TODOs - need a few more values tested, and long double test, and test on convenience typedef [SVN r50067] --- test/test_laplace.cpp | 229 +++++++++++++++++++++++++++++++++++------- 1 file changed, 191 insertions(+), 38 deletions(-) diff --git a/test/test_laplace.cpp b/test/test_laplace.cpp index 7dba3d4f1..4cd9f46a6 100644 --- a/test/test_laplace.cpp +++ b/test/test_laplace.cpp @@ -1,4 +1,17 @@ -// Copyright Thijs van den Berg 2007. +// Copyright Thijs van den Berg, 2008. +// Copyright John Maddock 2008. +// Copyright Paul A. Bristow 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// TODO ?? PAB 2 Dec 2008 + +// add few more tests for farther out than 2?? +// long double test +// add test for convenience typedef laplace. + /* This module tests the Laplace distribution. @@ -37,7 +50,7 @@ Test 6: test_complemented() quantile(L,p) == quantile(complement(l,1-p)) Test 7: test_bad_dist_parameters() - Test invalid dustribution construction. + Test invalid distribution construction. Test 8: test_extreme_function_arguments() Test x = +/- inf. for cdf(), pdf() @@ -51,7 +64,6 @@ Test 8: test_extreme_function_arguments() #include using boost::math::laplace_distribution; - /* #include using std::cout; @@ -90,6 +102,99 @@ for x = [real(-2.0), real(-1.0), real(-0.5), real(0.0), real(0.5), real(1.0), re endfor fclose(f); + + +Laplace distribution values version 2.0 + +Using NTL version 5.4 and the formula in Wikipedia Paul A. Bristow +NTL class RR precision 150 bits. +NTL class RR output precision 50 decimal digits OK. +Laplace pdf +-10 0.22699964881242425767795757780275305118959044437696e-4 +-9.5 0.37425914943850295735594659677277583056493449453316e-4 +-9 0.61704902043339774748818345365016913036076416123496e-4 +-8.5 0.00010173418450532208718446671524353319364865576338509 +-8 0.00016773131395125591941069456289043050965545006686111 +-7.5 0.00027654218507391679155100004426517859890566829114007 +-7 0.00045594098277725810400156804220464131323686226383407 +-6.5 0.00075171959648878622369145166608382691500025647887521 +-6 0.0012393760883331792115225837154083339457532397924584 +-5.5 0.0020433857192320334967323513423603842041953283241185 +-5 0.0033689734995427335483180242115742121244247925136568 +-4.5 0.0055544982691211532480715671434652638857696337503689 +-4 0.0091578194443670901468590106366206211059560337810038 +-3.5 0.015098691711159250369893146181809922535830266119032 +-3 0.024893534183931971489671207825030888315849796096331 +-2.5 0.041042499311949397584764337233579903918902060509316 +-2 0.067667641618306345946999747486242201703815772944649 +-1.5 0.11156508007421491446664023538200626067108581471131 +-1 0.18393972058572116079776188508073043372290556554506 +-0.5 0.30326532985631671180189976749559022672095906778368 +0 0.5 +0.5 0.30326532985631671180189976749559022672095906778368 +1 0.18393972058572116079776188508073043372290556554506 +1.5 0.11156508007421491446664023538200626067108581471131 +2 0.067667641618306345946999747486242201703815772944649 +2.5 0.041042499311949397584764337233579903918902060509316 +3 0.024893534183931971489671207825030888315849796096331 +3.5 0.015098691711159250369893146181809922535830266119032 +4 0.0091578194443670901468590106366206211059560337810038 +4.5 0.0055544982691211532480715671434652638857696337503689 +5 0.0033689734995427335483180242115742121244247925136568 +5.5 0.0020433857192320334967323513423603842041953283241185 +6 0.0012393760883331792115225837154083339457532397924584 +6.5 0.00075171959648878622369145166608382691500025647887521 +7 0.00045594098277725810400156804220464131323686226383407 +7.5 0.00027654218507391679155100004426517859890566829114007 +8 0.00016773131395125591941069456289043050965545006686111 +8.5 0.00010173418450532208718446671524353319364865576338509 +9 0.61704902043339774748818345365016913036076416123496e-4 +9.5 0.37425914943850295735594659677277583056493449453316e-4 +10 0.22699964881242425767795757780275305118959044437696e-4 + +Laplace cdf +-10 0.9999773000351187575742322042422197246948810411152 +-9.5 0.99996257408505614970426440534032272241694350636029 +-9 0.99993829509795666022525118165463498308696392404693 +-8.5 0.99989826581549467791281553328475646680635134420916 +-8 0.99983226868604874408058930543710956949034454956485 +-7.5 0.9997234578149260832084489999557348214010943317417 +-7 0.99954405901722274189599843195779535868676313746042 +-6.5 0.99924828040351121377630854833391617308499974328643 +-6 0.99876062391166682078847741628459166605424676032523 +-5.5 0.99795661428076796650326764865763961579580467117776 +-5 0.99663102650045726645168197578842578787557520756024 +-4.5 0.9944455017308788467519284328565347361142303666328 +-4 0.99084218055563290985314098936337937889404396651458 +-3.5 0.98490130828884074963010685381819007746416973359633 +-3 0.9751064658160680285103287921749691116841502037504 +-2.5 0.95895750068805060241523566276642009608109793962206 +-2 0.93233235838169365405300025251375779829618422688019 +-1.5 0.8884349199257850855333597646179937393289141857266 +-1 0.81606027941427883920223811491926956627709443427977 +-0.5 0.69673467014368328819810023250440977327904093221632 +0 0.5 +0.5 0.30326532985631671180189976749559022672095906778368 +1 0.18393972058572116079776188508073043372290556572023 +1.5 0.11156508007421491446664023538200626067108581462372 +2 0.067667641618306345946999747486242201703815773119812 +2.5 0.041042499311949397584764337233579903918902060377944 +3 0.024893534183931971489671207825030888315849796249598 +3.5 0.015098691711159250369893146181809922535830266053346 +4 0.009157819444367090146859010636620621105956033835742 +4.5 0.005554498269121153248071567143465263885769633717526 +5 0.0033689734995427335483180242115742121244247924397602 +5.5 0.0020433857192320334967323513423603842041953284719117 +6 0.0012393760883331792115225837154083339457532396747712 +6.5 0.00075171959648878622369145166608382691500025636324071 +7 0.00045594098277725810400156804220464131323686218925325 +7.5 0.00027654218507391679155100004426517859890566825829713 +8 0.00016773131395125591941069456289043050965545008482209 +8.5 0.00010173418450532208718446671524353319364865579083973 +9 0.61704902043339774748818345365016913036076303396971e-4 +9.5 0.37425914943850295735594659677277583056493289386783e-4 +10 0.22699964881242425767795757780275305118958884798806e-4 + */ template void test_pdf_cdf_ocatave() @@ -97,73 +202,84 @@ void test_pdf_cdf_ocatave() RealType tolerance(1e-10f); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(-2.00000000000000L)), - static_cast(0.06766764161831L), + pdf(laplace_distribution(), static_cast(-2.L)), + // static_cast(0.06766764161831L), + static_cast(0.067667641618306345946999747486242201703815773119812L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(-2.00000000000000L)), - static_cast(0.06766764161831L), + cdf(laplace_distribution(), static_cast(-2.L)), + //static_cast(0.06766764161831L), + static_cast(0.067667641618306345946999747486242201703815773119812L), tolerance); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(-1.00000000000000L)), + pdf(laplace_distribution(), static_cast(-1.L)), + //static_cast(0.18393972058572L), + static_cast(0.18393972058572116079776188508073043372290556554506L), + tolerance); + + BOOST_CHECK_CLOSE( + cdf(laplace_distribution(), static_cast(-1.L)), static_cast(0.18393972058572L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(-1.00000000000000L)), - static_cast(0.18393972058572L), + pdf(laplace_distribution(), static_cast(-0.5L)), + // static_cast(0.30326532985632L), + static_cast(0.30326532985631671180189976749559022672095906778368L), tolerance); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(-0.50000000000000L)), - static_cast(0.30326532985632L), + cdf(laplace_distribution(), static_cast(-0.5L)), + //static_cast(0.30326532985632L), + static_cast(0.30326532985631671180189976749559022672095906778368L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(-0.50000000000000L)), - static_cast(0.30326532985632L), + pdf(laplace_distribution(), static_cast(0.0L)), + static_cast(0.5L), tolerance); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(0.00000000000000L)), - static_cast(0.50000000000000L), + cdf(laplace_distribution(), static_cast(0.0L)), + static_cast(0.5L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(0.00000000000000L)), - static_cast(0.50000000000000L), + pdf(laplace_distribution(), static_cast(0.5L)), + //static_cast(0.30326532985632L), + static_cast(0.30326532985631671180189976749559022672095906778368L), tolerance); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(0.50000000000000L)), - static_cast(0.30326532985632L), + cdf(laplace_distribution(), static_cast(0.5L)), + // static_cast(0.69673467014368L), + static_cast(0.69673467014368328819810023250440977327904093221632L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(0.50000000000000L)), - static_cast(0.69673467014368L), - tolerance); - - BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(1.00000000000000L)), - static_cast(0.18393972058572L), + pdf(laplace_distribution(), static_cast(1.0L)), + // static_cast(0.18393972058572L), + static_cast(0.18393972058572116079776188508073043372290556554506L), tolerance); BOOST_CHECK_CLOSE( cdf(laplace_distribution(), static_cast(1.00000000000000L)), - static_cast(0.81606027941428L), + // static_cast(0.81606027941428L), + static_cast(0.81606027941427883920223811491926956627709443427977L), tolerance); BOOST_CHECK_CLOSE( - pdf(laplace_distribution(), static_cast(2.00000000000000L)), - static_cast(0.06766764161831L), + pdf(laplace_distribution(), static_cast(2.0L)), + // static_cast(0.06766764161831L), + static_cast(0.067667641618306345946999747486242201703815772944649L), tolerance); BOOST_CHECK_CLOSE( - cdf(laplace_distribution(), static_cast(2.00000000000000L)), - static_cast(0.93233235838169L), + cdf(laplace_distribution(), static_cast(2.0L)), + // static_cast(0.93233235838169L), + static_cast(0.93233235838169365405300025251375779829618422688019L), tolerance); } @@ -237,7 +353,7 @@ void test_mmm_moments() { RealType tolerance(boost::math::tools::epsilon() * 500); // 5 eps as a percentage - const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; + // const float xtest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; const float ltest[7] = { -2.0, -1.0, -0.5, 0.0, 0.5, 1.0, 2.0 }; const float stest[3] = { 0.5, 1.0, 2.0 }; @@ -245,7 +361,7 @@ void test_mmm_moments() for (int li=0; li<7; ++li) for (int si=0; si<3; ++si) { - RealType x( static_cast(xtest[xi]) ); + //RealType x( static_cast(xtest[xi]) ); RealType l( static_cast(ltest[li]) ); RealType s( static_cast(stest[si]) ); @@ -362,9 +478,6 @@ void test_extreme_function_arguments() } - - - BOOST_AUTO_TEST_CASE( vs_GNU_Octave ) { test_pdf_cdf_ocatave(); @@ -415,4 +528,44 @@ BOOST_AUTO_TEST_CASE( extreme_function_arguments ) { test_extreme_function_arguments(); test_extreme_function_arguments(); -} \ No newline at end of file +} + +/* + +Output: + +Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM + +Debug Multi-threaded Debug (/MTd) + +Running 8 test cases... + +*** No errors detected +Detected memory leaks! +Dumping objects -> +{286} normal block at 0x001E92D8, 7 bytes long. + Data: 64 6F 75 62 6C 65 00 +{285} normal block at 0x001E92A0, 8 bytes long. + Data: < 0 > D8 92 1E 00 30 92 1E 00 +{230} normal block at 0x001E9268, 6 bytes long. + Data: 66 6C 6F 61 74 00 +{229} normal block at 0x001E9230, 8 bytes long. + Data: 68 92 1E 00 00 00 00 00 +Object dump complete. +Press any key to continue . . . + +// Why does debug cause memory leak? Problem in Boost.Test - no - MS debug VC9 runtime +// http://www.nabble.com/Re%3A--Boost.Test--Problem-with-vc9-runtime-library-p17864724.html +// so we can ignore this. + + +Release Multi-threaded (/MT) + +Running 8 test cases... + +*** No errors detected +Press any key to continue . . . + + +*/ + From 1dca974f875bf1ba028b29a82c04c71fe8decfe4 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 15:27:34 +0000 Subject: [PATCH 082/192] added link the C99 and Tr1 sections. [SVN r50070] --- doc/sf_and_dist/building.qbk | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/doc/sf_and_dist/building.qbk b/doc/sf_and_dist/building.qbk index 2bcc832ac..0a9a49e72 100644 --- a/doc/sf_and_dist/building.qbk +++ b/doc/sf_and_dist/building.qbk @@ -4,24 +4,25 @@ The first thing you need to ask yourself is "Do I need to build anything at all?" as the bulk of this library is header only: meaning you can use it just by -#including the necessary header(s). (The library includes everything, -so if you only use a few components, -your total executables size will be *much* greater). +#including the necessary header(s). Refer to +[link math_toolkit.special.extern_c C99 and C++ TR1 C-style Functions] +for pros and cons of using +the TR1 components as opposed to the header only ones. -The ['only] time you need to build the library is if you want to use the +The ['only] time you ['need] to build the library is if you want to use the `extern "C"` functions declared in ``. To build this using Boost.Build, from a commandline boost-root directory issue a command like: bjam toolset=gcc --with-math install - + will do the job on Linux, while: bjam toolset=msvc --with-math --build-type=complete stage - + will work better on Windows (leaving libraries built in sub-folder `/stage` below your Boost root directory). Either way you should consult the -[@http://www.boost.org/doc/libs/release/more/getting_started/index.html +[@http://www.boost.org/doc/libs/release/more/getting_started/index.html getting started guide] for more information. You can also build the libraries from your favourite IDE or command line tool: @@ -29,7 +30,7 @@ each `extern "C"` function declared in `` has its own source file with the same name in `libs/math/src/tr1`. Just select the sources corresponding to the functions you are using and build them into a library, or else add them directly to your project. Note that the -directory `libs/math/src/tr1` will need to be in your compiler's +directory `libs/math/src/tr1` will need to be in your compiler's #include path as well as the boost-root directory (MSVC Tools, Options, Projects and Solutions, VC++ Directories, Include files). @@ -37,8 +38,8 @@ directory `libs/math/src/tr1` will need to be in your compiler's a Windows compiler that supports auto-linking and you have built the sources yourself (or added them directly to your project) then you will need to prevent `` from trying to auto-link to the binaries -that Boost.Build generates. You can do this by defining either -BOOST_MATH_NO_LIB or BOOST_ALL_NO_LIB at project level +that Boost.Build generates. You can do this by defining either +BOOST_MATH_NO_LIB or BOOST_ALL_NO_LIB at project level (so the defines get passed to each compiler invocation). ] @@ -65,20 +66,20 @@ The tests are located in `libs/math/test` and are best built using Boost.Build and the supplied Jamfile. If you plan to build them separately from your favourite IDE then you will need to add `libs/math/test` to the list of your compiler's -search paths. +search paths. You will also need to build and link to the Boost.Regex library for many of the tests: this can built -from the command line by following the -[@http://www.boost.org/doc/libs/release/more/getting_started/index.html +from the command line by following the +[@http://www.boost.org/doc/libs/release/more/getting_started/index.html getting started guide], using a command such as: bjam toolset=gcc --with-regex install - + or bjam toolset=msvc --with-regex --build-type=complete stage - + depending on whether you are on Linux or Windows. Many of the tests have optional precompiled header support @@ -92,7 +93,7 @@ will do this automatically when appropriate. [endsect] -[/ logistic.qbk +[/ building.qbk Copyright 2006, 2007, 2008 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From 0cf022f337aad4e2308dec9daad823674527e6b5 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 15:28:12 +0000 Subject: [PATCH 083/192] Links to C99 spec added [SVN r50071] --- doc/sf_and_dist/tr1.qbk | 65 +++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/doc/sf_and_dist/tr1.qbk b/doc/sf_and_dist/tr1.qbk index 9b15e170f..9e88739ea 100644 --- a/doc/sf_and_dist/tr1.qbk +++ b/doc/sf_and_dist/tr1.qbk @@ -1,6 +1,6 @@ [template tr1_overview[] Many of the special functions included in this library are also a part -of the either the C99 standard or the [tr1]. Therefore this library +of the either the [C99] or the [tr1]. Therefore this library includes a thin wrapper header `boost/math/tr1.hpp` that provides compatibility with these two standards. @@ -9,25 +9,26 @@ There are various pros and cons to using the library in this way: Pros: * The header to include is lightweight (i.e. fast to compile). -* The functions have extern "C" linkage, and so are usable from other languages. -* Standard compatibility. +* The functions have extern "C" linkage, + and so are usable from other languages (not just C and C++). +* C99 and C++ TR1 Standard compatibility. Cons: * You will need to compile and link to the external Boost.Math libraries. * Limited to support for the types, `float`, `double` and `long double`. -* Error handling is handled via setting ::errno and returning NaN's and +* Error handling is handled via setting ::errno and returning NaN's and infinities: this may be less flexible than an C++ exception based approach. [note The separate libraries are required *only* if you choose to use boost/math/tr1.hpp rather than some other Boost.Math header, the rest of Boost.Math remains header-only.] -The separate libraries required in order to use tr1.hpp can be compiled -using bjam from within the libs/math/build directory, or from the Boost -root directory using the usual Boost-wide install procedure. +The separate libraries required in order to use tr1.hpp can be compiled +using bjam from within the libs/math/build directory, or from the Boost +root directory using the usual Boost-wide install procedure. Alternatively the source files are located in libs/math/src and each have -the same name as the function they implement. The various libraries are +the same name as the function they implement. The various libraries are named as follows: [table @@ -40,19 +41,19 @@ named as follows: [[boost_math_tr1l-][long double][TR1 Functions]] ] -Where `` encodes the compiler and build options used to +Where `` encodes the compiler and build options used to build the libraries: for example "libboost_math_tr1-vc80-mt-gd.lib" -would be the statically linked TR1 library to use with Visual C++ 8.0, +would be the statically linked TR1 library to use with Visual C++ 8.0, in multithreading debug mode, with the DLL VC++ runtime, where as "boost_math_tr1-vc80-mt.lib" would be import library for the TR1 DLL to be used with Visual C++ 8.0 with the release multithreaded DLL VC++ runtime. -Refer to the getting started guide for a -[@http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming +Refer to the getting started guide for a +[@http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming full explanation of the `` meanings]. [note -Visual C++ users will typically have the correct library variant to link +Visual C++ users will typically have the correct library variant to link against selected for them by boost/math/tr1.hpp based on your compiler settings. @@ -60,11 +61,11 @@ Users will need to define BOOST_MATH_TR1_DYN_LINK when building their code if they want to link against the DLL versions of these libraries rather than the static versions. -Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when -building: this is typically only used when linking against a customised +Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when +building: this is typically only used when linking against a customised build of the libraries.] -[note Linux and Unix users will generally only have one variant of +[note Linux and Unix users will generally only have one variant of these libraries installed, and can generally just link against -lboost_math_tr1 etc.] @@ -79,26 +80,26 @@ an easier time linking, but a longer compile time. Which option you choose depends largely on how you prefer to work and how your system is set up. -For example a casual user who just needs the acosh function, would +For example a casual user who just needs the acosh function, would probably be better off including `` -and using `boost::math::acosh(x)` in their code. +and using `boost::math::acosh(x)` in their code. However, for large scale software development where compile times are significant, and where the Boost libraries are already built and installed on the system, then including `` and using `boost::math::tr1::acosh(x)` -will speed up compile times, reduce object files sizes (since there are -no templates being instantiated any more), and also speed up debugging -runtimes - since the externally compiled libraries can be +will speed up compile times, reduce object files sizes (since there are +no templates being instantiated any more), and also speed up debugging +runtimes - since the externally compiled libraries can be compiler optimised, rather than built using full settings - the difference -in performance between -[link math_toolkit.perf.getting_best +in performance between +[link math_toolkit.perf.getting_best release and debug builds can be as much as 20 times], so for complex applications this can be a big win. [h4 Supported C99 Functions] -See also the [link math_toolkit.special.extern_c.c99 +See also the [link math_toolkit.special.extern_c.c99 quick reference guide for these functions]. namespace boost{ namespace math{ namespace tr1{ extern "C"{ @@ -187,14 +188,14 @@ quick reference guide for these functions]. long double truncl(long double x); }}}} // namespaces - + [h4 Supported TR1 Functions] -See also the [link math_toolkit.special.extern_c.tr1 +See also the [link math_toolkit.special.extern_c.tr1 quick reference guide for these functions]. namespace boost{ namespace math{ namespace tr1{ extern "C"{ - + // [5.2.1.1] associated Laguerre polynomials: double assoc_laguerre(unsigned n, unsigned m, double x); float assoc_laguerref(unsigned n, unsigned m, float x); @@ -301,14 +302,14 @@ quick reference guide for these functions]. double sph_neumann(unsigned n, double x); float sph_neumannf(unsigned n, float x); long double sph_neumannl(unsigned n, long double x); - + }}}} // namespaces - + In addition sufficient additional overloads of the `double` versions of the above functions are provided, so that calling the function with any mixture of `float`, `double`, `long double`, or /integer/ arguments is supported, with the return type determined by the __arg_pomotion_rules. - + [h4 Currently Unsupported C99 Functions] double exp2(double x); @@ -370,7 +371,7 @@ return type determined by the __arg_pomotion_rules. double scalbn(double x, int ex); float scalbnf(float x, int ex); long double scalbnl(long double x, int ex); - + [h4 Currently Unsupported TR1 Functions] // [5.2.1.7] confluent hypergeometric functions: @@ -387,7 +388,7 @@ return type determined by the __arg_pomotion_rules. ] -[/ +[/ Copyright 2008 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From d30db521c3627670d046503d6d9e7d56c9a99be1 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 15:29:43 +0000 Subject: [PATCH 084/192] add C99 link (not added laplace.gbk yet TODO) [SVN r50072] --- doc/sf_and_dist/math.qbk | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/sf_and_dist/math.qbk b/doc/sf_and_dist/math.qbk index e14c34fb5..e86116c05 100644 --- a/doc/sf_and_dist/math.qbk +++ b/doc/sf_and_dist/math.qbk @@ -68,6 +68,7 @@ may still be changed without notice.] [template tr1[] [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Technical Report on C++ Library Extensions]] +[template C99[] [@http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf C99 Standard ISO/IEC 9899:1999]] [template jm_rationals[] [link math_toolkit.backgrounders.implementation.rational_approximations_used devised by JM]] [def __domain_error [link domain_error domain_error]] [def __pole_error [link pole_error pole_error]] From f41d12c964a1be3d7ac3d5dc03a4a15866569189 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 15:30:57 +0000 Subject: [PATCH 085/192] Typo corrected [SVN r50073] --- doc/sf_and_dist/implementation.qbk | 156 +++++++++++++++-------------- 1 file changed, 82 insertions(+), 74 deletions(-) diff --git a/doc/sf_and_dist/implementation.qbk b/doc/sf_and_dist/implementation.qbk index 8fda4a313..53d13fe49 100644 --- a/doc/sf_and_dist/implementation.qbk +++ b/doc/sf_and_dist/implementation.qbk @@ -72,12 +72,12 @@ So tests for one third, *not* exactly representable with radix two floating-poin `static_cast(1) / 3;` If a function is very sensitive to changes in input, -specifying an inexact value as input (such as 0.1) can throw +specifying an inexact value as input (such as 0.1) can throw the result off by a noticeable amount: 0.1f is "wrong" -by ~1e-7 for example (because 0.1 has no exact binary representation). +by ~1e-7 for example (because 0.1 has no exact binary representation). That is why exact binary values - halves, quarters, and eighths etc - -are used in test code along with the occasional fraction `a/b` with `b` -a power of two (in order to ensure that the result is an exactly +are used in test code along with the occasional fraction `a/b` with `b` +a power of two (in order to ensure that the result is an exactly representable binary value). [h4 Tolerance of Tests] @@ -87,7 +87,7 @@ The tolerances need to be set to the maximum of: * Some epsilon value. * The accuracy of the data (often only near 64-bit double). -Otherwise when long double has more digits than the test data, then no +Otherwise when long double has more digits than the test data, then no amount of tweaking an epsilon based tolerance will work. A common problem is when tolerances that are suitable for implementations @@ -127,13 +127,13 @@ and with the [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5]. [link math_toolkit.main_overview.error_handling See also domain_error]. -See __policy_ref for details of the error handling policies that should allow +See __policy_ref for details of the error handling policies that should allow a user to comply with any of these recommendations, as well as other behaviour. See [link math_toolkit.main_overview.error_handling error handling] for a detailed explanation of the mechanism, and [link math_toolkit.dist.stat_tut.weg.error_eg error_handling example] -and +and [@../../../example/error_handling_example.cpp error_handling_example.cpp] [caution If you enable throw but do NOT have try & catch block, @@ -146,14 +146,14 @@ However, for simplicity, this is not done for most examples.] Functions that are not mathematically defined, like the Cauchy mean, fail to compile by default. -[link math_toolkit.policy.pol_ref.assert_undefined A policy] +[link math_toolkit.policy.pol_ref.assert_undefined A policy] allows control of this. If the policy is to permit undefined functions, then calling them throws a domain error, by default. But the error policy can be set -to not throw, and to return NaN instead. For example, +to not throw, and to return NaN instead. For example, -`#define BOOST_MATH_DOMAIN_ERROR_POLICY ignore_error` +`#define BOOST_MATH_DOMAIN_ERROR_POLICY ignore_error` appears before the first Boost include, then if the un-implemented function is called, @@ -161,7 +161,7 @@ mean(cauchy<>()) will return std::numeric_limits::quiet_NaN(). [warning If `std::numeric_limits::has_quiet_NaN` is false (for example T is a User-defined type), -then an exception will always be thrown when a domain error occurs. +then an exception will always be thrown when a domain error occurs. Catching exceptions is therefore strongly recommended.] [h4 Median of distributions] @@ -186,19 +186,19 @@ Mathematica Basic Statistics.] give more detail, in particular for discrete dist [h4 Handling of Floating-Point Infinity] -Some functions and distributions are well defined with + or - infinity as -argument(s), but after some experiments with handling infinite arguments +Some functions and distributions are well defined with + or - infinity as +argument(s), but after some experiments with handling infinite arguments as special cases, we concluded that it was generally more useful to forbid this, -and instead to return the result of __domain_error. +and instead to return the result of __domain_error. -Handling infinity as special cases is additionally complicated -because, unlike built-in types on most - but not all - platforms, -not all User-Defined Types are +Handling infinity as special cases is additionally complicated +because, unlike built-in types on most - but not all - platforms, +not all User-Defined Types are specialized to provide `std::numeric_limits::infinity()` and would return zero rather than any representation of infinity. -The rationale is that non-finiteness may happen because of error -or overflow in the users code, and it will be more helpful for this +The rationale is that non-finiteness may happen because of error +or overflow in the users code, and it will be more helpful for this to be diagnosed promptly rather than just continuing. The code also became much more complicated, more error-prone, much more work to test, and much less readable. @@ -207,7 +207,7 @@ However in a few cases, for example normal, where we felt it obvious, we have permitted argument(s) to be infinity, provided infinity is implemented for the realType on that implementation. -Users who require special handling of infinity (or other specific value) can, +Users who require special handling of infinity (or other specific value) can, of course, always intercept this before calling a distribution or function and return their own choice of value, or other behavior. This will often be simpler than trying to handle the aftermath of the error policy. @@ -235,7 +235,7 @@ We considered adding location and scale to the list of functions, for example: } return (upper - lower); } - + but found that these concepts are not defined (or their definition too contentious) for too many distributions to be generally applicable. Because they are non-member functions, they can be added if required. @@ -253,7 +253,7 @@ the most common usage, lower = -1, mode = 0 and upper = 1 would be more suitable Some of the special functions in this library are implemented via rational approximations. These are either taken from the literature, -or devised by John Maddock using +or devised by John Maddock using [link math_toolkit.toolkit.internals2.minimax our Remez code]. Rational rather than Polynomial approximations are used to ensure @@ -266,24 +266,24 @@ Our own approximations were devised either for added accuracy literature methods were unavailable or under non-BSL compatible license. Our Remez code is known to produce good agreement with literature results in fairly simple "toy" cases. -All approximations were checked +All approximations were checked for convergence and to ensure that -they were not ill-conditioned (the coefficients can give a -theoretically good solution, but the resulting rational function -may be un-computable at fixed precision). +they were not ill-conditioned (the coefficients can give a +theoretically good solution, but the resulting rational function +may be un-computable at fixed precision). Recomputing using different Remez implementations may well produce differing coefficients: the problem is well known to be ill conditioned in general, and our Remez implementation often found a broad and ill-defined minima for many of these approximations -(of course for simple "toy" examples like approximating `exp` the minima +(of course for simple "toy" examples like approximating `exp` the minima is well defined, and the coeffiecents should agree no matter whose Remez implementation is used). This should not in general effect the validity -of the approximations: there's good literature supporting the idea that -coefficients can be "in error" without necessarily adversely effecting +of the approximations: there's good literature supporting the idea that +coefficients can be "in error" without necessarily adversely effecting the result. Note that "in error" has a special meaning in this context, -see [@http://front.math.ucdavis.edu/0101.5042 -"Approximate construction of rational approximations and the effect +see [@http://front.math.ucdavis.edu/0101.5042 +"Approximate construction of rational approximations and the effect of error autocorrection.", Grigori Litvinov, eprint arXiv:math/0101042]. Therefore the coefficients still need to be accurately calculated, even if they can be in error compared to the "true" minimax solution. @@ -294,8 +294,8 @@ A macro BOOST_DEFINE_MATH_CONSTANT in constants.hpp is used to provide high accuracy constants to mathematical functions and distributions, since it is important to provide values uniformly for both built-in float, double and long double types, -and for User Defined types like NTL::quad_float and NTL::RR. - +and for User Defined types like NTL::quad_float and NTL::RR. + To permit calculations in this Math ToolKit and its tests, (and elsewhere) at about 100 decimal digits with NTL::RR type, it is obviously necessary to define constants to this accuracy. @@ -316,7 +316,7 @@ For example, pi is defined: BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884197169399375105820974944, 5923078164062862089986280348253421170679821480865132823066470938446095505, - 0) + 0) And used thus: @@ -324,19 +324,19 @@ And used thus: double diameter = 1.; double radius = diameter * pi(); - + or boost::math::constants::pi() Note that it is necessary (if inconvenient) to specify the type explicitly. So you cannot write - double p = boost::math::constants::pi<>(); // could not deduce template argument for 'T' + double p = boost::math::constants::pi<>(); // could not deduce template argument for 'T' Neither can you write: - double p = boost::math::constants::pi; // Context does not allow for disambiguation of overloaded function - double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function + double p = boost::math::constants::pi; // Context does not allow for disambiguation of overloaded function + double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function [h4 Thread safety] @@ -344,16 +344,16 @@ Reporting of error by setting errno should be thread safe already (otherwise none of the std lib math functions would be thread safe?). If you turn on reporting of errors via exceptions, errno gets left unused anyway. -Other than that, the code is intended to be thread safe *for built in +Other than that, the code is intended to be thread safe *for built in real-number types* : so float, double and long double are all thread safe. -For non-built-in types - NTL::RR for example - initialisation of the various -constants used in the implementation is potentially *not* thread safe. +For non-built-in types - NTL::RR for example - initialisation of the various +constants used in the implementation is potentially *not* thread safe. This most undesiable, but it would be a signficant challenge to fix it. -Some compilers may offer the option of having -static-constants initialised in a thread safe manner (Commeau, and maybe -others?), if that's the case then the problem is solved. This is a topic of -hot debate for the next C++ std revision, so hopefully all compilers +Some compilers may offer the option of having +static-constants initialised in a thread safe manner (Commeau, and maybe +others?), if that's the case then the problem is solved. This is a topic of +hot debate for the next C++ std revision, so hopefully all compilers will be required to do the right thing here at some point. [h4 Sources of Test Data] @@ -386,32 +386,32 @@ It calculates pdf, cdf, survivor, log survivor, hazard, tail areas, & critical values for 5 tail values. It is also the only independent source found for the Weibull distribution; -unfortunately it appears to suffer from very poor accuracy in areas where +unfortunately it appears to suffer from very poor accuracy in areas where the underlying special function is known to be difficult to implement. [h4 Creating and Managing the Equations] -The primary source for the equations is now -[@http://www.w3.org/Math/ MathML]: see the +The primary source for the equations is now +[@http://www.w3.org/Math/ MathML]: see the *.mml files in libs\/math\/doc\/sf_and_dist\/equations\/. -These are most easily edited by a GUI editor such as +These are most easily edited by a GUI editor such as [@http://mathcast.sourceforge.net/home.html Mathcast], please note that the equation editor supplied with Open Office currently mangles these files and should not currently be used. -Convertion to SVG was achieved using +Convertion to SVG was achieved using [@http://www.grigoriev.ru/svgmath/ SVGMath] and a command line such as: -[pre -$for file in *.mml; do +[pre +$for file in *.mml; do >/cygdrive/c/Python25/python.exe 'C:\download\open\SVGMath-0.3.1\math2svg.py' \\ >>$file > $(basename $file .mml).svg >done ] -Note that SVGMath requires that the mml files are *not* wrapped in an XHTML +Note that SVGMath requires that the mml files are *not* wrapped in an XHTML XML wrapper - this is added by Mathcast by default - one workaround is to copy an existing mml file and then edit it with Mathcast: the existing format should then be preserved. This is a bug in the XML parser used by @@ -444,7 +444,7 @@ for it to be used with either SVGMath or XEP "as is". Also note that the SVG files in the repository are almost certainly Windows-specific since they reference various Windows Fonts. -PNG files can be created from the SVG's using +PNG files can be created from the SVG's using [@http://xmlgraphics.apache.org/batik/tools/rasterizer.html Batik] and a command such as: @@ -452,8 +452,8 @@ and a command such as: Or using Inkscape and a command such as: -[pre for file in *.svg; do - /cygdrive/c/progra~1/Inkscape/inkscape -d 120 -e $(cygpath -a -w $(basename $file .svg).png) $(cygpath -a -w $file); +[pre for file in *.svg; do + /cygdrive/c/progra~1/Inkscape/inkscape -d 120 -e $(cygpath -a -w $(basename $file .svg).png) $(cygpath -a -w $file); done] Currently Inkscape seems to generate the better looking png's. @@ -462,19 +462,25 @@ The PDF is generated into \pdf\math.pdf using a command from a shell or command window with current directory \math_toolkit\libs\math\doc\sf_and_dist, typically: -[pre bjam -a pdf] +[pre bjam -a pdf >math_pdf.log] -Note that XEP will have to be configured to *use and embed* +Note that XEP will have to be configured to *use and embed* whatever fonts are used by the SVG equations -(if necessary editing the sample xep.xml provided by the XEP installation). +(almost certainly editing the sample xep.xml provided by the XEP installation). +If you fail to do this you will get XEP warnings in the log file like -(html is generated at math_toolkit\libs\math\doc\sf_and_dist\html\index.html -using just bjam -a). +[pre \[warning\]could not find any font family matching "Times New Roman"; replaced by Helvetica] -JM's XEP config file has the following font configuration section added: +(html is the default so it is generated at math_toolkit\libs\math\doc\sf_and_dist\html\index.html +using command line >bjam -a > math_docs.log). + + +is provided in the xep.xml downloaded, but the Windows TrueType fonts are commented out. + +JM's XEP config file \xep\xep.xml has the following font configuration section added: [pre - + <\/font> <\/font> @@ -514,18 +520,20 @@ JM's XEP config file has the following font configuration section added: <\/font> <\/font> <\/font\-family> - - - <\/font> - <\/font\-family> + + + + + + ] PAB had to alter his because the Lucida Sans Unicode font had a different name. -Changes are very likely to be required if you are not using Windows. +Other changes are very likely to be required if you are not using Windows. XZ authored his equations using the venerable Latex, JM converted these to MathML using [@http://gentoo-wiki.com/HOWTO_Convert_LaTeX_to_HTML_with_MathML mxlatex]. -This process is currently unreliable and required some manual intervention: +This process is currently unreliable and required some manual intervention: consequently Latex source is not considered a viable route for the automatic production of SVG versions of equations. @@ -543,24 +551,24 @@ template defined in math.qbk. This outputs Docbook XML that looks like: ] -MathML is not currently present in the Docbook output, or in the +MathML is not currently present in the Docbook output, or in the generated HTML: this needs further investigation. [h4 Producing Graphs] Graphs were produced in SVG format and then converted to PNG's using the same -process as the equations. +process as the equations. -The programs +The programs /libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp and /libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp -generate the SVG's directly using the +generate the SVG's directly using the [@http://code.google.com/soc/2007/boost/about.html Google Summer of Code 2007] project of Jacob Voytko (whose work so far is at .\boost-sandbox\SOC\2007\visualization). [endsect] [/section:implementation Implementation Notes] -[/ +[/ Copyright 2006, 2007 John Maddock and Paul A. Bristow. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From 693f597348cf9df4beafa4fff2d048ebdd69ad2c Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 16:34:41 +0000 Subject: [PATCH 086/192] Placeholder only for laplace doc - needs serious work, and not added to the math.qbk, so won't be processed yet. [SVN r50074] --- doc/sf_and_dist/distributions/laplace.qbk | 130 ++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 doc/sf_and_dist/distributions/laplace.qbk diff --git a/doc/sf_and_dist/distributions/laplace.qbk b/doc/sf_and_dist/distributions/laplace.qbk new file mode 100644 index 000000000..1cdf81f4c --- /dev/null +++ b/doc/sf_and_dist/distributions/laplace.qbk @@ -0,0 +1,130 @@ +[section:laplace_dist Laplace Distribution] + +``#include `` + + namespace boost{ namespace math{ + + template + class laplace_distribution; + + typedef laplace_distribution<> laplace; + + template + class laplace_distribution + { + public: + typedef RealType value_type; + typedef Policy policy_type; + // Construct: + laplace_distribution(RealType location = 0, RealType scale = 1); + // Accessors: + RealType location()const; + RealType scale()const; + }; + + }} // namespaces + +The laplace distribution is the distribution that is the difference betweeen +two independent identically distributed exponential distributed variables. +It is also called the double exponential distribution. + +TODO - this need complete revision - it has been subjected to a dirty find and replace +so is plain wrong. Also need pictures. + +and added to math.qbk to be used. + + +For location and scale parameters /m/ and /s/ it is defined by the +probability density function: + +[equation laplace_ref] + +The location and scale parameters are equivalent to the mean and +standard deviation of the logarithm of the random variable. + +The following graph illustrates the effect of the location +parameter on the PDF, note that the range of the random +variable remains \[0,+[infin]\] irrespective of the value of the +location parameter: + +[graph laplace_pdf1] + +The next graph illustrates the effect of the scale parameter on the PDF: + +[graph laplace_pdf2] + +[h4 Member Functions] + + laplace_distribution(RealType location = 0, RealType scale = 1); + +Constructs a laplace distribution with location /location/ and +scale /scale/. + +The location parameter is the same as the mean of the logarithm of the +random variate. + +The scale parameter is the same as the standard deviation of the +logarithm of the random variate. + +Requires that the scale parameter is greater than zero, otherwise calls +__domain_error. + + RealType location()const; + +Returns the /location/ parameter of this distribution. + + RealType scale()const; + +Returns the /scale/ parameter of this distribution. + +[h4 Non-member Accessors] + +All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] that are generic to all +distributions are supported: __usual_accessors. + +The domain of the random variable is \[0,+[infin]\]. + +[h4 Accuracy] + +The laplace distribution is implemented in terms of the +standard library log and exp functions, plus the +[link math_toolkit.special.sf_erf.error_function error function], +and as such should have very low error rates. + +[h4 Implementation] + +In the following table /m/ is the location parameter of the distribution, +/s/ is it's scale parameter, /x/ is the random variate, /p/ is the probability +and /q = 1-p/. + +[table +[[Function][Implementation Notes]] +[[pdf][Using the relation: pdf = e[super -(ln(x) - m)[super 2 ] \/ 2s[super 2 ] ] \/ (x * s * sqrt(2pi)) ]] +[[cdf][Using the relation: p = cdf(normal_distribtion(m, s), log(x)) ]] +[[cdf complement][Using the relation: q = cdf(complement(normal_distribtion(m, s), log(x))) ]] +[[quantile][Using the relation: x = exp(quantile(normal_distribtion(m, s), p))]] +[[quantile from the complement][Using the relation: x = exp(quantile(complement(normal_distribtion(m, s), q)))]] +[[mean][e[super m + s[super 2 ] / 2 ] ]] +[[variance][(e[super s[super 2] ] - 1) * e[super 2m + s[super 2 ] ] ]] +[[mode][e[super m + s[super 2 ] ] ]] +[[skewness][sqrt(e[super s[super 2] ] - 1) * (2 + e[super s[super 2] ]) ]] +[[kurtosis][e[super 4s[super 2] ] + 2e[super 3s[super 2] ] + 3e[super 2s[super 2] ] - 3]] +[[kurtosis excess][e[super 4s[super 2] ] + 2e[super 3s[super 2] ] + 3e[super 2s[super 2] ] - 6 ]] +] + +[h4 References] + +[*http://mathworld.wolfram.com/LaplaceDistribution.html Weisstein, Eric W. "Laplace Distribution."] From MathWorld--A Wolfram Web Resource. +[*http://en.wikipedia.org/wiki/Laplace_distribution Laplace Distribution] +Abramowitz and Stegun 1972, p. 930. + +[endsect][/section:laplace_dist laplace] + +[/ + Copyright 2008 John Maddock, Paul A. Bristow and M.A. (Thijs) van den Berg. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] + From 0ecf5cf3535abbfd96e385b38aef00334ef68e6f Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Tue, 2 Dec 2008 17:16:03 +0000 Subject: [PATCH 087/192] A very noddy example for Laplace distribution. Better ideas? [SVN r50075] --- example/laplace_example.cpp | 171 ++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 example/laplace_example.cpp diff --git a/example/laplace_example.cpp b/example/laplace_example.cpp new file mode 100644 index 000000000..b1652f041 --- /dev/null +++ b/example/laplace_example.cpp @@ -0,0 +1,171 @@ +// laplace_example.cpp + +// Copyright Paul A. Bristow 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Example of using laplace (& comparing with normal) distribution. + +// Note that this file contains Quickbook mark-up as well as code +// and comments, don't change any of the special comment mark-ups! + +//[laplace_example1 +/*` +First we need some includes to access the laplace & normal distributions +(and some std output of course). +*/ + +#include // for laplace_distribution + using boost::math::laplace; // typedef provides default type is double. +#include // for normal_distribution + using boost::math::normal; // typedef provides default type is double. + +#include + using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; +#include + using std::setw; using std::setprecision; +#include + using std::numeric_limits; + +int main() +{ + cout << "Example: Laplace distribution." << endl; + + try + { + { // Traditional tables and values. +/*`Let's start by printing some traditional tables. +*/ + double step = 1.; // in z + double range = 4; // min and max z = -range to +range. + //int precision = 17; // traditional tables are only computed to much lower precision. + int precision = 4; // traditional table at much lower precision. + int width = 10; // for use with setw. + + // Construct standard laplace & normal distributions l & s + normal s; // (default location or mean = zero, and scale or standard deviation = unity) + cout << "Standard normal distribution, mean or location = "<< s.location() + << ", standard deviation or scale = " << s.scale() << endl; + laplace l; // (default mean = zero, and standard deviation = unity) + cout << "Laplace normal distribution, location = "<< l.location() + << ", scale = " << l.scale() << endl; + +/*` First the probability distribution function (pdf). +*/ + cout << "Probability distribution function values" << endl; + cout << " z PDF normal laplace (difference)" << endl; + cout.precision(5); + for (double z = -range; z < range + step; z += step) + { + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(width) << pdf(s, z) << " " + << setprecision(precision) << setw(width) << pdf(l, z)<< " (" + << setprecision(precision) << setw(width) << pdf(l, z) - pdf(s, z) // difference. + << ")" << endl; + } + cout.precision(6); // default +/*`Notice how the laplace is less at z = 1 , but has 'fatter' tails at 2 and 3. + + And the area under the normal curve from -[infin] up to z, + the cumulative distribution function (cdf). +*/ + // For a standard distribution + cout << "Standard location = "<< s.location() + << ", scale = " << s.scale() << endl; + cout << "Integral (area under the curve) from - infinity up to z " << endl; + cout << " z CDF normal laplace (difference)" << endl; + for (double z = -range; z < range + step; z += step) + { + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(width) << cdf(s, z) << " " + << setprecision(precision) << setw(width) << cdf(l, z) << " (" + << setprecision(precision) << setw(width) << cdf(l, z) - cdf(s, z) // difference. + << ")" << endl; + } + cout.precision(6); // default + +/*` +Pretty-printing a traditional 2-dimensional table is left as an exercise for the student, +but why bother now that the Boost Math Toolkit lets you write +*/ + double z = 2.; + cout << "Area for gaussian z = " << z << " is " << cdf(s, z) << endl; // to get the area for z. + cout << "Area for laplace z = " << z << " is " << cdf(l, z) << endl; // +/*` +Correspondingly, we can obtain the traditional 'critical' values for significance levels. +For the 95% confidence level, the significance level usually called alpha, +is 0.05 = 1 - 0.95 (for a one-sided test), so we can write +*/ + cout << "95% of gaussian area has a z below " << quantile(s, 0.95) << endl; + cout << "95% of laplace area has a z below " << quantile(l, 0.95) << endl; + // 95% of area has a z below 1.64485 + // 95% of laplace area has a z below 2.30259 +/*`and a two-sided test (a comparison between two levels, rather than a one-sided test) + +*/ + cout << "95% of gaussian area has a z between " << quantile(s, 0.975) + << " and " << -quantile(s, 0.975) << endl; + cout << "95% of laplace area has a z between " << quantile(l, 0.975) + << " and " << -quantile(l, 0.975) << endl; + // 95% of area has a z between 1.95996 and -1.95996 + // 95% of laplace area has a z between 2.99573 and -2.99573 +/*`Notice how much wider z has to be to enclose 95% of the area. +*/ + } +//] [/[laplace_example1] + } + catch(const std::exception& e) + { // Always useful to include try & catch blocks because default policies + // are to throw exceptions on arguments that cause errors like underflow, overflow. + // Lacking try & catch blocks, the program will abort without a message below, + // which may give some helpful clues as to the cause of the exception. + std::cout << + "\n""Message from thrown exception was:\n " << e.what() << std::endl; + } + return 0; +} // int main() + + +/* + +Output is: + +Example: Laplace distribution. +Standard normal distribution, mean or location = 0, standard deviation or scale = 1 +Laplace normal distribution, location = 0, scale = 1 +Probability distribution function values + z PDF normal laplace (difference) +-4 0.0001338 0.009158 (0.009024 ) +-3 0.004432 0.02489 (0.02046 ) +-2 0.05399 0.06767 (0.01368 ) +-1 0.242 0.1839 (-0.05803 ) +0 0.3989 0.5 (0.1011 ) +1 0.242 0.1839 (-0.05803 ) +2 0.05399 0.06767 (0.01368 ) +3 0.004432 0.02489 (0.02046 ) +4 0.0001338 0.009158 (0.009024 ) +Standard location = 0, scale = 1 +Integral (area under the curve) from - infinity up to z + z CDF normal laplace (difference) +-4 3.167e-005 0.009158 (0.009126 ) +-3 0.00135 0.02489 (0.02354 ) +-2 0.02275 0.06767 (0.04492 ) +-1 0.1587 0.1839 (0.02528 ) +0 0.5 0.5 (0 ) +1 0.8413 0.8161 (-0.02528 ) +2 0.9772 0.9323 (-0.04492 ) +3 0.9987 0.9751 (-0.02354 ) +4 1 0.9908 (-0.009126 ) +Area for gaussian z = 2 is 0.97725 +Area for laplace z = 2 is 0.932332 +95% of gaussian area has a z below 1.64485 +95% of laplace area has a z below 2.30259 +95% of gaussian area has a z between 1.95996 and -1.95996 +95% of laplace area has a z between 2.99573 and -2.99573 + + +*/ + From 29aa65cc3f4defbbace4a5d42a2d7b5189c0658a Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 3 Dec 2008 18:12:16 +0000 Subject: [PATCH 088/192] Add missing \. [SVN r50089] --- include/boost/math/special_functions/fpclassify.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index 5b22e39bd..2480a902d 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -166,7 +166,7 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) return BOOST_FPCLASSIFY_PREFIX fpclassify(t); } #if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) \ - && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) + && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ && !(defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) // The native fpclassify broken for long doubles with aCC // use portable one instead.... @@ -253,3 +253,4 @@ inline bool isnormal BOOST_NO_MACRO_EXPAND(T t) + From 72fd2dd78c1cfa0f8f09fd068592557a816b5f9b Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Thu, 4 Dec 2008 16:22:21 +0000 Subject: [PATCH 089/192] Deleted because now obselete - use bindings/rr.hpp instead [SVN r50113] --- tools/ntl.diff | 175 ------------------------------------------------- 1 file changed, 175 deletions(-) delete mode 100644 tools/ntl.diff diff --git a/tools/ntl.diff b/tools/ntl.diff deleted file mode 100644 index d6cf77f6a..000000000 --- a/tools/ntl.diff +++ /dev/null @@ -1,175 +0,0 @@ -diff -r -u ntl/WinNTL-5_4/include/NTL/RR.h WinNTL-5_4/include/NTL/RR.h ---- ntl/WinNTL-5_4/include/NTL/RR.h 2005-03-25 07:59:12.000000000 +0000 -+++ WinNTL-5_4/include/NTL/RR.h 2006-03-23 17:06:36.742860800 +0000 -@@ -17,6 +17,13 @@ - - RR() { e = 0; } - -+inline RR(long double t) -+: e(0) -+{ -+ *this = t; -+} -+RR(quad_float const& t); -+ - inline RR(INIT_VAL_TYPE, const ZZ& a); - inline RR(INIT_VAL_TYPE, int a); - inline RR(INIT_VAL_TYPE, long a); -@@ -30,7 +37,7 @@ - inline RR(INIT_VAL_TYPE, const RR& a); - - --inline RR& operator=(double a); -+inline RR& operator=(long double a); - - RR(RR& z, INIT_TRANS_TYPE) : x(z.x, INIT_TRANS), e(z.e) { } - -@@ -346,8 +353,9 @@ - void conv(RR& z, unsigned long a); - inline void conv(RR& z, unsigned int a) { conv(z, (unsigned long)(a)); } - void conv(RR& z, const char *s); --void conv(RR& z, double a); --inline void conv(RR& z, float a) { conv(z, double(a)); } -+void conv(RR& z, long double a); -+inline void conv(RR& z, float a) { conv(z, (long double)(a)); } -+inline void conv(RR& z, double a) { conv(z, (long double)(a)); } - void conv(RR& z, const xdouble& a); - void conv(RR& z, const quad_float& a); - -@@ -381,7 +389,7 @@ - inline RR to_RR(const quad_float& a) { return RR(INIT_VAL, a); } - inline RR to_RR(const char *a) { return RR(INIT_VAL, a); } - --inline RR& RR::operator=(double a) { conv(*this, a); return *this; } -+inline RR& RR::operator=(long double a) { conv(*this, a); return *this; } - - void conv(ZZ& z, const RR& a); - void conv(long& z, const RR& a); -@@ -488,6 +496,11 @@ - inline RR cos(const RR& a) - { RR z; cos(z, a); NTL_OPT_RETURN(RR, z); } - -+inline RR::RR(quad_float const& t) -+: e(0) -+{ -+ conv(*this, t); -+} - -diff -r -u ntl/WinNTL-5_4/include/NTL/quad_float.h WinNTL-5_4/include/NTL/quad_float.h ---- ntl/WinNTL-5_4/include/NTL/quad_float.h 2005-03-25 07:59:14.000000000 +0000 -+++ WinNTL-5_4/include/NTL/quad_float.h 2006-03-23 12:25:57.453315200 +0000 -@@ -67,7 +67,7 @@ - static void SetOutputPrecision(long p); - static long OutputPrecision() { return oprec; } - -- quad_float(double x, double y) : hi(x), lo(y) { } // internal use only -+ quad_float(double x, double y = 0) : hi(x), lo(y) { } // internal use only - - ~quad_float() {} - -diff -r -u ntl/WinNTL-5_4/src/RR.cpp WinNTL-5_4/src/RR.cpp ---- ntl/WinNTL-5_4/src/RR.cpp 2005-03-25 07:59:08.000000000 +0000 -+++ WinNTL-5_4/src/RR.cpp 2006-09-12 17:28:15.281374400 +0100 -@@ -66,7 +66,7 @@ - Error("RR: overflow"); - - if (z.e <= -NTL_OVFBND) -- Error("RR: underflow"); -+ z = 0; // Error("RR: underflow"); - } - - void normalize(RR& z, const RR& y, long residual = 0) -@@ -570,7 +570,7 @@ - xcopy(z, t); - } - --void RoundPrec(RR& x, const RR& a, const RR& b, long p) -+void RoundPrec(RR& x, const RR& a, long p) - { - if (p < 1 || NTL_OVERFLOW(p, 1, 0)) - Error("RoundPrec: bad precsion"); -@@ -657,7 +657,7 @@ - RR::prec = old_p; - } - -- -+/* - void conv(RR& z, double a) - { - if (a == 0) { -@@ -687,6 +687,41 @@ - - xcopy(z, t); - } -+*/ -+void conv(RR& z, long double a) -+{ -+ if (a == 0) { -+ clear(z); -+ return; -+ } -+ -+ if (a == 1) { -+ set(z); -+ return; -+ } -+ -+ //if (!IsFinite(&a)) -+ //Error("RR: conversion of a non-finite double"); -+ -+ int e; -+ long double f, term; -+ RR t; -+ clear(z); -+ -+ f = frexp(a, &e); -+ -+ while(f) -+ { -+ // extract 30 bits from f: -+ f = ldexp(f, 30); -+ term = floor(f); -+ e -= 30; -+ conv(t.x, (int)term); -+ t.e = e; -+ z += t; -+ f -= term; -+ } -+} - - void ConvPrec(RR& x, double a, long p) - { -@@ -1069,7 +1104,7 @@ - Error("RR: overflow"); - - if (z.e <= -NTL_OVFBND) -- Error("RR: underflow"); -+ z = 0; // Error("RR: underflow"); - } - - void ConvPrec(RR& x, const xdouble& a, long p) -@@ -1100,11 +1135,12 @@ - if (e >= NTL_OVFBND) - Error("RR: overflow"); - -- if (e <= -NTL_OVFBND) -- Error("RR: underflow"); - - set(z.x); - z.e = e; -+ -+ if (e <= -NTL_OVFBND) -+ z = 0; // Error("RR: underflow"); - } - - void conv(RR& z, const quad_float& a) -@@ -2019,7 +2055,7 @@ - - bp[len] = '\0'; - -- if (k > 3 || k < -len - 3) { -+ if ((s.flags() & ostream::scientific) || (k > 3 || k < -len - 3)) { - // use scientific notation - - if (neg) s << "-"; - From 7a1400a78c81b80eb0ac4c78ecff5f6e6f75f595 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Fri, 5 Dec 2008 12:41:18 +0000 Subject: [PATCH 090/192] Laplace pdf formula [SVN r50129] --- doc/sf_and_dist/equations/laplace_pdf.mml | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/sf_and_dist/equations/laplace_pdf.mml diff --git a/doc/sf_and_dist/equations/laplace_pdf.mml b/doc/sf_and_dist/equations/laplace_pdf.mml new file mode 100644 index 000000000..6ba8cc8d2 --- /dev/null +++ b/doc/sf_and_dist/equations/laplace_pdf.mml @@ -0,0 +1,52 @@ + +]> + +laplace_pdf + + + + + f + + + x + ; + μ + , + σ + + + + = + + + 1 + + 2 + σ + + + + e + + + + + | + x + + μ + | + + + σ + + + + + + + + \ No newline at end of file From ca742e513d88cb2a811c615689ae9ac86b6f2518 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Fri, 5 Dec 2008 12:43:28 +0000 Subject: [PATCH 091/192] Laplace distribution pdf images [SVN r50130] --- doc/sf_and_dist/graphs/laplace_pdf_mu.svg | 537 +++++++++++++++++++ doc/sf_and_dist/graphs/laplace_pdf_sigma.svg | 537 +++++++++++++++++++ 2 files changed, 1074 insertions(+) create mode 100644 doc/sf_and_dist/graphs/laplace_pdf_mu.svg create mode 100644 doc/sf_and_dist/graphs/laplace_pdf_sigma.svg diff --git a/doc/sf_and_dist/graphs/laplace_pdf_mu.svg b/doc/sf_and_dist/graphs/laplace_pdf_mu.svg new file mode 100644 index 000000000..a272e4be7 --- /dev/null +++ b/doc/sf_and_dist/graphs/laplace_pdf_mu.svg @@ -0,0 +1,537 @@ + + + +Produced by GNUPLOT 4.2 patchlevel 4 + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0.1 + + + + + 0.2 + + + + + 0.3 + + + + + 0.4 + + + + + 0.5 + + + + + -10 + + + + + -8 + + + + + -6 + + + + + -4 + + + + + -2 + + + + + 0 + + + + + 2 + + + + + 4 + + + + + 6 + + + + + 8 + + + + + 10 + + + + + Probability + + + + Random Variable + + + + + + + + μ = -6, σ = 1 + + + + + + + + + + + μ = 0, σ = 2 + + + + + + + + + + + μ = 2, σ = 4 + + + + + + + + + + + diff --git a/doc/sf_and_dist/graphs/laplace_pdf_sigma.svg b/doc/sf_and_dist/graphs/laplace_pdf_sigma.svg new file mode 100644 index 000000000..67825f48f --- /dev/null +++ b/doc/sf_and_dist/graphs/laplace_pdf_sigma.svg @@ -0,0 +1,537 @@ + + + +Produced by GNUPLOT 4.2 patchlevel 4 + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0.1 + + + + + 0.2 + + + + + 0.3 + + + + + 0.4 + + + + + 0.5 + + + + + -10 + + + + + -8 + + + + + -6 + + + + + -4 + + + + + -2 + + + + + 0 + + + + + 2 + + + + + 4 + + + + + 6 + + + + + 8 + + + + + 10 + + + + + Probability + + + + Random Variable + + + + + + + + μ = 0, σ = 1 + + + + + + + + + + + μ = 0, σ = 2 + + + + + + + + + + + μ = 0, σ = 5 + + + + + + + + + + + From 3779df1d6cd651461b1c900d904992feb74f30e5 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Fri, 5 Dec 2008 12:43:56 +0000 Subject: [PATCH 092/192] added ref to equation and two images [SVN r50131] --- doc/sf_and_dist/distributions/laplace.qbk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/sf_and_dist/distributions/laplace.qbk b/doc/sf_and_dist/distributions/laplace.qbk index 1cdf81f4c..93ec785fe 100644 --- a/doc/sf_and_dist/distributions/laplace.qbk +++ b/doc/sf_and_dist/distributions/laplace.qbk @@ -25,7 +25,7 @@ }} // namespaces -The laplace distribution is the distribution that is the difference betweeen +The laplace distribution is the distribution that is the difference between two independent identically distributed exponential distributed variables. It is also called the double exponential distribution. @@ -35,24 +35,24 @@ so is plain wrong. Also need pictures. and added to math.qbk to be used. -For location and scale parameters /m/ and /s/ it is defined by the +For location parameter [mu][space] and scale parameters [sigma][space] it is defined by the probability density function: -[equation laplace_ref] +[equation laplace_pdf] The location and scale parameters are equivalent to the mean and standard deviation of the logarithm of the random variable. The following graph illustrates the effect of the location parameter on the PDF, note that the range of the random -variable remains \[0,+[infin]\] irrespective of the value of the +variable remains \[-[infin],+[infin]\] irrespective of the value of the location parameter: -[graph laplace_pdf1] +[graph laplace_pdf_mu] The next graph illustrates the effect of the scale parameter on the PDF: -[graph laplace_pdf2] +[graph laplace_pdf_sigma] [h4 Member Functions] From bf5388177d1bc6a5763dc544a7bf10af772de259 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 5 Dec 2008 16:05:26 +0000 Subject: [PATCH 093/192] Integrated Johan Rade's floating point utilities code. [SVN r50134] --- .../special_functions/detail/fp_traits.hpp | 556 ++++++++++++++++++ .../math/special_functions/fpclassify.hpp | 486 +++++++++++---- 2 files changed, 926 insertions(+), 116 deletions(-) create mode 100644 include/boost/math/special_functions/detail/fp_traits.hpp diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp new file mode 100644 index 000000000..60c934682 --- /dev/null +++ b/include/boost/math/special_functions/detail/fp_traits.hpp @@ -0,0 +1,556 @@ +// fp_traits.hpp + +#ifndef BOOST_MATH_FP_TRAITS_HPP +#define BOOST_MATH_FP_TRAITS_HPP + +// Copyright (c) 2006 Johan Rade + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* +To support old compilers, care has been taken to avoid partial template +specialization and meta function forwarding. +With these techniques, the code could be simplified. +*/ + +#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT +// The VAX floating point formats are used (for float and double) +# define BOOST_FPCLASSIFY_VAX_FORMAT +#endif + +#include + +#include +#include +#include +#include +#include + +#ifdef BOOST_NO_STDC_NAMESPACE + namespace std{ using ::memcpy; } +#endif + +#ifndef FP_NORMAL + +#define FP_ZERO 0 +#define FP_NORMAL 1 +#define FP_INFINITE 2 +#define FP_NAN 3 +#define FP_SUBNORMAL 4 + +#else + +#define BOOST_HAS_FPCLASSIFY + +#ifndef fpclassify +# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ + && defined(_GLIBCXX_USE_C99_MATH) \ + && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \ + && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) +# ifdef _STLP_VENDOR_CSTD +# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: +# else +# define BOOST_FPCLASSIFY_PREFIX ::std:: +# endif +# else +# undef BOOST_HAS_FPCLASSIFY +# define BOOST_FPCLASSIFY_PREFIX +# endif +#elif (defined(__HP_aCC) && !defined(__hppa)) +// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit! +# define BOOST_FPCLASSIFY_PREFIX :: +#else +# define BOOST_FPCLASSIFY_PREFIX +#endif + +#ifdef __MINGW32__ +# undef BOOST_HAS_FPCLASSIFY +#endif + +#endif + + +//------------------------------------------------------------------------------ + +namespace boost { +namespace math { +namespace detail { + +//------------------------------------------------------------------------------ + +/* +The following classes are used to tag the different methods that are used +for floating point classification +*/ + +struct native_tag {}; +template +struct generic_tag {}; +struct ieee_tag {}; +struct ieee_copy_all_bits_tag : public ieee_tag {}; +struct ieee_copy_leading_bits_tag : public ieee_tag {}; + +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// +// These helper functions are used only when numeric_limits<> +// members are not compile time constants: +// +inline bool is_generic_tag_false(const generic_tag&) +{ + return true; +} +inline bool is_generic_tag_false(...) +{ + return false; +} +#endif + +//------------------------------------------------------------------------------ + +/* +Most processors support three different floating point precisions: +single precision (32 bits), double precision (64 bits) +and extended double precision (80 - 128 bits, depending on the processor) + +Note that the C++ type long double can be implemented +both as double precision and extended double precision. +*/ + +struct unknown_precision{}; +struct single_precision {}; +struct double_precision {}; +struct extended_double_precision {}; + +// native_tag version -------------------------------------------------------------- + +template struct fp_traits_native +{ + typedef native_tag method; +}; + +// generic_tag version ------------------------------------------------------------- + +template struct fp_traits_non_native +{ +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + typedef generic_tag::is_specialized> method; +#else + typedef generic_tag method; +#endif +}; + +// ieee_tag versions --------------------------------------------------------------- + +/* +These specializations of fp_traits_non_native contain information needed +to "parse" the binary representation of a floating point number. + +Typedef members: + + bits -- the target type when copying the leading bytes of a floating + point number. It is a typedef for uint32_t or uint64_t. + + method -- tells us whether all bytes are copied or not. + It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag. + +Static data members: + + sign, exponent, flag, significand -- bit masks that give the meaning of the + bits in the leading bytes. + +Static function members: + + get_bits(), set_bits() -- provide access to the leading bytes. + +*/ + +// ieee_tag version, float (32 bits) ----------------------------------------------- + +#ifndef BOOST_FPCLASSIFY_VAX_FORMAT + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff); + + typedef uint32_t bits; + static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } + static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } +}; + +// ieee_tag version, double (64 bits) ---------------------------------------------- + +#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \ + || defined(__BORLANDC__) || defined(__CODEGEAR__) + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 4); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +//.............................................................................. + +#else + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = ((uint64_t)0x80000000u) << 32; + static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); + + typedef uint64_t bits; + static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; + +#endif + +#endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT + +// long double (64 bits) ------------------------------------------------------- + +#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\ + || defined(__BORLANDC__) || defined(__CODEGEAR__) + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 4); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +//.............................................................................. + +#else + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = (uint64_t)0x80000000u << 32; + static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; + + typedef uint64_t bits; + static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; + +#endif + + +// long double (>64 bits), x86 and x64 ----------------------------------------- + +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \ + || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \ + || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) + +// Intel extended double precision format (80 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + 6, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + 6, &a, 4); + } +}; + + +// long double (>64 bits), Itanium --------------------------------------------- + +#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + +// The floating point format is unknown at compile time +// No template specialization is provided. +// The generic_tag definition is used. + +// The Itanium supports both +// the Intel extended double precision format (80 bits) and +// the IEEE extended double precision format with 15 exponent bits (128 bits). + + +// long double (>64 bits), PowerPC --------------------------------------------- + +#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \ + || defined(__ppc) || defined(__ppc__) || defined(__PPC__) + +// PowerPC extended double precision format (128 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 12); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + + +// long double (>64 bits), Motorola 68K ---------------------------------------- + +#elif defined(__m68k) || defined(__m68k__) \ + || defined(__mc68000) || defined(__mc68000__) \ + +// Motorola extended double precision format (96 bits) + +// It is the same format as the Intel extended double precision format, +// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and +// 3) the flag bit is not set for infinity + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); + + // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding. + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, &x, 2); + std::memcpy(reinterpret_cast(&a) + 2, + reinterpret_cast(&x) + 4, 2); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(&x, &a, 2); + std::memcpy(reinterpret_cast(&x) + 4, + reinterpret_cast(&a) + 2, 2); + } +}; + + +// long double (>64 bits), All other processors -------------------------------- + +#else + +// IEEE extended double precision format with 15 exponent bits (128 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 12); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +#endif + +//------------------------------------------------------------------------------ + +// size_to_precision is a type switch for converting a C++ floating point type +// to the corresponding precision type. + +template struct size_to_precision +{ + typedef unknown_precision type; +}; + +template<> struct size_to_precision<4, true> +{ + typedef single_precision type; +}; + +template<> struct size_to_precision<8, true> +{ + typedef double_precision type; +}; + +template<> struct size_to_precision<10, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<12, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<16, true> +{ + typedef extended_double_precision type; +}; + +//------------------------------------------------------------------------------ +// +// Figure out whether to use native classification functions based on +// whether T is a built in floating point type or not: +// +template +struct select_native +{ + typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; + typedef fp_traits_non_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; + +//------------------------------------------------------------------------------ + +// fp_traits is a type switch that selects the right fp_traits_non_native + +template struct fp_traits +{ +#if (defined(BOOST_MATH_USE_C99) && (!defined(__GNUC__) || (__GNUC__ >= 4))) + typedef typename select_native::type type; +#else + typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; + typedef fp_traits_non_native type; +#endif +}; + +//------------------------------------------------------------------------------ + +} // namespace detail +} // namespace math +} // namespace boost + +#endif diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index 2480a902d..c2a567a7b 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -1,4 +1,5 @@ -// Copyright John Maddock 2005-2006. +// Copyright John Maddock 2005-2008. +// Copyright (c) 2006-2008 Johan Rade // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +17,56 @@ #include #include #include +#include + +/* + +1. If the platform is C99 compliant, then the native floating point +classification functions are used. + +2. If the platform is not C99 compliant, and the binary format for +a floating point type (float, double or long double) can be determined +at compile time, then the following algorithm is used: + + If all exponent bits, the flag bit (if there is one), + and all significand bits are 0, then the number is zero. + + If all exponent bits and the flag bit (if there is one) are 0, + and at least one significand bit is 1, then the number is subnormal. + + If all exponent bits are 1 and all significand bits are 0, + then the number is infinity. + + If all exponent bits are 1 and at least one significand bit is 1, + then the number is a not-a-number. + + Otherwise the number is normal. + + This algorithm works for the IEEE 754 representation, + and also for several non IEEE 754 formats. + + Most formats have the structure + sign bit + exponent bits + significand bits. + + A few have the structure + sign bit + exponent bits + flag bit + significand bits. + The flag bit is 0 for zero and subnormal numbers, + and 1 for normal numbers and NaN. + It is 0 (Motorola 68K) or 1 (Intel) for infinity. + + To get the bits, the four or eight most significant bytes are copied + into an uint32_t or uint64_t and bit masks are applied. + This covers all the exponent bits and the flag bit (if there is one), + but not always all the significand bits. + Some of the functions below have two implementations, + depending on whether all the significand bits are copied or not. + +3. If the platform is not C99 compliant, and the binary format for +a floating point type (float, double or long double) can not be determined +at compile time, then comparison with std::numeric_limits values +is used. + +*/ #if defined(_MSC_VER) || defined(__BORLANDC__) #include @@ -25,45 +76,6 @@ namespace std{ using ::abs; using ::fabs; } #endif -#ifndef FP_NORMAL - -#define FP_ZERO 0 -#define FP_NORMAL 1 -#define FP_INFINITE 2 -#define FP_NAN 3 -#define FP_SUBNORMAL 4 - -#else - -#define BOOST_HAS_FPCLASSIFY - -#ifndef fpclassify -# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ - && defined(_GLIBCXX_USE_C99_MATH) \ - && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \ - && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) -# ifdef _STLP_VENDOR_CSTD -# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: -# else -# define BOOST_FPCLASSIFY_PREFIX ::std:: -# endif -# else -# undef BOOST_HAS_FPCLASSIFY -# define BOOST_FPCLASSIFY_PREFIX -# endif -#elif (defined(__HP_aCC) && !defined(__hppa)) -// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit! -# define BOOST_FPCLASSIFY_PREFIX :: -#else -# define BOOST_FPCLASSIFY_PREFIX -#endif - -#ifdef __MINGW32__ -# undef BOOST_HAS_FPCLASSIFY -#endif - -#endif - namespace boost{ #if defined(BOOST_HAS_FPCLASSIFY) || defined(isnan) @@ -99,8 +111,16 @@ namespace math{ namespace detail{ template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const mpl::true_&) +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&) { + return (std::fpclassify)(t); +} + +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) +{ + BOOST_MATH_INSTRUMENT_VARIABLE(t); + // whenever possible check for Nan's first: #ifdef BOOST_HAS_FPCLASSIFY if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) @@ -133,117 +153,351 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const mpl::true_&) } template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const mpl::false_&) +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return fp_classify_imp(t, mpl::true_()); +#endif // // An unknown type with no numeric_limits support, // so what are we supposed to do we do here? // + BOOST_MATH_INSTRUMENT_VARIABLE(t); + return t == 0 ? FP_ZERO : FP_NORMAL; } +template +int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) +{ + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_MATH_INSTRUMENT_VARIABLE(x); + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + BOOST_MATH_INSTRUMENT_VARIABLE(a); + a &= traits::exponent | traits::flag | traits::significand; + BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand)); + BOOST_MATH_INSTRUMENT_VARIABLE(a); + + if(a <= traits::significand) { + if(a == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + if(a == 0) return FP_INFINITE; + + return FP_NAN; +} + +template +int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) +{ + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_MATH_INSTRUMENT_VARIABLE(x); + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag | traits::significand; + + if(a <= traits::significand) { + if(x == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + traits::set_bits(x,a); + if(x == 0) return FP_INFINITE; + + return FP_NAN; +} + +#if defined(BOOST_HAS_FPCLASSIFY) +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, const U&) +{ + return BOOST_FPCLASSIFY_PREFIX fpclassify BOOST_NO_MACRO_EXPAND(x); +} +#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ + || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ + || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) +// The native fpclassify broken for long doubles +// use portable one instead.... +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const U&) +{ +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + typedef generic_tag::is_specialized> method; +#else + typedef generic_tag method; +#endif + return fpclassify_imp BOOST_NO_MACRO_EXPAND(t, method(), t); +} +#endif +#endif } // namespace detail template inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) { + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - if(std::numeric_limits::is_specialized) - return detail::fpclassify_imp(t, mpl::true_()); - return detail::fpclassify_imp(t, mpl::false_()); + if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(method())) + return detail::fpclassify_imp(t, detail::generic_tag()); + return detail::fpclassify_imp(t, method()); #else - return detail::fpclassify_imp(t, mpl::bool_< ::std::numeric_limits::is_specialized>()); + return detail::fpclassify_imp(t, method()); #endif } -#if defined(BOOST_HAS_FPCLASSIFY) -inline int fpclassify BOOST_NO_MACRO_EXPAND(float t) -{ - return BOOST_FPCLASSIFY_PREFIX fpclassify(t); -} -inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) -{ - return BOOST_FPCLASSIFY_PREFIX fpclassify(t); -} -#if !defined(__CYGWIN__) && !defined(__HP_aCC) && !defined(BOOST_INTEL) \ - && !defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ - && !(defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) -// The native fpclassify broken for long doubles with aCC -// use portable one instead.... -inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) -{ - return BOOST_FPCLASSIFY_PREFIX fpclassify(t); -} +namespace detail { + + template + inline bool isfinite_impl(T x, native_tag const&) + { + return (std::isfinite)(x); + } + + template + inline bool isfinite_impl(T x, generic_tag const&) + { + return x >= -std::numeric_limits::max() + && x <= std::numeric_limits::max(); + } + + template + inline bool isfinite_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isfinite_impl(x, mpl::true_()); #endif + (void)x; // warning supression. + return true; + } + + template + inline bool isfinite_impl(T x, ieee_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent; + return a != traits::exponent; + } -#elif defined(_MSC_VER) -// This only works for type double, for both float -// and long double it gives misleading answers. -inline int fpclassify BOOST_NO_MACRO_EXPAND(double t) -{ - switch(::_fpclass(t)) - { - case _FPCLASS_SNAN /* Signaling NaN */ : - case _FPCLASS_QNAN /* Quiet NaN */ : - return FP_NAN; - case _FPCLASS_NINF /*Negative infinity ( -INF) */ : - case _FPCLASS_PINF /* Positive infinity (+INF) */ : - return FP_INFINITE; - case _FPCLASS_NN /* Negative normalized non-zero */ : - case _FPCLASS_PN /* Positive normalized non-zero */ : - return FP_NORMAL; - case _FPCLASS_ND /* Negative denormalized */: - case _FPCLASS_PD /* Positive denormalized */ : - return FP_SUBNORMAL; - case _FPCLASS_NZ /* Negative zero ( - 0) */ : - case _FPCLASS_PZ /* Positive 0 (+0) */ : - return FP_ZERO; - default: - /**/ ; - } - return FP_NAN; // should never get here!!! } + +template +inline bool (isfinite)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isfinite_impl(x, method()); +} + +//------------------------------------------------------------------------------ + +namespace detail { + + template + inline bool isnormal_impl(T x, native_tag const&) + { + return (std::isnormal)(x); + } + + template + inline bool isnormal_impl(T x, generic_tag const&) + { + if(x < 0) x = -x; + return x >= std::numeric_limits::min() + && x <= std::numeric_limits::max(); + } + + template + inline bool isnormal_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isnormal_impl(x, mpl::true_()); #endif + return !(x == 0); + } + + template + inline bool isnormal_impl(T x, ieee_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag; + return (a != 0) && (a < traits::exponent); + } -template -inline bool isfinite BOOST_NO_MACRO_EXPAND(T z) -{ - int t = (::boost::math::fpclassify)(z); - return (t != (int)FP_NAN) && (t != (int)FP_INFINITE); } -template -inline bool isinf BOOST_NO_MACRO_EXPAND(T t) +template +inline bool (isnormal)(T x) { - return (::boost::math::fpclassify)(t) == (int)FP_INFINITE; + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isnormal_impl(x, method()); } -template -inline bool isnan BOOST_NO_MACRO_EXPAND(T t) +//------------------------------------------------------------------------------ + +namespace detail { + + template + inline bool isinf_impl(T x, native_tag const&) + { + return (std::isinf)(x); + } + + template + inline bool isinf_impl(T x, generic_tag const&) + { + return std::numeric_limits::has_infinity + && ( x == std::numeric_limits::infinity() + || x == -std::numeric_limits::infinity()); + } + + template + inline bool isinf_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isinf_impl(x, mpl::true_()); +#endif + (void)x; // warning supression. + return false; + } + + template + inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a == traits::exponent; + } + + template + inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + if(a != traits::exponent) + return false; + + traits::set_bits(x,0); + return x == 0; + } + +} // namespace detail + +template +inline bool (isinf)(T x) { - return (::boost::math::fpclassify)(t) == (int)FP_NAN; + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isinf_impl(x, method()); } + +//------------------------------------------------------------------------------ + +namespace detail { + + template + inline bool isnan_impl(T x, native_tag const&) + { + return (std::isnan)(x); + } + + template + inline bool isnan_impl(T x, generic_tag const&) + { + return std::numeric_limits::has_infinity + ? !(x <= std::numeric_limits::infinity()) + : x != x; + } + + template + inline bool isnan_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isnan_impl(x, mpl::true_()); +#endif + (void)x; // warning supression + return false; + } + + template + inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a > traits::exponent; + } + + template + inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + + a &= traits::exponent | traits::significand; + if(a < traits::exponent) + return false; + + a &= traits::significand; + traits::set_bits(x,a); + return x != 0; + } + +} // namespace detail + +template bool (isnan)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isnan_impl(x, method()); +} + #ifdef isnan template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } -#elif defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' -# pragma warning(disable: 4244) // conversion from 'long double' to 'double', -// No possible loss of data because they are same size. -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return _isnan(t); } -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return _isnan(t); } -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return _isnan(t); } -#pragma warning (pop) #endif -template -inline bool isnormal BOOST_NO_MACRO_EXPAND(T t) -{ - return (::boost::math::fpclassify)(t) == (int)FP_NORMAL; -} - } // namespace math } // namespace boost From ae98d17de024e33b5327719a924b1aad880af3bc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 5 Dec 2008 16:08:17 +0000 Subject: [PATCH 094/192] Clarified test case. [SVN r50135] --- test/test_classify.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_classify.cpp b/test/test_classify.cpp index 5b661266b..19b46323f 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -50,6 +50,7 @@ void test_classify(T t, const char* type) } if(std::numeric_limits::has_denorm) { + t = (std::numeric_limits::min)(); t /= 2; if(t != 0) { From adb945b0742883f67d22753589e7fd738eff2bbe Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 6 Dec 2008 16:06:15 +0000 Subject: [PATCH 095/192] Fix Intel/Linux compile failures, and reinstate some old workarounds for broken std::fpclassify implementations. [SVN r50161] --- .../math/special_functions/fpclassify.hpp | 49 +++++++++++-------- include/boost/math/tools/config.hpp | 6 +++ 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index c2a567a7b..f95ad6efb 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -224,29 +224,14 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) return FP_NAN; } -#if defined(BOOST_HAS_FPCLASSIFY) -template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, const U&) +#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +template <> +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { - return BOOST_FPCLASSIFY_PREFIX fpclassify BOOST_NO_MACRO_EXPAND(x); -} -#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ - || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ - || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) -// The native fpclassify broken for long doubles -// use portable one instead.... -template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const U&) -{ -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - typedef generic_tag::is_specialized> method; -#else - typedef generic_tag method; -#endif - return fpclassify_imp BOOST_NO_MACRO_EXPAND(t, method(), t); + return boost::math::detail::fpclassify_imp(t, generic_tag()); } #endif -#endif + } // namespace detail template @@ -299,6 +284,14 @@ namespace detail { return a != traits::exponent; } +#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +template <> +inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isfinite_impl(t, generic_tag()); +} +#endif + } template @@ -348,6 +341,14 @@ namespace detail { return (a != 0) && (a < traits::exponent); } +#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +template <> +inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isnormal_impl(t, generic_tag()); +} +#endif + } template @@ -414,6 +415,14 @@ namespace detail { return x == 0; } +#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +template <> +inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isinf_impl(t, generic_tag()); +} +#endif + } // namespace detail template diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index fe2de8923..44160ff83 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -82,6 +82,12 @@ # define BOOST_MATH_USE_C99 #endif +#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ + || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ + || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) +# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY +#endif + #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) # include "boost/type.hpp" From 6a51e23333deb4f5087e553b8cc8c9636f66d1d4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 6 Dec 2008 16:07:42 +0000 Subject: [PATCH 096/192] Added debugging info to test case. [SVN r50162] --- test/test_classify.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/test_classify.cpp b/test/test_classify.cpp index 19b46323f..c0a3e7558 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -15,10 +15,46 @@ #pragma warning(disable: 4127) // conditional expression is constant #endif +const char* method_name(const boost::math::detail::native_tag&) +{ + return "Native"; +} + +const char* method_name(const boost::math::detail::generic_tag&) +{ + return "Generic (with numeric limits)"; +} + +const char* method_name(const boost::math::detail::generic_tag&) +{ + return "Generic (without numeric limits)"; +} + +const char* method_name(const boost::math::detail::ieee_tag&) +{ + return "IEEE std"; +} + +const char* method_name(const boost::math::detail::ieee_copy_all_bits_tag&) +{ + return "IEEE std, copy all bits"; +} + +const char* method_name(const boost::math::detail::ieee_copy_leading_bits_tag&) +{ + return "IEEE std, copy leading bits"; +} + template void test_classify(T t, const char* type) { std::cout << "Testing type " << type << std::endl; + + typedef typename boost::math::detail::fp_traits::type traits; + typedef typename traits::method method; + + std::cout << "Evaluation method = " << method_name(method()) << std::endl; + t = 2; T u = 2; BOOST_CHECK_EQUAL((::boost::math::fpclassify)(t), (int)FP_NORMAL); From af0b3d744ed09666635b4681de68433754c0c84b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Dec 2008 10:15:46 +0000 Subject: [PATCH 097/192] Disable use of std::fpclassify for more platforms. [SVN r50218] --- include/boost/math/special_functions/detail/fp_traits.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp index 60c934682..1020aae49 100644 --- a/include/boost/math/special_functions/detail/fp_traits.hpp +++ b/include/boost/math/special_functions/detail/fp_traits.hpp @@ -539,7 +539,9 @@ struct select_native template struct fp_traits { -#if (defined(BOOST_MATH_USE_C99) && (!defined(__GNUC__) || (__GNUC__ >= 4))) +#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \ + && !defined(__hpux) \ + && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) typedef typename select_native::type type; #else typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; From b01c45c9c7d1b4d42b30b0db5a7b48f7b45321fb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Dec 2008 16:34:59 +0000 Subject: [PATCH 098/192] Patch for gcc-3.2 compiler errors. [SVN r50223] --- include/boost/math/policies/policy.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 590c0520b..1ed35a4db 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -92,7 +92,8 @@ namespace policies{ #define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 #endif -#if !defined(__BORLANDC__) +#if !defined(__BORLANDC__) \ + && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) #define BOOST_MATH_META_INT(type, name, Default)\ template struct name : public boost::mpl::int_{};\ namespace detail{\ @@ -106,7 +107,7 @@ namespace policies{ BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ };\ }\ - template struct is_##name : public boost::mpl::bool_::value>{}; + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; #define BOOST_MATH_META_BOOL(name, Default)\ template struct name : public boost::mpl::bool_{};\ @@ -121,7 +122,7 @@ namespace policies{ BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ };\ }\ - template struct is_##name : public boost::mpl::bool_::value>{}; + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; #else #define BOOST_MATH_META_INT(Type, name, Default)\ template struct name : public boost::mpl::int_{};\ @@ -137,10 +138,10 @@ namespace policies{ template struct is_##name##_imp\ {\ static T inst;\ - BOOST_STATIC_CONSTANT(bool, value = sizeof(detail::is_##name##_tester::test(inst)) == 1);\ + BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ };\ }\ - template struct is_##name : public boost::mpl::bool_::value>\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ {\ template struct apply{ typedef is_##name type; };\ }; @@ -159,10 +160,10 @@ namespace policies{ template struct is_##name##_imp\ {\ static T inst;\ - BOOST_STATIC_CONSTANT(bool, value = sizeof(detail::is_##name##_tester::test(inst)) == 1);\ + BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ };\ }\ - template struct is_##name : public boost::mpl::bool_::value>\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ {\ template struct apply{ typedef is_##name type; };\ }; From 21168dad49867b194597d09a6f4070f044edeaa7 Mon Sep 17 00:00:00 2001 From: Thijs van den Berg Date: Thu, 11 Dec 2008 11:31:33 +0000 Subject: [PATCH 099/192] png version of the laplace pdf equiation image [SVN r50238] --- doc/sf_and_dist/equations/laplace_pdf.png | Bin 0 -> 1107 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/sf_and_dist/equations/laplace_pdf.png diff --git a/doc/sf_and_dist/equations/laplace_pdf.png b/doc/sf_and_dist/equations/laplace_pdf.png new file mode 100644 index 0000000000000000000000000000000000000000..53fcf26d46e6c7eca9440780deb807b8ce60fdff GIT binary patch literal 1107 zcmeAS@N?(olHy`uVBq!ia0y~yU^vadz@W;(#K6Fie7$QL0|Secr;B4q#hkaZ4L5Bv z5NMcQ|F8MMo@b(ROvl)cU6amu{71JZy`ZQlOAg-*jB>lzy}rx&^rkfe;omm9MzVN_`9J5YR`|4Cos;+R zv73Qb{A<_pcQY^D7NtJv=;g{oavla|XD&QA(_CT|e~aOQgz3E17XpqpN%9)cIr#9~ zlehglv@ET)CS17{?zl<9E|;O{n)VNtmJKBlixb;!CCENMnfUN+>`@J#bi*a9J5$#t zHZ>Nbwe2ggP+s%tk@6cGD1@u&fYLMEGw`@*Dh!2vS~M`UlC~f~vv{mJ& z9cQUU$wJfI)8-b$Er{8n;|J<=D^Uu8O z-OX$E)&xh2iq>RER{9w4TXO09Bev5T6TZGV9D2%0f`MUg?T6G?RlTX77VLX#)b+{w z*Xc(Fb!xMvPF`NSYWJC!%v{sh7X@rOx68fz{6isw^6KpTgF0{D#XMb^8sn+>H{s+w z-93AEw=swI)Od(3zn7GD+RMCZ(c637|6*g+bUW4*dT;gfh^ZC-aggKF-QdYL6k0zy z@AcjMorA%l>vN*G-07FMH@C6}AAR!9nM-Y(YUG@%?{_}srra0(@bTVZn~bQ6!u?^H z8zOIoPI%>XFPm>|U2NftL(kR~sy-_JFv(G1&k@%yB~HJ|mLKEdCUMT4FQ9H_`0}pv z>dYA>w^oUy3-fMexp)2WwZ$=EY?TXCtZ(mpr}zGQo9D)29lzgwhkiL+FesBfdgjX4 z*qC$Imj2qdYSJ6I(;6RUOkZ31c~#)5)&JH=_N3U`IEP&*Z`_zvl_|b7*Robpwk$Qp zH@|#;F6&f1Te-hg>#8rae)YJ2Gq-DN&^BIq|Lcr4j<^5ziZY%|3Wzh_5^HI5&VAAa z^%L=j8-u(uC0EveH+Qmnx!7rf^4B2q-&>z-+jT+eS2pMTeN$Za?Qe6Rezq-cf_}qO z`>nk`!e`CbSvl@|B4#jJ$4#O&U@@PC1|Us9@79qxkJNHlL5s z<+#T8S^dNVfh~GwCnv4G`EKuuk{@N6jtp Date: Thu, 11 Dec 2008 11:32:54 +0000 Subject: [PATCH 100/192] updated text updated table with equations [SVN r50239] --- doc/sf_and_dist/distributions/laplace.qbk | 56 +++++++++++++++-------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/doc/sf_and_dist/distributions/laplace.qbk b/doc/sf_and_dist/distributions/laplace.qbk index 93ec785fe..d6373253b 100644 --- a/doc/sf_and_dist/distributions/laplace.qbk +++ b/doc/sf_and_dist/distributions/laplace.qbk @@ -41,7 +41,7 @@ probability density function: [equation laplace_pdf] The location and scale parameters are equivalent to the mean and -standard deviation of the logarithm of the random variable. +standard deviation. The following graph illustrates the effect of the location parameter on the PDF, note that the range of the random @@ -61,11 +61,9 @@ The next graph illustrates the effect of the scale parameter on the PDF: Constructs a laplace distribution with location /location/ and scale /scale/. -The location parameter is the same as the mean of the logarithm of the -random variate. +The location parameter is the same as the mean of the random variate. -The scale parameter is the same as the standard deviation of the -logarithm of the random variate. +The scale parameter is proportional to the standard deviation of the random variate. Requires that the scale parameter is greater than zero, otherwise calls __domain_error. @@ -83,14 +81,12 @@ Returns the /scale/ parameter of this distribution. All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] that are generic to all distributions are supported: __usual_accessors. -The domain of the random variable is \[0,+[infin]\]. +The domain of the random variable is \[-[infin],+[infin]\]. [h4 Accuracy] The laplace distribution is implemented in terms of the -standard library log and exp functions, plus the -[link math_toolkit.special.sf_erf.error_function error function], -and as such should have very low error rates. +standard library log and exp functions and as such should have very low error rates. [h4 Implementation] @@ -100,17 +96,37 @@ and /q = 1-p/. [table [[Function][Implementation Notes]] -[[pdf][Using the relation: pdf = e[super -(ln(x) - m)[super 2 ] \/ 2s[super 2 ] ] \/ (x * s * sqrt(2pi)) ]] -[[cdf][Using the relation: p = cdf(normal_distribtion(m, s), log(x)) ]] -[[cdf complement][Using the relation: q = cdf(complement(normal_distribtion(m, s), log(x))) ]] -[[quantile][Using the relation: x = exp(quantile(normal_distribtion(m, s), p))]] -[[quantile from the complement][Using the relation: x = exp(quantile(complement(normal_distribtion(m, s), q)))]] -[[mean][e[super m + s[super 2 ] / 2 ] ]] -[[variance][(e[super s[super 2] ] - 1) * e[super 2m + s[super 2 ] ] ]] -[[mode][e[super m + s[super 2 ] ] ]] -[[skewness][sqrt(e[super s[super 2] ] - 1) * (2 + e[super s[super 2] ]) ]] -[[kurtosis][e[super 4s[super 2] ] + 2e[super 3s[super 2] ] + 3e[super 2s[super 2] ] - 3]] -[[kurtosis excess][e[super 4s[super 2] ] + 2e[super 3s[super 2] ] + 3e[super 2s[super 2] ] - 6 ]] +[[pdf][Using the relation: pdf = e[super -abs(x-m) \/ s] \/ (2 * s) ]] +[[cdf][Using the relations: + +x < m : p = e[super (x-m)/s ] \/ s + +x >= m : p = 1 - e[super (m-x)/s ] \/ s +]] +[[cdf complement][Using the relation: + +-x < m : q = e[super (-x-m)/s ] \/ s + +-x >= m : q = 1 - e[super (m+x)/s ] \/ s +]] +[[quantile][Using the relations: + +p < 0.5 : x = m + s * log(2*p) + +p >= 0.5 : x = m - s * log(2-2*p) +]] +[[quantile from the complement][Using the relation: + +q > 0.5: x = m + s*log(2-2*q) + +q <=0.5: x = m - s*log( 2*q ) +]] +[[mean][m]] +[[variance][2 * s[super 2] ]] +[[mode][m]] +[[skewness][0]] +[[kurtosis][6]] +[[kurtosis excess][3]] ] [h4 References] From b1c1aab20973f7cbea4b94cadb2e547a587f8efc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 11 Dec 2008 16:45:25 +0000 Subject: [PATCH 101/192] Added SVG and PNG versions of the laplace_pdf equation. [SVN r50241] --- doc/sf_and_dist/equations/laplace_pdf.png | Bin 1107 -> 2589 bytes doc/sf_and_dist/equations/laplace_pdf.svg | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 doc/sf_and_dist/equations/laplace_pdf.svg diff --git a/doc/sf_and_dist/equations/laplace_pdf.png b/doc/sf_and_dist/equations/laplace_pdf.png index 53fcf26d46e6c7eca9440780deb807b8ce60fdff..b299820f8c14d3967b6d97566beb86c86a93c273 100644 GIT binary patch literal 2589 zcmeAS@N?(olHy`uVBq!ia0y~yV7S7-z@W~-#=yW(ej{x?0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq`?Dr;B4q#hkZut2e}77Cml%f40Yj_JElyy4*d51-s%zgWkKG>@}0^&yWo6 zUy&sl)pjvpmXATOO78ItRgE^UWucc9IaHVRhJ}c_HdjmwToNbPRP+1zEpywSPrv`W zd%yO{yz^)B&%J-M`TMQk=iaX=z807Lwl;P4oH<`5J*yeDbM0@b{QS*yI@kWNcXxWu|xERTC`>OiaBwuZ?CJK zWtqqRFX6Y1XKkaW>Z~>AYVw)WmcM`8=(;W3J1ST)e8rq)%9#QMMg^^JuTFhsE`9sG zXB6L_3Fqt?>*Ck-F6nL1XYLNVsPf?3p{k!UTFWz+SROZdbnLI@-6wUEx0ru0*x=85 zmXAel%U-Wb1rKH)h;5y^>!|#U&G$A*7U;h8y>L}U{m_k)D&-5)WJGFLW!z)4QP0%a zApe2U!0*ztn_fFlPQPrDv!6jBQ*%T0^**)+!2`#(Jy#RX(|@3Nd;YX+m6fd>#(SCG zr2lsFoXy0XyMN~Sg+*4gMPqFl7;c-V?_1AuZvCd02M^5Nrhk6R|H_SBAOj`8eEGBO zal`RdD`)IqSX9N_&p6-Y!auGDokrK?8SPqP78X?*Ogbj~aY2&A4u%=?SKiO47hSJ? z-t2s)*`#%BeoST_hV#EpE4>#m$&FFCQMd8uw*OI{9ZPH*uIKE(^wIfEm5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dgjX4 z*qC$Imj2qdYSJ6I(;6RUOkZ31c~#)5)&JH=_N3U`IEP&*Z`_zvl_|b7*Robpwk$Qp zH@|#;F6&f1Te-hg>#8rae)YJ2Gq-DN&^BIq|Lcr4j<^5ziZY%|3Wzh_5^HI5&VAAa z^%L=j8-u(uC0EveH+Qmnx!7rf^4B2q-&>z-+jT+eS2pMTeN$Za?Qe6Rezq-cf_}qO z`>nk`!e`CbSvl@|B4#jJ$4#O&U@@PC1|Us9@79qxkJNHlL5s z<+#T8S^dNVfh~GwCnv4G`EKuuk{@N6jtp +f(x;μ,σ)=12σe−|x−μ|σ \ No newline at end of file From a69840ed47f00ee0b32d9a4e58d956d861cc0b3b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 12 Dec 2008 10:32:01 +0000 Subject: [PATCH 102/192] Add a couple more exemptions from using std::fpclassify. [SVN r50245] --- include/boost/math/special_functions/detail/fp_traits.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp index 1020aae49..6178f6df5 100644 --- a/include/boost/math/special_functions/detail/fp_traits.hpp +++ b/include/boost/math/special_functions/detail/fp_traits.hpp @@ -541,6 +541,8 @@ template struct fp_traits { #if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \ && !defined(__hpux) \ + && !defined(__DECCXX)\ + && !defined(__osf__)\ && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) typedef typename select_native::type type; #else From 5f9cb93d99e0617b81fa7ba66ca6163e392faa9f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 15 Dec 2008 09:31:44 +0000 Subject: [PATCH 103/192] Reorganise std::fpclassify usage so that functions are only declared if they're used: otherwise compilers can issue an error regarding std::fpclassify usage, even though the template is never instantiated. [SVN r50274] --- .../special_functions/detail/fp_traits.hpp | 11 +++++---- .../math/special_functions/fpclassify.hpp | 23 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp index 6178f6df5..60fca11e4 100644 --- a/include/boost/math/special_functions/detail/fp_traits.hpp +++ b/include/boost/math/special_functions/detail/fp_traits.hpp @@ -537,13 +537,16 @@ struct select_native // fp_traits is a type switch that selects the right fp_traits_non_native -template struct fp_traits -{ #if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \ && !defined(__hpux) \ && !defined(__DECCXX)\ - && !defined(__osf__)\ - && !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) + && !defined(__osf__) +# define BOOST_MATH_USE_STD_FPCLASSIFY +#endif + +template struct fp_traits +{ +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY typedef typename select_native::type type; #else typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index f95ad6efb..e8aa69402 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -110,11 +110,13 @@ namespace math{ namespace detail{ +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&) { return (std::fpclassify)(t); } +#endif template inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) @@ -224,7 +226,7 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) return FP_NAN; } -#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) template <> inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { @@ -250,11 +252,13 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) namespace detail { +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isfinite_impl(T x, native_tag const&) { return (std::isfinite)(x); } +#endif template inline bool isfinite_impl(T x, generic_tag const&) @@ -284,7 +288,7 @@ namespace detail { return a != traits::exponent; } -#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) template <> inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { @@ -307,11 +311,13 @@ inline bool (isfinite)(T x) namespace detail { +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isnormal_impl(T x, native_tag const&) { return (std::isnormal)(x); } +#endif template inline bool isnormal_impl(T x, generic_tag const&) @@ -341,7 +347,7 @@ namespace detail { return (a != 0) && (a < traits::exponent); } -#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) template <> inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { @@ -364,11 +370,13 @@ inline bool (isnormal)(T x) namespace detail { +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isinf_impl(T x, native_tag const&) { return (std::isinf)(x); } +#endif template inline bool isinf_impl(T x, generic_tag const&) @@ -415,7 +423,7 @@ namespace detail { return x == 0; } -#if defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) template <> inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { @@ -438,11 +446,13 @@ inline bool (isinf)(T x) namespace detail { +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isnan_impl(T x, native_tag const&) { return (std::isnan)(x); } +#endif template inline bool isnan_impl(T x, generic_tag const&) @@ -512,8 +522,3 @@ template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ #endif // BOOST_MATH_FPCLASSIFY_HPP - - - - - From bf735388616d041bcabc605c5b1a3eb08cf6bd13 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 15 Dec 2008 16:03:30 +0000 Subject: [PATCH 104/192] Added Johan Rade to the credits, and updated library history. [SVN r50277] --- doc/sf_and_dist/credits.qbk | 3 + doc/sf_and_dist/html/index.html | 13 +- .../html/math_toolkit/backgrounders.html | 8 +- .../backgrounders/implementation.html | 86 ++--- .../math_toolkit/backgrounders/lanczos.html | 56 +-- .../html/math_toolkit/backgrounders/refs.html | 20 +- .../backgrounders/relative_error.html | 12 +- .../math_toolkit/backgrounders/remez.html | 42 +-- doc/sf_and_dist/html/math_toolkit/dist.html | 8 +- .../html/math_toolkit/dist/dist_ref.html | 8 +- .../dist/dist_ref/dist_algorithms.html | 36 +- .../math_toolkit/dist/dist_ref/dists.html | 8 +- .../dist/dist_ref/dists/bernoulli_dist.html | 50 +-- .../dist/dist_ref/dists/beta_dist.html | 100 ++--- .../dist/dist_ref/dists/binomial_dist.html | 130 +++---- .../dist/dist_ref/dists/cauchy_dist.html | 64 ++-- .../dist/dist_ref/dists/chi_squared_dist.html | 70 ++-- .../dist/dist_ref/dists/exp_dist.html | 54 +-- .../dist/dist_ref/dists/extreme_dist.html | 48 +-- .../dist/dist_ref/dists/f_dist.html | 84 ++--- .../dist/dist_ref/dists/gamma_dist.html | 68 ++-- .../dist/dist_ref/dists/lognormal_dist.html | 50 +-- .../dist/dist_ref/dists/nc_beta_dist.html | 66 ++-- .../dist_ref/dists/nc_chi_squared_dist.html | 72 ++-- .../dist/dist_ref/dists/nc_f_dist.html | 58 +-- .../dist/dist_ref/dists/nc_t_dist.html | 62 ++-- .../dists/negative_binomial_dist.html | 106 +++--- .../dist/dist_ref/dists/normal_dist.html | 58 +-- .../dist/dist_ref/dists/pareto.html | 58 +-- .../dist/dist_ref/dists/poisson_dist.html | 64 ++-- .../dist/dist_ref/dists/rayleigh.html | 60 +-- .../dist/dist_ref/dists/students_t_dist.html | 68 ++-- .../dist/dist_ref/dists/triangular_dist.html | 52 +-- .../dist/dist_ref/dists/uniform_dist.html | 52 +-- .../dist/dist_ref/dists/weibull.html | 64 ++-- .../html/math_toolkit/dist/dist_ref/nmp.html | 344 +++++++++--------- .../html/math_toolkit/dist/future.html | 24 +- .../html/math_toolkit/dist/stat_tut.html | 8 +- .../dist/stat_tut/dist_params.html | 14 +- .../math_toolkit/dist/stat_tut/overview.html | 50 +-- .../math_toolkit/dist/stat_tut/variates.html | 8 +- .../html/math_toolkit/dist/stat_tut/weg.html | 8 +- .../dist/stat_tut/weg/binom_eg.html | 10 +- .../stat_tut/weg/binom_eg/binom_conf.html | 8 +- .../stat_tut/weg/binom_eg/binom_size_eg.html | 8 +- .../binom_eg/binomial_coinflip_example.html | 10 +- .../weg/binom_eg/binomial_quiz_example.html | 22 +- .../math_toolkit/dist/stat_tut/weg/cs_eg.html | 8 +- .../stat_tut/weg/cs_eg/chi_sq_intervals.html | 12 +- .../dist/stat_tut/weg/cs_eg/chi_sq_size.html | 10 +- .../dist/stat_tut/weg/cs_eg/chi_sq_test.html | 8 +- .../dist/stat_tut/weg/dist_construct_eg.html | 12 +- .../dist/stat_tut/weg/error_eg.html | 12 +- .../math_toolkit/dist/stat_tut/weg/f_eg.html | 8 +- .../dist/stat_tut/weg/find_eg.html | 8 +- .../weg/find_eg/find_location_eg.html | 16 +- .../weg/find_eg/find_mean_and_sd_eg.html | 38 +- .../stat_tut/weg/find_eg/find_scale_eg.html | 20 +- .../dist/stat_tut/weg/nag_library.html | 8 +- .../dist/stat_tut/weg/nccs_eg.html | 10 +- .../stat_tut/weg/nccs_eg/nccs_power_eg.html | 8 +- .../dist/stat_tut/weg/neg_binom_eg.html | 10 +- .../weg/neg_binom_eg/neg_binom_conf.html | 8 +- .../weg/neg_binom_eg/neg_binom_size_eg.html | 8 +- .../negative_binomial_example1.html | 12 +- .../negative_binomial_example2.html | 8 +- .../dist/stat_tut/weg/normal_example.html | 10 +- .../weg/normal_example/normal_misc.html | 38 +- .../math_toolkit/dist/stat_tut/weg/st_eg.html | 8 +- .../dist/stat_tut/weg/st_eg/paired_st.html | 14 +- .../weg/st_eg/tut_mean_intervals.html | 8 +- .../stat_tut/weg/st_eg/tut_mean_size.html | 8 +- .../stat_tut/weg/st_eg/tut_mean_test.html | 8 +- .../weg/st_eg/two_sample_students_t.html | 8 +- .../html/math_toolkit/main_overview.html | 8 +- .../main_overview/compilers_overview.html | 12 +- .../math_toolkit/main_overview/contact.html | 8 +- .../main_overview/directories.html | 16 +- .../main_overview/error_handling.html | 154 ++++---- .../math_toolkit/main_overview/history1.html | 52 ++- .../math_toolkit/main_overview/intro.html | 56 +-- .../main_overview/namespaces.html | 10 +- .../main_overview/navigation.html | 12 +- .../math_toolkit/main_overview/perf_over.html | 14 +- .../main_overview/pol_overview.html | 34 +- .../main_overview/result_type.html | 10 +- .../math_toolkit/main_overview/threads.html | 8 +- .../html/math_toolkit/main_overview/tr1.html | 36 +- doc/sf_and_dist/html/math_toolkit/perf.html | 8 +- .../math_toolkit/perf/comp_compilers.html | 42 +-- .../html/math_toolkit/perf/comparisons.html | 168 ++++----- .../html/math_toolkit/perf/getting_best.html | 42 +-- .../html/math_toolkit/perf/interp.html | 8 +- .../html/math_toolkit/perf/perf_over.html | 14 +- .../html/math_toolkit/perf/perf_test_app.html | 16 +- .../html/math_toolkit/perf/tuning.html | 52 +-- doc/sf_and_dist/html/math_toolkit/policy.html | 8 +- .../math_toolkit/policy/pol_overview.html | 34 +- .../html/math_toolkit/policy/pol_ref.html | 8 +- .../policy/pol_ref/assert_undefined.html | 8 +- .../policy/pol_ref/discrete_quant_ref.html | 32 +- .../pol_ref/error_handling_policies.html | 44 +-- .../policy/pol_ref/internal_promotion.html | 12 +- .../policy/pol_ref/iteration_pol.html | 12 +- .../policy/pol_ref/namespace_pol.html | 8 +- .../policy/pol_ref/pol_ref_ref.html | 8 +- .../policy/pol_ref/policy_defaults.html | 76 ++-- .../policy/pol_ref/precision_pol.html | 8 +- .../math_toolkit/policy/pol_tutorial.html | 8 +- .../pol_tutorial/ad_hoc_dist_policies.html | 8 +- .../pol_tutorial/ad_hoc_sf_policies.html | 8 +- .../changing_policy_defaults.html | 8 +- .../pol_tutorial/namespace_policies.html | 8 +- .../pol_tutorial/policy_tut_defaults.html | 14 +- .../policy/pol_tutorial/policy_usage.html | 8 +- .../pol_tutorial/understand_dis_quant.html | 12 +- .../policy/pol_tutorial/user_def_err_pol.html | 8 +- .../policy/pol_tutorial/what_is_a_policy.html | 8 +- .../html/math_toolkit/special.html | 8 +- .../html/math_toolkit/special/bessel.html | 8 +- .../math_toolkit/special/bessel/bessel.html | 62 ++-- .../special/bessel/bessel_over.html | 32 +- .../math_toolkit/special/bessel/mbessel.html | 62 ++-- .../special/bessel/sph_bessel.html | 58 +-- .../html/math_toolkit/special/ellint.html | 8 +- .../math_toolkit/special/ellint/ellint_1.html | 68 ++-- .../math_toolkit/special/ellint/ellint_2.html | 68 ++-- .../math_toolkit/special/ellint/ellint_3.html | 68 ++-- .../special/ellint/ellint_carlson.html | 108 +++--- .../special/ellint/ellint_intro.html | 38 +- .../html/math_toolkit/special/expint.html | 8 +- .../math_toolkit/special/expint/expint_i.html | 58 +-- .../math_toolkit/special/expint/expint_n.html | 52 +-- .../html/math_toolkit/special/extern_c.html | 8 +- .../math_toolkit/special/extern_c/c99.html | 48 +-- .../math_toolkit/special/extern_c/tr1.html | 36 +- .../special/extern_c/tr1_ref.html | 64 ++-- .../html/math_toolkit/special/factorials.html | 8 +- .../special/factorials/sf_binomial.html | 36 +- .../factorials/sf_double_factorial.html | 30 +- .../special/factorials/sf_factorial.html | 50 +-- .../factorials/sf_falling_factorial.html | 38 +- .../factorials/sf_rising_factorial.html | 38 +- .../html/math_toolkit/special/fpclass.html | 16 +- .../html/math_toolkit/special/inv_hyper.html | 8 +- .../math_toolkit/special/inv_hyper/acosh.html | 36 +- .../math_toolkit/special/inv_hyper/asinh.html | 34 +- .../math_toolkit/special/inv_hyper/atanh.html | 40 +- .../special/inv_hyper/inv_hyper_over.html | 8 +- .../html/math_toolkit/special/next_float.html | 8 +- .../special/next_float/float_advance.html | 16 +- .../special/next_float/float_distance.html | 16 +- .../special/next_float/float_next.html | 20 +- .../special/next_float/float_prior.html | 20 +- .../special/next_float/nextafter.html | 24 +- .../html/math_toolkit/special/powers.html | 8 +- .../math_toolkit/special/powers/cbrt.html | 28 +- .../math_toolkit/special/powers/ct_pow.html | 52 +-- .../math_toolkit/special/powers/expm1.html | 28 +- .../math_toolkit/special/powers/hypot.html | 24 +- .../math_toolkit/special/powers/log1p.html | 28 +- .../math_toolkit/special/powers/powm1.html | 28 +- .../math_toolkit/special/powers/sqrt1pm1.html | 28 +- .../html/math_toolkit/special/rounding.html | 8 +- .../math_toolkit/special/rounding/modf.html | 10 +- .../math_toolkit/special/rounding/round.html | 10 +- .../math_toolkit/special/rounding/trunc.html | 10 +- .../html/math_toolkit/special/sf_beta.html | 8 +- .../special/sf_beta/beta_derivative.html | 42 +-- .../special/sf_beta/beta_function.html | 54 +-- .../special/sf_beta/ibeta_function.html | 94 ++--- .../special/sf_beta/ibeta_inv_function.html | 154 ++++---- .../html/math_toolkit/special/sf_erf.html | 8 +- .../special/sf_erf/error_function.html | 66 ++-- .../special/sf_erf/error_inv.html | 62 ++-- .../html/math_toolkit/special/sf_gamma.html | 8 +- .../special/sf_gamma/digamma.html | 52 +-- .../special/sf_gamma/gamma_derivatives.html | 42 +-- .../special/sf_gamma/gamma_ratios.html | 64 ++-- .../math_toolkit/special/sf_gamma/igamma.html | 108 +++--- .../special/sf_gamma/igamma_inv.html | 86 ++--- .../math_toolkit/special/sf_gamma/lgamma.html | 68 ++-- .../math_toolkit/special/sf_gamma/tgamma.html | 82 ++--- .../html/math_toolkit/special/sf_poly.html | 8 +- .../math_toolkit/special/sf_poly/hermite.html | 54 +-- .../special/sf_poly/laguerre.html | 72 ++-- .../special/sf_poly/legendre.html | 92 ++--- .../special/sf_poly/sph_harm.html | 74 ++-- .../html/math_toolkit/special/sinc.html | 8 +- .../special/sinc/sinc_overview.html | 12 +- .../math_toolkit/special/sinc/sinc_pi.html | 24 +- .../math_toolkit/special/sinc/sinhc_pi.html | 26 +- .../html/math_toolkit/special/zetas.html | 8 +- .../html/math_toolkit/special/zetas/zeta.html | 52 +-- doc/sf_and_dist/html/math_toolkit/status.html | 8 +- .../html/math_toolkit/status/compilers.html | 12 +- .../html/math_toolkit/status/credits.html | 11 +- .../html/math_toolkit/status/history1.html | 52 ++- .../html/math_toolkit/status/issues.html | 46 +-- .../html/math_toolkit/toolkit.html | 8 +- .../html/math_toolkit/toolkit/internals1.html | 8 +- .../math_toolkit/toolkit/internals1/cf.html | 24 +- .../toolkit/internals1/constants.html | 16 +- .../toolkit/internals1/minima.html | 20 +- .../toolkit/internals1/rational.html | 24 +- .../toolkit/internals1/roots.html | 36 +- .../toolkit/internals1/roots2.html | 64 ++-- .../toolkit/internals1/series_evaluation.html | 20 +- .../html/math_toolkit/toolkit/internals2.html | 8 +- .../toolkit/internals2/error_test.html | 20 +- .../toolkit/internals2/minimax.html | 12 +- .../toolkit/internals2/polynomials.html | 16 +- .../toolkit/internals2/test_data.html | 32 +- .../toolkit/internals_overview.html | 8 +- .../html/math_toolkit/using_udt.html | 8 +- .../math_toolkit/using_udt/archetypes.html | 20 +- .../html/math_toolkit/using_udt/concepts.html | 20 +- .../math_toolkit/using_udt/dist_concept.html | 14 +- .../html/math_toolkit/using_udt/use_ntl.html | 10 +- doc/sf_and_dist/math.qbk | 4 +- doc/sf_and_dist/roadmap.qbk | 4 + 221 files changed, 3693 insertions(+), 3656 deletions(-) diff --git a/doc/sf_and_dist/credits.qbk b/doc/sf_and_dist/credits.qbk index bd67c4ee8..0cea15f5b 100644 --- a/doc/sf_and_dist/credits.qbk +++ b/doc/sf_and_dist/credits.qbk @@ -22,6 +22,9 @@ Google Summer of Code project 2006. Bruno Lalande submitted the "compile time power of a runtime base" code. +Johan R'''å'''de wrote the optimised floating point classification +code. + Professor Nico Temme for advice on the inverse incomplete beta function. [@http://www.shoup.net Victor Shoup for NTL], diff --git a/doc/sf_and_dist/html/index.html b/doc/sf_and_dist/html/index.html index ad65664fe..48437bbab 100644 --- a/doc/sf_and_dist/html/index.html +++ b/doc/sf_and_dist/html/index.html @@ -3,8 +3,8 @@ Math Toolkit - - + + @@ -39,11 +39,14 @@

Bruno Lalande

+

+Johan Råde +

+ Holin, Xiaogang Zhang, Bruno Lalande and Johan Råde

Additional @@ -39,7 +39,7 @@

@@ -33,8 +33,8 @@ and reflect more the general implementation philosophy used.

- - Implemention + + Implemention philosophy

@@ -85,8 +85,8 @@ These could still provide sufficient accuracy for some speed-critical applications.

- - Accuracy + + Accuracy and Representation of Test Values

@@ -130,8 +130,8 @@ binary value).

- - Tolerance + + Tolerance of Tests

@@ -156,8 +156,8 @@ first that the suffix L is present, and then that the tolerance is big enough.

- - Handling + + Handling Unsuitable Arguments

@@ -214,17 +214,17 @@ with ISO/IEC 9899:1999 Programming languages - C and with the Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph - 5. See + 5. See also domain_error.

- See policy reference for + See policy reference for details of the error handling policies that should allow a user to comply with any of these recommendations, as well as other behaviour.

- See error handling - for a detailed explanation of the mechanism, and error_handling + See error handling + for a detailed explanation of the mechanism, and error_handling example and error_handling_example.cpp

@@ -242,13 +242,13 @@

- - Handling + + Handling of Functions that are Not Mathematically defined

Functions that are not mathematically defined, like the Cauchy mean, fail - to compile by default. A + to compile by default. A policy allows control of this.

@@ -276,8 +276,8 @@

- - Median + + Median of distributions

@@ -309,15 +309,15 @@ Basic Statistics. give more detail, in particular for discrete distributions.

- - Handling + + Handling of Floating-Point Infinity

Some functions and distributions are well defined with + or - infinity as argument(s), but after some experiments with handling infinite arguments as special cases, we concluded that it was generally more useful to forbid - this, and instead to return the result of domain_error. + this, and instead to return the result of domain_error.

Handling infinity as special cases is additionally complicated because, unlike @@ -343,18 +343,18 @@ be simpler than trying to handle the aftermath of the error policy.

- Overflow, underflow, denorm can be handled using error + Overflow, underflow, denorm can be handled using error handling policies.

We have also tried to catch boundary cases where the mathematical specification would result in divide by zero or overflow and signalling these similarly. - What happens at (and near), poles can be controlled through error + What happens at (and near), poles can be controlled through error handling policies.

- - Scale, + + Scale, Shape and Location

@@ -380,8 +380,8 @@ functions, they can be added if required.

- - Notes + + Notes on Implementation of Specific Functions & Distributions
  • @@ -392,14 +392,14 @@ 0 and upper = 1 would be more suitable.
- - Rational + + Rational Approximations Used

Some of the special functions in this library are implemented via rational approximations. These are either taken from the literature, or devised by - John Maddock using our + John Maddock using our Remez code.

@@ -435,8 +435,8 @@ to the "true" minimax solution.

- - Representation + + Representation of Mathematical Constants

@@ -496,8 +496,8 @@ double p = boost::math::constants::pi(); // Context does not allow for disambiguation of overloaded function

-

+

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

@@ -448,7 +451,7 @@

- +

Last revised: August 22, 2008 at 12:37:17 GMT

Last revised: December 15, 2008 at 15:49:54 GMT


diff --git a/doc/sf_and_dist/html/math_toolkit/backgrounders.html b/doc/sf_and_dist/html/math_toolkit/backgrounders.html index f71ebaa9e..91ccd20b9 100644 --- a/doc/sf_and_dist/html/math_toolkit/backgrounders.html +++ b/doc/sf_and_dist/html/math_toolkit/backgrounders.html @@ -3,8 +3,8 @@ Backgrounders - - + + @@ -24,7 +24,7 @@
- - Thread + + Thread safety

@@ -521,8 +521,8 @@ the right thing here at some point.

- - Sources + + Sources of Test Data

@@ -565,8 +565,8 @@ the underlying special function is known to be difficult to implement.

- - Creating + + Creating and Managing the Equations

@@ -726,8 +726,8 @@ done

HTML: this needs further investigation.

- - Producing + + Producing Graphs

@@ -744,7 +744,7 @@ done

- - Motivation + + Motivation

Why base gamma and gamma-like functions on the Lanczos approximation? @@ -39,7 +39,7 @@ or Mathworld) appears to offer no clear advantage over more traditional methods such as Stirling's - approximation. Pugh carried out an extensive + approximation. Pugh carried out an extensive comparison of the various methods available and discovered that they were all very similar in terms of complexity and relative error. However, the Lanczos approximation does have a couple of properties that make it worthy @@ -91,15 +91,15 @@ Of course, computing large powers is itself a notoriously hard problem, but even so, analytic combinations of Lanczos approximations can make the difference between obtaining a valid result, or simply garbage. Refer to the implementation - notes for the beta - function for an example of this method in practice. The incomplete gamma_p gamma and - beta functions + notes for the beta + function for an example of this method in practice. The incomplete gamma_p gamma and + beta functions use similar analytic combinations of power terms, to combine gamma and beta functions divided by large powers into single (simpler) expressions.

- - The + + The Approximation

@@ -155,20 +155,20 @@ Some authors choose to define the sum from k=1 to N, and hence end up with N+1 coefficients. This happens to confuse both the following discussion and the code (since C++ deals with half open array ranges, rather than - the closed range of the sum). This convention is consistent with Godfrey, but not Pugh, + the closed range of the sum). This convention is consistent with Godfrey, but not Pugh, so take care when referring to the literature in this field.

- - Computing + + Computing the Coefficients

The coefficients C0..CN-1 need to be computed from N and g at high precision, and then stored as part of the program. Calculation of the coefficients is performed via the method - of Godfrey; let the constants be contained + of Godfrey; let the constants be contained in a column vector P, then:

@@ -204,8 +204,8 @@ multiplied by F as the last step.

- - Choosing + + Choosing the Right Parameters

@@ -217,7 +217,7 @@ terms, and to then suddenly converge with a "crunch".

- Pugh has determined the optimal value of g + Pugh has determined the optimal value of g for N in the range 1 <= N <= 60: unfortunately in practice choosing these values leads to cancellation errors in the Lanczos sum as the largest term in the (alternating) series is approximately @@ -228,7 +228,7 @@ computing to float precision with double precision arithmetic.

-

Table 53. Optimal choices for N and g when computing with +

Table 53. Optimal choices for N and g when computing with guard digits (source: Pugh)

@@ -309,11 +309,11 @@

- The alternative described by Godfrey is to + The alternative described by Godfrey is to perform an exhaustive search of the N and g parameter space to determine the optimal combination for a given p digit floating-point type. Repeating this work found a good approximation - for double precision arithmetic (close to the one Godfrey + for double precision arithmetic (close to the one Godfrey found), but failed to find really good approximations for 80 or 128-bit long doubles. Further it was observed that the approximations obtained tended to optimised for the small values of z (1 < z < 200) used to test the @@ -322,7 +322,7 @@ truncation of the Lancozos series.

- Pugh identified all the locations where the theoretical + Pugh identified all the locations where the theoretical error of the approximation were at a minimum, but unfortunately has published only the largest of these minima. However, he makes the observation that the minima coincide closely with the location where the first neglected term @@ -350,8 +350,8 @@ "sweet spots" whose theoretical error is less than the machine epsilon for the type being tested, yielded good approximations for all the types tested. The optimal values found were quite close to the best cases - reported by Pugh (just slightly larger N - and slightly smaller g for a given precision than Pugh reports), and even though converting to rational + reported by Pugh (just slightly larger N + and slightly smaller g for a given precision than Pugh reports), and even though converting to rational form doubles the number of stored coefficients, it should be noted that half of them are integers (and therefore require less storage space) and the approximations require a smaller N than would otherwise be required, @@ -371,7 +371,7 @@ exactly matches the machine epsilon for the type in question.

-

Table 54. Optimum value for N and g when computing at fixed +

Table 54. Optimum value for N and g when computing at fixed precision

@@ -536,8 +536,8 @@ is exact, and so isn't used for the gamma function.

- - References + + References
  1. @@ -562,7 +562,7 @@
- - General + + General references

@@ -91,8 +91,8 @@ Library (version 2), Walter E. Brown

- - Calculators* + + Calculators* that we found (and used to cross-check - as far as their widely-varying accuracy allowed).
@@ -101,8 +101,8 @@ Binomial Probability Distribution Calculator.

- - Other Libraries + + Other Libraries

Cephes library by Shephen @@ -162,7 +162,7 @@

@@ -81,8 +81,8 @@

- - The + + The Impossibility of Zero Error

@@ -110,7 +110,7 @@

The Remez algorithm @@ -94,8 +94,8 @@ are located!

- - The Remez + + The Remez Method

@@ -174,8 +174,8 @@

- - Remez Step + + Remez Step 1

@@ -205,8 +205,8 @@ to 5.6x10-4.

- - Remez Step + + Remez Step 2

@@ -234,8 +234,8 @@ In our example we perform multi-point exchange.

- - Iteration + + Iteration

The Remez method then performs steps 1 and 2 above iteratively until the @@ -250,8 +250,8 @@ remez-4

- - Rational + + Rational Approximations

@@ -299,8 +299,8 @@ number of terms overall.

- - Practical + + Practical Considerations

@@ -347,7 +347,7 @@

The difficult part is obviously finding the right g(x) to extract from your function: often the asymptotic behaviour of the function will give a clue, - so for example the function erfc + so for example the function erfc becomes proportional to e-x2/x as x becomes large. Therefore using:

@@ -407,8 +407,8 @@ desired minimax solution (5x10-4).

- - Remez + + Remez Method Checklist

@@ -461,8 +461,8 @@

- - References + + References

The original references for the Remez Method and it's extension to rational @@ -528,7 +528,7 @@
Statistical Distributions @@ -178,7 +178,7 @@
@@ -84,7 +84,7 @@
- - Finding + + Finding the Location and Scale for Normal and similar distributions

@@ -50,8 +50,8 @@ using boost::math::complement; // Will be needed by users who want to use complements.

- - find_location + + find_location function

@@ -62,13 +62,13 @@

namespace boost{ namespace math{
 
-template <class Dist, class Policy> // explicit error handling policy
+template <class Dist, class Policy> // explicit error handling policy
   typename Dist::value_type find_location( // For example, normal mean.
   typename Dist::value_type z, // location of random variable z to give probability, P(X > z) == p.
   // For example, a nominal minimum acceptable z, so that p * 100 % are > z
   typename Dist::value_type p, // probability value desired at x, say 0.95 for 95% > z.
   typename Dist::value_type scale, // scale parameter, for example, normal standard deviation.
-  const Policy& pol);
+  const Policy& pol);
 
 template <class Dist>  // with default policy.
   typename Dist::value_type find_location( // For example, normal mean.
@@ -80,8 +80,8 @@
   }} // namespaces
 
- - find_scale + + find_scale function

@@ -92,13 +92,13 @@

namespace boost{ namespace math{ 
 
-template <class Dist, class Policy>
+template <class Dist, class Policy>
   typename Dist::value_type find_scale( // For example, normal mean.
   typename Dist::value_type z, // location of random variable z to give probability, P(X > z) == p.
   // For example, a nominal minimum acceptable weight z, so that p * 100 % are > z
   typename Dist::value_type p, // probability value desired at x, say 0.95 for 95% > z.
   typename Dist::value_type location, // location parameter, for example, normal distribution mean.
-  const Policy& pol);
+  const Policy& pol);
 
  template <class Dist> // with default policy.
    typename Dist::value_type find_scale( // For example, normal mean.
@@ -109,20 +109,20 @@
 }} // namespaces
 

- All argument must be finite, otherwise domain_error + All argument must be finite, otherwise domain_error is called.

- Probability arguments must be [0, 1], otherwise domain_error + Probability arguments must be [0, 1], otherwise domain_error is called.

- If the choice of arguments would give a negative scale, domain_error + If the choice of arguments would give a negative scale, domain_error is called, unless the policy is to ignore, when the negative (impossible) value of scale is returned.

- Find Mean and standard + Find Mean and standard deviation examples gives simple examples of use of both find_scale and find_location, and a longer example finding means and standard deviations of normally distributed weights to meet a specification. @@ -131,7 +131,7 @@
@@ -77,7 +77,7 @@

@@ -35,12 +35,12 @@

namespace boost{ namespace math{
  template <class RealType = double, 
-           class Policy   = policies::policy<> >
+           class Policy   = policies::policy<> >
  class bernoulli_distribution;
    
  typedef bernoulli_distribution<> bernoulli;
 
- template <class RealType, class Policy>
+ template <class RealType, class Policy>
  class bernoulli_distribution
  {
  public:
@@ -87,8 +87,8 @@
             
           

- - Member + + Member Functions
bernoulli_distribution(RealType p);
@@ -103,21 +103,21 @@
             Returns the success_fraction parameter of this distribution.
           

- - Non-member + + Non-member Accessors

- All the usual non-member + All the usual non-member accessor functions that are generic to all distributions are supported: - Cumulative Distribution Function, - Probability Density Function, Quantile, Hazard - Function, Cumulative Hazard Function, - mean, median, - mode, variance, - standard deviation, skewness, - kurtosis, kurtosis_excess, - range and support. + Cumulative Distribution Function, + Probability Density Function, Quantile, Hazard + Function, Cumulative Hazard Function, + mean, median, + mode, variance, + standard deviation, skewness, + kurtosis, kurtosis_excess, + range and support.

The domain of the random variable is 0 and 1, and the useful supported @@ -128,16 +128,16 @@ exception and make an error message available.

- - Accuracy + + Accuracy

The Bernoulli distribution is implemented with simple arithmetic operators and so should have errors within an epsilon or two.

- - Implementation + + Implementation

In the following table p is the probability of success @@ -327,8 +327,8 @@

- - References + + References
- - References + + References

Wikipedia @@ -616,7 +616,7 @@ from presumed-known mean and variance. @@ -876,9 +876,9 @@ find_lower_bound_on_p and find_number_of_trials are implemented in terms of the inverse incomplete beta functions - ibetac_inv, - ibeta_inv, - and ibetac_invb + ibetac_inv, + ibeta_inv, + and ibetac_invb respectively

@@ -886,8 +886,8 @@

@@ -36,12 +36,12 @@

namespace boost{ namespace math{ 
 
 template <class RealType = double, 
-          class Policy   = policies::policy<> >
+          class Policy   = policies::policy<> >
 class binomial_distribution;
 
 typedef binomial_distribution<> binomial;
 
-template <class RealType, class Policy>
+template <class RealType, class Policy>
 class binomial_distribution
 {
 public:
@@ -155,10 +155,10 @@
               

This behaviour can be changed so that the quantile functions are - rounded differently, or even return a real-valued result using Policies. It is - strongly recommended that you read the tutorial Understanding + rounded differently, or even return a real-valued result using Policies. It is + strongly recommended that you read the tutorial Understanding Quantiles of Discrete Distributions before using the quantile - function on the Binomial distribution. The reference + function on the Binomial distribution. The reference docs describe how to change the rounding policy for these distributions.

@@ -167,13 +167,13 @@

- - Member + + Member Functions
- - Construct + + Construct
binomial_distribution(RealType n, RealType p);
 
@@ -186,11 +186,11 @@ p <= 1, and n >= 0, - otherwise calls domain_error. + otherwise calls domain_error.

- - Accessors + + Accessors
RealType success_fraction() const;
 
@@ -205,8 +205,8 @@ was constructed.

- - Lower + + Lower Bound on the Success Fraction
static RealType find_lower_bound_on_p(
@@ -252,7 +252,7 @@
                     n, k, 0.05);
 

- See + See worked example.

@@ -311,8 +311,8 @@ limits illustrated in the case of the binomial. Biometrika 26 404-413.

- - Upper + + Upper Bound on the Success Fraction
static RealType find_upper_bound_on_p(
@@ -359,7 +359,7 @@
                     n, k, 0.05);
 

- See + See worked example.

@@ -383,14 +383,14 @@ by passing α = 0.025 to each of the functions.

- See + See worked example.

- - Estimating + + Estimating the Number of Trials Required for a Certain Number of Successes
static RealType find_minimum_number_of_trials(
@@ -431,8 +431,8 @@
             of seeing 10 events that occur with frequency one half.
           

- - Estimating + + Estimating the Maximum Number of Trials to Ensure no more than a Certain Number of Successes
@@ -475,28 +475,28 @@ frequency. This is typically used in failure analysis.

- See + See Worked Example.

- - Non-member + + Non-member Accessors

- All the usual non-member + All the usual non-member accessor functions that are generic to all distributions are supported: - Cumulative Distribution Function, - Probability Density Function, Quantile, Hazard - Function, Cumulative Hazard Function, - mean, median, - mode, variance, - standard deviation, skewness, - kurtosis, kurtosis_excess, - range and support. + Cumulative Distribution Function, + Probability Density Function, Quantile, Hazard + Function, Cumulative Hazard Function, + mean, median, + mode, variance, + standard deviation, skewness, + kurtosis, kurtosis_excess, + range and support.

- The domain for the random variable k is 0 <= k <= N, otherwise a domain_error + The domain for the random variable k is 0 <= k <= N, otherwise a domain_error is returned.

@@ -504,7 +504,7 @@ in the context of this distribution:

-

Table 11. Meaning of the non-member accessors

+

Table 11. Meaning of the non-member accessors


- - Examples + + Examples

- Various worked + Various worked examples are available illustrating the use of the binomial distribution.

- - Accuracy + + Accuracy

This distribution is implemented using the incomplete beta functions - ibeta - and ibetac, + ibeta + and ibetac, please refer to these functions for information on accuracy.

- - Implementation + + Implementation

In the following table p is the probability that @@ -680,7 +680,7 @@

- Implementation is in terms of ibeta_derivative: + Implementation is in terms of ibeta_derivative: if nCk is the binomial coefficient of a and b, then we have:

@@ -691,7 +691,7 @@ (n+1)

- The function ibeta_derivative + The function ibeta_derivative is used here, since it has already been optimised for the lowest possible error - indeed this is really just a thin wrapper around part of the internals of the incomplete beta function. @@ -716,7 +716,7 @@

p = I[sub 1-p](n - k, k + 1)
   = 1 - I[sub p](k + 1, n - k)
-  = ibetac(k + 1, n - k, p)
+ = ibetac(k + 1, n - k, p)

@@ -732,7 +732,7 @@

- Using the relation: q = ibeta(k + Using the relation: q = ibeta(k + 1, n - k, p)

@@ -751,7 +751,7 @@ Since the cdf is non-linear in variate k none of the inverse incomplete beta functions can be used here. Instead the quantile is found numerically using a derivative - free method (TOMS + free method (TOMS Algorithm 748).

- - References + + References
- - References + + References
- - References + + References
- - references + + references

- (See also the reference documentation for the related Extreme + (See also the reference documentation for the related Extreme Distributions.)