Skip to content

Commit

Permalink
NumberExpression: Added std::setprecision to keep precision of number…
Browse files Browse the repository at this point in the history
… in double to string conversion.
  • Loading branch information
eivindkv authored and wwmayer committed Dec 18, 2015
1 parent 6f39eed commit 823b520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App/Expression.cpp
Expand Up @@ -258,7 +258,7 @@ void NumberExpression::negate()
std::string NumberExpression::toString() const
{
std::stringstream s;
s << quantity.getValue();
s << std::setprecision(std::numeric_limits<double>::digits10 + 1) << quantity.getValue();

/* Trim of any extra spaces */
//while (s.size() > 0 && s[s.size() - 1] == ' ')
Expand Down

0 comments on commit 823b520

Please sign in to comment.