IntAsDouble function

Fully qualified name: Std.Convert.IntAsDouble

function IntAsDouble(number : Int) : Double

Summary

Converts a given integer number to an equivalent double-precision floating-point number.

Description

Converts a given integer to a double-precision floating point number. Please note that the double-precision representation may have fewer bits allocated to represent significant digits so the conversion may be approximate for large numbers. For example, the current simulator converts 4,611,686,018,427,387,919 = 2^64+15 to 4,611,686,018,427,387,904.0 = 2^64.

Example

Message($"{IntAsDouble(1)}"); // Prints 1.0 rather than 1