Karim Belabas on Wed, 25 Feb 2004 16:39:39 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: erfc(0) yields error |
* D. Hugh Redelmeier [2004-02-24 06:52]: > 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) I have fixed the problem in CVS ( it was an internal error, nothing faulty about the error message: the routine indeed received an invalid object ) Thanks for the bug report ! Cheers, Karim. -- Karim Belabas Tel: (+33) (0)1 69 15 57 48 Dep. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19 Universite Paris-Sud http://www.math.u-psud.fr/~belabas/ F-91405 Orsay (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]