Re: The GP command “?”

Ilya Zakharevich <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
On Sat, Dec 09, 2023 at 07:49:50PM -0800, Ilya Zakharevich wrote:
>   The GP calculator accepts input in the PARI language, as well as
>   special commands starting with \ or with ? or with #.  The PARI
>   language has unary and binary operators (among them + - * / % << >>
>   && || < > == <= >=) “with the usual meaning” (and the assignment
>   flavors such as +=) and other operators (inspect the output of ?19
>   or ?_\_ or ?_! or ?_===_  etc. for details).  The command separator
>   is “;”.
> 
>   Thousands of available functions are split into “topics” (inspect
>   them via the list emitted by the command ?sections).  User-defined
>   functions (listed by ?0) are stored in variables (like f below) and
>   are defined as:
>     f(mandatory_arg, optional_arg=default) = N++; mandatory_arg+optional_arg
>   or equivalently (omit parentheses if this terminates a command):
>     (f = (mandatory_arg, optional_arg=default) -> N++; mandatory_arg+optional_arg)
>   Flow control is via functions if(), while() etc. (inspect ?if
>   etc. — and output of ?1).

Another important thing which should better be mentioned is variables
vs. “ring generators” (is there a proper PARI's nomenclature?).  Like

  “Free variables” for polynomials/series/rational functions etc. are
  denoted as 'z etc.  As a shortcut, this is the default value of the
  corresponding unassigned global variables (so they behave as if
  after z='z).

Should not there be a warning about variables?

  Warning: polynomials in several variables are treacherous (see
  ????polynomials).

"????" since I do not know where to refer the reader to…

Yours,
Ilya
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.