ref: 9e41afffa65f4c42aa7e68ddb2ffcacaadaa32ed
parent: 546f0330a832eb382fe0f6197c90fd21074b5eda
author: Tor Andersson <[email protected]>
date: Fri Mar 21 11:55:04 EDT 2014
Add signbit() implementation for MSVC.
--- a/jsi.h
+++ b/jsi.h
@@ -23,6 +23,7 @@
#define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x))
#define isfinite(x) _finite(x)
+static __inline int signbit(double x) {union{double d;__int64 i;}u;u.d=x;return u.i>>63;}
#define INFINITY (DBL_MAX+DBL_MAX)
#define NAN (INFINITY-INFINITY)
#endif