Difference between revisions of "Category talk:Variables"
Jump to navigation
Jump to search
→Overhaul: More tests
imported>Haama |
imported>Haama (→Overhaul: More tests) |
||
Line 38: | Line 38: | ||
::::I've created a [[:Category:Variables/Test|Test page]]. For now it only has pieces and parts, but it's something.--[[User:Haama|Haama]] 17:25, 3 April 2008 (EDT) | ::::I've created a [[:Category:Variables/Test|Test page]]. For now it only has pieces and parts, but it's something.--[[User:Haama|Haama]] 17:25, 3 April 2008 (EDT) | ||
::::I've done some more tests, and am pretty sure (for CS/OB v1.2) that: | |||
#All variables are 32-bit | |||
#All script variables are the same, and they're all ''longs''. The stored value is accurate to 2^31, so the range is -2,147,483,648 to 2,147,483,647. This was tested by storing the value and printing it out with pluggy's [[IntToString]]. | |||
#*Note, however, that is the ''stored'' precision. Once a float value is used in a function it will lose some precision. | |||
#All global variables are the same, and they're all ''floats''. The stored value is accurate to 2^24 so the range is -16777215 to 16777216 (in testing, it was accurate to 16777216 but not 16777217, so I'm sure about the positive side - not sure why the 0 is on the negative side for these variables). Note that the full 32 bits are used, and 2147483647 will be stored as -2147483648. Tested the same way as above.--[[User:Haama|Haama]] 23:40, 5 April 2008 (EDT) |