Commit bb988549 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/tools.{h,cpp}: scientific_string_of_double, default precision to 2

bikeshedding e-value outputs
These estimations are by no way more precise than that...

see #4338
parent e4fa6c7a
......@@ -88,10 +88,10 @@ string fixed_string_of_float(float number, int precision)
return ss.str();
}
string scientific_string_of_double(double number)
string scientific_string_of_double(double number, int precision)
{
stringstream ss;
ss << scientific << number ;
ss << scientific << setprecision(precision) << number ;
return ss.str();
}
......
......@@ -128,7 +128,7 @@ bool pair_occurrence_sort(pair<T, int> a, pair<T, int> b);
string string_of_int(int number, int pad_to_width=0);
string fixed_string_of_float(float number, int precision);
string scientific_string_of_double(double number);
string scientific_string_of_double(double number, int precision=2);
string string_of_map(map <string, string> m, const string &before);
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment