فهرست منبع

Integrals will now use bbLongPow() for ^.

woollybah 6 سال پیش
والد
کامیت
d6b0fed998
3فایلهای تغییر یافته به همراه11 افزوده شده و 3 حذف شده
  1. 5 1
      ctranslator.bmx
  2. 5 1
      expr.bmx
  3. 1 1
      options.bmx

+ 5 - 1
ctranslator.bmx

@@ -2258,7 +2258,11 @@ t:+"NULLNULLNULL"
 		End If
 		
 		If expr.op = "^" Then
-			Return "bbFloatPow" + Bra(t_lhs + ", " + t_rhs)
+			If TIntegralType(expr.exprType) Then
+				Return "bbLongPow" + Bra(t_lhs + ", " + t_rhs)
+			Else
+				Return "bbFloatPow" + Bra(t_lhs + ", " + t_rhs)
+			End If
 		End If
 		
 		If expr.op = "mod" Or expr.op = "%" Then

+ 5 - 1
expr.bmx

@@ -1907,7 +1907,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 )

+ 1 - 1
options.bmx

@@ -25,7 +25,7 @@ SuperStrict
 
 Import "base.configmap.bmx"
 
-Const version:String = "0.112"
+Const version:String = "0.113"
 
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_MODULE:Int = 1