| Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 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) | 
 | 19 | enum { | 
 | 20 |   FP_NAN, | 
 | 21 |   FP_INFINITE, | 
 | 22 |   FP_ZERO, | 
 | 23 |   FP_SUBNORMAL, | 
 | 24 |   FP_NORMAL | 
 | 25 | }; | 
 | 26 |  | 
 | 27 |  | 
 | 28 | namespace std { | 
 | 29 |  | 
 | 30 | int isfinite(double x); | 
 | 31 | int isinf(double x); | 
 | 32 | int isnan(double x); | 
 | 33 | int isless(double x, double y); | 
 | 34 | int isgreater(double x, double y); | 
 | 35 | int fpclassify(double x); | 
 | 36 | int signbit(double x); | 
 | 37 |  | 
 | 38 | }  // namespace std | 
 | 39 |  | 
 | 40 | #endif  // _MSC_VER < 1800 | 
 | 41 |  | 
 | 42 | #endif  // V8_BASE_WIN32_MATH_H_ |