[PTLsim-devel] Bug while printing floating points rvn 225

abhishek
Sun Feb 24 19:01:58 EST 2008


Hi,

float temp = 2.0069;
cerr << temp, endl, flush;

it prints as 2.699342384

Not the two zeroes after decimal place are missing. The format_float
function in klibc.cpp doesn't take care of the case when there zeroes
immediately after the decimal place.

Also, in format_number functions in superstl.cpp the following lines
doesn't make much sense.

        if (i > precision)
                precision = i;
As a result some junk characters are printed.

regards,
abhishek



More information about the PTLsim-devel mailing list