FloatingPoint32 Operator (FPScript)
Converts an expression into the 32-bit floating point value data type.
Syntax
FloatingPoint32 Expression
The syntax of the FloatingPoint32 operator consists of the following elements:
Element |
Description |
---|---|
Expression |
Any expression. All data types are permitted. |
Remarks
The operator can process scalar values or entire data series and data matrices. If Expression is a data series or a data matrix, then the type conversion takes place on a per-element basis and the result is once again a data series or a data matrix. If a signal, a signal series or a space curve is converted, only the Y component is examined. The result then contains the unchanged X component and possibly the Z component of Expression. If Expression is a list, then the operation is executed for each item in the list and the result is also a list.
The Boolean value TRUE results in the value 1.s and FALSE results in the value 0.s. The absolute value is formed for complex data types. When converting from 64-bit to 32-bit floating point values, the accuracy of the Mantissa is reduced from about 15 digits to about 7 digits. If the exponent of the number for conversion is too large, a void value is output. Strings are interpreted as a value or quantity first and then converted like numerical data. Here the decimal and list separators specified in FlexPro Options are used. The Empty type and a string that cannot be interpreted as a quantity result in ?s.
If Expression is a quantity, then its unit is taken and the result is also a quantity.
Available in
FlexPro View, Basic, Professional, Developer Suite
Examples
FloatingPoint32 1.0E50 |
Returns ?, since the range was exceeded. |
FloatingPoint32 "1.2 A" |
Returns 1.2. |
FloatingPoint32 1.2 V |
Returns 1.2 V as a 32-bit floating point quantity. |
See Also
ComplexFloatingPoint32 Operator