diff options
Diffstat (limited to 'html/001help.cc.html')
-rw-r--r-- | html/001help.cc.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html index 2c8bcce4..84c836c5 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -207,7 +207,8 @@ feenableexcept<span class="Delimiter">(</span>FE_OVERFLOW | FE_UNDERFLOW<span cl <span class="CommentedCode">//? assert(sizeof(int) == 4 && sizeof(float) == 4);</span> <span class="CommentedCode">//? // | exp | mantissa</span> <span class="CommentedCode">//? int smallest_subnormal = 0b00000000000000000000000000000001;</span> -<span class="CommentedCode">//? float smallest_subnormal_f = *reinterpret_cast<int*>(&smallest_subnormal);</span> +<span class="CommentedCode">//? float smallest_subnormal_f = *reinterpret_cast<float*>(&smallest_subnormal);</span> +<span class="CommentedCode">//? cerr << "ε: " << smallest_subnormal_f << '\n';</span> <span class="CommentedCode">//? cerr << "ε/2: " << smallest_subnormal_f/2 << " (underflow)\n"; // test SIGFPE</span> <span class="Delimiter">:(before "End Includes")</span> <span class="PreProc">#include </span><span class="Constant"><fenv.h></span> @@ -215,7 +216,7 @@ feenableexcept<span class="Delimiter">(</span>FE_OVERFLOW | FE_UNDERFLOW<span cl <span class="PreProc">#ifdef __APPLE__</span> <span class="Comment">// Public domain polyfill for feenableexcept on OS X</span> <span class="Comment">// <a href="http://www-personal.umich.edu/~williams/archive/computation/fe-handling-example.c">http://www-personal.umich.edu/~williams/archive/computation/fe-handling-example.c</a></span> -<span class="Normal">inline</span> <span class="Normal">int</span> feenableexcept <span class="Delimiter">(</span><span class="Normal">unsigned</span> <span class="Normal">int</span> excepts<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">int</span> feenableexcept <span class="Delimiter">(</span><span class="Normal">unsigned</span> <span class="Normal">int</span> excepts<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">static</span> fenv_t fenv<span class="Delimiter">;</span> <span class="Normal">unsigned</span> <span class="Normal">int</span> new_excepts = excepts & FE_ALL_EXCEPT<span class="Delimiter">;</span> <span class="Normal">unsigned</span> <span class="Normal">int</span> old_excepts<span class="Delimiter">;</span> |