Show: Delphi C++
Display Preferences

System.TFloatSpecial

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TFloatSpecial = ( fsZero, fsNZero, fsDenormal, fsNDenormal,
fsPositive, fsNegative, fsInf, fsNInf, fsNaN );

C++

enum DECLSPEC_DENUM TFloatSpecial : unsigned char { fsZero, fsNZero, fsDenormal, fsNDenormal, fsPositive, fsNegative, fsInf, fsNInf, fsNaN };

Properties

Type Visibility Source Unit Parent
enum public
System.pas
System.hpp
System System

Description

Represents special floating-point values.

TFloatSpecial is used to designate special categories of floating-point values. The following table describes the classification:

Constant Description
fsZero Positive zero (+0.0)
fsNZero Negative zero (-0.0)
fsDenormal Positive denormalized value
fsNDenormal Negative denormalized value
fsPositive Positive value
fsNegative Negative value
fsInf Positive infinite
fsNInf Negative infinite
fsNaN Not a number (unrepresentable value)
Note: A denormalized floating-point value is in essence a very approximate value. A denormalized floating-point value obtained by computation indicates a considerable loss of accuracy.

Example

var
  F: TSingleRec;
  C: TFloatSpecial;

begin
  F := TSingleRec(-0.0);
  C := F.SpecialType; // C is fsNZero

  F := TSingleRec(5e-40);
  C := F.SpecialType; // C is fsDenormal

  // ...

See Also

Personal tools
In Other Languages
Previous Versions
Assistance