Consistency: Dividing an integer by the powers of 2 vs powers of 10?
This is a question concerning cross-platform consistency and determinism of floating point operations (IE yield different results on different CPUs/sysetms) Which one is more likely to stay cross-platform consistent(pseudo code): float myFloat = float ( myInteger) / float( 1024 ) or float myFloat = float ( myInteger ) / float( 1000 ) Platforms are C# and AS3. . AS3 versions: var myFloat:Number = myInteger / 1000 // AS3 var myFloat:Number = myInteger / 1024 // AS3 - Ok I've added AS3 version for clarification, which is equivalent to the 'C pseudo code' above . As you can see in AS3 all calculat
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.