DelphiBasics
Extended
Type
The floating point type with the highest capacity and precision System unit
type Extended;
Description
The Extended type is a floating point type used when the highest exponent and/or significant digits are required.
 
It supports approximately 19 digits of precision in a range from 3.37 x 10-4932 to 1.18 x 104932.
Notes
The Single type is the smallest and fastest, but with worst capacity and precision.

The Double type has medium storage, speed, capacity and performance.

A Extended set to its highest value is treated as Infinity.
Related commands
CurrencyA decimal type with 4 decimal points used for financial values
DoubleA floating point type supporting about 15 digits of precision
PExtendedPointer to a Extended floating point value
SingleThe smallest capacity and precision floating point type
 Download this web site as a Windows program.




 
Example code : Showing the precision and capacity of Extended values
var
  account1, account2, account3, account4 : Extended;
begin
  account1 := 0.1234567890123456789;  // 20 decimal places
  account2 := 3.37E-4932;              // Lowest exponent value
  account3 := 1.18E4932;              // Highest exponent value
  account4 := 1.19E4932;              // Treated as infinite

  ShowMessage('Account1 = '+FloatToStrF(account1, ffGeneral, 22, 20));
  ShowMessage('Account2 = '+FloatToStr(account2));
  ShowMessage('Account3 = '+FloatToStr(account3));
  ShowMessage('Account4 = '+FloatToStr(account4));
end;
Show full unit code
  Account1 = 0.123456789012345679
  Account2 = 3.37E-4932
  Account3 = 1.18E4932
  Account4 = INF
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page