I ran the following code :
#include <iostream>
using namespace std;
#include
On 17/01/2020 01:52, anshu khare via Boost wrote:
On running cos(3*pi/2) , cos(5*pi/2) , cos(7*pi/2) , cos(9*pi/2) all give the same answer, which is less than epsilon except cos(7*pi/2) which gives a highly negative value.
Not seeing it, I'm running:
for (unsigned i = 3; i < 20; i += 2) { std::cout << std::setw(20) << i << std::setw(20) << ceil(fabs(cos(i * boost::math::constants::half_piboost::multiprecision::cpp_bin_float_50())
/ std::numeric_limitsboost::multiprecision::cpp_bin_float_50::epsilon())) << std::endl; }
Which gives:
N abs error / epsilon
3 2 5 2 7 2 9 2 11 6 13 10 15 10 17 6 19 6
And if I switch to testing type double I see:
3 1 5 2 7 2 9 3 11 12 13 5 15 13 17 4 19 14
Best, John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost