Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Dec 5, 2024
1 parent 10d2daf commit 4086988
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/DaemonFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ option(USE_FLOAT_EXCEPTIONS "Use floating point exceptions" OFF)
option(USE_FAST_MATH "Use fast math" ON)

if (USE_FLOAT_EXCEPTIONS)
add_definitions(-DDAEMON_USE_FLOAT_EXCEPTIONS)
add_definitions( -DDAEMON_USE_FLOAT_EXCEPTIONS )
endif()

if (MSVC)
Expand Down
8 changes: 7 additions & 1 deletion src/engine/framework/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ static void CloseSingletonSocket()

static void SetFloatingPointExceptions()
{
// Must be done after Sys::Init() to read cvars from command line.
#if defined(DAEMON_USE_FLOAT_EXCEPTIONS_AVAILABLE)
#if defined(__USE_GNU) || defined(__APPLE__)
int exceptions = 0;
Expand Down Expand Up @@ -359,6 +358,13 @@ static void SetFloatingPointExceptions()
_controlfp_s(&current, exceptions, _MCW_EM);
#endif
#endif
// TODO: remove it.
#if 1
const float x = -1.0f;
const float f = 0.0f;
printf("%f\n", sqrt(x));
printf(" %f\n", 1/f);
#endif
}

// Common code for fatal and non-fatal exit
Expand Down

0 comments on commit 4086988

Please sign in to comment.