Why and when should one call _fpreset( )?
Posted
by STingRaySC
on Stack Overflow
See other posts from Stack Overflow
or by STingRaySC
Published on 2010-02-09T18:35:32Z
Indexed on
2010/03/26
3:43 UTC
Read the original article
Hit count: 288
The only documentation I can find (on MSDN or otherwise) is that a call to _fpreset() "resets the floating-point package." What is the "floating point package?" Does this also clear the FPU status word? I see documentation that says to call _fpreset() when recovering from a SIGFPE, but doesn't _clearfp() do this as well? Do I need to call both?
I am working on an application that unmasks some FP exceptions (using _controlfp()). When I want to reset the FPU to the default state (say, when calling to .NET code), should I just call _clearfp(), _fpreset(), or both. This is performance critical code, so I don't want to call both if I don't have to...
© Stack Overflow or respective owner