/usr/include/vowpalwabbit/floatbits.h is in libvw-dev 8.5.0.dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /*
Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved. Released under a BSD
license as described in the file LICENSE.
*/
#pragma once
#include <stdint.h>
static inline uint32_t float_to_bits(float a)
{ union { float f; uint32_t i; } x;
x.f = a;
return x.i;
}
static inline float bits_to_float(uint32_t a)
{ union { float f; uint32_t i; } x;
x.i = a;
return x.f;
}
|