Show: Delphi C++
Display Preferences

System.Extended

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

type Extended = { built-in type };

C++

typedef long double          Extended;         // 10 byte real

Properties

Type Visibility Source Unit Parent
type
typedef
public
System.pas
sysmac.h
System System


Description

Represents a high-precision floating-point value.

System.Extended offers greater precision than other real types, but is less portable. Be careful using System.Extended if you are creating data files to share across platforms. Be aware that:

  • On Intel 32-bit Windows systems, the size of System.Extended is 10 bytes.
  • On Intel 32-bit macOS or iOS-Simulator systems, the size of System.Extended is 16 bytes in order to be compatible with BCCOSX.
  • On Intel Linux systems, the size of System.Extended is 16 bytes.
  • On Intel 64-bit Windows systems, however, the System.Extended type is an alias for System.Double, which is only 8 bytes. This difference can adversely affect numeric precision in floating-point operations. For more information, see Delphi Considerations for Multi-Device Applications.
  • On ARM system include iOS and Android, however, the System.Extended type is an alias for System.Double, which is only 8 bytes. This difference can adversely affect numeric precision in floating-point operations. For more information, see Delphi Considerations for Multi-Device Applications.

The following code displays 10 on Win32, 8 on Win64 and 16 on macOS and Linux.

Writeln(IntToStr(SizeOf(Extended)));

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance