Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Jan 07, 2010 10:42 pm   

[3.12] 64-bit integer support bug
 
As I recall, CMUD is capable of displaying 64-bit integers. This doesn't seem to be the case with zscript.

#SAY (100000 * 30000) returns -1294967296

However, if you do the same thing in Lua:

print(100000*30000) returns, correctly, 3000000000.

It seems that zscript cannot support 64-bit integers, though I'm not sure when that has become a problem.

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jan 08, 2010 5:36 pm   
 
Hmm, I'll look into that. CMUD 2.37 does the same thing. CMUD is supposed to be using 64-bit integers for internal calculations, but might only be able to store 32-bit. But I just tried this:

#SAY ((100000 * 30000)/1000)

and it still didn't work. So somehow it's not even using 64-bit for internal calculations.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Mon Jan 11, 2010 5:23 pm   
 
hmm, I think this has more to do with expression parsing Zugg. I do have a variable that is currently well into 64-bit integer range.

additionally

#SAY (100000 * (30000))
#SAY ((100000) * 30000)
#SAY (100000 * %int(30000))

All seem to work correctly
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net