A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ES5 Property or operator | Proposed Harony | C math.h | C99 math functions | X/Open extensions | C++ TR1 | definition | Allen Wirfs-Brock | |||||||||||||
2 | TBD | http://www.dinkumware.com/manuals/Default.aspx?manual=compleat | http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf | http://pubs.opengroup.org/onlinepubs/9699919799/ | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf | alternative names with type letters are generally not shown | 2/23/2011 | ||||||||||||||
3 | isNaN(x) | isnan(x) | |||||||||||||||||||
4 | isFinite(x) | isfinite(x) | |||||||||||||||||||
5 | isinf(x) | ||||||||||||||||||||
6 | isnormal(x) | is normalized and finite | |||||||||||||||||||
7 | isgreater(x,y) | x>y ? 1 : 0 | |||||||||||||||||||
8 | isgreaterequal(x,y) | x>=y ? 1 : 0 | |||||||||||||||||||
9 | isless(x,y) | x<y ? 1 : 0 | |||||||||||||||||||
10 | islessequal(x,y) | x<=y ? 1 : 0 | |||||||||||||||||||
11 | islessgreater(x,y) | (x<y || x>y)? 1 : 0 | |||||||||||||||||||
12 | isunordered(x,y) | (isNaN(x) || is(NaN(y))? 1 : 0 | |||||||||||||||||||
13 | Number.MAX_VALUE | ||||||||||||||||||||
14 | Number.MIN_VALUE | ||||||||||||||||||||
15 | Number.NAN | ||||||||||||||||||||
16 | Number.NEGATIVE_INFINITY | ||||||||||||||||||||
17 | Number.POSITIVE_INFINITY | ||||||||||||||||||||
18 | Math.E | M_E | |||||||||||||||||||
19 | Math.LN10 | M_LN10 | |||||||||||||||||||
20 | Math.LN2 | M_LN2 | |||||||||||||||||||
21 | Math.LOG2E | M_LOG2E | |||||||||||||||||||
22 | Math.LOG10E | M_LOG10E | |||||||||||||||||||
23 | Math.PI | M_PI | |||||||||||||||||||
24 | M_PI_2 | Not Included | pi/2 | ||||||||||||||||||
25 | M_PI_4 | pi/4 | |||||||||||||||||||
26 | M_1_PI | 1/pi | |||||||||||||||||||
27 | M_2_PI | 2/pi | |||||||||||||||||||
28 | M_2_SQRTPI | 2/sqrt(pi) | |||||||||||||||||||
29 | Math.SQRT1_2 | M_SQRT1_2 | |||||||||||||||||||
30 | Math.SQRT2 | M_SQRT2 | |||||||||||||||||||
31 | HUGE_VAL | valued return by some functions on range error | |||||||||||||||||||
32 | INFINITY | ||||||||||||||||||||
33 | NAN | ||||||||||||||||||||
34 | fpclassify(x) | returns an integer code classify x as infinite, NaN, normal, subnormal, zero | |||||||||||||||||||
35 | signbit(x) | 1 if x is negative, 0 otherwise (including NaN) | |||||||||||||||||||
36 | Math.abs(x) | fabs(x); abs(x), c++ | |||||||||||||||||||
37 | Math.acos(x) | acos(x) | |||||||||||||||||||
38 | Math.asin(x) | asin(x) | |||||||||||||||||||
39 | Math.atan(x) | atan(x) | |||||||||||||||||||
40 | Math.atan2(y,x) | atan2(y,x) | |||||||||||||||||||
41 | Math.ceil(x) | ceil(x) | |||||||||||||||||||
42 | Math.cos(x) | cos(x) | |||||||||||||||||||
43 | Math.exp(x) | exp(x) | |||||||||||||||||||
44 | Math.floor(x) | floor(x) | |||||||||||||||||||
45 | % operator | fmod(num, denom) | |||||||||||||||||||
46 | frexp(x,*exp) | extract mantissa and exponent | |||||||||||||||||||
47 | ldexp(x,exp) | x*pow(2,exp) | |||||||||||||||||||
48 | Math.log(x) | log(x) | |||||||||||||||||||
49 | log10(x) | ||||||||||||||||||||
50 | log1p(x) | log(1+x) | |||||||||||||||||||
51 | log2(x) | log2(x) | |||||||||||||||||||
52 | Math.max(v1,v2,...) | fmax(x,y) | max(x,y) | ||||||||||||||||||
53 | Math.min(v1,v2,...) | fmin(x,y) | min(x,y) | ||||||||||||||||||
54 | modf(x,*int) | decompose number into integer and fraction parts | |||||||||||||||||||
55 | Math.pow(x,y) | pow(x,y) | |||||||||||||||||||
56 | Math.random() | ||||||||||||||||||||
57 | lround(x);llround(x) | round, x.5 rounds away from zero ignoring current rounding mode; int result | ath | ||||||||||||||||||
58 | lrint(x);llring(x) | round using current rounding mode, int result | |||||||||||||||||||
59 | rint(x) | round using current mode, float result | |||||||||||||||||||
60 | Math.round(x) | round | round, x.5 rounds away from zero; float result | ||||||||||||||||||
61 | Math.sin(x) | sin(x) | |||||||||||||||||||
62 | Math.sqrt(x) | sqrt(x) | |||||||||||||||||||
63 | Math.tan(x) | tan(x) | |||||||||||||||||||
64 | coshh(x) | ||||||||||||||||||||
65 | sinh(x) | ||||||||||||||||||||
66 | tanh(x) | ||||||||||||||||||||
67 | acos(x) | ||||||||||||||||||||
68 | asinh(x) | .E | |||||||||||||||||||
69 | atanh(x) | ||||||||||||||||||||
70 | cbrt(x) | cube root | |||||||||||||||||||
71 | copysign(x,y) | set sign of x to sign of y | |||||||||||||||||||
72 | erf(x) | error function of x | |||||||||||||||||||
73 | erfc(x) | complementary error function | |||||||||||||||||||
74 | exp2(x) | power(2,x) | |||||||||||||||||||
75 | expml(x) | exp(x)-1 | |||||||||||||||||||
76 | fdim(x,y) | max(x-y,0) | |||||||||||||||||||
77 | fma(x,y,z) | (x*y)+z | |||||||||||||||||||
78 | hypot(x,y) | hypotenuse: sqrt(pow(x,2)+pow(x,2)) | |||||||||||||||||||
79 | ilogb(x); logb(x) | exponent of the floating point number | |||||||||||||||||||
80 | lgamma(x) | log(abs(gamma(X)) | |||||||||||||||||||
81 | nan(s) | create a NaN based upon string argument | |||||||||||||||||||
82 | nearbyint(x) | round to nearest integer using current founding mode, no exceptions, overflow produces HUGE_VAL | |||||||||||||||||||
83 | nextafter(x,y) | next representable value after x towards y | |||||||||||||||||||
84 | nexttowards(x,y) | same as nextafter except y is extended precision | |||||||||||||||||||
85 | remainder(x,y) | remainder as defined by iec 60559 | |||||||||||||||||||
86 | remquo(x,y,*q) | returns remainder, and stores quotent | |||||||||||||||||||
87 | scalebn(x,n);scalebln(x,n) | scalb(x,y) | x*pow(FLT_RADIX,n); n is y for scalb | ||||||||||||||||||
88 | tgamma(x) | gamma function | |||||||||||||||||||
89 | trunc(x,n) | truncate number to an integer | |||||||||||||||||||
90 | j0(x) | Bassel function of x of the first kind of order 0 | |||||||||||||||||||
91 | j1(x) | Bassel function of x of the first kind of order 1 | |||||||||||||||||||
92 | jn(n,x) | Bassel function of x of the first kind of order n | |||||||||||||||||||
93 | y0(x) | Bassel function of x of the second kind of order 0 | |||||||||||||||||||
94 | y1(x) | Bassel function of x of the second kind of order 1 | |||||||||||||||||||
95 | yn(n,x) | Bassel function of x of the second kind of order n | |||||||||||||||||||
96 | assoc_leguerre(n,m,x) | associated Laguerre polynomial | |||||||||||||||||||
97 | assoc_legendre(l,m,x) | associated Legendre polynomial | |||||||||||||||||||
98 | beta(x,y) | ||||||||||||||||||||
99 | comp_ellint_1(k) | complete elliptic integral of the first kind of k | |||||||||||||||||||
100 | comp_ellint_2(k) | complete elliptic integral of the second kind of k |