blob: cf335807321fde77fca98bea21c65e1e94b1d83f [file] [log] [blame]
Ben Murdoch61f157c2016-09-16 13:49:30 +01001// 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
3// found in the LICENSE file.
4
5#ifndef V8_BASE_IEEE754_H_
6#define V8_BASE_IEEE754_H_
7
8namespace v8 {
9namespace base {
10namespace ieee754 {
11
12// Returns the principal value of the arc tangent of |x|; that is the value
13// whose tangent is |x|.
14double atan(double x);
15
16// Returns the principal value of the arc tangent of |y/x|, using the signs of
17// the two arguments to determine the quadrant of the result.
18double atan2(double y, double x);
19
20// Returns the cosine of |x|, where |x| is given in radians.
21double cos(double x);
22
23// Returns the base-e exponential of |x|.
24double exp(double x);
25
26double atanh(double x);
27
28// Returns the natural logarithm of |x|.
29double log(double x);
30
31// Returns a value equivalent to |log(1+x)|, but computed in a way that is
32// accurate even if the value of |x| is near zero.
33double log1p(double x);
34
35// Returns the base 2 logarithm of |x|.
36double log2(double x);
37
38// Returns the base 10 logarithm of |x|.
39double log10(double x);
40
41// Returns the cube root of |x|.
42double cbrt(double x);
43
44// Returns exp(x)-1, the exponential of |x| minus 1.
45double expm1(double x);
46
47// Returns the sine of |x|, where |x| is given in radians.
48double sin(double x);
49
50// Returns the tangent of |x|, where |x| is given in radians.
51double tan(double x);
52
53} // namespace ieee754
54} // namespace base
55} // namespace v8
56
57#endif // V8_BASE_IEEE754_H_