OTX Reference  
OpenTestSystem.Otx.Core.DataTypes.Float Class Reference

Floating point numbers. More...

Inheritance diagram for OpenTestSystem.Otx.Core.DataTypes.Float:
Inheritance graph

Public Attributes

FloatLiteral init
 Initialisation of a Float declaration with a literal More...
 

Detailed Description

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.

Note
If a Float declaration is not explicitly initialized, 0.0 is assigned to the declaration.
Terms and Actions
List of some useful terms and actions:.
Conversion Terms
ConversionResultSample
ToBooleanReturns false if 0.0, otherwise true
Boolean b = ToBoolean(123.456); // Returns true
ToIntegerReturns the integer part (the digits to the left of the decimal point – truncation)
Integer i = ToInteger(123.456); // Returns 123
ToFloatReturns the copy of the value
Float f = ToFloat(123.456); // Returns 123.456
ToStringReturns the value in decimal string representation
String s = ToString(123.456); // Returns "123.456"
ToByteFieldReturns the 64-bit double precision encoded value according to [IEEE 754:2008]
ByteField bf = ToByteField(123.456); // Returns 405EDD2F1A9FBE77
Syntax Declaration
Float Declaration [= FloatLiteral];
Literal
0.0
1.2e34
There are the following additional special Float constants:
LiteralMeaning
-0Value, which is minus zero
InfinityValue, which is positive infinity
-InfinityValue, which is negative infinity
NaNValue, which is not a number
Sample
Float FloatVariable = 1.2345e67;

Member Data Documentation

◆ init

FloatLiteral OpenTestSystem.Otx.Core.DataTypes.Float.init

Initialisation of a Float declaration with a literal