Thomas D. Dean on Tue, 12 Jul 2022 08:12:05 +0200


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

Gp2c translates znorder to order and produces an error


gp2c translates znorder(Mod(10,d)) into order(gmodulsg(10, d)).
Should be znorder(gmodulsg(10, d),NULL)?

> cat test-znorder.gp
d = 43575234518570298227833630584570189723;
zo = znorder(Mod(10,d));

> gp2c-run test-znorder.gp
test-znorder.gp.c: In function 'init_test_znorder':
test-znorder.gp.c:19:8: warning: implicit declaration of function 'order'; did you mean 'fforder'? [-Wimplicit-function-declaration]
   19 |   zo = order(gmodulsg(10, d));
      |        ^~~~~
      |        fforder
test-znorder.gp.c:19:6: warning: assignment to 'GEN' {aka 'long int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
   19 |   zo = order(gmodulsg(10, d));
      |      ^
Reading GPRC: /home/tomdean/.gprc
GPRC Done.

        GP/PARI CALCULATOR Version 2.14.0 (development 27794-7da38e0b6)
          amd64 running linux (x86-64/GMP-6.2.1 kernel) 64-bit version
compiled: Jul 11 2022, gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
                           threading engine: pthread
                 (readline v8.0 enabled, extended help enabled)

                     Copyright (C) 2000-2022 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?18 for how to get moral (and possibly technical) support.

parisizemax = 4000002048, primelimit = 500000, nbthreads = 64


Tom Dean