ReactOS 0.4.16-dev-91-g764881a
floor.c File Reference
#include "math_helpers.h"
Include dependency graph for floor.c:

Go to the source code of this file.

Macros

#define _CRTBLD
 

Functions

void Test_floor (void)
 
void Test_floorf (void)
 
 START_TEST (floor)
 

Variables

static TESTENTRY_DBL s_floor_tests []
 
static TESTENTRY_FLT s_floorf_tests []
 

Macro Definition Documentation

◆ _CRTBLD

#define _CRTBLD

Definition at line 9 of file floor.c.

Function Documentation

◆ START_TEST()

START_TEST ( floor  )

Definition at line 107 of file floor.c.

108{
109 Test_floor();
110 Test_floorf();
111}
void Test_floorf(void)
Definition: floor.c:95
void Test_floor(void)
Definition: floor.c:52

◆ Test_floor()

void Test_floor ( void  )

Definition at line 52 of file floor.c.

53{
54 int i;
55
56 for (i = 0; i < _countof(s_floor_tests); i++)
57 {
58 double x = u64_to_dbl(s_floor_tests[i].x);
59 double z = floor(x);
61 }
62}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint64EXT * result
Definition: glext.h:11304
GLdouble GLdouble z
Definition: glext.h:5874
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
#define ok_eq_dbl_exact(func, ullx, z, ullexp)
Definition: math_helpers.h:67
static __inline double u64_to_dbl(UINT64 x)
Definition: math_helpers.h:18
static TESTENTRY_DBL s_floor_tests[]
Definition: floor.c:20
#define _countof(array)
Definition: sndvol32.h:70

Referenced by START_TEST().

◆ Test_floorf()

void Test_floorf ( void  )

Definition at line 95 of file floor.c.

96{
97 int i;
98
99 for (i = 0; i < _countof(s_floorf_tests); i++)
100 {
101 float x = u32_to_flt(s_floorf_tests[i].x);
102 float z = floorf(x);
104 }
105}
static __inline float u32_to_flt(UINT32 x)
Definition: math_helpers.h:34
#define ok_eq_flt_exact(func, ux, z, uexp)
Definition: math_helpers.h:77
static TESTENTRY_FLT s_floorf_tests[]
Definition: floor.c:64
#define floorf(x)
Definition: mymath.h:65

Referenced by START_TEST().

Variable Documentation

◆ s_floor_tests

TESTENTRY_DBL s_floor_tests[]
static
Initial value:
=
{
{ 0x0000000000000000 , 0x0000000000000000 },
{ 0x8000000000000000 , 0x8000000000000000 },
{ 0x7ff0000000000000 , 0x7ff0000000000000 },
{ 0x7ff0000000000001 , 0x7ff8000000000001 },
{ 0x7ff7ffffffffffff , 0x7fffffffffffffff },
{ 0x7ff8000000000000 , 0x7ff8000000000000 },
{ 0x7ff8000000000001 , 0x7ff8000000000001 },
{ 0x7fffffffffffffff , 0x7fffffffffffffff },
{ 0xfff0000000000000 , 0xfff0000000000000 },
{ 0xfff0000000000001 , 0xfff8000000000001 },
{ 0xfff7ffffffffffff , 0xffffffffffffffff },
{ 0xfff8000000000000 , 0xfff8000000000000 },
{ 0xfff8000000000001 , 0xfff8000000000001 },
{ 0xffffffffffffffff , 0xffffffffffffffff },
{ 0x386580c747a3402b , 0x0000000000000000 },
{ 0xb74298e6627fb9ed , 0xbff0000000000000 },
{ 0x0ef25f06e414aa2d , 0x0000000000000000 },
{ 0x24002a37167638b5 , 0x0000000000000000 },
{ 0x44258d1be62a0d22 , 0x44258d1be62a0d22 },
{ 0x9ed4e46a65aad464 , 0xbff0000000000000 },
{ 0xc5afcd6f4ae4bf41 , 0xc5afcd6f4ae4bf41 },
{ 0x330fac896cbb01d2 , 0x0000000000000000 },
{ 0xc18026ab4c845405 , 0xc18026ab50000000 },
{ 0x2f42a7dc898a741a , 0x0000000000000000 },
}

Definition at line 20 of file floor.c.

Referenced by Test_floor().

◆ s_floorf_tests

TESTENTRY_FLT s_floorf_tests[]
static
Initial value:
=
{
{ 0x00000000 , 0x00000000 },
{ 0x00000000 , 0x00000000 },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x00000000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x00000000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x00000000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x00000000 },
{ 0xffffffff , 0xffffffff },
{ 0x386580c7 , 0x00000000 },
{ 0x47a3402b , 0x47a34000 },
{ 0xb74298e6 , 0xbf800000 },
{ 0x627fb9ed , 0x627fb9ed },
{ 0x0ef25f06 , 0x00000000 },
{ 0xe414aa2d , 0xe414aa2d },
{ 0x24002a37 , 0x00000000 },
{ 0x167638b5 , 0x00000000 },
{ 0x44258d1b , 0x44258000 },
{ 0xe62a0d22 , 0xe62a0d22 },
}

Definition at line 64 of file floor.c.

Referenced by Test_floorf().