version 1.2, 2000/08/21 08:31:19 |
version 1.5, 2001/05/28 08:25:30 |
|
|
* shall be made on your publication or presentation in any form of the |
* shall be made on your publication or presentation in any form of the |
* results obtained by use of the SOFTWARE. |
* results obtained by use of the SOFTWARE. |
* (4) In the event that you modify the SOFTWARE, you shall notify FLL by |
* (4) In the event that you modify the SOFTWARE, you shall notify FLL by |
* e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification |
* e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification |
* for such modification or the source code of the modified part of the |
* for such modification or the source code of the modified part of the |
* SOFTWARE. |
* SOFTWARE. |
* |
* |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/fctr.c,v 1.1.1.1 1999/12/03 07:39:07 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/fctr.c,v 1.4 2001/03/29 09:49:56 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 57 void Pmodsqfr(),Pmodfctr(),Pddd(),Pnewddd(),Pddd_tab() |
|
Line 57 void Pmodsqfr(),Pmodfctr(),Pddd(),Pnewddd(),Pddd_tab() |
|
void Pirred_check(), Pnfctr_mod(); |
void Pirred_check(), Pnfctr_mod(); |
|
|
struct ftab fctr_tab[] = { |
struct ftab fctr_tab[] = { |
{"fctr",Pfctr,1}, |
{"fctr",Pfctr,-2}, |
{"gcd",Pgcd,-3}, |
{"gcd",Pgcd,-3}, |
{"gcdz",Pgcdz,2}, |
{"gcdz",Pgcdz,2}, |
{"lcm",Plcm,2}, |
{"lcm",Plcm,2}, |
|
|
DCP dc; |
DCP dc; |
|
|
asir_assert(ARG0(arg),O_P,"fctr"); |
asir_assert(ARG0(arg),O_P,"fctr"); |
fctrp(CO,(P)ARG0(arg),&dc); |
if ( argc(arg) == 1 ) |
|
fctrp(CO,(P)ARG0(arg),&dc); |
|
else { |
|
asir_assert(ARG1(arg),O_P,"fctr"); |
|
fctr_wrt_v_p(CO,(P)ARG0(arg),VR((P)ARG1(arg)),&dc); |
|
} |
dcptolist(dc,rp); |
dcptolist(dc,rp); |
} |
} |
|
|
|
|
else if ( !p2 ) |
else if ( !p2 ) |
*rp = p1; |
*rp = p1; |
else if ( !qpcheck((Obj)p1) || !qpcheck((Obj)p2) ) |
else if ( !qpcheck((Obj)p1) || !qpcheck((Obj)p2) ) |
error("gcd : invalid argument"); |
gcdprsp(CO,p1,p2,rp); |
else if ( argc(arg) == 2 ) |
else if ( argc(arg) == 2 ) |
ezgcdp(CO,p1,p2,rp); |
ezgcdp(CO,p1,p2,rp); |
else { |
else { |