D. Hugh Redelmeier on Tue, 24 Feb 2004 06:51:18 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

erfc(0) yields error


[I guess that subject is a bit of a pun.]

I'm trying to use erfc, the complementary error function in a little
gp program that I'm writing.  I'm very new to pari/gp, but I think
that I've found a bug.

It seems to me that the complementary error function is mathematically
well-defined at 0.  It ought to be 1.  And yet, gp doesn't like 0:

    ? erfc(0)
      ***   incorrect type in negation.
    ? erfc(0.0)
      ***   incorrect type in negation.
    ? erfc(0.0000000000000000001)
    %2 = 0.9999999999999999998871620833

The error message is a little opaque too.

Version information:

                   GP/PARI CALCULATOR Version 2.2.7 (alpha)
                i686 running linux (ix86 kernel) 32-bit version
       compiled: Feb 17 2004, gcc-3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Hugh Redelmeier
hugh@mimosa.com  voice: +1 416 482-8253