Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: src/win32-math.cc

Issue 14362023: Replace math.h with cmath (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/win32-math.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/win32-math.cc
diff --git a/src/win32-math.cc b/src/win32-math.cc
index 3410872bb5a4554e83ca56b1a86612aa4fabe608..9ffc4ea73bd77a4c44d0148c25ae8421610aea5f 100644
--- a/src/win32-math.cc
+++ b/src/win32-math.cc
@@ -35,21 +35,14 @@
#define V8_WIN32_HEADERS_FULL
#include "win32-headers.h"
#include <limits.h> // Required for INT_MAX etc.
-#include <math.h>
#include <float.h> // Required for DBL_MAX and on Win32 for finite()
+#include <cmath>
#include "win32-math.h"
#include "checks.h"
-namespace v8 {
-
-// Test for finite value - usually defined in math.h
-int isfinite(double x) {
- return _finite(x);
-}
-
-} // namespace v8
+namespace std {
// Test for a NaN (not a number) value - usually defined in math.h
int isnan(double x) {
@@ -63,6 +56,12 @@ int isinf(double x) {
}
+// Test for finite value - usually defined in math.h
+int isfinite(double x) {
+ return _finite(x);
+}
+
+
// Test if x is less than y and both nominal - usually defined in math.h
int isless(double x, double y) {
return isnan(x) || isnan(y) ? 0 : x < y;
@@ -103,4 +102,6 @@ int signbit(double x) {
return x < 0;
}
+} // namespace std
+
#endif // _MSC_VER
« no previous file with comments | « src/win32-math.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698