| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_BASE_IEEE754_H_ | 5 #ifndef V8_BASE_IEEE754_H_ |
| 6 #define V8_BASE_IEEE754_H_ | 6 #define V8_BASE_IEEE754_H_ |
| 7 | 7 |
| 8 #include "src/base/base-export.h" | |
| 9 | |
| 10 namespace v8 { | 8 namespace v8 { |
| 11 namespace base { | 9 namespace base { |
| 12 namespace ieee754 { | 10 namespace ieee754 { |
| 13 | 11 |
| 14 // Returns the arc cosine of |x|; that is the value whose cosine is |x|. | 12 // Returns the arc cosine of |x|; that is the value whose cosine is |x|. |
| 15 V8_BASE_EXPORT double acos(double x); | 13 double acos(double x); |
| 16 | 14 |
| 17 // Returns the inverse hyperbolic cosine of |x|; that is the value whose | 15 // Returns the inverse hyperbolic cosine of |x|; that is the value whose |
| 18 // hyperbolic cosine is |x|. | 16 // hyperbolic cosine is |x|. |
| 19 V8_BASE_EXPORT double acosh(double x); | 17 double acosh(double x); |
| 20 | 18 |
| 21 // Returns the arc sine of |x|; that is the value whose sine is |x|. | 19 // Returns the arc sine of |x|; that is the value whose sine is |x|. |
| 22 V8_BASE_EXPORT double asin(double x); | 20 double asin(double x); |
| 23 | 21 |
| 24 // Returns the inverse hyperbolic sine of |x|; that is the value whose | 22 // Returns the inverse hyperbolic sine of |x|; that is the value whose |
| 25 // hyperbolic sine is |x|. | 23 // hyperbolic sine is |x|. |
| 26 V8_BASE_EXPORT double asinh(double x); | 24 double asinh(double x); |
| 27 | 25 |
| 28 // Returns the principal value of the arc tangent of |x|; that is the value | 26 // Returns the principal value of the arc tangent of |x|; that is the value |
| 29 // whose tangent is |x|. | 27 // whose tangent is |x|. |
| 30 V8_BASE_EXPORT double atan(double x); | 28 double atan(double x); |
| 31 | 29 |
| 32 // Returns the principal value of the arc tangent of |y/x|, using the signs of | 30 // Returns the principal value of the arc tangent of |y/x|, using the signs of |
| 33 // the two arguments to determine the quadrant of the result. | 31 // the two arguments to determine the quadrant of the result. |
| 34 V8_BASE_EXPORT double atan2(double y, double x); | 32 double atan2(double y, double x); |
| 35 | 33 |
| 36 // Returns the cosine of |x|, where |x| is given in radians. | 34 // Returns the cosine of |x|, where |x| is given in radians. |
| 37 V8_BASE_EXPORT double cos(double x); | 35 double cos(double x); |
| 38 | 36 |
| 39 // Returns the base-e exponential of |x|. | 37 // Returns the base-e exponential of |x|. |
| 40 V8_BASE_EXPORT double exp(double x); | 38 double exp(double x); |
| 41 | 39 |
| 42 V8_BASE_EXPORT double atanh(double x); | 40 double atanh(double x); |
| 43 | 41 |
| 44 // Returns the natural logarithm of |x|. | 42 // Returns the natural logarithm of |x|. |
| 45 V8_BASE_EXPORT double log(double x); | 43 double log(double x); |
| 46 | 44 |
| 47 // Returns a value equivalent to |log(1+x)|, but computed in a way that is | 45 // Returns a value equivalent to |log(1+x)|, but computed in a way that is |
| 48 // accurate even if the value of |x| is near zero. | 46 // accurate even if the value of |x| is near zero. |
| 49 V8_BASE_EXPORT double log1p(double x); | 47 double log1p(double x); |
| 50 | 48 |
| 51 // Returns the base 2 logarithm of |x|. | 49 // Returns the base 2 logarithm of |x|. |
| 52 V8_BASE_EXPORT double log2(double x); | 50 double log2(double x); |
| 53 | 51 |
| 54 // Returns the base 10 logarithm of |x|. | 52 // Returns the base 10 logarithm of |x|. |
| 55 V8_BASE_EXPORT double log10(double x); | 53 double log10(double x); |
| 56 | 54 |
| 57 // Returns the cube root of |x|. | 55 // Returns the cube root of |x|. |
| 58 V8_BASE_EXPORT double cbrt(double x); | 56 double cbrt(double x); |
| 59 | 57 |
| 60 // Returns exp(x)-1, the exponential of |x| minus 1. | 58 // Returns exp(x)-1, the exponential of |x| minus 1. |
| 61 V8_BASE_EXPORT double expm1(double x); | 59 double expm1(double x); |
| 62 | 60 |
| 63 // Returns the sine of |x|, where |x| is given in radians. | 61 // Returns the sine of |x|, where |x| is given in radians. |
| 64 V8_BASE_EXPORT double sin(double x); | 62 double sin(double x); |
| 65 | 63 |
| 66 // Returns the tangent of |x|, where |x| is given in radians. | 64 // Returns the tangent of |x|, where |x| is given in radians. |
| 67 V8_BASE_EXPORT double tan(double x); | 65 double tan(double x); |
| 68 | 66 |
| 69 // Returns the hyperbolic cosine of |x|, where |x| is given radians. | 67 // Returns the hyperbolic cosine of |x|, where |x| is given radians. |
| 70 V8_BASE_EXPORT double cosh(double x); | 68 double cosh(double x); |
| 71 | 69 |
| 72 // Returns the hyperbolic sine of |x|, where |x| is given radians. | 70 // Returns the hyperbolic sine of |x|, where |x| is given radians. |
| 73 V8_BASE_EXPORT double sinh(double x); | 71 double sinh(double x); |
| 74 | 72 |
| 75 // Returns the hyperbolic tangent of |x|, where |x| is given radians. | 73 // Returns the hyperbolic tangent of |x|, where |x| is given radians. |
| 76 V8_BASE_EXPORT double tanh(double x); | 74 double tanh(double x); |
| 77 | 75 |
| 78 } // namespace ieee754 | 76 } // namespace ieee754 |
| 79 } // namespace base | 77 } // namespace base |
| 80 } // namespace v8 | 78 } // namespace v8 |
| 81 | 79 |
| 82 #endif // V8_BASE_IEEE754_H_ | 80 #endif // V8_BASE_IEEE754_H_ |
| OLD | NEW |