Commit | Line | Data |
---|---|---|
c4665c80 TL |
1 | .TH EXP 3M |
2 | .SH NAME | |
3 | exp, log, log10, pow, sqrt \- exponential, logarithm, power, square root | |
4 | .SH SYNOPSIS | |
5 | .B #include <math.h> | |
6 | .PP | |
7 | .B double exp(x) | |
8 | .br | |
9 | .B double x; | |
10 | .PP | |
11 | .B double log(x) | |
12 | .br | |
13 | .B double x; | |
14 | .PP | |
15 | .B double log10(x) | |
16 | .br | |
17 | .B double x; | |
18 | .PP | |
19 | .B double pow(x, y) | |
20 | .br | |
21 | .B double x, y; | |
22 | .PP | |
23 | .B double sqrt(x) | |
24 | .br | |
25 | .B double x; | |
26 | .SH DESCRIPTION | |
27 | .I Exp | |
28 | returns the exponential function of | |
29 | .I x. | |
30 | .PP | |
31 | .I Log | |
32 | returns the natural logarithm of | |
33 | .IR x ; | |
34 | .I log10 | |
35 | returns the base 10 logarithm. | |
36 | .PP | |
37 | .I Pow | |
38 | returns | |
39 | .I x\u\s8y\s10\d. | |
40 | .PP | |
41 | .I Sqrt | |
42 | returns the square root of | |
43 | .I x. | |
44 | .SH SEE ALSO | |
45 | hypot(3), | |
46 | sinh(3), | |
47 | intro(2) | |
48 | .SH DIAGNOSTICS | |
49 | .I Exp | |
50 | and | |
51 | .I pow | |
52 | return a huge value when the correct value would | |
53 | overflow; | |
54 | .I errno | |
55 | is set to ERANGE. | |
56 | .I Pow | |
57 | returns 0 and sets | |
58 | .I errno | |
59 | to | |
60 | EDOM when the second argument is negative and non-integral and | |
61 | when | |
62 | both arguments are 0. | |
63 | .PP | |
64 | .I Log | |
65 | returns 0 when | |
66 | .I x | |
67 | is zero or negative; | |
68 | .I errno | |
69 | is set to EDOM. | |
70 | .PP | |
71 | .I Sqrt | |
72 | returns 0 when | |
73 | .I x | |
74 | is negative; | |
75 | .I errno | |
76 | is set to EDOM. |