1// Copyright 2011 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// Extra POSIX/ANSI routines for Win32 when using Visual Studio C++. Please 6// refer to The Open Group Base Specification for specification of the correct 7// semantics for these functions. 8// (http://www.opengroup.org/onlinepubs/000095399/) 9 10#ifndef V8_BASE_WIN32_MATH_H_ 11#define V8_BASE_WIN32_MATH_H_ 12 13#ifndef _MSC_VER 14#error Wrong environment, expected MSVC. 15#endif // _MSC_VER 16 17// MSVC 2013+ provides implementations of all standard math functions. 18#if (_MSC_VER < 1800) 19enum { 20 FP_NAN, 21 FP_INFINITE, 22 FP_ZERO, 23 FP_SUBNORMAL, 24 FP_NORMAL 25}; 26 27 28namespace std { 29 30int isfinite(double x); 31int isinf(double x); 32int isnan(double x); 33int isless(double x, double y); 34int isgreater(double x, double y); 35int fpclassify(double x); 36int signbit(double x); 37 38} // namespace std 39 40#endif // _MSC_VER < 1800 41 42#endif // V8_BASE_WIN32_MATH_H_ 43