[Beignet] pow(n), erf(c), tgamma give wrong results

Zhigang Gong zhigang.gong at linux.intel.com
Tue Nov 4 20:05:23 PST 2014


The patch LGTM. Could you reply with a signed-off signature?

And it triggers some other bugs related to constant expression
handling when run all unit test cases.
I will send out a patchset to fix that issue.

On Tue, Nov 04, 2014 at 10:42:48PM +0000, Rebecca N. Palmer wrote:
> In current beignet (commit 4caba11ce88b3c1ec80ee119ceaf4bf778b96471):
> -pow/pown ignore the sign of their first argument (e.g. pow(-2,3) gives
> 8 instead of -8)
> -erf/erfc diverge (instead of converging to 1 or 0) for arguments above
> about 2
> -tgamma is actually lgamma, a related but very different function
> 
> The test suite doesn't detect these problems because the erf/erfc
> and pow tests are disabled by default (in the case of pow, due to an
> unrelated bug in the test), and the tgamma test checks it against
> libc's gammaf, which is also lgamma, instead of tgammaf.
> 
> My patch against 0.9.3, fixing all the above and re-enabling the
> tests, is at https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090
> but will need some adjustment for HEAD (the relevant parts of
> backend/src/ocl_stdlib.tmpl.h are now in
> backend/src/libocl/tmpl/ocl_math.tmpl.cl).
> 
> This patch contains LGPL2.1+ code from glibc ( http://sources.debian.net/src/glibc/2.19-12/sysdeps/ieee754/flt-32/s_erff.c/
> ); is that permitted here?  (Beignet's COPYING file is LGPL2.1 , the
> project website says LGPL2+, and the file headers say "Lesser GPL
> v2+" (2.1 was the first version to be called Lesser, rather than
> Library, GPL).)
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list