Article ID: 326219 - Last Review: May 20, 2003 - Revision: 3.0 PRB: System.Arithmetic Exception Error When You Change the Floating-Point Control Register in a Managed Application
This article was previously published under Q326219 On This PageSYMPTOMS
When you change the floating-point control register in managed applications, you may receive exception error messages such as the following in the Microsoft .NET Framework common language runtime:
An unhandled exception of type 'System.ArithmeticException' occurred in
system.windows.forms.dll Additional information: Overflow or underflow in the arithmetic operation. CAUSE
The common language runtime and the .NET Framework assume that the floating-point control register is set to the default state.
RESOLUTION
If a managed application calls into unmanaged code that must modify the floating-point control register, the unmanaged code must return the
floating-point register to its default state before it returns program control to the managed application. For example, if you use an Intel system, you can use the following statement before you return program control to the managed application to reset the floating-point control register: STATUS
This behavior is by design. MORE INFORMATIONSteps to Reproduce the Behavior
| Other Resources Other Support Sites
CommunityArticle Translations |






















Back to the top