AGX Dynamics  2.37.3.2
FloatingPointExceptions.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_FLOATING_POINT_EXCEPTIONS_H
18 #define AGX_FLOATING_POINT_EXCEPTIONS_H
19 
20 
21 #include <agx/config.h>
22 #include <agx/agx.h>
23 #include <agx/agxCore_export.h>
24 
25 
26 namespace agx
27 {
28  namespace FloatingPointExceptions {
31  FP_EXC_INVALID_OPERATION = 1, // Invalid operation (e.g., square root of a negative number - qNaN by default).
32  FP_EXC_DIVISION_BY_ZERO = 2, // Division by zero (e.g., 1/0 or log(0) +- infinity by default)
33  FP_EXC_OVERFLOW = 4, // Overflow (a result is too large to be represented correctly) +- infinity by default).
34  FP_EXC_UNDERFLOW = 8, // Underflow (result too small and inexact) (returns a denormalized value by default).
35  FP_EXC_INEXACT = 16, // Inexact (returns correctly rounded result by default).
37  };
38 
56 
62 
69 
70  }
71 
72 }
73 
74 
75 
76 #endif
void AGXCORE_EXPORT setFloatingPointExceptionSettings(int mask)
Sets global floating point exception settings for AGX, and applies them for current thread...
void AGXCORE_EXPORT applyFloatingPointExceptionSettings()
Applies floating point exceptions as specified by the setFloatingPointExceptionSettings-function, but for current core.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
int AGXCORE_EXPORT getFloatingPointExceptionSettings()
Gets the global floating point exception settings.
#define AGXCORE_EXPORT