Index: pol-core/pol/module/mathmod.cpp =================================================================== --- pol-core/pol/module/mathmod.cpp (revision 625) +++ pol-core/pol/module/mathmod.cpp (working copy) @@ -360,9 +360,10 @@ if (getRealParam( 0, x ) && getParam( 1, digits )) { - char buffer[ 200 ]; - sprintf( buffer, "%.*g", static_cast(digits), x); - return new String( buffer ); + std::stringstream result; + result << std::setprecision(digits) << std::fixed; + result << x; + return new String( result.str() ); } else {