MAXScript Language Reference > Values > Basic Data Values >

# 64 Bit Values - Double, Integer64, IntegerPtr

Value > Basic Data Values > Number Values > 64 Bit Values

| Values and Collections - Quick Navigation

    Double : Number
    Integer64 : Number
    IntegerPtr : Number

Three Number value classes have been added to MAXScript in 3ds Max 9: Double, Integer64 and IntegerPtr.

- The widest float value in the .NET Common Type System (CTS) is the System::Double, which corresponds to the C++ double value (real*8). The Double value class in MAXScript wraps the double value class.

- All generic mathematical methods and operations (sin, cos, random, +, -, etc.) that operate on the Float value class in MAXScript are also implemented on the Double class.

- The Double class supports the 'bit' structure methods in a manner similar to the Float class.

- The Double class is a MAXScript saveable class - in other words, it can be used in persistent globals.

- The data type convertors for ActiveX, OLE, and fileProperties.getPropertyValue / setPropertyValue will convert variant VT_R8 to Doubles, and vice versa.

- For methods that expect a Float as an argument, the Double value will be cast to a Float value and used.

- Double literals are indicated by 'd' exponential qualifier.

FOR EXAMPLE:
    1.0d0 --returns 1.0d0
    0.5 as Double --returns0.5d0
    2.0d5--returns 2000000.0d0
    1.2d-3 --returns 0.0012d0

- 'bit' structure methods that operate on an Integer can also operate on Integer64 and IntegerPtr. For methods that take 2 integer arguments, the first argument determines the output value type.

- bit.intAsHex will append an "L" to the output string for Integer64 inputs, and a "P" for IntegerPtr inputs.

- bit.hexAsInt will output an Integer64 if the input string contains an "L", an IntegerPtr if it contains a "P".

- String and Stringstream values can be coerced to Double, Integer64 and IntegerPtr.

- All number data types (Integer, Float, Integer64, IntegerPtr, Double) and Time can be coerced from one to the other.

- For loop variables are either Integer, Float, Integer64, IntegerPtr, or Double based on the widest value type for the to, from, and step values

The printing of very small Double values has been improved in 3ds Max 2011 and higher:

When a Float value is printed, if its value is less than 1.192092896e-07 (the smallest float f such that 1.0+f != 1.0), the Float is printed as 0.0.

When a Double value is printed, if its value is less than 2.2204460492503131e-016 (the smallest double d such that 1.0+d != 1.0), the Double is printed as 0.0. In versions prior to 3ds Max 2011, the float value of 1.192092896e-07 was being used for Doubles too.

Related Methods:

    is64bitApplication()

In 3ds Max 9 and higher, returns true if running in a 64 bit build of 3ds Max, false otherwise.

#### See Also

- Number Values