Real Type

Use the Real primitive type to represent a floating point number. A Real primitive type has a set of values that is a subset of real numbers. These values can be represented in floating point notation with a fixed number of digits.

Use a Real primitive type to store floating point numbers; for example, a temperature.

Real numbers are useful for computations involving very large or very small numbers, or when the range of magnitudes cannot be predicted.

Real primitive types provide fifteen digits of precision; that is, if you assign a Real value to a Real attribute or local variable and then retrieve the value in your method, only the first fifteen significant digits can be relied on for complete accuracy.

As a floating point number stores an approximation of the value that is accurate to fifteen significant digits, you should use an Integer, an Integer64, or a Decimal primitive type to store values where precision is required; for example, for monetary values.

Real numbers are stored internally using an eight-byte representation, providing fifteen significant digits of accuracy.

You can use the JadeEditMask class and TextBox class getTextAsReal and setTextFromReal methods to handle locale formatting for numeric fields.

For details about the constants and methods defined in the Real primitive type, see "Real Constants" and "Real Methods", in the following subsections. For details about converting primitive types, see "Converting Primitive Types", in Chapter 1 of the JADE Developer’s Reference.