reverted the floating-point number formatting (exception in ml tests)

pull/13383/head
Alexander Shishkov 14 years ago
parent 80dfdf8ff7
commit b19434513b
  1. 4
      modules/core/src/persistence.cpp

@ -775,7 +775,7 @@ icvDoubleToString( char* buf, double value )
sprintf( buf, "%d.", ivalue );
else
{
static const char* fmt = "%.17g";
static const char* fmt = "%.16e";
char* ptr = buf;
sprintf( buf, fmt, value );
if( *ptr == '+' || *ptr == '-' )
@ -814,7 +814,7 @@ icvFloatToString( char* buf, float value )
sprintf( buf, "%d.", ivalue );
else
{
static const char* fmt = "%.9g";
static const char* fmt = "%.8e";
char* ptr = buf;
sprintf( buf, fmt, value );
if( *ptr == '+' || *ptr == '-' )

Loading…
Cancel
Save