diff --git a/doc/multiprecision.css b/doc/multiprecision.css index 6b076046..d26cabb1 100644 --- a/doc/multiprecision.css +++ b/doc/multiprecision.css @@ -1,7 +1,8 @@ -@import url('../../../../doc/src/boostbook.css'); /* Contains the basic settings for BoostBook and used by Quickbook to docbook conversion. */ -/* Note:this import link assumes called from doc/html, not from any backup copy in /doc. */ +/* Note:this import link assumes called from libs/multiprecision/doc/html, not from any backup copy in libs/multiprecision/doc. */ +/* boost-no-inspect */ +@import url('../../../../doc/src/boostbook.css'); /*============================================================================= Copyright (c) 2004 Joel de Guzman http://spirit.sourceforge.net/ diff --git a/include/boost/multiprecision/detail/functions/trig.hpp b/include/boost/multiprecision/detail/functions/trig.hpp index c7d21b26..65505498 100644 --- a/include/boost/multiprecision/detail/functions/trig.hpp +++ b/include/boost/multiprecision/detail/functions/trig.hpp @@ -357,7 +357,6 @@ void eval_cos(T& result, const T& x) typedef typename boost::multiprecision::detail::canonical::type si_type; typedef typename boost::multiprecision::detail::canonical::type ui_type; - typedef typename mpl::front::type fp_type; switch (eval_fpclassify(x)) { @@ -467,9 +466,6 @@ void eval_cos(T& result, const T& x) const bool b_zero = eval_get_sign(xx) == 0; - // Check if the reduced argument is very close to 0. - const bool b_near_zero = xx.compare(fp_type(1e-1)) < 0; - if (b_zero) { result = si_type(0); diff --git a/test/test_cos_near_half_pi.cpp b/test/test_cos_near_half_pi.cpp index 2c07cff3..88079a41 100644 --- a/test/test_cos_near_half_pi.cpp +++ b/test/test_cos_near_half_pi.cpp @@ -50,7 +50,7 @@ template void test() { - using mpfr_float_1000 = boost::multiprecision::number >; + typedef boost::multiprecision::number > mpfr_float_1000; for (int n = -20; n <= 20; ++n) { @@ -102,12 +102,10 @@ int main() test > >(); test > >(); test > >(); - /* These fail since our exponent range is greater than that of mpfr which we use for comparison: test > >(); test > >(); test > > >(); test > > >(); - */ // Check low multiprecision digit counts. test > >(); test > >(); diff --git a/test/test_sin_near_half_pi.cpp b/test/test_sin_near_half_pi.cpp index a6b4e146..b327fa4a 100644 --- a/test/test_sin_near_half_pi.cpp +++ b/test/test_sin_near_half_pi.cpp @@ -50,13 +50,15 @@ template void test() { - using mpfr_float_1000 = boost::multiprecision::number >; + typedef boost::multiprecision::number > mpfr_float_1000; - for (int n = -20; n <= 20; ++n) + for (int n = 0; n <= 20; ++n) { std::cout << "Testing n = " << n << std::endl; T boundary = boost::math::constants::half_pi() * n; T val = boundary; + if((n == 0) && ((std::numeric_limits::min_exponent <= std::numeric_limits::min_exponent) || (!std::numeric_limits::is_specialized))) + continue; for (unsigned i = 0; i < 200; ++i) { mpfr_float_1000 comparison(val); @@ -64,10 +66,6 @@ void test() T found = sin(val); T expected = T(comparison); BOOST_CHECK_LE(boost::math::epsilon_difference(found, expected), 20); - //std::cout << std::setprecision(10) << val << std::endl; - //std::cout << std::setprecision(50) << found << std::endl; - //std::cout << std::setprecision(50) << comparison << std::endl; - //std::cout << std::setprecision(50) << expected << std::endl; val = boost::math::float_next(val); } val = boundary; @@ -102,12 +100,10 @@ int main() test > >(); test > >(); test > >(); - /* These fail since our exponent range is greater than that of mpfr which we use for comparison: test > >(); test > >(); test > > >(); test > > >(); - */ // Check low multiprecision digit counts. test > >(); test > >();