RFC: FLT_ROUNDS and fesetround

H.J. Lu hjl.tools@gmail.com
Sat Nov 16 05:13:00 GMT 2013


Hi,

float.h has

/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown.  */
/* ??? This is supposed to change with calls to fesetround in <fenv.h>.  */
#undef FLT_ROUNDS
#define FLT_ROUNDS 1

Clang introduces __builtin_flt_rounds and

#define FLT_ROUNDS (__builtin_flt_rounds())

I am not sure if it is the correct approach.  Is there any plan to
address this in GCC and glibc?

Thanks.

-- 
H.J.



More information about the Libc-alpha mailing list