[phobos] Failing unit tests on Windows

Don Clugston dclugston at googlemail.com
Thu Nov 18 20:40:44 PST 2010


On 19 November 2010 02:50, David Simcha <dsimcha at gmail.com> wrote:
> Don's gamma function code apparently fails some unit tests on Windows.  I
> can't figure out why it passes on Brad's automated tester.  I'm using
> Windows 7 64-bit, Phobos revision 2181, and DMD 2.050.  I'm running the
> tests the standard way (make -fwin32.mak unittest).  I also tried running
> the unit tests just for the gamma function module in CodeBlocks, both with
> and without -O, -inline, and -release.  I get the following unit test
> failure:
>
> core.exception.AssertError at std.internal.math.gammafunction(816): unittest
> failure
>
> The relevant line of code is:
>
> assert(betaIncompleteInv(0x1.ff1275ae5b939bcap-41, 4.6713e18,
> 0.0813601)==0x1.f97749d90c7adba8p-63);

It definitely passes for me (WinXP, 32 bit) with the DMD from svn, and
also with the binary from 2.050.
Can you please run this:

import std.mathspecial;
import std.stdio;

void main()
{
writefln("%a", betaIncompleteInverse(0x1.ff1275ae5b939bcap-41, 4.6713e18,
 0.0813601));
writefln("%a %a", 4.6713e18, 0.0813601);
}


More information about the phobos mailing list