System.Math.GetExceptionMask

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetExceptionMask: TArithmeticExceptionMask;

C++

extern DELPHI_PACKAGE TArithmeticExceptionMask __fastcall GetExceptionMask(void);

Properties

Type Visibility Source Unit Parent
function public
System.Math.pas
System.Math.hpp
System.Math System.Math

Description

Returns the current floating-point exception mask.

Some hardware including ARM does not support raising of arithmetic exceptions. In this case, RTL emulates raising of arithmetic exceptions using this exception mask.

Delphi RTL's default value for all platforms is:
[ exDenormalized, exOverflow, exPrecision ];

GetExceptionMask is platform independent.

Call GetExceptionMask to ascertain the types of exceptions the floating-point hardware generates. Any element set in this mask prevents the hardware from raising the corresponding type of exception. Instead, the hardware returns its best attempt at a value – often NaN, Infinity, or NegInfinity. The value depends on the operation.

See Also