[phobos] std.math.exp: different results compared to expl

Johannes Pfau johannespfau at googlemail.com
Sat May 18 12:37:15 PDT 2013


We currently try to fix all failing phobos unittests for gdc and we have 
failures in the  std/internal/math/gammafunction.d(367) tests. It seems 
the reason is that gdc doesn't use the custom inline versions of exp. We 
use the C expl function instead and this function provides slightly 
different results:

Testcase: http://dpaste.dzfl.pl/bb319763

Can anyone tell if
* This difference is expected?
* Which version is 'correct', the inline asm implementation or the C 
implementation?
* What should we do about this in the tests? should we just relax the tests?

(We could of course adapt the inline asm version to gdc inline asm, but 
using the C function is better regarding portability)

-- 
Johannes Pfau



More information about the phobos mailing list