|
@@ -326,7 +326,8 @@ typedef l_uint32 Instruction;
|
|
|
|
|
|
/* exponentiation */
|
|
|
#if !defined(luai_numpow)
|
|
|
-#define luai_numpow(L,a,b) ((void)L, l_mathop(pow)(a,b))
|
|
|
+#define luai_numpow(L,a,b) \
|
|
|
+ ((void)L, (b == 2) ? (a)*(a) : l_mathop(pow)(a,b))
|
|
|
#endif
|
|
|
|
|
|
/* the others are quite standard operations */
|