Replies: 2 comments 1 reply
-
Thank you and I'm glad you're enjoying xloil.
Excel natively only supports 32 bit integers and double precision floating
point. You could return very large integers to Excel via the object cache
functionality, but then you would not be able to use Excel's arithmetic
functions on them, you'd need to define your own SUM etc. Since python is
dynamic you could define something which worked like `=pyExec("2*a+b**2",
A1, A2)` which would work if A1 or A2 were very-large-integer objects.
…On Wed, 6 Sep 2023, 12:46 sbraccia, ***@***.***> wrote:
First of all thank you for this great project.
I was wondering if it is expected for the simple function below to return
-1 (both python and excel are 64 bit)?
@xloil.func()
def test():
return 2147483647 + 1
The same function if defined as async would throw an OverflowError
Many thanks,
Carlo
—
Reply to this email directly, view it on GitHub
<#61>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFOUG4CHF4AH553SSBSWCQTXZBICDANCNFSM6AAAAAA4NECNSU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I'll add a warning or error if big ints are encountered as the current
behaviour is a bit surprising!
…On Fri, 8 Sep 2023, 17:46 sbraccia, ***@***.***> wrote:
That explains the behaviour, thank you. For my use case casting to a float
works just fine.
Thank you again
Kind regards
—
Reply to this email directly, view it on GitHub
<#61 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFOUG4F46JRCXKDOSPH5AXDXZM4WBANCNFSM6AAAAAA4NECNSU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all thank you for this great project.
I was wondering if it is expected for the simple function below to return -1 (both python and excel are 64 bit)?
@xloil.func()
def test():
return 2147483647 + 1
The same function if defined as async would throw an OverflowError
Many thanks,
Carlo
Beta Was this translation helpful? Give feedback.
All reactions