Jeroen Demeyer on Thu, 18 Sep 2008 10:52:49 +0200

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

 Length of PARI types

```Hello,

```
I have a question about the following paragraph from the libpari documentation about cgetg():
```
```
Note that the length argument \$l\$ is predetermined for a number of types: 3 for types \typ{INTMOD}, \typ{FRAC}, \typ{COMPLEX}, \typ{POLMOD}, \typ{RFRAC}, 4 for type \typ{QUAD} and \typ{QFI}, and 5 for type \typ{PADIC} and \typ{QFR}. However for the sake of efficiency, \kbd{cgetg} does not check this: disasters will occur if you give an incorrect length for those types.
```
```
I can imagine that "disasters" can occur if these types are allocated with too few space, but what can go wrong if any of these types is allocated with more codewords than required? I think that should be okay?
```
Cheers,
Jeroen.

```