Embedded Artistry Framework
Embedded Systems C++ Framework
Macros | Functions | Variables
s_rintl.c File Reference
#include "cdefs-compat.h"
#include <float.h>
#include <openlibm_fenv.h>
#include <openlibm_math.h>
#include "fpmath.h"
#include "math_private.h"
Include dependency graph for s_rintl.c:

Macros

#define BIAS   (LDBL_MAX_EXP - 1)
 
#define DECL(type, fn, rint)
 

Functions

OLM_DLLEXPORT long double rintl (long double x)
 

Variables

static const float shift [2]
 
static const float zero [2] = { 0.0, -0.0 }
 

Macro Definition Documentation

◆ BIAS

#define BIAS   (LDBL_MAX_EXP - 1)

◆ DECL

#define DECL (   type,
  fn,
  rint 
)
Value:
fn(type x) \
{ \
type ret; \
fenv_t env; \
fegetenv(&env); \
ret = rint(x); \
fesetenv(&env); \
return (ret); \
}
OLM_DLLEXPORT double rint(double)
Definition: s_rint.c:38
#define type
Definition: s_llrint.c:4
#define OLM_DLLEXPORT
Definition: openlibm_math.h:43
int fegetenv(fenv_t *__envp)
Definition: fenv.c:87
#define fn
Definition: s_llrint.c:7

Function Documentation

◆ rintl()

OLM_DLLEXPORT long double rintl ( long double  x)

References BIAS, LDBL_MANT_DIG, LDBL_MAX_EXP, shift, u, and zero.

Referenced by tgammal().

Here is the caller graph for this function:

Variable Documentation

◆ shift

const float shift[2]
static
Initial value:
= {
0x1.0p63, -0x1.0p63
}

Referenced by rintl().

◆ zero

const float zero[2] = { 0.0, -0.0 }
static

Referenced by rintl().