ClickHouse/libs/libglibc-compatibility/musl/__math_divzerof.c
2019-08-01 06:20:54 +03:00

18 lines
349 B
C

#include <stdint.h>
/* fp_barrier returns its input, but limits code transformations
as if it had a side-effect (e.g. observable io) and returned
an arbitrary value. */
static inline float fp_barrierf(float x)
{
volatile float y = x;
return y;
}
float __math_divzerof(uint32_t sign)
{
return fp_barrierf(sign ? -1.0f : 1.0f) / 0.0f;
}