From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html | 80 ------------------------------ 1 file changed, 80 deletions(-) delete mode 100644 devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html (limited to 'devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html') diff --git a/devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html b/devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html deleted file mode 100644 index bbc17453..00000000 --- a/devdocs/c/numeric%2Ffenv%2Ffe_dfl_env.html +++ /dev/null @@ -1,80 +0,0 @@ -

FE_DFL_ENV

Defined in header <fenv.h>
#define FE_DFL_ENV  /*implementation defined*/
-
(since C99)

The macro constant FE_DFL_ENV expands to an expression of type const fenv_t*, which points to a full copy of the default floating-point environment, that is, the environment as loaded at program startup.

-

Additional macros that begin with FE_ followed by uppercase letters, and have the type const fenv_t*, may be supported by an implementation.

-

Example

#include <stdio.h>
-#include <fenv.h>
- 
-#pragma STDC FENV_ACCESS ON
- 
-void show_fe_exceptions(void)
-{
-    printf("current exceptions raised: ");
-    if(fetestexcept(FE_DIVBYZERO))     printf(" FE_DIVBYZERO");
-    if(fetestexcept(FE_INEXACT))       printf(" FE_INEXACT");
-    if(fetestexcept(FE_INVALID))       printf(" FE_INVALID");
-    if(fetestexcept(FE_OVERFLOW))      printf(" FE_OVERFLOW");
-    if(fetestexcept(FE_UNDERFLOW))     printf(" FE_UNDERFLOW");
-    if(fetestexcept(FE_ALL_EXCEPT)==0) printf(" none");
-    printf("\n");
-}
- 
-void show_fe_rounding_method(void)
-{
-    printf("current rounding method:    ");
-    switch (fegetround()) {
-           case FE_TONEAREST:  printf ("FE_TONEAREST");  break;
-           case FE_DOWNWARD:   printf ("FE_DOWNWARD");   break;
-           case FE_UPWARD:     printf ("FE_UPWARD");     break;
-           case FE_TOWARDZERO: printf ("FE_TOWARDZERO"); break;
-           default:            printf ("unknown");
-    };
-    printf("\n");
-}
- 
-void show_fe_environment(void)
-{
-    show_fe_exceptions();
-    show_fe_rounding_method();
-} 
- 
-int main()
-{
-    printf("On startup:\n");
-    show_fe_environment();
- 
-    // Change environment
-    fesetround(FE_DOWNWARD);     // change rounding mode
-    feraiseexcept(FE_INVALID);   // raise exception
-    printf("\nBefore restoration:\n");
-    show_fe_environment();
- 
-    fesetenv(FE_DFL_ENV);    // restore
-    printf("\nAfter restoring default environment:\n");
-    show_fe_environment();
-}

Output:

-
On startup:
-current exceptions raised:  none
-current rounding method:    FE_TONEAREST
- 
-Before restoration:
-current exceptions raised:  FE_INVALID
-current rounding method:    FE_DOWNWARD
- 
-After restoring default environment:
-current exceptions raised:  none
-current rounding method:    FE_TONEAREST

References

See also

- - -
-
(C99)
saves or restores the current floating-point environment
(function)
-
(C99)
restores the floating-point environment and raises the previously raise exceptions
(function)
C++ documentation for FE_DFL_ENV
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/numeric/fenv/FE_DFL_ENV -

-
-- cgit v1.2.3