Changeset 875


Ignore:
Timestamp:
Aug 29, 2011, 1:48:01 PM (8 years ago)
Author:
sam
Message:

test: add a fallback for isnan() when not defined by the system includes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/half.cpp

    r874 r875  
    1818#include <cppunit/TestSuite.h>
    1919
     20#include <cmath>
     21
    2022#include "core.h"
     23
     24/* This will not work with aggressive optimisation, but a reasonable
     25 * assumption is that such environments do have a proper isnan(). */
     26#if !defined isnan
     27#   define isnan(x) (!((x) == (x)))
     28#endif
    2129
    2230namespace lol
Note: See TracChangeset for help on using the changeset viewer.