mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
296 B
19 lines
296 B
#include <float.h>
|
|
#include <fenv.h>
|
|
|
|
int __flt_rounds()
|
|
{
|
|
switch (fegetround()) {
|
|
#ifdef FE_TOWARDZERO
|
|
case FE_TOWARDZERO: return 0;
|
|
#endif
|
|
case FE_TONEAREST: return 1;
|
|
#ifdef FE_UPWARD
|
|
case FE_UPWARD: return 2;
|
|
#endif
|
|
#ifdef FE_DOWNWARD
|
|
case FE_DOWNWARD: return 3;
|
|
#endif
|
|
}
|
|
return -1;
|
|
}
|
|
|