ReactOS 0.4.15-dev-8219-ge8b88cf
fabs.c File Reference
#include "math_helpers.h"
Include dependency graph for fabs.c:

Go to the source code of this file.

Functions

void Test_fabs (void)
 
void Test_fabsf (void)
 
 START_TEST (fabs)
 

Variables

static TESTENTRY_DBL s_fabs_tests []
 
static TESTENTRY_FLT s_fabsf_tests []
 

Function Documentation

◆ START_TEST()

START_TEST ( fabs  )

Definition at line 108 of file fabs.c.

109{
110 Test_fabs();
111 Test_fabsf();
112}
void Test_fabs(void)
Definition: fabs.c:57
void Test_fabsf(void)
Definition: fabs.c:96

◆ Test_fabs()

void Test_fabs ( void  )

Definition at line 57 of file fabs.c.

58{
59 int i;
60
61 for (i = 0; i < _countof(s_fabs_tests); i++)
62 {
63 double x = u64_to_dbl(s_fabs_tests[i].x);
64 double z = fabs(x);
66 }
67}
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_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
Definition: fabs.c:17
#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_fabs_tests[]
Definition: fabs.c:19
#define _countof(array)
Definition: sndvol32.h:70

Referenced by START_TEST().

◆ Test_fabsf()

void Test_fabsf ( void  )

Definition at line 96 of file fabs.c.

97{
98 int i;
99
100 for (i = 0; i < _countof(s_fabsf_tests); i++)
101 {
102 float x = u32_to_flt(s_fabsf_tests[i].x);
103 float z = fabsf(x);
105 }
106}
_Check_return_ __CRT_INLINE float __CRTDECL fabsf(_In_ float x)
Definition: math.h:179
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_fabsf_tests[]
Definition: fabs.c:69

Referenced by START_TEST().

Variable Documentation

◆ s_fabs_tests

TESTENTRY_DBL s_fabs_tests[]
static

Definition at line 19 of file fabs.c.

Referenced by Test_fabs().

◆ s_fabsf_tests

TESTENTRY_FLT s_fabsf_tests[]
static
Initial value:
=
{
{ 0x7F800000 , 0x7F800000 },
{ 0x7F800001 , 0x7FC00001 },
{ 0x7FBFFFFF , 0x7FFFFFFF },
{ 0x7FC00000 , 0x7FC00000 },
{ 0x7FC00001 , 0x7FC00001 },
{ 0x7FCFFFFF , 0x7FCFFFFF },
{ 0xFF800000 , 0x7F800000 },
{ 0xFF800001 , 0xFFC00001 },
{ 0xFFBFFFFF , 0xFFFFFFFF },
{ 0xFFC00000 , 0xFFC00000 },
{ 0xFFC00001 , 0xFFC00001 },
{ 0xFFCFFFFF , 0xFFCFFFFF },
{ 0x00000000 , 0x00000000 },
{ 0x80000000 , 0x00000000 },
{ 0x01234567 , 0x01234567 },
{ 0x81234567 , 0x01234567 },
{ 0x472ad8b3 , 0x472ad8b3 },
{ 0xc72ad8b3 , 0x472ad8b3 },
{ 0x1d289e50 , 0x1d289e50 },
{ 0x9d289e50 , 0x1d289e50 },
}

Definition at line 69 of file fabs.c.

Referenced by Test_fabsf().