mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
18 lines
349 B
C
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;
|
|
}
|