Karim Belabas on Fri, 01 Feb 2019 18:26:45 +0100


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

Re: Syntax question: | .. | for matdet([ ... ])


* Bill Allombert [2019-02-01 18:21]:
> On Fri, Feb 01, 2019 at 04:55:16PM +0000, Jacques Gélinas wrote:
> > What changes would be needed in order for gp to accept the normal
> > mathematical symbol  for determinants, using the same conventions as
> > matrices for denoting the elements ?
> 
> You mean you want to accept |a,b;c,d| as a*d-bc ?
> This would be confusing with the other uses of |.
> 
> The major issue is that there are no different left | and right |
> characters to bracket the matrix entries.
> 
> Maybe you can change src/language/parse.y (and compile.c) to
> handle this but I would not advise it.

Note also the clash with other standard mathematical notations such as |x| = abs(x)
( or even |set| = #set ). Would you expect 

  ? |-2|   \\ = matdet(Mat(-2))
  %1 = -2

?

Cheers,

    K.B.

P.S. And we already have x || y for "x OR y" and [ x | ... ] for "the set of x such that"
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`