System.SysUtils.TExtendedHelper.Frac

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Frac: UInt64 read GetFrac write SetFrac;

Properties

Type Visibility Source Unit Parent
property public System.SysUtils.pas System.SysUtils TExtendedHelper

Description

Represents the mantissa or raw fraction part in the number depending on the platform.

If the size of Extended is 10 bytes (for example, 32-bit Windows platform), Frac represents the raw mantissa of the number and keeps all bits of the significand. Frac is represented on 64 bits.

If the size of Extended is 8 bytes (for example, 64-bit Windows platform), Frac represents the raw fraction part of the number and is formed from the bits after the decimal mark in binary form for the normalized representation of the number. Frac is represented on 52 bits. See Internal Representation of Extended Type and TExtendedHelper for more information.

The Frac property provides direct access to the mantissa (or fraction) part of the floating-point value in the TExtendedHelper variable.

For example, the number 21, represented in binary, is 10101. After the normalization, the number looks like this: 1.0101 * 2^4. If the size of Extended is 10 bytes, Frac is formed from all bits of the number: 10101. If the size of Extended is 8 bytes,Frac is formed from the bits after the decimal mark: 0101.

Since on 32-bit Windows, the Frac is represented on 64 bits, so we fill the 10101 sequence with zeros up to 64 digits. Since on 64-bit Windows, the Frac is represented on 52 bits, so we fill the 0101 sequence with zeros up to 52 digits.

See Also