kraj/musl

`FLT_EVAL_METHOD` and `LDBL_EPSILON`

Closed this issue · 2 comments

The arch/riscv64/bits/float.h file defines:

#define FLT_EVAL_METHOD 0

And:
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L

It does not define DBL_EPSILON, which is however used in src/math/ceil.c when FLT_EVAL_METHOD is 0:

musl/src/math/ceil.c

Lines 3 to 8 in a6c4997

#if FLT_EVAL_METHOD==0 || FLT_EVAL_METHOD==1
#define EPS DBL_EPSILON
#elif FLT_EVAL_METHOD==2
#define EPS LDBL_EPSILON
#endif
static const double_t toint = 1/EPS;

Could this be a mistake?

kraj commented

I dont think its a mistake. its defined in include/float.h

I see, thanks for your feedback :)