diff --git a/src/number.vala b/src/number.vala
index 81d2811..ce5bdc8 100644
--- a/src/number.vala
+++ b/src/number.vala
@@ -886,7 +886,8 @@ public class Number
 
     /* Sets z = x^y */
     public Number xpowy (Number y)
-    {
+    {   
+        
         if (y.is_integer ())
             return xpowy_integer (y.to_integer ());
         else
@@ -903,6 +904,13 @@ public class Number
     public Number xpowy_integer (int64 n)
     {
         /* 0^-n invalid */
+        if(is_zero () && n=0)
+        {
+         //0^0 is not defined
+        mperr(_("Zero raised to zero is undefined"));
+        return new Number.integer(0);
+        }
+        
         if (is_zero () && n < 0)
         {
             /* Translators: Error displayed when attempted to raise 0 to a negative re_exponent */
