Chromium Code Reviews| 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_ |