version 1.3, 2000/08/22 05:04:05 |
version 1.5, 2009/03/27 14:42:29 |
|
|
* 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/engine/bf.c,v 1.2 2000/08/21 08:31:27 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/bf.c,v 1.4 2003/02/14 22:29:08 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#if PARI |
#if defined(PARI) |
#include "base.h" |
#include "base.h" |
#include <math.h> |
#include <math.h> |
#include "genpari.h" |
#include "genpari.h" |
|
|
extern long prec; |
|
|
|
void ritopa(Obj,GEN *); |
void ritopa(Obj,GEN *); |
void patori(GEN,Obj *); |
void patori(GEN,Obj *); |
|
|
Line 141 void pwrbf(a,e,c) |
|
Line 139 void pwrbf(a,e,c) |
|
Num a,e; |
Num a,e; |
Num *c; |
Num *c; |
{ |
{ |
GEN pa,pe,z; |
|
long ltop,lbot; |
|
|
|
if ( !e ) |
if ( !e ) |
*c = (Num)ONE; |
*c = (Num)ONE; |
else if ( !a ) |
else if ( !a ) |
*c = 0; |
*c = 0; |
else { |
else { |
ltop = avma; ritopa((Obj)a,&pa); ritopa((Obj)e,&pe); lbot = avma; |
gpui_ri((Obj)a,(Obj)c,(Obj *)c); |
z = gerepile(ltop,lbot,gpui(pa,pe,prec)); |
|
patori(z,(Obj *)c); cgiv(z); |
|
} |
} |
} |
} |
|
|