...
Operating System | Handling FP errors | |
|---|---|---|
Linux | C99 FP functions - These functions are declared in | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c8084ba6e0c3434b-847a5567-487149e1-a233a78c-ea51228384d4ee93ad32af6b"><ac:plain-text-body><![CDATA[ | Windows | Structured Exception Handling - user defined handler |
...
| Code Block | ||
|---|---|---|
| ||
fpOper_usingStatus() {
/* ... */
double a = 1e-40, b, c;
float x = 0, y;
unsigned int rv = _clearfp() ;
/* Store into y is inexact and underflows: */
y = a;
rv = _clearfp() ; /* rv has _SW_INEXACT and _SW_UNDERFLOW */
/* zero-divide */
b = y / x; rv = _clearfp() ; /* rv has _SW_ZERODIVIDE */
/* inexact */
c = sin(30) * a; rv = _clearfp() ; /* rv has _SW_INEXACT */
/* ... */
}
|
...
| Wiki Markup |
|---|
\[6\] ARM support for floating-point computations [http://www.keil.com/support/man/docs/armlib/armlib_bihbjiea.htm]\\ |
...
FLP02-A. Understand the caveats of floating point exceptions 05. Floating Point (FLP) FLP30-C. Do not use floating point variables as loop counters