|
Date: Fri, 4 Apr 2014 17:02:07 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: printf issues On Fri, Apr 04, 2014 at 04:01:08PM -0400, Morten Welinder wrote: > In fmt_fmt, the rounding decision is done using this test: > > /* Decide whether to round by probing round+small */ > if (round+small != round) { ... > > Why is this done with long double? > > The reason I ask is that the Valgrind situation improves a lot if > this is done with doubles. > > (Valgrind situation: Valgrind emulates long doubles, poorly, by using > simple doubles. See, for example, https://bugs.kde.org/show_bug.cgi?id=164298) This is a known issue that needs to be fixed in valgrind. It's impossible to do anything useful with rounding on x86 with types other than double, due to excess precision (FLT_EVAL_METHOD==2). This is why musl uses long double internally everywhere that rounding semantics matter. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.