Talk:System.Math.GetExceptionMask

From RAD Studio API Documentation
Jump to: navigation, search

- Please use the following contents.

Returns the current floating-point exception mask.

Some hardware include ARM doesn't support to raise arithmetic exceptions. In this case, RTL will emulate to raise the arithmetic exception using this exception mask.

Delphi RTL's default value is [exDenormalized,exUnderflow,exPrecision] for all platforms.

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 and the current rounding mode .

Depending on the floating-point hardware, GetExceptionMask internally calls GetFPUExceptionMask or GetSSEExceptionMask.

Under iOS, we always mask all floating-point exceptions. Therefore, GetExceptionMask always returns exAllArithmeticExceptions:

--Tarisawa (talk) 21:35, 18 February 2015 (PST)