This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add libm-test.inc macro for all-rounding-modes testing


On 03/08/2014 02:13 AM, Joseph S. Myers wrote:
> This patch adds support in libm-test.inc for automatically running
> tests of a function in all rounding modes, in the form of a macro
> ALL_RM_TEST to loop over all rounding modes when running tests of a
> function, and uses it for functions whose results should always be
> independent of the rounding mode.
> 
> Conversion of tests of nextafter to ALL_RM_TEST was deferred because
> trying that conversion showed up bug 16677.  (Finding such a bug of
> course illustrates the point of testing more systematically in all
> rounding modes rather than only reactively when bugs get reported in a
> particular function in a non-default mode.)  Conversion of tests where
> results can depend on the rounding mode will follow once I add
> gen-libm-test.pl support for using different initializers for the
> expected results for different rounding modes (again, some conversions
> may need deferring until bugs are fixed, depending on how
> straightforward they are to XFAIL in a particular context).
> 
> Some existing tests get run five times rather than four, with
> round-to-nearest tests both run in that as default rounding mode and
> also with it explicitly set with fesetround (FE_TONEAREST).  This
> duplication doesn't seem particularly useful, so ALL_RM_TEST only runs
> tests four times.
> 
> Tested x86_64 and x86.

Thanks,
Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]