Index: functions.c
===================================================================
--- functions.c	(revision 2084)
+++ functions.c	(working copy)
@@ -79,12 +79,21 @@
 
     MPstr_to_num(a, v->base, MP_a);
     MPstr_to_num(b, v->base, MP_b);
+    
     if (a[i+1] == '-') {
         int MP_c[MP_SIZE];
         mpneg(MP_b, MP_c);
-        calc_xtimestenpowx(MP_a, MP_c, t);
+        int MP_base[MP_SIZE];
+        mpcim(&basevals[v->base], MP_base);
+        int MP1[MP_SIZE];
+        calc_xpowy(MP_base, MP_c, MP1);
+        mpmul(MP_a, MP1, t);
     } else {
-        calc_xtimestenpowx(MP_a, MP_b, t);
+        int MP_base[MP_SIZE];
+        mpcim(&basevals[v->base], MP_base);
+        int MP1[MP_SIZE];
+        calc_xpowy(MP_base, MP_b, MP1);
+        mpmul(MP_a, MP1, t);
     }
 
     free(a);
