mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Avoid using max_digits10 in test to allow as old versions as possible to run
This commit is contained in:
@@ -11,10 +11,14 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
double z = 2.0;
|
||||
double w = boost::math::lambert_w0(z);
|
||||
double z = 2.0;
|
||||
double w0 = boost::math::lambert_w0(z);
|
||||
std::cout.setf(std::ios_base::showpoint); // Include any trailing zeros.
|
||||
std::cout.precision(std::numeric_limits<double>::max_digits10); // Show all possibly significant digits.
|
||||
std::cout << " lambert_w0(" << z << ") = " << w << std::endl;
|
||||
// std::cout.precision(std::numeric_limits<double>::max_digits10); // Show all possibly significant digits.
|
||||
// Avoid using max_digfigs10 so as many old compilers can run the most basic lambert_w0 test.
|
||||
std::cout << " lambert_w0(" << z << ") = " << w0 << std::endl; // lambert_w0(2.00000) = 0.852606
|
||||
z = -0.2;
|
||||
double wm1 = boost::math::lambert_wm1(z);
|
||||
std::cout << " lambert_wm1(" << z << ") = " << wm1 << std::endl; // lambert_wm1(-0.200000) = -2.54264
|
||||
return 0;
|
||||
} // int main()
|
||||
|
||||
Reference in New Issue
Block a user