Change to lib_dtoa() to fix prescision error from trailing zeroes
This commit is contained in:
parent
3901597746
commit
92cc7a96e6
|
@ -189,6 +189,10 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
|||
digits = __dtoa(value, 3, prec, &expt, &dsgn, &rve);
|
||||
numlen = rve - digits;
|
||||
|
||||
/* Avoid precision error from missing trailing zeroes */
|
||||
|
||||
numlen = MAX(expt, numlen);
|
||||
|
||||
if (IS_NEGATE(flags))
|
||||
{
|
||||
obj->put(obj, '-');
|
||||
|
|
Loading…
Reference in New Issue