NumberExpression: Added std::setprecision to keep precision of number in double to string conversion.
This commit is contained in:
parent
6f39eed25e
commit
823b5205bb
|
@ -258,7 +258,7 @@ void NumberExpression::negate()
|
||||||
std::string NumberExpression::toString() const
|
std::string NumberExpression::toString() const
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
s << quantity.getValue();
|
s << std::setprecision(std::numeric_limits<double>::digits10 + 1) << quantity.getValue();
|
||||||
|
|
||||||
/* Trim of any extra spaces */
|
/* Trim of any extra spaces */
|
||||||
//while (s.size() > 0 && s[s.size() - 1] == ' ')
|
//while (s.size() > 0 && s[s.size() - 1] == ' ')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user