Skip to content
Snippets Groups Projects
Commit 515a0552 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[test.common] fixed convert_to_scientific()

Somehow size_t(...) was 791 while ... was 792, so a std::round(...) might
be better.
parent 5911f8fc
No related branches found
No related tags found
No related merge requests found
......@@ -45,9 +45,10 @@ std::pair<size_t, ssize_t> convert_to_scientific(const double number, const size
// std::cout << "number = " << number << std::endl;
// std::cout << "exponent = " << exponent << std::endl;
// std::cout << "coefficient = " << coefficient << std::endl;
// std::cout << "scaled = " << size_t(std::floor(factor * coefficient)) << std::endl << std::endl;
// std::cout << "scaled = " << std::round(factor * coefficient) << std::endl;
// std::cout << "size_t(scaled) = " << size_t(std::round(factor * coefficient)) << std::endl << std::endl;
return std::make_pair(size_t(std::floor(factor * coefficient)), exponent);
return std::make_pair(size_t(std::round(factor * coefficient)), exponent);
} // ... convert_to_scientific(...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment