Exponentiation and types
bluetooth-mdw opened this issue · 5 comments
bluetooth-mdw commented
Hi
The README contains the following:
// Exponentiation
BInt ** Int // Retuns BInt to the power of Int
but I get a compilation error of "Cannot convert value of type 'BInt' to expected argument type 'BDouble'" from the following code. Am I doing something wrong or is the documentation or API at fault?
let TWO : BInt = 2
let TWO_SIX_THREE : Int = 263
var TWO_POW_263 : BInt = TWO ** TWO_SIX_THREE
Thanks in anticipation
Martin
twodayslate commented
What version of Swift are you using?
Deleted user commented
Hi! I'm using version 5.
twodayslate commented
Unable to reproduce 0b353aa#diff-733881c122a9299bec8512e3fc2fec48
mkrd commented
Possibly https://github.com/mkrd/Swift-BigInt/blob/master/Sources/Swift-Big-Number-Core.swift#L842.
The BDouble equivalent is declared as public, while this is not.
It is weird that the problem is not reproducible, but declaring the function as public might solve the issue
twodayslate commented
Closing as I believe this is resolved