OTX Reference
|
|
Floating point numbers. More...
Public Attributes | |
FloatLiteral | init |
Cardinality [0..1] Initialisation of a Float declaration with a literal More... | |
Floating point numbers.
Floating point numbers are used to store non integer numeric values. OTX adheres to the W3C definition of the xsd:double data type, which corresponds to the IEEE double-precision 64-bit floating point type in [IEEE 754:2008]. The basic value space of xsd:double consists of the values m × 2^e, where m is an integer whose absolute value is less than 2^53, and e is an integer between -1075 and 970, inclusive.
0.0
is assigned to the declaration. Conversion | Result | Sample |
---|---|---|
ToBoolean | Returns false if 0.0 , otherwise true | Boolean b = ToBoolean(123.456); // Returns true
|
ToInteger | Returns the integer part (the digits to the left of the decimal point – truncation) | Integer i = ToInteger(123.456); // Returns 123
|
ToFloat | Returns the copy of the value | Float f = ToFloat(123.456); // Returns 123.456
|
ToString | Returns the value in decimal string representation | String s = ToString(123.456); // Returns "123.456"
|
ToByteField | Returns the 64-bit double precision encoded value according to [IEEE 754:2008] | ByteField bf = ToByteField(123.456); // Returns 405EDD2F1A9FBE77
|
Literal | Meaning |
---|---|
-0 | Value, which is minus zero |
Infinity | Value, which is positive infinity |
-Infinity | Value, which is negative infinity |
NaN | Value, which is not a number |
FloatLiteral OpenTestSystem.Otx.Core.DataTypes.Float.init |
Cardinality [0..1]
Initialisation of a Float declaration with a literal