FLOAT

Top  Previous  Next

FLOAT is one of the basic data types supported by the VPL programming language from firmware version 3.10.

 

A FLOAT can hold single-precision floating-point values in the range  ±1.18E-38 .. ±3.4E38 with a precision of approx. 7 decimal digits. Additionally, the denormalized numbers in the range ±1.4E-45 .. ±1.18E-38 can be held with reduced precision.

A FLOAT data type occupies 4 bytes of storage.

 

The FLOAT data type is based on the IEEE 754 standard, and can – in addition to the floating-point values – contain two kinds of error values, ±infinity and NaN (Not a Number).

These error values will be returned from some math functions and calculations if the result is out of range, or if the calculation is invalid, e.g. due to division by zero.

If a sub-calculation returns an error value, the entire calculation will return an error value, which can be checked with IsInf and IsNaN.

 

It is possible to transparently mix FLOAT and DOUBLE without explicit type-conversion.