Skip to content

Commit 7db8562

Browse files
committed
TurboPFor: Bitutil
1 parent 29e47ec commit 7db8562

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/bitutil.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#pragma warning( disable : 4068)
2828

2929
#include <math.h> //nan
30+
#define __STDC_WANT_IEC_60559_TYPES_EXT__
31+
#include <float.h> //_Float16
32+
3033
#include "include_/conf.h"
3134
#include "include_/bitutil.h"
3235

@@ -875,8 +878,7 @@ void bitzdec(unsigned char *in, unsigned n, unsigned esize) {
875878
}
876879

877880
//----------- Lossy floating point conversion: pad the trailing mantissa bits with zero bits according to the relative error e (ex. 0.00001) ----------
878-
879-
#ifndef _NFLOAT16
881+
#ifdef FLT16_MAX
880882
// https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point
881883
_Float16 _fprazor16(_Float16 d, float e, int lg2e) {
882884
uint16_t du = ctou16(&d), sign, u;

0 commit comments

Comments
 (0)