| Bill Allombert on Sun, 31 Oct 1999 19:07:26 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: sqr() bug and acos bug. |
>No, that would be horrible. (There ain't no zero divisors in fields
>or integral domains...)
Well, there is four square roots in Z/2^nZ if n>2 , and of course
only two in the 2-adic ring.
---
I have written a function (in C) which generate absolutely random GEN, to
test GP.
Frow now on, it has found two bugs:
? exp("eee")
CRASH...
? 2+[;]
*** forbidden addition *** segmentation fault: bug in GP (please report).
Here a patch (I have also updated the CVS version)
Index: src/basemath/alglin1.c
===================================================================
RCS file: /home/megrez/cvsroot/pari/src/basemath/alglin1.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 alglin1.c
--- src/basemath/alglin1.c 1999/09/16 13:47:15 1.1.1.1
+++ src/basemath/alglin1.c 1999/10/31 17:04:45
@@ -643,7 +643,7 @@
long ly,dy,i,j;
GEN z;
- ly=lg(y); if (ly==1) err(gadderf,"Scalar","t_MAT");
+ ly=lg(y); if (ly==1) err(gadderf,typ(x),t_MAT);
dy=lg(y[1]);
if (typ(y)!=t_MAT || ly!=dy) err(mattype1,"gaddmat");
z=cgetg(ly,t_MAT);
Index: src/basemath/trans1.c
===================================================================
RCS file: /home/megrez/cvsroot/pari/src/basemath/trans1.c,v
retrieving revision 1.6
diff -u -r1.6 trans1.c
--- src/basemath/trans1.c 1999/10/30 18:12:54 1.6
+++ src/basemath/trans1.c 1999/10/31 17:04:45
@@ -177,6 +177,8 @@
case t_QFR: case t_QFI:
err(talker,"quadratic forms cannot be used in transcendental functions");
+ default:
+ err(typeer,"a transcendental function");
}
return f(x,prec);
}