Talk:System.Math.SetExceptionMask

From RAD Studio API Documentation
Jump to: navigation, search

- Please use the following contents.

Sets the exception mask for floating-point exception mask.

Sets the FPU control word for 32-bit Windows, or the SSE control word for 64-bit Windows. You typically need to mask and unmask exceptions when you are interacting with external code such as TWebBrowser, OLEDB, .NET assembly, ActiveX controls, and OpenGL.

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

SetExceptionMask returns the previous exception mask.

Under iOS, we always mask all floating-point exceptions; therefore, SetExceptionMask has no effect and always returns exAllArithmeticExceptions:

SetExceptionMask is platform independent.

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