Delete rint/rintf emulation for Windows, since it got broken (the tests fail) and we don't use it any more
This was SVN commit r9015.
This commit is contained in:
parent
09cbe4f341
commit
2229c10e05
@ -30,17 +30,6 @@
|
||||
|
||||
#if !HAVE_C99_MATH
|
||||
|
||||
float rintf(float f)
|
||||
{
|
||||
return (float)(int)f;
|
||||
}
|
||||
|
||||
double rint(double d)
|
||||
{
|
||||
return (double)(int)d;
|
||||
}
|
||||
|
||||
|
||||
size_t fpclassifyd(double d)
|
||||
{
|
||||
#if ARCH_IA32
|
||||
|
@ -115,7 +115,7 @@ extern wchar_t* wcsdup(const wchar_t* str);
|
||||
extern int wcscasecmp(const wchar_t* s1, const wchar_t* s2);
|
||||
#endif
|
||||
|
||||
// rint*, fpclassify (too few/diverse to make separate HAVE_ for each)
|
||||
// fpclassify etc (too few/diverse to make separate HAVE_ for each)
|
||||
#if HAVE_C99 || ICC_VERSION || GCC_VERSION
|
||||
# define HAVE_C99_MATH 1
|
||||
#else
|
||||
@ -123,11 +123,6 @@ extern int wcscasecmp(const wchar_t* s1, const wchar_t* s2);
|
||||
#endif
|
||||
|
||||
#if !HAVE_C99_MATH
|
||||
// round float to nearest integral value, according to
|
||||
// current rounding mode.
|
||||
extern float rintf(float f);
|
||||
extern double rint(double d);
|
||||
|
||||
extern size_t fpclassifyf(float f);
|
||||
extern size_t fpclassifyd(double d);
|
||||
#define fpclassify(x) ( (sizeof(x) == sizeof(float))? fpclassifyf(x) : fpclassifyd(x) )
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/sysdep/cpu.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "lib/posix/posix.h" // rintf etc.
|
||||
|
||||
#if OS_LINUX
|
||||
# include "mocks/dlfcn.h"
|
||||
@ -40,19 +39,6 @@
|
||||
class TestSysdep : public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
void test_round()
|
||||
{
|
||||
TS_ASSERT_EQUALS(rintf(0.99999f), 1.0f);
|
||||
TS_ASSERT_EQUALS(rintf(1.0f), 1.0f);
|
||||
TS_ASSERT_EQUALS(rintf(1.01f), 1.0f);
|
||||
TS_ASSERT_EQUALS(rintf(5.6f), 6.0f);
|
||||
|
||||
TS_ASSERT_EQUALS(rint(0.99999), 1.0);
|
||||
TS_ASSERT_EQUALS(rint(1.0), 1.0);
|
||||
TS_ASSERT_EQUALS(rint(1.01), 1.0);
|
||||
TS_ASSERT_EQUALS(rint(5.6), 6.0);
|
||||
}
|
||||
|
||||
void test_random()
|
||||
{
|
||||
u64 a = 0, b = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user