Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28495 views
License: GPL3
ubuntu2004
1
% Copyright (c) 2015 The PARI Group
2
%
3
% This file is part of the PARI/GP documentation
4
%
5
% Permission is granted to copy, distribute and/or modify this document
6
% under the terms of the GNU General Public License
7
\chapter{$L$-functions}
8
9
\section{Accessors}
10
11
\fun{long}{is_linit}{GEN data}
12
13
\fun{GEN}{ldata_get_an}{GEN ldata}
14
15
\fun{GEN}{ldata_get_dual}{GEN ldata}
16
17
\fun{long}{ldata_isreal}{GEN ldata}
18
19
\fun{GEN}{ldata_get_gammavec}{GEN ldata}
20
21
\fun{long}{ldata_get_degree}{GEN ldata}
22
23
\fun{GEN}{ldata_get_k}{GEN ldata}
24
25
\fun{GEN}{ldata_get_k1}{GEN ldata}
26
27
\fun{GEN}{ldata_get_conductor}{GEN ldata}
28
29
\fun{GEN}{ldata_get_rootno}{GEN ldata}
30
31
\fun{GEN}{ldata_get_residue}{GEN ldata}
32
33
\fun{long}{ldata_get_type}{GEN ldata}
34
35
\fun{long}{linit_get_type}{GEN linit}
36
37
\fun{GEN}{linit_get_ldata}{GEN linit}
38
39
\fun{GEN}{linit_get_tech}{GEN linit}
40
41
\fun{GEN}{lfun_get_domain}{GEN tech}
42
43
\fun{GEN}{lfun_get_dom}{GEN tech}
44
45
\fun{long}{lfun_get_bitprec}{GEN tech}
46
47
\fun{GEN}{lfun_get_factgammavec}{GEN tech}
48
49
\fun{GEN}{lfun_get_step}{GEN tech}
50
51
\fun{GEN}{lfun_get_pol}{GEN tech}
52
53
\fun{GEN}{lfun_get_Residue}{GEN tech}
54
55
\fun{GEN}{lfun_get_k2}{GEN tech}
56
57
\fun{GEN}{lfun_get_w2}{GEN tech}
58
59
\fun{GEN}{lfun_get_expot}{GEN tech}
60
61
\fun{long}{lfun_get_bitprec}{GEN tech}
62
63
\fun{GEN}{lfunprod_get_fact}{GEN tech}
64
65
\fun{GEN}{theta_get_an}{GEN tdata}
66
67
\fun{GEN}{theta_get_K}{GEN tdata}
68
69
\fun{GEN}{theta_get_R}{GEN tdata}
70
71
\fun{long}{theta_get_bitprec}{GEN tdata}
72
73
\fun{long}{theta_get_m}{GEN tdata}
74
75
\fun{GEN}{theta_get_tdom}{GEN tdata}
76
77
\fun{GEN}{theta_get_isqrtN}{GEN tdata}
78
79
\section{Conversions and constructors}
80
81
\fun{GEN}{lfunmisc_to_ldata}{GEN obj} converts \kbd{obj} to \kbd{Ldata} format.
82
Exception if \kbd{obj} cannot be converted.
83
84
\fun{GEN}{lfunmisc_to_ldata_shallow}{GEN obj} as \tet{lfunmisc_to_ldata},
85
shallow result. Exception if \kbd{obj} cannot be converted.
86
87
\fun{GEN}{lfunmisc_to_ldata_shallow_i}{GEN obj} as
88
\tet{lfunmisc_to_ldata_shallow_i}, returning \kbd{NULL} on failure.
89
90
\fun{GEN}{lfunrtopoles}{GEN r}
91
92
\fun{int}{sdomain_isincl}{double k, GEN dom, GEN dom0}
93
94
\fun{GEN}{ldata_vecan}{GEN ldata, long N, long prec}
95
return the vector of coefficients of indices $1$ to $N$ to precision
96
\kbd{prec}. The output is allowed to be a \typ{VECSMALL} when the
97
coefficients are known to be all integral and fit into a \kbd{long};
98
for instance the Dirichlet $L$ function of a real character or the
99
$L$-function of a rational elliptic curve.
100
101
\fun{GEN}{ldata_newprec}{GEN ldata, long prec}
102
return a shallow copy of \kbd{ldata} with fields accurate to precision
103
\kbd{prec}.
104
105
\fun{long}{etaquotype}{GEN *peta, GEN *pN, GEN *pk, GEN *pCHI, long *pv, long
106
*psd, long *pcusp} Let \kbd{eta} be the integer matrix factorization supposedly
107
attached to an $\eta$-quotient $f(z) = \prod_i \eta(n_i z)^{e_i}$. Assuming
108
\kbd{*peta} is initially set to \kbd{eta}, this function returns $0$ if
109
there is a type error or this does not define a function on some $X_0(N)$.
110
Else it returns $1$ and sets
111
112
\item \kbd{*peta} to a normalized factorization (as would be returned by
113
\kbd{factor}),
114
115
\item \kbd{*pN} to the level $N$ of $f$,
116
117
\item \kbd{*pk} to the modular weight $k$ of $f$,
118
119
\item \kbd{*pCHI} to the Nebentypus of $f$ (quadratic character)
120
as an integer,
121
122
\item \kbd{*pv} to the valuation at infinity $v_q(f)$,
123
124
\item \kbd{*psd} to $1$ if and only if $f$ is self-dual,
125
126
\item \kbd{*pcusp} to $1$ if $f$ is cuspidal, else to $0$ if $f$ holomorphic
127
at all cusps, else to $-1$.
128
129
The last three arguments \kbd{pCHI}, \kbd{pv} and \kbd{pcusp} can be set to
130
\kbd{NULL}, in which case the relevant information is not computed, which
131
saves time.
132
133
\section{Variants of GP functions}
134
135
\fun{GEN}{lfun}{GEN ldata, GEN s, long bitprec}
136
137
\fun{GEN}{lfuninit}{GEN ldata, GEN dom, long der, long bitprec}
138
139
\fun{GEN}{lfuninit_make}{long t, GEN ldata, GEN tech, GEN domain}
140
141
\fun{GEN}{lfunlambda}{GEN ldata, GEN s, long bitprec}
142
143
\fun{GEN}{lfunquadneg}{long D, long k} for $L(\chi_D, k)$, $D$ fundamental
144
discriminant and $k \geq 0$.
145
146
\fun{long}{lfunthetacost}{GEN ldata, GEN tdom, long m, long bitprec}:
147
\kbd{lfunthetacost0} when the first argument is known to be an \kbd{Ldata}.
148
149
\fun{GEN}{lfunthetacheckinit}{GEN data, GEN tinf, long m, long bitprec}
150
151
\fun{GEN}{lfunrootno}{GEN data, long bitprec}
152
153
\fun{GEN}{lfunzetakinit}{GEN pol, GEN dom, long der, long bitprec}
154
155
\fun{GEN}{lfunellmfpeters}{GEN E, long bitprec}
156
157
\fun{GEN}{ellanalyticrank}{GEN E, long prec} DEPRECATED.
158
159
\fun{GEN}{ellL1}{GEN E, long prec} DEPRECATED.
160
161
\section{Inverse Mellin transforms of Gamma products}
162
163
\fun{GEN}{gammamellininv}{GEN Vga, GEN s, long m, long bitprec}
164
165
\fun{GEN}{gammamellininvinit}{GEN Vga, long m, long bitprec}
166
167
\fun{GEN}{gammamellininvrt}{GEN K, GEN s, long bitprec} no GC-clean, but
168
suitable for \kbd{gerepileupto}.
169
170
\fun{int}{Vgaeasytheta}{GEN Vga} return 1 if the inverse Mellin transform is
171
an exponential and 0 otherwise.
172
173
\fun{double}{dbllemma526}{double a, double b, double c, long B}
174
175
\fun{double}{dblcoro526}{double a, double c, long B}
176
177
\newpage
178
179
\chapter{Modular symbols}
180
181
\fun{void}{checkms}{GEN W} raise an exception if $W$ is not an \var{ms}
182
structure from \kbd{msinit}.
183
184
\fun{void}{checkmspadic}{GEN W} raise an exception if $W$ is not an
185
\var{mspadic} structure from \kbd{mspadicinit}.
186
187
\fun{GEN}{mseval2_ooQ}{GEN W, GEN phi, GEN c} let $W$ be a \kbd{msinit}
188
structure for $k = 2$, $\phi$ be a modular symbol with integral values
189
and $c$ be a rational number. Return the integer $\phi(p)$,
190
where $p$ is the path $\{\infty,c\}$.
191
192
\fun{void}{mspadic_parse_chi}{GEN s, GEN *s1, GEN *s2} see \kbd{mspadicL};
193
let $\chi$ be the cyclotomic character from
194
$\text{Gal}\big(\Q_p(mu_{p^\infty})/\Q_p\big)$ to $\Z_p^*$
195
and $\tau$ be the Teichm\"uller character for $p > 2$ and the character of
196
order $2$ on $(\Z/4\Z)^*$ if $p = 2$. Let $s$ encode
197
the $p$-adic characther $\chi^s := \langle\chi\rangle^{s_1} \tau^{s_2}$;
198
set \kbd{*s1} and \kbd{*s2} to the integers $s_1$ and $s_2$.
199
200
\fun{GEN}{mspadic_unit_eigenvalue}{GEN ap, long k, GEN p, long n}
201
let $p$ be a prime not dividing the trace of Frobenius \kbd{ap},
202
return the unit root of $x^2 - ap*x + p^(k-1)$ to $p$-adic accuracy $p^n$.
203
204
Variants of \kbd{mfnumcusps} :
205
206
\fun{ulong}{mfnumcuspsu}{ulong n}
207
208
\fun{GEN}{mfnumcusps_fact}{GEN fa} where \kbd{fa} is \kbd{factor}$(n)$.
209
210
\fun{ulong}{mfnumcuspsu_fact}{GEN fa} where \kbd{fa} is \kbd{factoru}$(n)$.
211
212
\chapter{Modular forms}
213
214
\section{Implementation of public data structures}
215
216
\fun{void}{checkMF}{GEN mf} raise an exception if the argument is not a
217
modular form space.
218
219
\fun{GEN}{checkMF_i}{GEN mf} return the underlying modular form space
220
if \kbd{mf} is either directly a modular form space from \kbd{mfinit}
221
or a symbol from \kbd{mfsymbol}. Return \kbd{NULL} otherwise.
222
223
\fun{int}{checkmf_i}{GEN mf} return $1$ if the argument is a modular form
224
and $0$ otherwise.
225
226
\fun{int}{checkfarey_i}{GEN F} return $1$ if the argument is a Farey symbol
227
(from \kbd{mspolygon} or \kbd{msfarey}) and $0$ otherwise.
228
229
\subsec{Accessors for modular form spaces}
230
231
Shallow functions; assume that their argument is a modular form space
232
is created by \kbd{mfinit} and checked using \kbd{checkMF}.
233
234
\fun{GEN}{MF_get_gN}{GEN mf} return the level $N$ as a \typ{INT}.
235
236
\fun{long}{MF_get_N}{GEN mf} return the level $N$ as a \kbd{long}.
237
238
\fun{GEN}{MF_get_gk}{GEN mf} return the level $k$ as a \typ{INT}.
239
240
\fun{long}{MF_get_k}{GEN mf} return the level $k$ as a \kbd{long}.
241
242
\fun{long}{MF_get_r}{GEN mf} assuming the level is a half-integer, return
243
the integer $r = k - (1/2)$.
244
245
\fun{GEN}{MF_get_CHI}{GEN mf} return the nebentypus $\chi$, which is a
246
special form of character structure attached to Dirichlet characters (see
247
next section). Its values are given as algebraic numbers: either $\pm1$ or
248
\typ{POLMOD} in $t$.
249
250
\fun{long}{MF_get_space}{GEN mf} returns the space type, corresponding
251
to \kbd{mfinit}'s \kbd{space} flag. The current list is
252
253
\bprog
254
mf_NEW, mf_CUSP, mf_OLD, mf_EISEN, mf_FULL
255
@eprog
256
257
\fun{GEN}{MF_get_basis}{GEN mf} return the $\Q$-basis of the space,
258
concatenation of \tet{MF_get_E} and \tet{MF_get_S}, in this order; the forms
259
have coefficients in $\Q(\chi)$. Low-level version of \kbd{mfbasis}.
260
261
\fun{long}{MF_get_dim}{GEN mf} returns the dimension $d$ of the space. It
262
is the cardinality of \tet{MF_get_basis}.
263
264
\fun{GEN}{MF_get_E}{GEN mf} returns a $\Q$-basis for the subspace
265
spanned by Eisenstein series in the space; the forms have coefficients in
266
$\Q(\chi)$.
267
268
\fun{GEN}{MF_get_S}{GEN mf} returns a $\Q$-basis for the cuspidal subspace
269
in the space; the forms have coefficients in $\Q(\chi)$.
270
271
\fun{GEN}{MF_get_fields}{GEN mf} returns the vector of polynomials defining
272
each Galois orbit of newforms over $\Q(\chi)$. Uses memoization: a first call
273
splits the space and may be costly; subsequent calls return the cached
274
result.
275
276
\fun{GEN}{MF_get_newforms}{GEN mf} returns a vector \kbd{vF} containing the
277
coordinates of the eigenforms on \tet{MF_get_basis} (\kbd{mftobasis} form).
278
Low-level version of
279
\kbd{mfeigenbasis}, whose elements are recovered as \kbd{mflinear(mf,
280
gel(vF,i))}. Uses memoization, sharing the same data as
281
\kbd{MF\_get\_fields}. Note that it is much more efficient to use
282
\kbd{mfcoefs(mf,)} then multiply by this vector than to compute the
283
coefficients of eigenforms from \kbd{mfeigenbasis} individually.
284
285
The following accessors are technical,
286
287
\fun{GEN}{MF_get_M}{GEN mf} the $(1+m) \times d$ matrix whose $j$-th column
288
contain the coefficients of the $j$-th entry in \tet{MF_get_basis}, $m$
289
is the optimal ``Sturm bound'' for the space: the maximum of the $v_\infty(f)$
290
over nonzero forms. It has entries in $\Q(\chi)$.
291
292
\fun{GEN}{MF_get_Mindex}{GEN mf} is a \typ{VECSMALL} containing $d$ row
293
indices, the corresponding rows of $M$ form an invertible matrix $M_0$.
294
295
\fun{GEN}{MF_get_Minv}{GEN mf} the inverse of $M_0$ in a form suitable for fast
296
multiplication.
297
298
\fun{GEN}{MFcusp_get_vMjd}{GEN mf} valid only for a full
299
\emph{cuspidal} space. Then the functions in \tet{MF_get_S} are
300
of the form $B_d T_j Tr^{new}_M$. This returns the vector of triples
301
(\typ{VECSMALL}) $[M,j,d]$, in the same order.
302
303
\fun{GEN}{MFnew_get_vj}{GEN mf} valid only for a \emph{new} space. Then
304
the functions in \tet{MF_get_S} are of the form $T_j Tr^{new}_N$. This
305
returns a \typ{VECSMALL} of the Hecke indices $j$, in the same order.
306
307
\subsec{Accessors for individual modular forms}
308
309
\fun{GEN}{mf_get_gN}{GEN F} return the level of $F$, which may be a multiple of
310
the conductor, as a \typ{INT}
311
312
\fun{long}{mf_get_N}{GEN F} return the level as a \kbd{long}.
313
314
\fun{GEN}{mf_get_gk}{GEN F} return the weight of $F$ as a \typ{INT}
315
or a \typ{FRAC} with denominator $2$ (half-integral weight).
316
317
\fun{long}{mf_get_k}{GEN F} return the weight as a \kbd{long}; if the weight is
318
not integral, this raises an exception.
319
320
\fun{long}{mf_get_r}{GEN F} assuming $F$ is a modular form of half-integral
321
weight $k = (2r+1)/2$, return $r = k - (1/2)$.
322
323
\fun{GEN}{mf_get_CHI}{GEN F} return the nebentypus, which is a special form of
324
character structure attached to Dirichlet characters (see next section). Its
325
values are given as algebraic numbers: either $\pm1$ or \typ{POLMOD}
326
in $t$.
327
328
\fun{GEN}{mf_get_field}{GEN F} return the polynomial (in variable $y$)
329
defining $\Q(f)$ over $\Q(\chi)$.
330
331
\fun{GEN}{mf_get_NK}{GEN F} return the tag attached to $F$: a vector containing
332
\kbd{gN}, \kbd{gk}, \kbd{CHI}, \kbd{field}. Never use its component directly,
333
use individual accessors as above.
334
335
\fun{long}{mf_get_type}{GEN F} returns a symbolic name for the constructur
336
used to create the form, e.g. \kbd{t\_MF\_EISEN} for a general Eisenstein
337
series. A form has a recursive structure represented by a tree: its
338
definition may involve other forms, e.g. the tree attached to $T_n f$
339
contains $f$ as a subtree. Such trees have \emph{leaves}, forms
340
which do not contain a strict subtree, e.g. \kbd{t\_MF\_DELTA} is a leaf,
341
attached to Ramanujan's $\Delta$.
342
343
Here is the current list of types; since the names are liable to change,
344
they are not documented at this point. Use \kbd{mfdescribe} to visualize
345
their mathematical structure.
346
\bprog
347
/*leaves*/
348
t_MF_CONST, t_MF_EISEN, t_MF_Ek, t_MF_DELTA, t_MF_ETAQUO, t_MF_ELL,
349
t_MF_DIHEDRAL, t_MF_THETA, t_MF_TRACE, t_MF_NEWTRACE,
350
/*recursive*/
351
t_MF_MUL, t_MF_POW, t_MF_DIV, t_MF_BRACKET, t_MF_LINEAR, t_MF_LINEAR_BHN,
352
t_MF_SHIFT, t_MF_DERIV, t_MF_DERIVE2, t_MF_TWIST, t_MF_HECKE,
353
t_MF_BD,
354
@eprog
355
356
\subsec{Nebentypus} The characters stored in modular forms and modular form
357
spaces have a special structure. One can recover the parameters
358
of an ordinary Dirichlet character by \kbd{G = gel(CHI,1)} (the underlying
359
\kbd{znstar}) and \kbd{chi = gel(CHI,2)} (the underlying character in
360
\kbd{znconreylog} form).
361
362
\fun{long}{mfcharmodulus}{GEN CHI} the modulus of $\chi$.
363
364
\fun{long}{mfcharorder}{GEN CHI} the order of $\chi$.
365
366
\fun{GEN}{mfcharpol}{GEN CHI} the cyclotomic polynomial $\Phi_n$
367
defining $\Q(\chi)$, always normalized so that $n$ is not $2$ mod $4$.
368
369
\subsec{Miscellaneous functions}
370
371
\fun{long}{mfnewdim}{long N, long k, GEN CHI} dimension of the new part
372
of the cuspidal space.
373
374
\fun{long}{mfcuspdim}{long N, long k, GEN CHI} dimension of the cuspidal space.
375
376
\fun{long}{mfolddim}{long N, long k, GEN CHI} dimension of the old part
377
of the cuspidal space.
378
379
\fun{long}{mfeisensteindim}{long N, long k, GEN CHI} dimension of the
380
Eisenstein subspace.
381
382
\fun{long}{mffulldim}{long N, long k, GEN CHI} dimension of the full space.
383
384
385
386
\fun{GEN}{mfeisensteinspaceinit}{GEN NK}
387
388
\fun{GEN}{mfdiv_val}{GEN F, GEN G, long vG}
389
390
391
\fun{GEN}{mfembed}{GEN E, GEN v}
392
393
\fun{GEN}{mfmatembed}{GEN E, GEN v}
394
395
\fun{GEN}{mfvecembed}{GEN E, GEN v}
396
397
398
\fun{long}{mfsturmNgk}{long N, GEN k}
399
400
\fun{long}{mfsturmNk}{long N, long k}
401
402
\fun{long}{mfsturm_mf}{GEN mf}
403
404
\fun{long}{mfiscuspidal}{GEN mf, GEN F}
405
406
\fun{GEN}{mftobasisES}{GEN mf, GEN F}
407
408
\fun{GEN}{mftocol}{GEN F, long lim, long d}
409
410
\fun{GEN}{mfvectomat}{GEN vF, long lim, long d}
411
412
\newpage
413
414
\chapter{Plots}
415
416
A \tet{PARI_plot} canvas is a record of dimensions, with the following fields:
417
\bprog
418
long width; /* window width */
419
long height; /* window height */
420
long hunit; /* length of horizontal 'ticks' */
421
long vunit; /* length of vertical 'ticks' */
422
long fwidth; /* font width */
423
long fheight;/* font height */
424
void (*draw)(PARI_plot *T, GEN w, GEN x, GEN y);
425
@eprog\noindent The \kbd{draw} method performs the actual drawing of
426
a \typ{VECSMALL} w (rectwindow indices); $x$ and $y$ are \typ{VECSMALL}s
427
of the same length and rectwindow $w[i]$ is drawn with its upper left
428
corner at offset $(x[i],y[i])$. No plot engine is available in \kbd{libpari}
429
by default, since thie would introduce a dependency on extra graphical
430
libraries. See the files \kbd{src/graph/plot*} for basic implementations of
431
various plot engines: \kbd{plotsvg} is particularly simple (\kbd{draw} is a
432
1-liner).
433
434
\fun{void}{pari_set_plot_engine}{void (*T)(PARI_plot *)} installs the
435
graphical engine $T$ and initializes the graphical subsystem. No routine in
436
this chapter will work without this initialization.
437
438
\fun{void}{pari_kill_plot_engine}{void} closes the graphical subsystem and
439
frees the ressources it occupies.
440
441
\subsec{Highlevel function}
442
Those functions plot $f(E,x)$ for $x\in [a,b]$, using $n$ regularly spaced
443
points (by default).
444
445
\fun{GEN}{ploth}{void *E, GEN(*f)(void*,GEN), GEN a, GEN b, long flags,long
446
n, long prec} draw physically.
447
448
\fun{GEN}{plotrecth}{void *E, GEN(*f)(void*,GEN), long w, GEN a,GEN b, ulong
449
flags,long n, long prec} draw in rectwindow $w$.
450
451
\subsec{Function }
452
453
\fun{void}{plotbox}{long ne, GEN gx2, GEN gy2}
454
455
\fun{void}{plotclip}{long rect}
456
457
\fun{void}{plotcolor}{long ne, long color}
458
459
\fun{void}{plotcopy}{long source, long dest, GEN xoff, GEN yoff, long flag}
460
461
\fun{GEN}{plotcursor}{long ne}
462
463
\fun{void}{plotdraw}{GEN list, long flag}
464
465
\fun{GEN}{plothraw}{GEN listx, GEN listy, long flag}
466
467
\fun{GEN}{plothsizes}{long flag}
468
469
\fun{void}{plotinit}{long ne, GEN x, GEN y, long flag}
470
471
\fun{void}{plotkill}{long ne}
472
473
\fun{void}{plotline}{long ne, GEN x2, GEN y2}
474
475
\fun{void}{plotlines}{long ne, GEN listx, GEN listy, long flag}
476
477
\fun{void}{plotlinetype}{long ne, long t}
478
479
\fun{void}{plotmove}{long ne, GEN x, GEN y}
480
481
\fun{void}{plotpoints}{long ne, GEN listx, GEN listy}
482
483
\fun{void}{plotpointsize}{long ne, GEN size}
484
485
\fun{void}{plotpointtype}{long ne, long t}
486
487
\fun{void}{plotrbox}{long ne, GEN x2, GEN y2}
488
489
\fun{GEN}{plotrecthraw}{long ne, GEN data, long flags}
490
491
\fun{void}{plotrline}{long ne, GEN x2, GEN y2}
492
493
\fun{void}{plotrmove}{long ne, GEN x, GEN y}
494
495
\fun{void}{plotrpoint}{long ne, GEN x, GEN y}
496
497
\fun{void}{plotscale}{long ne, GEN x1, GEN x2, GEN y1, GEN y2}
498
499
\fun{void}{plotstring}{long ne, char *x, long dir}
500
501
\subsec{Obsolete functions} These draw directly to a PostScript file
502
specified by a global variable and should no longer be used. Use
503
\kbd{plotexport} and friends instead.
504
505
\fun{void}{psdraw}{GEN list, long flag}
506
507
\fun{GEN}{psplothraw}{GEN listx, GEN listy, long flag}
508
509
\fun{GEN}{psploth}{void *E, GEN(*f)(void*,GEN), GEN a, GEN b, long flags,
510
long n, long prec} draw to a PostScript file.
511
512
513
\subsec{Dump rectwindows to a PostScript or SVG file}
514
515
$w,x,y$ are three \typ{VECSMALL}s indicating the rectwindows to dump, at
516
which offsets. If $T$ is \kbd{NULL}, rescale with respect to the installed
517
graphic engine dimensions; else with respect to $T$.
518
519
\fun{char*}{rect2ps}{GEN w, GEN x, GEN y, PARI_plot *T}
520
521
\fun{char*}{rect2ps_i}{GEN w, GEN x, GEN y, PARI_plot *T, int plotps}
522
if \kbd{plotps} is $0$, as above; else private version used to implement
523
the \kbd{plotps} graphic engine (do not rescale, rotate to portrait
524
orientation).
525
526
\fun{char*}{rect2svg}{GEN w, GEN x, GEN y, PARI_plot *T}
527
528
\subsec{Technical functions exported for convenience}
529
530
\fun{void}{pari_plot_by_file}{const char *env, const char *suf, const char *img}
531
backend used by the \kbd{plotps} and \kbd{plotsvg} graphic engines.
532
533
\fun{void}{colorname_to_rgb}{const char *s, int *r, int *g, int *b} convert
534
an \kbd{X11} colorname to RGB values.
535
536
\fun{void}{color_to_rgb}{GEN c, int *r, int *g, int *b} convert a pari color
537
(\typ{VECSMALL} RGB triple or \typ{STR} name) to RGB values.
538
539
\fun{void}{long_to_rgb}{long c, int *r, int *g, int *b} split a standard
540
hexadecimal color value \kbd{0xfdf5e6} to its rgb components (\kbd{0xfd},
541
\kbd{0xf5}, \kbd{0xe6}).
542
\newpage
543
544