Chromium Code Reviews

Unified Diff: src/rempio2.h

Issue 411263004: Implement trigonometric functions using a fdlibm port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/math.js ('k') | src/rempio2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/rempio2.h
diff --git a/src/rempio2.h b/src/rempio2.h
new file mode 100644
index 0000000000000000000000000000000000000000..554fb255c21b4cf5577dd52618b17bd223aa70e2
--- /dev/null
+++ b/src/rempio2.h
@@ -0,0 +1,36 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// ====================================================
+// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+//
+// Developed at SunSoft, a Sun Microsystems, Inc. business.
+// Permission to use, copy, modify, and distribute this
+// software is freely granted, provided that this notice
+// is preserved.
+// ====================================================
+//
+// The following is adapted from fdlibm (http://www.netlib.org/fdlibm).
+
+#ifndef V8_REMPIO2_H_
+#define V8_REMPIO2_H_
+
+namespace v8 {
+namespace internal {
+
+int rempio2(double x, double* y);
+
+// Constants to be exposed to builtins via Float64Array.
+class TrigonometricConstants : AllStatic {
+ public:
+ static void* constants() { return const_cast<double*>(constants_); }
Sven Panne 2014/07/24 10:44:21 Casting away const here looks wrong: The array its
Yang 2014/07/24 11:00:33 Done.
+ static const int kSize = 34;
+
+ private:
+ static const double constants_[kSize];
+};
+}
+} // namespace v8::internal
+
+#endif // V8_REMPIO2_H_
« no previous file with comments | « src/math.js ('k') | src/rempio2.cc » ('j') | no next file with comments »

Powered by Google App Engine