AGXDynamics  2.35.0.3
FloatingPointExceptions.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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
AGXCORE_EXPORT
#define AGXCORE_EXPORT
agx::FloatingPointExceptions::FP_EXC_OVERFLOW
@ FP_EXC_OVERFLOW
Definition: FloatingPointExceptions.h:33
agx::FloatingPointExceptions::FP_EXC_ALL
@ FP_EXC_ALL
Definition: FloatingPointExceptions.h:36
agx::FloatingPointExceptions::FP_EXC_INEXACT
@ FP_EXC_INEXACT
Definition: FloatingPointExceptions.h:35
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agxCore_export.h
agx.h
agx::FloatingPointExceptions::ExceptionCode
ExceptionCode
Definition: FloatingPointExceptions.h:29
agx::FloatingPointExceptions::FP_EXC_DIVISION_BY_ZERO
@ FP_EXC_DIVISION_BY_ZERO
Definition: FloatingPointExceptions.h:32
agx::FloatingPointExceptions::applyFloatingPointExceptionSettings
void AGXCORE_EXPORT applyFloatingPointExceptionSettings()
Applies floating point exceptions as specified by the setFloatingPointExceptionSettings-function,...
agx::FloatingPointExceptions::FP_EXC_INVALID_OPERATION
@ FP_EXC_INVALID_OPERATION
Definition: FloatingPointExceptions.h:31
agx::FloatingPointExceptions::getFloatingPointExceptionSettings
int AGXCORE_EXPORT getFloatingPointExceptionSettings()
Gets the global floating point exception settings.
agx::FloatingPointExceptions::setFloatingPointExceptionSettings
void AGXCORE_EXPORT setFloatingPointExceptionSettings(int mask)
Sets global floating point exception settings for AGX, and applies them for current thread.
agx::FloatingPointExceptions::FP_EXC_NONE
@ FP_EXC_NONE
Definition: FloatingPointExceptions.h:30
agx::FloatingPointExceptions::FP_EXC_UNDERFLOW
@ FP_EXC_UNDERFLOW
Definition: FloatingPointExceptions.h:34