Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75089 - in sandbox/multiprecision/libs/multiprecision: src/functions/elementary test/real/cases
From: e_float_at_[hidden]
Date: 2011-10-22 10:51:37


Author: christopher_kormanyos
Date: 2011-10-22 10:51:36 EDT (Sat, 22 Oct 2011)
New Revision: 75089
URL: http://svn.boost.org/trac/boost/changeset/75089

Log:
- Added test cases for small argument arctangent path.
- Cleaned up some errant spacing in the code.
Text files modified:
   sandbox/multiprecision/libs/multiprecision/src/functions/elementary/elementary_trig.cpp | 14 +++++++-------
   sandbox/multiprecision/libs/multiprecision/test/real/cases/test_case_00114_various_trig.cpp | 6 +++++-
   2 files changed, 12 insertions(+), 8 deletions(-)

Modified: sandbox/multiprecision/libs/multiprecision/src/functions/elementary/elementary_trig.cpp
==============================================================================
--- sandbox/multiprecision/libs/multiprecision/src/functions/elementary/elementary_trig.cpp (original)
+++ sandbox/multiprecision/libs/multiprecision/src/functions/elementary/elementary_trig.cpp 2011-10-22 10:51:36 EDT (Sat, 22 Oct 2011)
@@ -368,19 +368,19 @@
   mp_float my_atan_series_at_zero(const mp_float& x)
   {
     // http://functions.wolfram.com/ElementaryFunctions/ArcTan/26/01/01/
- return x * boost::multiprecision::hyp2F1( boost::multiprecision::one(),
- boost::multiprecision::half(),
- boost::multiprecision::three_half(),
- -(x * x));
+ return x * boost::multiprecision::hyp2F1(boost::multiprecision::one(),
+ boost::multiprecision::half(),
+ boost::multiprecision::three_half(),
+ -(x * x));
   }
 
   mp_float my_atan_series_at_infinity(const mp_float& x)
   {
     // http://functions.wolfram.com/ElementaryFunctions/ArcTan/26/01/01/
     return boost::multiprecision::pi_half() - boost::multiprecision::hyp2F1( boost::multiprecision::half(),
- boost::multiprecision::one(),
- boost::multiprecision::three_half(),
- -boost::multiprecision::one() / (x * x)) / x;
+ boost::multiprecision::one(),
+ boost::multiprecision::three_half(),
+ -boost::multiprecision::one() / (x * x)) / x;
   }
 }
 

Modified: sandbox/multiprecision/libs/multiprecision/test/real/cases/test_case_00114_various_trig.cpp
==============================================================================
--- sandbox/multiprecision/libs/multiprecision/test/real/cases/test_case_00114_various_trig.cpp (original)
+++ sandbox/multiprecision/libs/multiprecision/test/real/cases/test_case_00114_various_trig.cpp 2011-10-22 10:51:36 EDT (Sat, 22 Oct 2011)
@@ -37,15 +37,19 @@
         data.push_back(boost::multiprecision::sec(boost::multiprecision::catalan()));
         data.push_back(boost::multiprecision::asin(+boost::multiprecision::catalan() / mp_float("1e30")));
         data.push_back(boost::multiprecision::asin(-boost::multiprecision::catalan() / mp_float("1e30")));
+ data.push_back(boost::multiprecision::atan(+mp_float("1.23e-22")));
+ data.push_back(boost::multiprecision::atan(-mp_float("1.23e-22")));
       }
       virtual const std::vector<mp_float>& control_data(void) const
       {
- static const boost::array<mp_float, 4u> a =
+ static const boost::array<mp_float, 6u> a =
         {{
            mp_float("1.1933383729559773203137729267291947387173342208011247547153095890743890561595544691386633932476257421048110900061166081912943949195747181880197698938173812351027488623304591726956668351876851737682699217189957312877162495237230373808708191601490391769224697378179329863218317580732300824551143583689671403028593009944218611445507878903766448405383719847063127742468033101525589647537043486864948893731"),
            mp_float("1.6419687273531364590567262071166440461685175366204953964739895651486200745161209040937844868647740537903996967626064986560711138637337304241821135325361595693541390424196494707138586320032467383542843973174977685986944349019525021804348293697747650763421720272451832097977353331515326976664205296758687867984902307858016265514207983161159140822122404062357504219549141106987355182424111888131203820022"),
            mp_float("9.1596559417721901505460351493238411077414937428167213426649824770321202257884602717067499380728515974852534974792725335053169713416495422477659412829135938900234959594014659219497551406645133077883384785850868306010483584350145419323416351657472379419800448382146789912411266712225748380678597136738172111710383925664667554883048994022463260972160151953504181570286917586579688985816103159672576819373e-31"),
            mp_float("-9.1596559417721901505460351493238411077414937428167213426649824770321202257884602717067499380728515974852534974792725335053169713416495422477659412829135938900234959594014659219497551406645133077883384785850868306010483584350145419323416351657472379419800448382146789912411266712225748380678597136738172111710383925664667554883048994022463260972160151953504181570286917586579688985816103159672576819373e-31"),
+ mp_float("1.2299999999999999999999999999999999999999999937971100000000000000000000000000000000000000563061136859999999999999999999999999999999993915320043175042857142857142857142857142857214455571909102127842857142857142857142857141970877975493418392149624675324675324675324686670161119999782171785788270829170829170829022069430178035607368730350101790829170829172814982108268792203750305881039533894358582566996e-22"),
+ mp_float("-1.2299999999999999999999999999999999999999999937971100000000000000000000000000000000000000563061136859999999999999999999999999999999993915320043175042857142857142857142857142857214455571909102127842857142857142857142857141970877975493418392149624675324675324675324686670161119999782171785788270829170829170829022069430178035607368730350101790829170829172814982108268792203750305881039533894358582566996e-22"),
         }};
         static const std::vector<mp_float> v(a.begin(), a.end());
         return v;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk