Browse Source

Use long pow for integral-only power. Fixes #542

Brucey 4 years ago
parent
commit
8a8cfab015
1 changed files with 5 additions and 1 deletions
  1. 5 1
      expr.bmx

+ 5 - 1
expr.bmx

@@ -1909,7 +1909,11 @@ Type TBinaryMathExpr Extends TBinaryExpr
 				exprType=New TIntType
 			End If
 		Case "^"
-			exprType=New TDoubleType
+			If TIntegralType(lhs.exprType) And TIntegralType(rhs.exprType) Then
+				exprType=New TLongType
+			Else
+				exprType=New TDoubleType
+			End If
 		Default
 			exprType=BalanceTypes( lhs.exprType,rhs.exprType )
 			If TStringType( exprType )