ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
fmod.c File Reference
#include <math.h>
Include dependency graph for fmod.c:

Macros

#define fmod_def(type, name, remainder_func, fabs_func)

Functions

 fmod_def (float, fmodf, remainderf, fabsf)
 fmod_def (double, fmod, remainder, fabs)
 fmod_def (long double, fmodl, remainderl, fabsl)

Macro Definition Documentation

◆ fmod_def

#define fmod_def ( type,
name,
remainder_func,
fabs_func )
Value:
type name(type x, type y) \
{ \
__ESBMC_HIDE:; \
type r = remainder_func(x, y); \
if (r != 0.0 && ((x < 0.0) != (r < 0.0))) \
r += (x < 0.0) ? -fabs_func(y) : fabs_func(y); \
return r; \
} \
\
type __##name(type x, type y) \
{ \
__ESBMC_HIDE:; \
return name(x, y); \
}

Function Documentation

◆ fmod_def() [1/3]

fmod_def ( double ,
fmod ,
remainder ,
fabs  )

◆ fmod_def() [2/3]

fmod_def ( float ,
fmodf ,
remainderf ,
fabsf  )

◆ fmod_def() [3/3]

fmod_def ( long double ,
fmodl ,
remainderl ,
fabsl  )