Game Development Community

Large int become 1e+00?

by Samme Ng · in Torque Game Engine · 08/03/2005 (12:43 am) · 3 replies

After I made some calculation, large int value become 1e+007 while displayed in GUI.

The variable is INT by default, however, but add/sub, it become a float internally.

How can I solve this problem? I need to display around 2^31 digits correctly.

#1
08/03/2005 (4:10 pm)
2^31 DIGITS, or 2^31 max value?
#2
08/03/2005 (4:16 pm)
You will have to change the engine internals to get this working properly, AFAIK.
Look at how the already existing typedefs (S8 U8 S16 U16 S32 U32 F32 F64) are defined and used within the engine and make your own changes there.
#3
08/03/2005 (4:46 pm)
Known issue, will be fixed in 1.4. Meanwhile, you might try using printf to format the int properly.