_clear87
raw OCR
Clears floating-point status word.
Defined in header <float.h>
Syntax
#include <float.h>
unsigned int _clear87 (void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
_clear87 clears the floating-point status word, which is a combination of the 80x87 status word and other conditions detected by the 80x87 exception handler.
Return value
The bits in the value returned indicate the floating-point status before it was cleared. For information on the status word, refer to the constants defined in float.h.
See also
Example
#include <stdio.h>
#include <float.h>
int main(void)
{
float x;
double y = 1.5e-100;
printf("\nStatus 87 before error: %X\n", _status87 ());
X = y; /* create underflow and precision loss */
printf("Status 87 after error: %X\n", _status87());
_clear87();
printf("Status 87 after clear: %X\n", _status87());
y = x;
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `clear87` read as `_clear87`
Stable link: /3.1/float.h/_clear87/
· short form /3.1/_clear87/