home *** CD-ROM | disk | FTP | other *** search
- <TITLE>math -- Python library reference</TITLE>
- Next: <A HREF="../r/rand" TYPE="Next">rand</A>
- Prev: <A HREF="../m/miscellaneous_services" TYPE="Prev">Miscellaneous Services</A>
- Up: <A HREF="../m/miscellaneous_services" TYPE="Up">Miscellaneous Services</A>
- Top: <A HREF="../t/top" TYPE="Top">Top</A>
- <H1>5.1. Built-in Module <CODE>math</CODE></H1>
- This module is always available.
- It provides access to the mathematical functions defined by the C
- standard.
- They are:
- <DL><DT><B>acos</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>asin</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>atan</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>atan2</B> (<VAR>x</VAR>, <VAR>y</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>ceil</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>cos</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>cosh</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>exp</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>fabs</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>floor</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>fmod</B> (<VAR>x</VAR>, <VAR>y</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>frexp</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>hypot</B> (<VAR>x</VAR>, <VAR>y</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>ldexp</B> (<VAR>x</VAR>, <VAR>y</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>log</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>log10</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>modf</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>pow</B> (<VAR>x</VAR>, <VAR>y</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>sin</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>sinh</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>sqrt</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>tan</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- <DL><DT><B>tanh</B> (<VAR>x</VAR>) -- function of module math<DD>
- </DL>
- Note that <CODE>frexp</CODE> and <CODE>modf</CODE> have a different call/return
- pattern than their C equivalents: they take a single argument and
- return a pair of values, rather than returning their second return
- value through an `output parameter' (there is no such thing in Python).
- <P>
- The module also defines two mathematical constants:
- <DL><DT><B>pi</B> -- data of module math<DD>
- </DL>
- <DL><DT><B>e</B> -- data of module math<DD>
- </DL>
-