1 <!DOCTYPE HTML PUBLIC
"-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
7 <link rev=
"owner" href=
"mailto:scs@eskimo.com">
8 <link rev=
"made" href=
"mailto:scs@eskimo.com">
9 <title>section
7.8.6: Mathematical Functions
</title>
10 <link href=
"sx10l.html" rev=precedes
>
11 <link href=
"sx10n.html" rel=precedes
>
12 <link href=
"sx10.html" rev=subdocument
>
15 <H2>section
7.8.6: Mathematical Functions
</H2>
17 <p>Note that the
<TT>pow
</TT> function is how you do
18 exponentiation in C--C does not have a built-in
19 exponentiation operator
20 (such as
<TT>**
</TT> or
<TT>^
</TT> in some other languages).
21 </p><p>Before calling these functions,
22 remember to
<TT>#include
<math.h
></TT>.
23 (It's always a good idea to
<TT>#include
</TT> the appropriate
24 header(s) before using any library functions,
25 but the math functions are particularly unlikely to work
26 correctly if you forget.)
29 you may have to explicitly request the math library
30 by adding the
<TT>-lm
</TT> option at the end of the command line
31 when compiling/linking.
35 <a href=
"sx10l.html" rev=precedes
>prev
</a>
36 <a href=
"sx10n.html" rel=precedes
>next
</a>
37 <a href=
"sx10.html" rev=subdocument
>up
</a>
38 <a href=
"top.html">top
</a>
41 This page by
<a href=
"http://www.eskimo.com/~scs/">Steve Summit
</a>
42 //
<a href=
"copyright.html">Copyright
</a> 1995,
1996
43 //
<a href=
"mailto:scs@eskimo.com">mail feedback
</a>