ReactOS 0.4.15-dev-8100-g1887773
ceil.c File Reference
#include "math_helpers.h"
Include dependency graph for ceil.c:

Go to the source code of this file.

Macros

#define _CRTBLD
 

Functions

void Test_ceil (void)
 
void Test_ceilf (void)
 
 START_TEST (ceil)
 

Variables

static TESTENTRY_DBL s_ceil_tests []
 
static TESTENTRY_FLT s_ceilf_tests []
 

Macro Definition Documentation

◆ _CRTBLD

#define _CRTBLD

Definition at line 9 of file ceil.c.

Function Documentation

◆ START_TEST()

START_TEST ( ceil  )

Definition at line 105 of file ceil.c.

106{
107 Test_ceil();
108 Test_ceilf();
109}
void Test_ceil(void)
Definition: ceil.c:50
void Test_ceilf(void)
Definition: ceil.c:93

◆ Test_ceil()

void Test_ceil ( void  )

Definition at line 50 of file ceil.c.

51{
52 int i;
53
54 for (i = 0; i < _countof(s_ceil_tests); i++)
55 {
56 double x = u64_to_dbl(s_ceil_tests[i].x);
57 double z = ceil(x);
59 }
60}
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 ceil(_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_ceil_tests[]
Definition: ceil.c:18
#define _countof(array)
Definition: sndvol32.h:70

Referenced by START_TEST().

◆ Test_ceilf()

void Test_ceilf ( void  )

Definition at line 93 of file ceil.c.

94{
95 int i;
96
97 for (i = 0; i < _countof(s_ceilf_tests); i++)
98 {
99 float x = u32_to_flt(s_ceilf_tests[i].x);
100 float z = ceilf(x);
102 }
103}
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_ceilf_tests[]
Definition: ceil.c:62
#define ceilf(x)
Definition: mymath.h:62

Referenced by START_TEST().

Variable Documentation

◆ s_ceil_tests

TESTENTRY_DBL s_ceil_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 },
{ 0x84be2329aed66ce1 , 0x8000000000000000 },
{ 0xf1499052ebe9bbf1 , 0xf1499052ebe9bbf1 },
{ 0x3cdba6b3993e0c87 , 0x3ff0000000000000 },
{ 0x1c0d5e24de47b706 , 0x3ff0000000000000 },
{ 0xc84d12b3a68bbb43 , 0xc84d12b3a68bbb43 },
{ 0x7d5a031f1f253809 , 0x7d5a031f1f253809 },
{ 0xfccbd45d3b45f596 , 0xfccbd45d3b45f596 },
{ 0x0a890d1332aedb1c , 0x3ff0000000000000 },
{ 0xee509a20fd367840 , 0xee509a20fd367840 },
{ 0xf6324912dc497d9e , 0xf6324912dc497d9e },
}

Definition at line 18 of file ceil.c.

Referenced by Test_ceil().

◆ s_ceilf_tests

TESTENTRY_FLT s_ceilf_tests[]
static
Initial value:
=
{
{ 0x00000000 , 0x00000000 },
{ 0x80000000 , 0x80000000 },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x3f800000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x3f800000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x3f800000 },
{ 0xffffffff , 0xffffffff },
{ 0x00000000 , 0x00000000 },
{ 0x00000001 , 0x3f800000 },
{ 0xffffffff , 0xffffffff },
{ 0xf2144fad , 0xf2144fad },
{ 0xd0664044 , 0xd0664044 },
{ 0xb730c46b , 0x80000000 },
{ 0x22a13b32 , 0x3f800000 },
{ 0x9d9122f6 , 0x80000000 },
{ 0xda1f8be1 , 0xda1f8be1 },
{ 0x0299cab0 , 0x3f800000 },
{ 0x499d72b9 , 0x499d72c0 },
{ 0xc57e802c , 0xc57e8000 },
{ 0x80e9d599 , 0x80000000 },
}

Definition at line 62 of file ceil.c.

Referenced by Test_ceilf().